The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/i386/include/i4b_ioctl.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
    3  *
    4  * Redistribution and use in source and binary forms, with or without
    5  * modification, are permitted provided that the following conditions
    6  * are met:
    7  * 1. Redistributions of source code must retain the above copyright
    8  *    notice, this list of conditions and the following disclaimer.
    9  * 2. Redistributions in binary form must reproduce the above copyright
   10  *    notice, this list of conditions and the following disclaimer in the
   11  *    documentation and/or other materials provided with the distribution.
   12  *
   13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   16  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   17  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   19  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   20  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   22  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   23  * SUCH DAMAGE.
   24  *
   25  *---------------------------------------------------------------------------
   26  *
   27  *      i4b_ioctl.h - messages kernel <--> userland
   28  *      -------------------------------------------
   29  *
   30  * $FreeBSD$ 
   31  *
   32  *      last edit-date: [Fri Jul 30 08:53:47 1999]
   33  *
   34  *---------------------------------------------------------------------------*/
   35 
   36 #ifndef _I4B_IOCTL_H_
   37 #define _I4B_IOCTL_H_
   38 
   39 #if defined(__FreeBSD__) && __FreeBSD__ >= 3
   40 #ifndef _MACHINE_TYPES_H_
   41 #include <machine/types.h>
   42 #endif /* _MACHINE_TYPES_H_ */
   43 #endif /* __FreeBSD__ */
   44 
   45 /*---------------------------------------------------------------------------*
   46  *      version and release number for isdn4bsd package
   47  *---------------------------------------------------------------------------*/
   48 #define VERSION         0               /* version number       */
   49 #define REL             83              /* release number       */
   50 #define STEP            0               /* release step         */
   51 
   52 /*---------------------------------------------------------------------------*
   53  * date/time format in i4b log messages
   54  * ------------------------------------
   55  * Being year 2000 clean is not easy with the current state of the
   56  * ANSI C library standard and it's implementation for some locales.
   57  * You might like to use the "%c" format of "strftime" sometimes,
   58  * but this breaks Y2K in some locales. Also the old standard logfile
   59  * format "%d.%m.%y %H:%M:%S" is non compliant.
   60  * NetBSD's current toolset warns about this problems, and we compile
   61  * with -Werror, so this problems need to be resolved.
   62  *---------------------------------------------------------------------------*/
   63 #define I4B_TIME_FORMAT "%d.%m.%Y %H:%M:%S"
   64 
   65 /*---------------------------------------------------------------------------*
   66  *      max number of controllers in system
   67  *---------------------------------------------------------------------------*/
   68 #define MAX_CONTROLLERS 8               /* max number of controllers    */
   69 
   70 /*---------------------------------------------------------------------------*
   71  *      controller types
   72  *---------------------------------------------------------------------------*/
   73 #define CTRL_INVALID    (-1)            /* invalid, error               */
   74 #define CTRL_UNKNOWN    0               /* unknown controller type      */
   75 #define CTRL_PASSIVE    1               /* passive ISDN controller cards*/
   76 #define CTRL_DAIC       2               /* Diehl active controller cards*/
   77 #define CTRL_TINADD     3               /* Stollmann Tina-dd active card*/
   78 #define CTRL_AVMB1      4               /* AVM B1 active card           */
   79 #define CTRL_NUMTYPES   5               /* number of controller types   */
   80 
   81 /*---------------------------------------------------------------------------*
   82  *      card types for CTRL_PASSIVE 
   83  *---------------------------------------------------------------------------*/
   84 #define CARD_TYPEP_INVAL        (-1)    /* invalid, error               */
   85 #define CARD_TYPEP_UNK          0       /* unknown                      */
   86 #define CARD_TYPEP_8            1       /* Teles, S0/8                  */
   87 #define CARD_TYPEP_16           2       /* Teles, S0/16                 */
   88 #define CARD_TYPEP_16_3         3       /* Teles, S0/16.3               */
   89 #define CARD_TYPEP_AVMA1        4       /* AVM A1 or AVM Fritz!Card     */
   90 #define CARD_TYPEP_163P         5       /* Teles, S0/16.3 PnP           */
   91 #define CARD_TYPEP_CS0P         6       /* Creatix, S0 PnP              */
   92 #define CARD_TYPEP_USRTA        7       /* US Robotics ISDN TA internal */
   93 #define CARD_TYPEP_DRNNGO       8       /* Dr. Neuhaus Niccy GO@        */
   94 #define CARD_TYPEP_SWS          9       /* Sedlbauer Win Speed          */
   95 #define CARD_TYPEP_DYNALINK     10      /* Dynalink IS64PH              */
   96 #define CARD_TYPEP_BLMASTER     11      /* ISDN Blaster / ISDN Master   */
   97 #define CARD_TYPEP_PCFRITZ      12      /* AVM PCMCIA Fritz!Card        */
   98 #define CARD_TYPEP_ELSAQS1ISA   13      /* ELSA QuickStep 1000pro ISA   */
   99 #define CARD_TYPEP_ELSAQS1PCI   14      /* ELSA QuickStep 1000pro PCI   */
  100 #define CARD_TYPEP_SIEMENSITALK 15      /* Siemens I-Talk               */
  101 #define CARD_TYPEP_ELSAMLIMC    16      /* ELSA MicroLink ISDN/MC       */
  102 #define CARD_TYPEP_ELSAMLMCALL  17      /* ELSA MicroLink MCall         */
  103 #define CARD_TYPEP_ITKIX1       18      /* ITK ix1 micro                */
  104 #define CARD_TYPEP_AVMA1PCI     19      /* AVM FRITZ!CARD PCI           */
  105 #define CARD_TYPEP_PCC16        20      /* ELSA PCC-16                  */
  106 #define CARD_TYPEP_AVM_PNP      21      /* AVM FRITZ!CARD PnP           */
  107 #define CARD_TYPEP_SIE_ISURF2   22      /* Siemens I-Surf 2 PnP         */
  108 #define CARD_TYPEP_ASUSCOMIPAC  23      /* Asuscom ISDNlink 128 K PnP   */
  109 /*
  110  * in case you add support for more cards, please update:
  111  *
  112  *      isdnd:          support.c, name_of_controller()
  113  *      diehl/diehlctl: main.c, listall()
  114  *
  115  * and adjust CARD_TYPEP_MAX below.
  116  */
  117 
  118 #define CARD_TYPEP_MAX          23      /* max type */
  119 
  120 /*---------------------------------------------------------------------------*
  121  *      card types for CTRL_DAIC
  122  *---------------------------------------------------------------------------*/
  123 #define CARD_TYPEA_DAIC_UNK     0
  124 #define CARD_TYPEA_DAIC_S       1
  125 #define CARD_TYPEA_DAIC_SX      2
  126 #define CARD_TYPEA_DAIC_SCOM    3
  127 #define CARD_TYPEA_DAIC_QUAD    4
  128 
  129 /*---------------------------------------------------------------------------*
  130  *      max length of some strings
  131  *---------------------------------------------------------------------------*/
  132 #define TELNO_MAX       41  /* max length of a telephone number (+ '\0')  */
  133 #define DISPLAY_MAX     91  /* max length of display information (+ '\0') */
  134 #define DATETIME_MAX    21  /* max length of datetime information (+ '\0')*/
  135 
  136 /*---------------------------------------------------------------------------*
  137  *      in case the src or dst telephone number is empty
  138  *---------------------------------------------------------------------------*/
  139 #define TELNO_EMPTY     "NotAvailable"  
  140 
  141 /*---------------------------------------------------------------------------*
  142  *      B channel parameters
  143  *---------------------------------------------------------------------------*/
  144 #define BCH_MAX_DATALEN 2048    /* max length of a B channel frame */
  145 
  146 /*---------------------------------------------------------------------------*
  147  * userland driver types
  148  * ---------------------
  149  * a "driver" is defined here as a piece of software interfacing an 
  150  * ISDN B channel with a userland service, such as IP, Telephony etc.
  151  *---------------------------------------------------------------------------*/
  152 #define BDRV_RBCH       0       /* raw b-channel interface driver       */
  153 #define BDRV_TEL        1       /* telephone (speech) interface driver  */
  154 #define BDRV_IPR        2       /* IP over raw HDLC interface driver    */
  155 #define BDRV_ISPPP      3       /* sync Kernel PPP interface driver     */
  156 #define BDRV_IBC        4       /* BSD/OS point to point driver         */
  157 
  158 /*---------------------------------------------------------------------------*
  159  * B channel protocol
  160  *---------------------------------------------------------------------------*/
  161 #define BPROT_NONE      0       /* no protocol at all, raw data         */
  162 #define BPROT_RHDLC     1       /* raw HDLC: flag, data, crc, flag      */
  163 
  164 /*---------------------------------------------------------------------------*
  165  * causes data type
  166  *---------------------------------------------------------------------------*/
  167 typedef unsigned int cause_t;           /* 32 bit unsigned int  */
  168 
  169 /*---------------------------------------------------------------------------*
  170  * call descriptor id (cdid) definitions
  171  *---------------------------------------------------------------------------*/
  172 #define CDID_UNUSED     0       /* cdid is invalid and unused           */
  173 #define CDID_MAX        99999   /* highest valid cdid, wraparound to 1  */
  174 
  175 /*---------------------------------------------------------------------------*
  176  *      The shorthold algorithm to use
  177  *---------------------------------------------------------------------------*/
  178 #define SHA_FIXU        0    /* timeout algorithm for fix unit charging */
  179 #define SHA_VARU        1    /* timeout algorithm for variable unit charging */
  180 
  181 /*---------------------------------------------------------------------------*
  182  *      The shorthold data struct
  183  *---------------------------------------------------------------------------*/
  184 typedef struct {
  185         int     shorthold_algorithm;    /* shorthold algorithm to use   */
  186         int     unitlen_time;           /* length of a charging unit    */
  187         int     idle_time;              /* time without activity on b ch*/
  188         int     earlyhup_time;          /* safety area at end of unit   */
  189 } msg_shorthold_t;
  190 
  191 
  192 /****************************************************************************
  193 
  194         outgoing call:
  195         --------------
  196 
  197                 userland                kernel
  198                 --------                ------
  199 
  200                 CDID_REQ ----------------->
  201 
  202                     <------------------ cdid
  203         
  204                 CONNECT_REQ -------------->
  205 
  206                     <------------------ PROCEEDING_IND (if connect req ok)
  207 
  208                     <------------------ CONNECT_ACTIVE_IND (if connection ok)
  209 
  210                 or
  211 
  212                     <------------------ DISCONNECT_IND (if connection failed)
  213                     
  214                 
  215 
  216         incoming call:
  217         --------------
  218 
  219                 userland                kernel
  220                 --------                ------
  221 
  222                     <------------------ CONNECT_IND
  223 
  224                 CONNECT_RESP ------------->
  225 
  226                     <------------------ CONNECT_ACTIVE_IND (if accepted)
  227 
  228 
  229 
  230         active disconnect:
  231         ------------------
  232 
  233                 userland                kernel
  234                 --------                ------
  235 
  236                 DISCONNECT_REQ ------------>
  237 
  238                     <------------------ DISCONNECT_IND
  239                     
  240 
  241         passive disconnect:
  242         -------------------
  243 
  244                 userland                kernel
  245                 --------                ------
  246 
  247                     <------------------ DISCONNECT_IND
  248                     
  249 
  250 ****************************************************************************/
  251 
  252 
  253 /*===========================================================================*
  254  *===========================================================================*
  255  *      "read" messages from kernel -> userland
  256  *===========================================================================* 
  257  *===========================================================================*/
  258 
  259  
  260 /*---------------------------------------------------------------------------*
  261  *      message header, included in every message
  262  *---------------------------------------------------------------------------*/
  263 typedef struct {
  264         char            type;           /* message identifier           */
  265 #define MSG_CONNECT_IND         'a'
  266 #define MSG_CONNECT_ACTIVE_IND  'b'
  267 #define MSG_DISCONNECT_IND      'c'
  268 #define MSG_DIALOUT_IND         'd'
  269 #define MSG_IDLE_TIMEOUT_IND    'e'
  270 #define MSG_ACCT_IND            'f'
  271 #define MSG_CHARGING_IND        'g'
  272 #define MSG_PROCEEDING_IND      'h'
  273 #define MSG_ALERT_IND           'i'
  274 #define MSG_DRVRDISC_REQ        'j'
  275 #define MSG_L12STAT_IND         'k'
  276 #define MSG_TEIASG_IND          'l'
  277 #define MSG_PDEACT_IND          'm'
  278 #define MSG_NEGCOMP_IND         'n'
  279 #define MSG_IFSTATE_CHANGED_IND 'o'
  280 #define MSG_DIALOUTNUMBER_IND   'p'
  281         int             cdid;           /* call descriptor id           */
  282 } msg_hdr_t;
  283 
  284 /*---------------------------------------------------------------------------*
  285  *      connect indication
  286  *              indicates incoming connection
  287  *---------------------------------------------------------------------------*/
  288 typedef struct {
  289         msg_hdr_t       header;         /* common header                */
  290         int             controller;     /* controller number            */
  291         int             channel;        /* channel number               */
  292 #define  CHAN_B1  0             /* this _must_ be 0, HSCX B1 is also 0  */
  293 #define  CHAN_B2  1             /* this _must_ be 1, HSCX B2 is also 1  */
  294 #define  CHAN_ANY (-1)          /* outgoing, not possible for incoming  */
  295 #define  CHAN_NO  (-2)          /* call waiting (CW) for incoming       */
  296         int             bprot;  /* b channel protocot, see BPROT_XXX    */
  297         char            dst_telno[TELNO_MAX];   /* destination telno    */
  298         char            src_telno[TELNO_MAX];   /* source telno         */
  299         int             scr_ind;/* screening indicator                  */
  300 #define  SCR_NONE     0         /* no screening indicator transmitted   */
  301 #define  SCR_USR_NOSC 1         /* screening user provided, not screened*/
  302 #define  SCR_USR_PASS 2         /* screening user provided, verified & passed */
  303 #define  SCR_USR_FAIL 3         /* screening user provided, verified & failed */
  304 #define  SCR_NET      4         /* screening network provided           */
  305         char            display[DISPLAY_MAX];   /* content of display IE*/
  306 } msg_connect_ind_t;
  307 
  308 /*---------------------------------------------------------------------------*
  309  *      connect active indication
  310  *              indicates active connection
  311  *---------------------------------------------------------------------------*/
  312 typedef struct {
  313         msg_hdr_t       header;         /* common header                   */
  314         int             controller;     /* controller number actually used */
  315         int             channel;        /* channel number actually used    */
  316         char            datetime[DATETIME_MAX]; /* content of date/time IE */
  317 } msg_connect_active_ind_t;
  318 
  319 /*---------------------------------------------------------------------------*
  320  *      disconnect indication
  321  *              indicates a disconnect
  322  *---------------------------------------------------------------------------*/
  323 typedef struct {
  324         msg_hdr_t       header;         /* common header        */
  325         cause_t         cause;          /* cause code           */
  326 } msg_disconnect_ind_t;
  327 
  328 /*---------------------------------------------------------------------------*
  329  *      negotiation complete
  330  *              indicates an interface is completely up & running
  331  *---------------------------------------------------------------------------*/
  332 typedef struct {
  333         msg_hdr_t       header;         /* common header        */
  334 } msg_negcomplete_ind_t;
  335 
  336 /*---------------------------------------------------------------------------*
  337  *      interface changes internal state
  338  *              indicates an interface has somehow switched its FSM
  339  *---------------------------------------------------------------------------*/
  340 typedef struct {
  341         msg_hdr_t       header;         /* common header        */
  342         int state;                      /* new interface state */
  343 } msg_ifstatechg_ind_t;
  344 
  345 /*---------------------------------------------------------------------------*
  346  *      initiate a call to a remote site
  347  *              i.e. the IP driver got a packet and wants a connection
  348  *---------------------------------------------------------------------------*/
  349 typedef struct {
  350         msg_hdr_t       header;         /* common header        */
  351         int             driver;         /* driver type          */
  352         int             driver_unit;    /* driver unit number   */
  353 } msg_dialout_ind_t;
  354 
  355 /*---------------------------------------------------------------------------*
  356  *      dial a number
  357  *---------------------------------------------------------------------------*/
  358 typedef struct {
  359         msg_hdr_t       header;         /* common header        */
  360         int             driver;         /* driver type          */
  361         int             driver_unit;    /* driver unit number   */
  362         int             cmdlen;         /* length of string     */
  363         char            cmd[TELNO_MAX]; /* the number to dial   */      
  364 } msg_dialoutnumber_ind_t;
  365 
  366 /*---------------------------------------------------------------------------*
  367  *      idle timeout disconnect sent indication
  368  *              kernel has sent disconnect request because of b-ch idle
  369  *---------------------------------------------------------------------------*/
  370 typedef struct {
  371         msg_hdr_t       header;         /* common header        */
  372 } msg_idle_timeout_ind_t;
  373 
  374 /*---------------------------------------------------------------------------*
  375  *      accounting information from userland interface driver to daemon
  376  *---------------------------------------------------------------------------*/
  377 typedef struct {
  378         msg_hdr_t       header;         /* common header                */
  379         int             accttype;       /* accounting type              */
  380 #define  ACCT_DURING 0
  381 #define  ACCT_FINAL  1
  382         int             driver;         /* driver type                  */
  383         int             driver_unit;    /* driver unit number           */
  384         int             ioutbytes;      /* ISDN # of bytes sent         */
  385         int             iinbytes;       /* ISDN # of bytes received     */
  386         int             outbps;         /* bytes per sec out            */
  387         int             inbps;          /* bytes per sec in             */
  388         int             outbytes;       /* driver # of bytes sent       */
  389         int             inbytes;        /* driver # of bytes received   */
  390 } msg_accounting_ind_t;
  391 
  392 /*---------------------------------------------------------------------------*
  393  *      charging information from isdn driver to daemon
  394  *---------------------------------------------------------------------------*/
  395 typedef struct {
  396         msg_hdr_t       header;         /* common header                */
  397         int             units;          /* number of units              */
  398         int             units_type;     /* type of units info           */
  399 #define  CHARGE_INVALID 0       /* invalid, unknown */
  400 #define  CHARGE_AOCD    1       /* advice of charge during call */
  401 #define  CHARGE_AOCE    2       /* advice of charge at end of call */
  402 #define  CHARGE_CALC    3       /* locally calculated from rates information */
  403 } msg_charging_ind_t;
  404 
  405 /*---------------------------------------------------------------------------*
  406  *      call proceeding indication
  407  *              indicates outgoing SETUP has been acknowleged
  408  *---------------------------------------------------------------------------*/
  409 typedef struct {
  410         msg_hdr_t       header;         /* common header                   */
  411         int             controller;     /* controller number actually used */
  412         int             channel;        /* channel number actually used    */
  413 } msg_proceeding_ind_t;
  414 
  415 /*---------------------------------------------------------------------------*
  416  *      alert indication
  417  *              indicates remote user side "rings"
  418  *---------------------------------------------------------------------------*/
  419 typedef struct {
  420         msg_hdr_t       header;         /* common header                   */
  421 } msg_alert_ind_t;
  422 
  423 /*---------------------------------------------------------------------------*
  424  *      driver requests to disconnect line
  425  *---------------------------------------------------------------------------*/
  426 typedef struct {
  427         msg_hdr_t       header;         /* common header        */
  428         int             driver;         /* driver type          */
  429         int             driver_unit;    /* driver unit number   */
  430 } msg_drvrdisc_req_t;
  431 
  432 /*---------------------------------------------------------------------------*
  433  *      state of layer 1/2
  434  *---------------------------------------------------------------------------*/
  435 typedef struct {
  436         msg_hdr_t       header;         /* common header        */
  437         int             controller;     /* controller unit      */
  438         int             layer;          /* layer number (1/2)   */
  439 #define LAYER_ONE       1
  440 #define LAYER_TWO       2
  441         int             state;          /* state info           */
  442 #define LAYER_IDLE      0
  443 #define LAYER_ACTIVE    1
  444 } msg_l12stat_ind_t;
  445 
  446 /*---------------------------------------------------------------------------*
  447  *      TEI assignment messages
  448  *---------------------------------------------------------------------------*/
  449 typedef struct {
  450         msg_hdr_t       header;         /* common header        */
  451         int             controller;     /* controller unit      */
  452         int             tei;            /* TEI or -1 if invalid */
  453 } msg_teiasg_ind_t;
  454 
  455 /*---------------------------------------------------------------------------*
  456  *      persistent deactivation state of stack
  457  *---------------------------------------------------------------------------*/
  458 typedef struct {
  459         msg_hdr_t       header;         /* common header        */
  460         int             controller;     /* controller unit      */
  461         int             numactive;      /* number of active connections */
  462 } msg_pdeact_ind_t;
  463 
  464 
  465 /*===========================================================================*
  466  *===========================================================================*
  467  *      "ioctl" messages from userland -> kernel
  468  *===========================================================================* 
  469  *===========================================================================*/
  470 
  471 /*---------------------------------------------------------------------------*
  472  *      request a unique cdid (to setup an outgoing call)
  473  *---------------------------------------------------------------------------*/
  474 typedef struct {
  475         int             cdid;                   /* call descriptor id   */
  476 } msg_cdid_req_t;
  477  
  478 #define I4B_CDID_REQ            _IOWR('4', 0, int)
  479 
  480 /*---------------------------------------------------------------------------*
  481  *      connect request
  482  *              requests an outgoing connection
  483  *---------------------------------------------------------------------------*/
  484 typedef struct {
  485         int             cdid;           /* call descriptor id                */
  486         int             controller;     /* controller to use                 */
  487         int             channel;        /* channel to use                    */
  488         int             txdelay;        /* tx delay after connect            */
  489         int             bprot;          /* b channel protocol                */
  490         int             driver;         /* driver to route b channel data to */
  491         int             driver_unit;    /*      unit number for above driver */
  492         msg_shorthold_t shorthold_data; /* the shorthold data                */
  493         int             unitlen_method; /* how to calculate the unitlength   */
  494 #define  ULEN_METHOD_STATIC  0  /* use unitlen_time value (see above) */
  495 #define  ULEN_METHOD_DYNAMIC 1  /* use AOCD */  
  496         char            dst_telno[TELNO_MAX];   /* destination telephone no  */
  497         char            src_telno[TELNO_MAX];   /* source telephone number   */
  498 } msg_connect_req_t;
  499 
  500 #define I4B_CONNECT_REQ _IOW('4', 1, msg_connect_req_t)
  501 
  502 /*---------------------------------------------------------------------------*
  503  *      connect response
  504  *              this is the answer to an incoming connect indication
  505  *---------------------------------------------------------------------------*/
  506 typedef struct {
  507         int     cdid;           /* call descriptor id                   */
  508         int     response;       /* what to do with incoming call        */
  509 #define  SETUP_RESP_DNTCRE 0    /* dont care, call is not for me        */
  510 #define  SETUP_RESP_REJECT 1    /* reject call                          */
  511 #define  SETUP_RESP_ACCEPT 2    /* accept call                          */
  512         cause_t cause;          /* cause for case SETUP_RESP_REJECT     */
  513                 /* the following are only used for SETUP_RESP_ACCEPT !! */
  514         int     txdelay;        /* tx delay after connect               */
  515         int     bprot;          /* B chan protocol                      */
  516         int     driver;         /* driver to route b channel data to    */
  517         int     driver_unit;    /*      unit number for above driver    */
  518         int     max_idle_time;  /* max time without activity on b ch    */      
  519 } msg_connect_resp_t;
  520         
  521 #define I4B_CONNECT_RESP        _IOW('4', 2, msg_connect_resp_t)
  522 
  523 /*---------------------------------------------------------------------------*
  524  *      disconnect request
  525  *              active disconnect request
  526  *---------------------------------------------------------------------------*/
  527 typedef struct {
  528         int     cdid;           /* call descriptor id                   */
  529         cause_t cause;          /* protocol independent cause           */
  530 } msg_discon_req_t;
  531         
  532 #define I4B_DISCONNECT_REQ      _IOW('4', 3, msg_discon_req_t)
  533 
  534 /*---------------------------------------------------------------------------*
  535  *      controller info request
  536  *---------------------------------------------------------------------------*/
  537 typedef struct {
  538         int     controller;     /* controller number                    */
  539         int     ncontroller;    /* number of controllers in system      */
  540         int     ctrl_type;      /* controller type passive/active       */
  541         int     card_type;      /* brand / version                      */
  542         int     tei;            /* tei controller probably has          */
  543 } msg_ctrl_info_req_t;
  544         
  545 #define I4B_CTRL_INFO_REQ       _IOWR('4', 4, msg_ctrl_info_req_t)
  546 
  547 /*---------------------------------------------------------------------------*
  548  *      dialout response
  549  *              status report to driver who requested a dialout
  550  *---------------------------------------------------------------------------*/
  551 typedef struct {
  552         int             driver;         /* driver to route b channel data to */
  553         int             driver_unit;    /*      unit number for above driver */
  554         int             stat;           /* state of dialout request          */
  555 #define  DSTAT_NONE     0
  556 #define  DSTAT_TFAIL    1               /* transient failure */
  557 #define  DSTAT_PFAIL    2               /* permanent failure */
  558 #define  DSTAT_INONLY   3               /* no outgoing dials allowed */
  559         cause_t         cause;          /* exact i4b cause */
  560 } msg_dialout_resp_t;
  561 
  562 #define I4B_DIALOUT_RESP        _IOW('4', 5, msg_dialout_resp_t)
  563         
  564 /*---------------------------------------------------------------------------*
  565  *      timeout value update
  566  *---------------------------------------------------------------------------*/
  567 typedef struct {
  568         int     cdid;           /* call descriptor id                   */
  569         msg_shorthold_t shorthold_data;
  570 } msg_timeout_upd_t;
  571         
  572 #define I4B_TIMEOUT_UPD         _IOW('4', 6, msg_timeout_upd_t)
  573 
  574 /*---------------------------------------------------------------------------*
  575  *      soft enable/disable
  576  *---------------------------------------------------------------------------*/
  577 typedef struct {
  578         int             driver;         /* driver to route b channel data to */
  579         int             driver_unit;    /*      unit number for above driver */
  580         int             updown;         /* what to do                        */
  581 #define  SOFT_ENA       0       /* enable interface */
  582 #define  SOFT_DIS       1       /* disable interface */
  583 } msg_updown_ind_t;
  584 
  585 #define I4B_UPDOWN_IND          _IOW('4', 7, msg_updown_ind_t)
  586 
  587 /*---------------------------------------------------------------------------*
  588  *      send alert request
  589  *---------------------------------------------------------------------------*/
  590 typedef struct {
  591         int     cdid;           /* call descriptor id                   */
  592 } msg_alert_req_t;
  593         
  594 #define I4B_ALERT_REQ           _IOW('4', 8, msg_alert_req_t)
  595 
  596 /*---------------------------------------------------------------------------*
  597  *      request version and release info from kernel part
  598  *      (msg_vr_req_t is also used by tel & rbch drivers)
  599  *---------------------------------------------------------------------------*/
  600 typedef struct {
  601         int     version;        /* version number */
  602         int     release;        /* release number */
  603         int     step;           /* release step number */       
  604 } msg_vr_req_t;
  605 
  606 #define I4B_VR_REQ              _IOR('4', 9, msg_vr_req_t)
  607 
  608 /*---------------------------------------------------------------------------*
  609  *      Protocol download to active cards
  610  *---------------------------------------------------------------------------*/
  611 struct isdn_dr_prot {
  612         size_t bytecount;       /* length of code */
  613         u_int8_t *microcode;    /* pointer to microcode */
  614 };
  615 
  616 struct isdn_download_request {
  617         int controller;         /* controller number */
  618         int numprotos;          /* number of protocols in 'protocols' */
  619         struct isdn_dr_prot *protocols;
  620 };
  621 
  622 #define I4B_CTRL_DOWNLOAD       _IOW('4', 100, struct isdn_download_request)
  623 
  624 /*---------------------------------------------------------------------------*
  625  *      Generic diagnostic interface for active cards
  626  *---------------------------------------------------------------------------*/
  627 struct isdn_diagnostic_request {
  628         int controller;         /* controller number */
  629         u_int32_t cmd;          /* diagnostic command to execute */
  630         size_t in_param_len;    /* length of additional input parameter */
  631         void *in_param;         /* optional input parameter */
  632         size_t out_param_len;   /* available output space */
  633         void *out_param;        /* output data goes here */
  634 };
  635 
  636 #define I4B_ACTIVE_DIAGNOSTIC   _IOW('4', 102, struct isdn_diagnostic_request)
  637 
  638 #endif /* _I4B_IOCTL_H_ */

Cache object: e113a269096f884df7fffc10ff047d90


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.