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/netisdn/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, 2000 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  *      $Id: i4b_ioctl.h,v 1.10 2005/02/26 22:39:49 perry Exp $
   31  *
   32  * $FreeBSD$
   33  *
   34  *      last edit-date: [Tue Oct 10 15:30:55 2000]
   35  *
   36  *---------------------------------------------------------------------------*/
   37 
   38 #ifndef _I4B_IOCTL_H_
   39 #define _I4B_IOCTL_H_
   40 
   41 #if defined(__FreeBSD__) && __FreeBSD__ >= 3
   42 #ifndef _MACHINE_TYPES_H_
   43 #include <machine/types.h>
   44 #endif /* _MACHINE_TYPES_H_ */
   45 #endif /* __FreeBSD__ */
   46 
   47 /*---------------------------------------------------------------------------*
   48  *      version and release number for isdn4bsd package
   49  *---------------------------------------------------------------------------*/
   50 #define VERSION         0               /* version number       */
   51 #define REL             96              /* release number       */
   52 #define STEP            00              /* release step         */
   53 
   54 /*---------------------------------------------------------------------------*
   55  * date/time format in i4b log messages
   56  * ------------------------------------
   57  * Being year 2000 clean is not easy with the current state of the
   58  * ANSI C library standard and it's implementation for some locales.
   59  * You might like to use the "%c" format of "strftime" sometimes,
   60  * but this breaks Y2K in some locales. Also the old standard logfile
   61  * format "%d.%m.%y %H:%M:%S" is non compliant.
   62  * NetBSD's current toolset warns about this problems, and we compile
   63  * with -Werror, so this problems need to be resolved.
   64  *---------------------------------------------------------------------------*/
   65 #define I4B_TIME_FORMAT "%d.%m.%Y %H:%M:%S"
   66 
   67 /*---------------------------------------------------------------------------*
   68  *      ISDN D-channel protocols
   69  *---------------------------------------------------------------------------*/
   70 #define PROTOCOL_DSS1   0               /* default, Euro-ISDN/DSS1 */
   71 #define PROTOCOL_D64S   1               /* 64k leased line, no protocol */
   72 
   73 /*---------------------------------------------------------------------------*
   74  *      max length of some strings
   75  *---------------------------------------------------------------------------*/
   76 #define TELNO_MAX       41  /* max length of a telephone number (+ '\0')  */
   77 #define SUBADDR_MAX     22  /* max length of subaddres IE                 */
   78 #define DISPLAY_MAX     91  /* max length of display information (+ '\0') */
   79 #define DATETIME_MAX    21  /* max length of datetime information (+ '\0')*/
   80 
   81 /*---------------------------------------------------------------------------*
   82  *      in case the src or dst telephone number is empty
   83  *---------------------------------------------------------------------------*/
   84 #define TELNO_EMPTY     "NotAvailable"
   85 
   86 /*---------------------------------------------------------------------------*
   87  *      B channel parameters
   88  *---------------------------------------------------------------------------*/
   89 #define BCH_MAX_DATALEN 2048    /* max length of a B channel frame */
   90 
   91 /*---------------------------------------------------------------------------*
   92  * B channel protocol
   93  *---------------------------------------------------------------------------*/
   94 #define BPROT_NONE      0       /* no protocol at all, raw data         */
   95 #define BPROT_RHDLC     1       /* raw HDLC: flag, data, crc, flag      */
   96 
   97 /*---------------------------------------------------------------------------*
   98  * causes data type
   99  *---------------------------------------------------------------------------*/
  100 typedef unsigned int cause_t;           /* 32 bit unsigned int  */
  101 
  102 /*---------------------------------------------------------------------------*
  103  * call descriptor id (cdid) definitions
  104  *---------------------------------------------------------------------------*/
  105 #define CDID_UNUSED     0       /* cdid is invalid and unused           */
  106 #define CDID_MAX        99999   /* highest valid cdid, wraparound to 1  */
  107 
  108 /*---------------------------------------------------------------------------*
  109  *      The shorthold algorithm to use
  110  *---------------------------------------------------------------------------*/
  111 #define SHA_FIXU        0    /* timeout algorithm for fix unit charging */
  112 #define SHA_VARU        1    /* timeout algorithm for variable unit charging */
  113 
  114 /*---------------------------------------------------------------------------*
  115  *      The shorthold data struct
  116  *---------------------------------------------------------------------------*/
  117 typedef struct {
  118         int     shorthold_algorithm;    /* shorthold algorithm to use   */
  119         int     unitlen_time;           /* length of a charging unit    */
  120         int     idle_time;              /* time without activity on b ch*/
  121         int     earlyhup_time;          /* safety area at end of unit   */
  122 } msg_shorthold_t;
  123 
  124 
  125 /****************************************************************************
  126 
  127         outgoing call:
  128         --------------
  129 
  130                 userland                kernel
  131                 --------                ------
  132 
  133                 CDID_REQ ----------------->
  134 
  135                     <------------------ cdid
  136 
  137                 CONNECT_REQ -------------->
  138 
  139                     <------------------ PROCEEDING_IND (if connect req ok)
  140 
  141                     <------------------ CONNECT_ACTIVE_IND (if connection ok)
  142 
  143                 or
  144 
  145                     <------------------ DISCONNECT_IND (if connection failed)
  146 
  147 
  148 
  149         incoming call:
  150         --------------
  151 
  152                 userland                kernel
  153                 --------                ------
  154 
  155                     <------------------ CONNECT_IND
  156 
  157                 CONNECT_RESP ------------->
  158 
  159                     <------------------ CONNECT_ACTIVE_IND (if accepted)
  160 
  161 
  162 
  163         active disconnect:
  164         ------------------
  165 
  166                 userland                kernel
  167                 --------                ------
  168 
  169                 DISCONNECT_REQ ------------>
  170 
  171                     <------------------ DISCONNECT_IND
  172 
  173 
  174         passive disconnect:
  175         -------------------
  176 
  177                 userland                kernel
  178                 --------                ------
  179 
  180                     <------------------ DISCONNECT_IND
  181 
  182 
  183 ****************************************************************************/
  184 
  185 
  186 /*===========================================================================*
  187  *===========================================================================*
  188  *      "read" messages from kernel -> userland
  189  *===========================================================================*
  190  *===========================================================================*/
  191 
  192 
  193 /*---------------------------------------------------------------------------*
  194  *      message header, included in every message
  195  *---------------------------------------------------------------------------*/
  196 typedef struct {
  197         char            type;           /* message identifier           */
  198 #define MSG_CONNECT_IND         'a'
  199 #define MSG_CONNECT_ACTIVE_IND  'b'
  200 #define MSG_DISCONNECT_IND      'c'
  201 #define MSG_DIALOUT_IND         'd'
  202 #define MSG_IDLE_TIMEOUT_IND    'e'
  203 #define MSG_ACCT_IND            'f'
  204 #define MSG_CHARGING_IND        'g'
  205 #define MSG_PROCEEDING_IND      'h'
  206 #define MSG_ALERT_IND           'i'
  207 #define MSG_DRVRDISC_REQ        'j'
  208 #define MSG_L12STAT_IND         'k'
  209 #define MSG_TEIASG_IND          'l'
  210 #define MSG_PDEACT_IND          'm'
  211 #define MSG_NEGCOMP_IND         'n'
  212 #define MSG_IFSTATE_CHANGED_IND 'o'
  213 #define MSG_DIALOUTNUMBER_IND   'p'
  214 #define MSG_PACKET_IND          'q'
  215 #define MSG_CONTR_EV_IND        'r'
  216         int             cdid;           /* call descriptor id           */
  217 } msg_hdr_t;
  218 
  219 /*---------------------------------------------------------------------------*
  220  *      connect indication
  221  *              indicates incoming connection
  222  *---------------------------------------------------------------------------*/
  223 typedef struct {
  224         msg_hdr_t       header;         /* common header                */
  225         int             controller;     /* controller number            */
  226         int             channel;        /* channel number               */
  227 #define  CHAN_B1  0             /* this _must_ be 0, HSCX B1 is also 0  */
  228 #define  CHAN_B2  1             /* this _must_ be 1, HSCX B2 is also 1  */
  229 #define  CHAN_ANY (-1)          /* outgoing, not possible for incoming  */
  230 #define  CHAN_NO  (-2)          /* call waiting (CW) for incoming       */
  231         int             bprot;  /* b channel protocot, see BPROT_XXX    */
  232         char            dst_telno[TELNO_MAX];   /* destination telno    */
  233         char            src_telno[TELNO_MAX];   /* source telno         */
  234         int             scr_ind;/* screening indicator                  */
  235 #define  SCR_NONE     0         /* no screening indicator transmitted   */
  236 #define  SCR_USR_NOSC 1         /* screening user provided, not screened*/
  237 #define  SCR_USR_PASS 2         /* screening user provided, verified & passed */
  238 #define  SCR_USR_FAIL 3         /* screening user provided, verified & failed */
  239 #define  SCR_NET      4         /* screening network provided           */
  240         int             prs_ind;/* presentation indicator               */
  241 #define  PRS_NONE     0         /* no presentation indicator transmitted*/
  242 #define  PRS_ALLOWED  1         /* presentation allowed                 */
  243 #define  PRS_RESTRICT 2         /* presentation restricted              */
  244 #define  PRS_NNINTERW 3         /* number not available due to interworking */
  245 #define  PRS_RESERVED 4         /* reserved                             */
  246         char            display[DISPLAY_MAX];   /* content of display IE*/
  247         u_int8_t        src_subaddr[SUBADDR_MAX];
  248         u_int8_t        dest_subaddr[SUBADDR_MAX];
  249         u_int8_t        type_plan;
  250 } msg_connect_ind_t;
  251 
  252 /*---------------------------------------------------------------------------*
  253  *      connect active indication
  254  *              indicates active connection
  255  *---------------------------------------------------------------------------*/
  256 typedef struct {
  257         msg_hdr_t       header;         /* common header                   */
  258         int             controller;     /* controller number actually used */
  259         int             channel;        /* channel number actually used    */
  260         char            datetime[DATETIME_MAX]; /* content of date/time IE */
  261 } msg_connect_active_ind_t;
  262 
  263 /*---------------------------------------------------------------------------*
  264  *      disconnect indication
  265  *              indicates a disconnect
  266  *---------------------------------------------------------------------------*/
  267 typedef struct {
  268         msg_hdr_t       header;         /* common header        */
  269         cause_t         cause;          /* cause code           */
  270 } msg_disconnect_ind_t;
  271 
  272 /*---------------------------------------------------------------------------*
  273  *      negotiation complete
  274  *              indicates an interface is completely up & running
  275  *---------------------------------------------------------------------------*/
  276 typedef struct {
  277         msg_hdr_t       header;         /* common header        */
  278 } msg_negcomplete_ind_t;
  279 
  280 /*---------------------------------------------------------------------------*
  281  *      interface changes internal state
  282  *              indicates an interface has somehow switched its FSM
  283  *---------------------------------------------------------------------------*/
  284 typedef struct {
  285         msg_hdr_t       header;         /* common header        */
  286         int state;                      /* new interface state */
  287 } msg_ifstatechg_ind_t;
  288 
  289 /*---------------------------------------------------------------------------*
  290  *      initiate a call to a remote site
  291  *              i.e. the IP driver got a packet and wants a connection
  292  *---------------------------------------------------------------------------*/
  293 typedef struct {
  294         msg_hdr_t       header;         /* common header        */
  295         int             driver;         /* driver type          */
  296         int             driver_unit;    /* driver unit number   */
  297 } msg_dialout_ind_t;
  298 
  299 /*---------------------------------------------------------------------------*
  300  *      dial a number
  301  *---------------------------------------------------------------------------*/
  302 typedef struct {
  303         msg_hdr_t       header;         /* common header        */
  304         int             driver;         /* driver type          */
  305         int             driver_unit;    /* driver unit number   */
  306         int             cmdlen;         /* length of string     */
  307         char            cmd[TELNO_MAX]; /* the number to dial   */
  308 } msg_dialoutnumber_ind_t;
  309 
  310 /*---------------------------------------------------------------------------*
  311  *      idle timeout disconnect sent indication
  312  *              kernel has sent disconnect request because of b-ch idle
  313  *---------------------------------------------------------------------------*/
  314 typedef struct {
  315         msg_hdr_t       header;         /* common header        */
  316 } msg_idle_timeout_ind_t;
  317 
  318 /*---------------------------------------------------------------------------*
  319  *      accounting information from userland interface driver to daemon
  320  *---------------------------------------------------------------------------*/
  321 typedef struct {
  322         msg_hdr_t       header;         /* common header                */
  323         int             accttype;       /* accounting type              */
  324 #define  ACCT_DURING 0
  325 #define  ACCT_FINAL  1
  326         int             ioutbytes;      /* ISDN # of bytes sent         */
  327         int             iinbytes;       /* ISDN # of bytes received     */
  328         int             outbps;         /* bytes per sec out            */
  329         int             inbps;          /* bytes per sec in             */
  330         int             outbytes;       /* driver # of bytes sent       */
  331         int             inbytes;        /* driver # of bytes received   */
  332 } msg_accounting_ind_t;
  333 
  334 /*---------------------------------------------------------------------------*
  335  *      charging information from isdn driver to daemon
  336  *---------------------------------------------------------------------------*/
  337 typedef struct {
  338         msg_hdr_t       header;         /* common header                */
  339         int             units;          /* number of units              */
  340         int             units_type;     /* type of units info           */
  341 #define  CHARGE_INVALID 0       /* invalid, unknown */
  342 #define  CHARGE_AOCD    1       /* advice of charge during call */
  343 #define  CHARGE_AOCE    2       /* advice of charge at end of call */
  344 #define  CHARGE_CALC    3       /* locally calculated from rates information */
  345 } msg_charging_ind_t;
  346 
  347 /*---------------------------------------------------------------------------*
  348  *      call proceeding indication
  349  *              indicates outgoing SETUP has been acknowleged
  350  *---------------------------------------------------------------------------*/
  351 typedef struct {
  352         msg_hdr_t       header;         /* common header                   */
  353         int             controller;     /* controller number actually used */
  354         int             channel;        /* channel number actually used    */
  355 } msg_proceeding_ind_t;
  356 
  357 /*---------------------------------------------------------------------------*
  358  *      alert indication
  359  *              indicates remote user side "rings"
  360  *---------------------------------------------------------------------------*/
  361 typedef struct {
  362         msg_hdr_t       header;         /* common header                   */
  363 } msg_alert_ind_t;
  364 
  365 /*---------------------------------------------------------------------------*
  366  *      driver requests to disconnect line
  367  *---------------------------------------------------------------------------*/
  368 typedef struct {
  369         msg_hdr_t       header;         /* common header        */
  370 } msg_drvrdisc_req_t;
  371 
  372 /*---------------------------------------------------------------------------*
  373  *      connect packet logging
  374  *---------------------------------------------------------------------------*/
  375 
  376 typedef struct {
  377         msg_hdr_t       header;         /* common header        */
  378         int             driver;         /* driver type          */
  379         int             driver_unit;    /* driver unit number   */
  380         int             direction;      /* 0=in 1=out           */
  381 #define DIRECTION_IN    0               /* sending packet to remote     */
  382 #define DIRECTION_OUT   1               /* received packet from remote  */
  383 #define MAX_PACKET_LOG  40              /* space for IP and TCP header  */
  384         u_int8_t        pktdata[MAX_PACKET_LOG];
  385 } msg_packet_ind_t;
  386 
  387 /*---------------------------------------------------------------------------*
  388  *      state of layer 1/2
  389  *---------------------------------------------------------------------------*/
  390 typedef struct {
  391         msg_hdr_t       header;         /* common header        */
  392         int             controller;     /* controller unit      */
  393         int             layer;          /* layer number (1/2)   */
  394 #define LAYER_ONE       1
  395 #define LAYER_TWO       2
  396         int             state;          /* state info           */
  397 #define LAYER_IDLE      0
  398 #define LAYER_ACTIVE    1
  399 } msg_l12stat_ind_t;
  400 
  401 /*---------------------------------------------------------------------------*
  402  *      TEI assignment messages
  403  *---------------------------------------------------------------------------*/
  404 typedef struct {
  405         msg_hdr_t       header;         /* common header        */
  406         int             controller;     /* controller unit      */
  407         int             tei;            /* TEI or -1 if invalid */
  408 } msg_teiasg_ind_t;
  409 
  410 /*---------------------------------------------------------------------------*
  411  *      persistent deactivation state of stack
  412  *---------------------------------------------------------------------------*/
  413 typedef struct {
  414         msg_hdr_t       header;         /* common header        */
  415         int             controller;     /* controller unit      */
  416         int             numactive;      /* number of active connections */
  417 } msg_pdeact_ind_t;
  418 
  419 /*---------------------------------------------------------------------------*
  420  *      connect indication
  421  *              indicates incoming connection
  422  *---------------------------------------------------------------------------*/
  423 typedef struct {
  424         msg_hdr_t       header;         /* common header                */
  425         int             controller;     /* controller number            */
  426         int             event;
  427 #define CTRL_EV_IND_DETACH      0
  428 #define CTRL_EV_IND_ATTACH      1
  429 } msg_ctrl_ev_ind_t;
  430 
  431 /*===========================================================================*
  432  *===========================================================================*
  433  *      "ioctl" messages from userland -> kernel
  434  *===========================================================================*
  435  *===========================================================================*/
  436 
  437 /*---------------------------------------------------------------------------*
  438  *      request a unique cdid (to setup an outgoing call)
  439  *---------------------------------------------------------------------------*/
  440 typedef struct {
  441         int             cdid;                   /* call descriptor id   */
  442 } msg_cdid_req_t;
  443 
  444 #define I4B_CDID_REQ            _IOWR('4', 0, int)
  445 
  446 /*---------------------------------------------------------------------------*
  447  *      connect request
  448  *              requests an outgoing connection
  449  *---------------------------------------------------------------------------*/
  450 typedef struct {
  451         int             cdid;           /* call descriptor id                */
  452         int             controller;     /* controller to use                 */
  453         int             channel;        /* channel to use                    */
  454         int             txdelay;        /* tx delay after connect            */
  455         int             bprot;          /* b channel protocol                */
  456         int             driver;         /* driver to route b channel data to */
  457         int             driver_unit;    /*      unit number for above driver */
  458         msg_shorthold_t shorthold_data; /* the shorthold data                */
  459         int             unitlen_method; /* how to calculate the unitlength   */
  460 #define  ULEN_METHOD_STATIC  0  /* use unitlen_time value (see above) */
  461 #define  ULEN_METHOD_DYNAMIC 1  /* use AOCD */
  462         char            dst_telno[TELNO_MAX];   /* destination telephone no  */
  463         char            src_telno[TELNO_MAX];   /* source telephone number   */
  464 } msg_connect_req_t;
  465 
  466 #define I4B_CONNECT_REQ _IOW('4', 1, msg_connect_req_t)
  467 
  468 /*---------------------------------------------------------------------------*
  469  *      connect response
  470  *              this is the answer to an incoming connect indication
  471  *---------------------------------------------------------------------------*/
  472 typedef struct {
  473         int     cdid;           /* call descriptor id                   */
  474         int     response;       /* what to do with incoming call        */
  475 #define  SETUP_RESP_DNTCRE 0    /* dont care, call is not for me        */
  476 #define  SETUP_RESP_REJECT 1    /* reject call                          */
  477 #define  SETUP_RESP_ACCEPT 2    /* accept call                          */
  478         cause_t cause;          /* cause for case SETUP_RESP_REJECT     */
  479                 /* the following are only used for SETUP_RESP_ACCEPT !! */
  480         int     txdelay;        /* tx delay after connect               */
  481         int     bprot;          /* B chan protocol                      */
  482         int     driver;         /* driver to route b channel data to    */
  483         int     driver_unit;    /*      unit number for above driver    */
  484         int     max_idle_time;  /* max time without activity on b ch    */
  485 } msg_connect_resp_t;
  486 
  487 #define I4B_CONNECT_RESP        _IOW('4', 2, msg_connect_resp_t)
  488 
  489 /*---------------------------------------------------------------------------*
  490  *      disconnect request
  491  *              active disconnect request
  492  *---------------------------------------------------------------------------*/
  493 typedef struct {
  494         int     cdid;           /* call descriptor id                   */
  495         cause_t cause;          /* protocol independent cause           */
  496 } msg_discon_req_t;
  497 
  498 #define I4B_DISCONNECT_REQ      _IOW('4', 3, msg_discon_req_t)
  499 
  500 /*---------------------------------------------------------------------------*
  501  *      controller info request
  502  *---------------------------------------------------------------------------*/
  503 typedef struct {
  504         int     controller;     /* controller number                    */
  505         int     ncontroller;    /* number of controllers in system      */
  506         int     max_isdnif;     /* highest available ISDN interface num */
  507         int     tei;            /* tei controller probably has          */
  508         char    devname[64];    /* autoconfig device name, i.e. "isic0" */
  509         char    cardname[80];   /* human readable brand / version       */
  510         int     nbch;           /* number of b channels provided        */
  511 } msg_ctrl_info_req_t;
  512 
  513 #define I4B_CTRL_INFO_REQ       _IOWR('4', 4, msg_ctrl_info_req_t)
  514 
  515 /*---------------------------------------------------------------------------*
  516  *      dialout response
  517  *              status report to driver who requested a dialout
  518  *---------------------------------------------------------------------------*/
  519 typedef struct {
  520         int             driver;         /* driver to route b channel data to */
  521         int             driver_unit;    /*      unit number for above driver */
  522         int             stat;           /* state of dialout request          */
  523 #define  DSTAT_NONE     0
  524 #define  DSTAT_TFAIL    1               /* transient failure */
  525 #define  DSTAT_PFAIL    2               /* permanent failure */
  526 #define  DSTAT_INONLY   3               /* no outgoing dials allowed */
  527         cause_t         cause;          /* exact i4b cause */
  528 } msg_dialout_resp_t;
  529 
  530 #define I4B_DIALOUT_RESP        _IOW('4', 5, msg_dialout_resp_t)
  531 
  532 /*---------------------------------------------------------------------------*
  533  *      timeout value update
  534  *---------------------------------------------------------------------------*/
  535 typedef struct {
  536         int     cdid;           /* call descriptor id                   */
  537         msg_shorthold_t shorthold_data;
  538 } msg_timeout_upd_t;
  539 
  540 #define I4B_TIMEOUT_UPD         _IOW('4', 6, msg_timeout_upd_t)
  541 
  542 /*---------------------------------------------------------------------------*
  543  *      soft enable/disable
  544  *---------------------------------------------------------------------------*/
  545 typedef struct {
  546         int             driver;         /* driver to route b channel data to */
  547         int             driver_unit;    /*      unit number for above driver */
  548         int             updown;         /* what to do                        */
  549 #define  SOFT_ENA       0       /* enable interface */
  550 #define  SOFT_DIS       1       /* disable interface */
  551 } msg_updown_ind_t;
  552 
  553 #define I4B_UPDOWN_IND          _IOW('4', 7, msg_updown_ind_t)
  554 
  555 /*---------------------------------------------------------------------------*
  556  *      send alert request
  557  *---------------------------------------------------------------------------*/
  558 typedef struct {
  559         int     cdid;           /* call descriptor id                   */
  560 } msg_alert_req_t;
  561 
  562 #define I4B_ALERT_REQ           _IOW('4', 8, msg_alert_req_t)
  563 
  564 /*---------------------------------------------------------------------------*
  565  *      request version and release info from kernel part
  566  *      (msg_vr_req_t is also used by tel & rbch drivers)
  567  *---------------------------------------------------------------------------*/
  568 typedef struct {
  569         int     version;        /* version number */
  570         int     release;        /* release number */
  571         int     step;           /* release step number */
  572 } msg_vr_req_t;
  573 
  574 #define I4B_VR_REQ              _IOR('4', 9, msg_vr_req_t)
  575 
  576 /*---------------------------------------------------------------------------*
  577  *      set ISDN protocol used by a controller
  578  *---------------------------------------------------------------------------*/
  579 typedef struct {
  580         int     controller;     /* controller number            */
  581         int     protocol;       /* ISDN D-channel protocol type */
  582 } msg_prot_ind_t;
  583 
  584 #define I4B_PROT_IND            _IOW('4', 10, msg_prot_ind_t)
  585 
  586 /*---------------------------------------------------------------------------*
  587  *      Query the identifier for a B channel driver
  588  *---------------------------------------------------------------------------*/
  589 #define L4DRIVER_NAME_SIZ       16
  590 typedef struct {
  591         char name[L4DRIVER_NAME_SIZ];   /* lookup this driver */
  592         int  driver_id;                 /* returned driver id */
  593 } msg_l4driver_lookup_t;
  594 
  595 #define I4B_L4DRIVER_LOOKUP     _IOWR('4', 11, msg_l4driver_lookup_t)
  596 
  597 /*---------------------------------------------------------------------------*
  598  *      Protocol download to active cards
  599  *---------------------------------------------------------------------------*/
  600 struct isdn_dr_prot {
  601         size_t bytecount;       /* length of code */
  602         u_int8_t *microcode;    /* pointer to microcode */
  603 };
  604 
  605 struct isdn_download_request {
  606         int controller;         /* controller number */
  607         int numprotos;          /* number of protocols in 'protocols' */
  608         struct isdn_dr_prot *protocols;
  609 };
  610 
  611 #define I4B_CTRL_DOWNLOAD       _IOW('4', 100, struct isdn_download_request)
  612 
  613 /*---------------------------------------------------------------------------*
  614  *      Generic diagnostic interface for active cards
  615  *---------------------------------------------------------------------------*/
  616 struct isdn_diagnostic_request {
  617         int controller;         /* controller number */
  618         u_int32_t cmd;          /* diagnostic command to execute */
  619         size_t in_param_len;    /* length of additional input parameter */
  620 #define I4B_ACTIVE_DIAGNOSTIC_MAXPARAMLEN       65536
  621         void *in_param;         /* optional input parameter */
  622         size_t out_param_len;   /* available output space */
  623         void *out_param;        /* output data goes here */
  624 };
  625 
  626 #define I4B_ACTIVE_DIAGNOSTIC   _IOW('4', 102, struct isdn_diagnostic_request)
  627 
  628 #endif /* _I4B_IOCTL_H_ */

Cache object: ccfc0d0c118f56f77bb2a2b6ee00d064


[ 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.