OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [before_ORP/] [uclinux/] [uClinux-2.0.x/] [Documentation/] [isdn/] [INTERFACE] - Diff between revs 901 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 901 Rev 1765
$Id: INTERFACE,v 1.1.1.1 2001-09-10 07:44:09 simons Exp $
$Id: INTERFACE,v 1.1.1.1 2001-09-10 07:44:09 simons Exp $
Description of the Interface between Linklevel and Hardwarelevel
Description of the Interface between Linklevel and Hardwarelevel
  of isdn4linux:
  of isdn4linux:
  The Communication between Linklevel (LL) and Hardwarelevel (HL)
  The Communication between Linklevel (LL) and Hardwarelevel (HL)
  is based on the struct isdn_if (defined in isdnif.h).
  is based on the struct isdn_if (defined in isdnif.h).
  An HL-driver can register itself at LL by calling the function
  An HL-driver can register itself at LL by calling the function
  register_isdn() with a pointer to that struct. Prior to that, it has
  register_isdn() with a pointer to that struct. Prior to that, it has
  to preset some of the fields of isdn_if. The LL sets the rest of
  to preset some of the fields of isdn_if. The LL sets the rest of
  the fields. All further communication is done via callbacks using
  the fields. All further communication is done via callbacks using
  the function-pointers defined in isdn_if.
  the function-pointers defined in isdn_if.
  Changes/Version numbering:
  Changes/Version numbering:
  During development of the ISDN subsystem, several changes have been
  During development of the ISDN subsystem, several changes have been
  made to the interface. Before it went into kernel, the package
  made to the interface. Before it went into kernel, the package
  had a unique version number. The last version, distributed separately
  had a unique version number. The last version, distributed separately
  was 0.7.4. When the subsystem went into kernel, every functional unit
  was 0.7.4. When the subsystem went into kernel, every functional unit
  got a separate version number. These numbers are shown at initialization,
  got a separate version number. These numbers are shown at initialization,
  separated by slashes:
  separated by slashes:
     c.c/t.t/n.n/p.p/a.a
     c.c/t.t/n.n/p.p/a.a
  where
  where
   c.c is the revision of the common code.
   c.c is the revision of the common code.
   t.t is the revision of the tty related code.
   t.t is the revision of the tty related code.
   n.n is the revision of the network related code.
   n.n is the revision of the network related code.
   p.p is the revision of the ppp related code.
   p.p is the revision of the ppp related code.
   a.a is the revision of the audio related code.
   a.a is the revision of the audio related code.
  Changes in this document are marked with '***CHANGEx' where x representing
  Changes in this document are marked with '***CHANGEx' where x representing
  the version number. If that number starts with 0, it refers to the old,
  the version number. If that number starts with 0, it refers to the old,
  separately distributed package. If it starts with one of the letters
  separately distributed package. If it starts with one of the letters
  above, it refers to the revision of the corresponding module.
  above, it refers to the revision of the corresponding module.
1. Description of the fields of isdn_if:
1. Description of the fields of isdn_if:
  int channels;
  int channels;
    This field has to be set by the HL-driver to the number of channels
    This field has to be set by the HL-driver to the number of channels
    supported prior to calling register_isdn(). Upon return of the call,
    supported prior to calling register_isdn(). Upon return of the call,
    the LL puts an id there, which has to be used by the HL-driver when
    the LL puts an id there, which has to be used by the HL-driver when
    invoking the other callbacks.
    invoking the other callbacks.
  int maxbufsize;
  int maxbufsize;
    ***CHANGE0.6: New since this version.
    ***CHANGE0.6: New since this version.
    Also to be preset by the HL-driver. With this value the HL-driver
    Also to be preset by the HL-driver. With this value the HL-driver
    tells to the LL the maximum size of a data-packet it will accept.
    tells to the LL the maximum size of a data-packet it will accept.
  unsigned long features;
  unsigned long features;
    To be preset by the HL-driver. Using this field, the HL-driver
    To be preset by the HL-driver. Using this field, the HL-driver
    announces the features supported. At the moment this is limited to
    announces the features supported. At the moment this is limited to
    report the supported layer2 and layer3-protocols. For setting this
    report the supported layer2 and layer3-protocols. For setting this
    field the constants ISDN_FEATURE..., declared in isdnif.h have to be
    field the constants ISDN_FEATURE..., declared in isdnif.h have to be
    used.
    used.
    ***CHANGE0.7.1: The line type (1TR6, EDSS1) has to be set.
    ***CHANGE0.7.1: The line type (1TR6, EDSS1) has to be set.
  unsigned short hl_hdrlen;
  unsigned short hl_hdrlen;
    ***CHANGED.7.4: New field.
    ***CHANGED.7.4: New field.
    To be preset by the HL-driver, if it supports sk_buff's. The driver
    To be preset by the HL-driver, if it supports sk_buff's. The driver
    should put here the amount of additional space needed in sk-buff's for
    should put here the amount of additional space needed in sk-buff's for
    its internal purposes. Drivers not supporting sk_buff's should put
    its internal purposes. Drivers not supporting sk_buff's should put
    initialize this field to 0.
    initialize this field to 0.
  void (*rcvcallb)(int, int, u_char*, int);
  void (*rcvcallb)(int, int, u_char*, int);
    ***CHANGEc1.14: Declared obsolete. Do NOT use this field/function
    ***CHANGEc1.14: Declared obsolete. Do NOT use this field/function
                    anymore, since it will be removed when all current
                    anymore, since it will be removed when all current
                    LL drivers have been changed accordingly. Use
                    LL drivers have been changed accordingly. Use
                    rcvcallb_skb instead.
                    rcvcallb_skb instead.
    This field will be set by LL. The HL-driver delivers received data-
    This field will be set by LL. The HL-driver delivers received data-
    packets by calling this function.
    packets by calling this function.
    Parameter:
    Parameter:
      int    driver-Id
      int    driver-Id
      int    Channel-number locally to the driver. (starting with 0)
      int    Channel-number locally to the driver. (starting with 0)
      u_char Pointer to received data. (in kernel-space)
      u_char Pointer to received data. (in kernel-space)
      int    length of data-packet.
      int    length of data-packet.
  void (*rcvcallb_skb)(int, int, struct sk_buff *)
  void (*rcvcallb_skb)(int, int, struct sk_buff *)
    ***CHANGED.7.4: New field.
    ***CHANGED.7.4: New field.
    This field will be set by LL. The HL-driver delivers received data-
    This field will be set by LL. The HL-driver delivers received data-
    packets by calling this function. Upon calling, the HL-driver must
    packets by calling this function. Upon calling, the HL-driver must
    already have its private data pulled off the head of the sk_buff.
    already have its private data pulled off the head of the sk_buff.
    Parameter:
    Parameter:
      int              driver-Id
      int              driver-Id
      int              Channel-number locally to the driver. (starting with 0)
      int              Channel-number locally to the driver. (starting with 0)
      struct sk_buff * Pointer to sk_buff, containing received data.
      struct sk_buff * Pointer to sk_buff, containing received data.
  int (*statcallb)(isdn_ctrl*);
  int (*statcallb)(isdn_ctrl*);
    This field will be set by LL. This function has to be called by the
    This field will be set by LL. This function has to be called by the
    HL-driver for signaling status-changes or other events to the LL.
    HL-driver for signaling status-changes or other events to the LL.
    Parameter:
    Parameter:
      isdn_ctrl*
      isdn_ctrl*
      The struct isdn_ctrl also defined in isdn_if. The exact meanings of its
      The struct isdn_ctrl also defined in isdn_if. The exact meanings of its
      fields are described together with the descriptions of the possible
      fields are described together with the descriptions of the possible
      events. Here is only a short description of the fields:
      events. Here is only a short description of the fields:
        driver  = driver Id.
        driver  = driver Id.
        command = event-type. (one of the constants ISDN_STAT_...)
        command = event-type. (one of the constants ISDN_STAT_...)
        arg     = depends on event-type.
        arg     = depends on event-type.
        num     = depends on event-type.
        num     = depends on event-type.
    Returnvalue:
    Returnvalue:
      0 on success, else -1
      0 on success, else -1
  int (*command)(isdn_ctrl*);
  int (*command)(isdn_ctrl*);
    This field has to be preset by the HL-driver. It points to a function,
    This field has to be preset by the HL-driver. It points to a function,
    to be called by LL to perform functions like dialing, B-channel
    to be called by LL to perform functions like dialing, B-channel
    setup, etc. The exact meaning of the parameters is described with the
    setup, etc. The exact meaning of the parameters is described with the
    descriptions of the possible commands.
    descriptions of the possible commands.
    Parameter:
    Parameter:
      isdn_ctrl*
      isdn_ctrl*
        driver  = driver-Id
        driver  = driver-Id
        command = command to perform. (one of the constants ISDN_CMD_...)
        command = command to perform. (one of the constants ISDN_CMD_...)
        arg     = depends on command.
        arg     = depends on command.
        num     = depends on command.
        num     = depends on command.
    Returnvalue:
    Returnvalue:
      >=0 on success, else error-code (-ENODEV etc.)
      >=0 on success, else error-code (-ENODEV etc.)
  int (*writebuf)(int, int, u_char*, int, int);
  int (*writebuf)(int, int, u_char*, int, int);
    ***CHANGED1.14: Declared obsolete. Do NOT use this field/function
    ***CHANGED1.14: Declared obsolete. Do NOT use this field/function
                    anymore, since it will be removed when all current
                    anymore, since it will be removed when all current
                    LL drivers have been changed accordingly. Set this
                    LL drivers have been changed accordingly. Set this
                    field to NULL and use writebuf_skb instead.
                    field to NULL and use writebuf_skb instead.
    This field has to be preset by the HL-driver. The given function will
    This field has to be preset by the HL-driver. The given function will
    be called by the LL for delivering data to be send via B-Channel.
    be called by the LL for delivering data to be send via B-Channel.
    Parameter:
    Parameter:
      int     driver-Id ***CHANGE.7.4: New parameter.
      int     driver-Id ***CHANGE.7.4: New parameter.
      int     channel-number locally to the HL-driver. (starts with 0)
      int     channel-number locally to the HL-driver. (starts with 0)
      u_char* pointer to data.
      u_char* pointer to data.
      int     length of data-packet.
      int     length of data-packet.
      int     flag: 0 = call from within kernel-space. (HL-driver must use
      int     flag: 0 = call from within kernel-space. (HL-driver must use
                        memcpy, may NOT use schedule())
                        memcpy, may NOT use schedule())
                    1 = call from user-space. (HL-driver must use
                    1 = call from user-space. (HL-driver must use
                        memcpy_fromfs, use of schedule() allowed)
                        memcpy_fromfs, use of schedule() allowed)
    Returnvalue:
    Returnvalue:
      Length of data accepted on success, else error-code (-EINVAL on
      Length of data accepted on success, else error-code (-EINVAL on
      oversized packets etc.)
      oversized packets etc.)
  int (*writebuf_skb)(int, int, struct sk_buff *)
  int (*writebuf_skb)(int, int, struct sk_buff *)
    ***CHANGED.7.4: New field.
    ***CHANGED.7.4: New field.
    This field has to be preset by the HL-driver. The given function will
    This field has to be preset by the HL-driver. The given function will
    be called by the LL for delivering data to be send via B-Channel.
    be called by the LL for delivering data to be send via B-Channel.
    Parameter:
    Parameter:
      int              driver-Id ***CHANGE.7.4: New parameter.
      int              driver-Id ***CHANGE.7.4: New parameter.
      int              channel-number locally to the HL-driver. (starts with 0)
      int              channel-number locally to the HL-driver. (starts with 0)
      struct sk_buff * Pointer to sk_buff containing data to be send via
      struct sk_buff * Pointer to sk_buff containing data to be send via
                       B-channel.
                       B-channel.
    Returnvalue:
    Returnvalue:
      Length of data accepted on success, else error-code (-EINVAL on
      Length of data accepted on success, else error-code (-EINVAL on
      oversized packets etc.)
      oversized packets etc.)
  int (*writecmd)(u_char*, int, int, int, int);
  int (*writecmd)(u_char*, int, int, int, int);
    This field has to be preset by the HL-driver. The given function will be
    This field has to be preset by the HL-driver. The given function will be
    called to perform write-requests on /dev/isdnctrl (i.e. sending commands
    called to perform write-requests on /dev/isdnctrl (i.e. sending commands
    to the card) The data-format is hardware-specific. This function is
    to the card) The data-format is hardware-specific. This function is
    intended for debugging only. It is not necessary for normal operation
    intended for debugging only. It is not necessary for normal operation
    and never will be called by the tty-emulation- or network-code. If
    and never will be called by the tty-emulation- or network-code. If
    this function is not supported, the driver has to set NULL here.
    this function is not supported, the driver has to set NULL here.
    Parameter:
    Parameter:
      u_char* pointer to data.
      u_char* pointer to data.
      int     length of data.
      int     length of data.
      int     flag: 0 = call from within kernel-space. (HL-driver must use
      int     flag: 0 = call from within kernel-space. (HL-driver must use
                        memcpy, may NOT use schedule())
                        memcpy, may NOT use schedule())
                    1 = call from user-space. (HL-driver must use
                    1 = call from user-space. (HL-driver must use
                        memcpy_fromfs, use of schedule() allowed)
                        memcpy_fromfs, use of schedule() allowed)
      int     driver-Id.
      int     driver-Id.
      int     channel-number locally to the HL-driver. (starts with 0)
      int     channel-number locally to the HL-driver. (starts with 0)
***CHANGED1.14: The driver-Id and channel-number are new since this revision.
***CHANGED1.14: The driver-Id and channel-number are new since this revision.
    Returnvalue:
    Returnvalue:
      Length of data accepted on success, else error-code (-EINVAL etc.)
      Length of data accepted on success, else error-code (-EINVAL etc.)
  int (*readstat)(u_char*, int, int, int, int);
  int (*readstat)(u_char*, int, int, int, int);
    This field has to be preset by the HL-driver. The given function will be
    This field has to be preset by the HL-driver. The given function will be
    called to perform read-requests on /dev/isdnctrl (i.e. reading replies
    called to perform read-requests on /dev/isdnctrl (i.e. reading replies
    from the card) The data-format is hardware-specific. This function is
    from the card) The data-format is hardware-specific. This function is
    intended for debugging only. It is not necessary for normal operation
    intended for debugging only. It is not necessary for normal operation
    and never will be called by the tty-emulation- or network-code. If
    and never will be called by the tty-emulation- or network-code. If
    this function is not supported, the driver has to set NULL here.
    this function is not supported, the driver has to set NULL here.
    Parameter:
    Parameter:
      u_char* pointer to data.
      u_char* pointer to data.
      int     length of data.
      int     length of data.
      int     flag: 0 = call from within kernel-space. (HL-driver must use
      int     flag: 0 = call from within kernel-space. (HL-driver must use
                        memcpy, may NOT use schedule())
                        memcpy, may NOT use schedule())
                    1 = call from user-space. (HL-driver must use
                    1 = call from user-space. (HL-driver must use
                        memcpy_fromfs, use of schedule() allowed)
                        memcpy_fromfs, use of schedule() allowed)
      int     driver-Id.
      int     driver-Id.
      int     channel-number locally to the HL-driver. (starts with 0)
      int     channel-number locally to the HL-driver. (starts with 0)
***CHANGED1.14: The driver-Id and channel-number are new since this revision.
***CHANGED1.14: The driver-Id and channel-number are new since this revision.
    Returnvalue:
    Returnvalue:
      Length of data on success, else error-code (-EINVAL etc.)
      Length of data on success, else error-code (-EINVAL etc.)
  char id[20];
  char id[20];
       ***CHANGE0.7: New since this version.
       ***CHANGE0.7: New since this version.
   This string has to be preset by the HL-driver. Its purpose is for
   This string has to be preset by the HL-driver. Its purpose is for
   identification of the driver by the user. Eg.: it is shown in the
   identification of the driver by the user. Eg.: it is shown in the
   status-info of /dev/isdninfo. Furthermore it is used as Id for binding
   status-info of /dev/isdninfo. Furthermore it is used as Id for binding
   net-interfaces to a specific channel. If a string of length zero is
   net-interfaces to a specific channel. If a string of length zero is
   given, upon return, isdn4linux will replace it by a generic name. (line0,
   given, upon return, isdn4linux will replace it by a generic name. (line0,
   line1 etc.) It is recommended to make this string configurable during
   line1 etc.) It is recommended to make this string configurable during
   module-load-time. (copy a global variable to this string.) For doing that,
   module-load-time. (copy a global variable to this string.) For doing that,
   modules 1.2.8 or newer are necessary.
   modules 1.2.8 or newer are necessary.
2. Description of the commands, a HL-driver has to support:
2. Description of the commands, a HL-driver has to support:
   All commands will be performed by calling the function command() described
   All commands will be performed by calling the function command() described
   above from within the LL. The field command of the struct-parameter will
   above from within the LL. The field command of the struct-parameter will
   contain the desired command, the field driver always is set to the
   contain the desired command, the field driver always is set to the
   appropriate driver-Id.
   appropriate driver-Id.
   Until now, the following commands are defined:
   Until now, the following commands are defined:
***CHANGED1.34: The parameter "num" has been replaced by a union "para" containing
***CHANGED1.34: The parameter "num" has been replaced by a union "para" containing
                the old "num" and a new setup_type struct used for ISDN_CMD_DIAL
                the old "num" and a new setup_type struct used for ISDN_CMD_DIAL
                and ISDN_STAT_ICALL callback.
                and ISDN_STAT_ICALL callback.
   ISDN_CMD_IOCTL:
   ISDN_CMD_IOCTL:
     This command is intended for performing ioctl-calls for configuring
     This command is intended for performing ioctl-calls for configuring
     hardware or similar purposes (setting port-addresses, loading firmware
     hardware or similar purposes (setting port-addresses, loading firmware
     etc.) For this purpose, in the LL all ioctl-calls with an argument
     etc.) For this purpose, in the LL all ioctl-calls with an argument
     >= IIOCDRVCTL (0x100) will be handed transparently to this
     >= IIOCDRVCTL (0x100) will be handed transparently to this
     function after subtracting 0x100 and placing the result in arg.
     function after subtracting 0x100 and placing the result in arg.
     Example:
     Example:
       If a userlevel-program calls ioctl(0x101,...) the function gets
       If a userlevel-program calls ioctl(0x101,...) the function gets
       called with the field command set to 1.
       called with the field command set to 1.
     Parameter:
     Parameter:
       driver   = driver-Id.
       driver   = driver-Id.
       command  = ISDN_CMD_IOCTL
       command  = ISDN_CMD_IOCTL
       arg      = Original ioctl-cmd - IIOCDRVCTL
       arg      = Original ioctl-cmd - IIOCDRVCTL
       para.num = first bytes filled with (unsigned long)arg
       para.num = first bytes filled with (unsigned long)arg
     Returnvalue:
     Returnvalue:
       Depending on driver.
       Depending on driver.
  ISDN_CMD_DIAL:
  ISDN_CMD_DIAL:
    This command is used to tell the HL-driver it should dial a given
    This command is used to tell the HL-driver it should dial a given
    number.
    number.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_DIAL
      command     = ISDN_CMD_DIAL
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para.setup.phone  = An ASCII-String containing the number to dial.
      para.setup.phone  = An ASCII-String containing the number to dial.
      para.setup.eazmsn = An ASCII-Sting containing the own EAZ or MSN.
      para.setup.eazmsn = An ASCII-Sting containing the own EAZ or MSN.
      para.setup.si1    = The Service-Indicator.
      para.setup.si1    = The Service-Indicator.
      para.setup.si2    = Additional Service-Indicator.
      para.setup.si2    = Additional Service-Indicator.
                    If the Line has been designed as SPV (a special german
                    If the Line has been designed as SPV (a special german
                    feature, meaning semi-leased-line) the phone has to
                    feature, meaning semi-leased-line) the phone has to
                    start with an "S".
                    start with an "S".
      ***CHANGE0.6: In previous versions the EAZ has been given in the
      ***CHANGE0.6: In previous versions the EAZ has been given in the
                    highbyte of arg.
                    highbyte of arg.
    ***CHANGE0.7.1: New since this version: ServiceIndicator and AddInfo.
    ***CHANGE0.7.1: New since this version: ServiceIndicator and AddInfo.
  ISDN_CMD_ACCEPTD:
  ISDN_CMD_ACCEPTD:
    With this command, the HL-driver is told to accept a D-Channel-setup.
    With this command, the HL-driver is told to accept a D-Channel-setup.
    (Response to an incoming call)
    (Response to an incoming call)
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_ACCEPTD
      command     = ISDN_CMD_ACCEPTD
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_CMD_ACCEPTB:
  ISDN_CMD_ACCEPTB:
    With this command, the HL-driver is told to perform a B-Channel-setup.
    With this command, the HL-driver is told to perform a B-Channel-setup.
    (after establishing D-Channel-Connection)
    (after establishing D-Channel-Connection)
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_ACCEPTB
      command     = ISDN_CMD_ACCEPTB
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_CMD_HANGUP:
  ISDN_CMD_HANGUP:
    With this command, the HL-driver is told to hangup (B-Channel if
    With this command, the HL-driver is told to hangup (B-Channel if
    established first, then D-Channel). This command is also used for
    established first, then D-Channel). This command is also used for
    actively rejecting an incoming call.
    actively rejecting an incoming call.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_HANGUP
      command     = ISDN_CMD_HANGUP
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_CMD_CLREAZ:
  ISDN_CMD_CLREAZ:
    With this command, the HL-driver is told not to signal incoming
    With this command, the HL-driver is told not to signal incoming
    calls to the LL.
    calls to the LL.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_CLREAZ
      command     = ISDN_CMD_CLREAZ
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_CMD_SETEAZ:
  ISDN_CMD_SETEAZ:
    With this command, the HL-driver is told to signal incoming calls for
    With this command, the HL-driver is told to signal incoming calls for
    the given EAZs/MSNs to the LL.
    the given EAZs/MSNs to the LL.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_SETEAZ
      command     = ISDN_CMD_SETEAZ
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para.num    = ASCII-String, containing the desired EAZ's/MSN's
      para.num    = ASCII-String, containing the desired EAZ's/MSN's
                    (comma-separated). If an empty String is given, the
                    (comma-separated). If an empty String is given, the
                    HL-driver should respond to ALL incoming calls,
                    HL-driver should respond to ALL incoming calls,
                    regardless of the destination-address.
                    regardless of the destination-address.
      ***CHANGE0.6: New since this version the "empty-string"-feature.
      ***CHANGE0.6: New since this version the "empty-string"-feature.
  ISDN_CMD_GETEAZ: (currently unused)
  ISDN_CMD_GETEAZ: (currently unused)
    With this command, the HL-driver is told to report the current setting
    With this command, the HL-driver is told to report the current setting
    given with ISDN_CMD_SETEAZ.
    given with ISDN_CMD_SETEAZ.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_GETEAZ
      command     = ISDN_CMD_GETEAZ
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para.num    = ASCII-String, containing the current EAZ's/MSN's
      para.num    = ASCII-String, containing the current EAZ's/MSN's
  ISDN_CMD_SETSIL: (currently unused)
  ISDN_CMD_SETSIL: (currently unused)
    With this command, the HL-driver is told to signal only incoming
    With this command, the HL-driver is told to signal only incoming
    calls with the given Service-Indicators.
    calls with the given Service-Indicators.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_SETSIL
      command     = ISDN_CMD_SETSIL
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para.num    = ASCII-String, containing the desired Service-Indicators.
      para.num    = ASCII-String, containing the desired Service-Indicators.
  ISDN_CMD_GETSIL: (currently unused)
  ISDN_CMD_GETSIL: (currently unused)
    With this command, the HL-driver is told to return the current
    With this command, the HL-driver is told to return the current
    Service-Indicators it will respond to.
    Service-Indicators it will respond to.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_SETSIL
      command     = ISDN_CMD_SETSIL
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para.num    = ASCII-String, containing the current Service-Indicators.
      para.num    = ASCII-String, containing the current Service-Indicators.
  ISDN_CMD_SETL2:
  ISDN_CMD_SETL2:
    With this command, the HL-driver is told to select the given Layer-2-
    With this command, the HL-driver is told to select the given Layer-2-
    protocol. This command is issued by the LL prior to ISDN_CMD_DIAL or
    protocol. This command is issued by the LL prior to ISDN_CMD_DIAL or
    ISDN_CMD_ACCEPTD.
    ISDN_CMD_ACCEPTD.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_SETL2
      command     = ISDN_CMD_SETL2
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
                    logical or'ed with (protocol-Id << 8)
                    logical or'ed with (protocol-Id << 8)
                    protocol-Id is one of the constants ISDN_PROTO_L2...
                    protocol-Id is one of the constants ISDN_PROTO_L2...
      para        = unused.
      para        = unused.
  ISDN_CMD_GETL2: (currently unused)
  ISDN_CMD_GETL2: (currently unused)
    With this command, the HL-driver is told to return the current
    With this command, the HL-driver is told to return the current
    setting of the Layer-2-protocol.
    setting of the Layer-2-protocol.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_GETL2
      command     = ISDN_CMD_GETL2
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
    Returnvalue:
    Returnvalue:
      current protocol-Id (one of the constants ISDN_L2_PROTO)
      current protocol-Id (one of the constants ISDN_L2_PROTO)
  ISDN_CMD_SETL3:
  ISDN_CMD_SETL3:
    With this command, the HL-driver is told to select the given Layer-3-
    With this command, the HL-driver is told to select the given Layer-3-
    protocol. This command is issued by the LL prior to ISDN_CMD_DIAL or
    protocol. This command is issued by the LL prior to ISDN_CMD_DIAL or
    ISDN_CMD_ACCEPTD.
    ISDN_CMD_ACCEPTD.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_SETL3
      command     = ISDN_CMD_SETL3
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
                    logical or'ed with (protocol-Id << 8)
                    logical or'ed with (protocol-Id << 8)
                    protocol-Id is one of the constants ISDN_PROTO_L3...
                    protocol-Id is one of the constants ISDN_PROTO_L3...
      para        = unused.
      para        = unused.
  ISDN_CMD_GETL2: (currently unused)
  ISDN_CMD_GETL2: (currently unused)
    With this command, the HL-driver is told to return the current
    With this command, the HL-driver is told to return the current
    setting of the Layer-3-protocol.
    setting of the Layer-3-protocol.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_GETL3
      command     = ISDN_CMD_GETL3
      arg         = channel-number locally to the driver. (starting with 0)
      arg         = channel-number locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
    Returnvalue:
    Returnvalue:
      current protocol-Id (one of the constants ISDN_L3_PROTO)
      current protocol-Id (one of the constants ISDN_L3_PROTO)
  ISDN_CMD_LOCK:
  ISDN_CMD_LOCK:
    With this command the HL-driver is told, that it will be used by the
    With this command the HL-driver is told, that it will be used by the
    LL and therefore may not be unloaded. The HL-driver should use
    LL and therefore may not be unloaded. The HL-driver should use
    MOD_INC_USE_COUNT to tell that to the kernel.
    MOD_INC_USE_COUNT to tell that to the kernel.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_LOCK
      command     = ISDN_CMD_LOCK
      arg         = unused.
      arg         = unused.
      para        = unused.
      para        = unused.
  ISDN_CMD_UNLOCK:
  ISDN_CMD_UNLOCK:
    With this command the HL-driver is told, that it is no more used by the
    With this command the HL-driver is told, that it is no more used by the
    LL and therefore may be unloaded. The HL-driver should use
    LL and therefore may be unloaded. The HL-driver should use
    DEC_INC_USE_COUNT to tell that to the kernel.
    DEC_INC_USE_COUNT to tell that to the kernel.
    Parameter:
    Parameter:
      driver      = driver-Id.
      driver      = driver-Id.
      command     = ISDN_CMD_UNLOCK
      command     = ISDN_CMD_UNLOCK
      arg         = unused.
      arg         = unused.
      para        = unused.
      para        = unused.
3. Description of the events to be signaled by the HL-driver to th LL.
3. Description of the events to be signaled by the HL-driver to th LL.
  All status-changes are signaled via calling the previously described
  All status-changes are signaled via calling the previously described
  function statcallb(). The field command of the struct isdn_cmd has
  function statcallb(). The field command of the struct isdn_cmd has
  to be set by the HL-driver with the appropriate Status-Id (event-number).
  to be set by the HL-driver with the appropriate Status-Id (event-number).
  The field arg has to be set to the channel-number (locally to the driver,
  The field arg has to be set to the channel-number (locally to the driver,
  starting with 0) to which this event applies. (Exception: STAVAIL-event)
  starting with 0) to which this event applies. (Exception: STAVAIL-event)
  Until now, the following Status-Ids are defined:
  Until now, the following Status-Ids are defined:
  ISDN_STAT_AVAIL:
  ISDN_STAT_AVAIL:
    With this call, the HL-driver signals the availability of new data
    With this call, the HL-driver signals the availability of new data
    for readstat(). Used only for debugging-purposes, see description
    for readstat(). Used only for debugging-purposes, see description
    of readstat().
    of readstat().
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_STAVAIL
      command     = ISDN_STAT_STAVAIL
      arg         = length of available data.
      arg         = length of available data.
      para        = unused.
      para        = unused.
  ISDN_STAT_ICALL:
  ISDN_STAT_ICALL:
    With this call, the HL-driver signals an incoming call to the LL.
    With this call, the HL-driver signals an incoming call to the LL.
    Parameter:
    Parameter:
      driver            = driver-Id
      driver            = driver-Id
      command           = ISDN_STAT_ICALL
      command           = ISDN_STAT_ICALL
      arg               = channel-number, locally to the driver. (starting with 0)
      arg               = channel-number, locally to the driver. (starting with 0)
      para.setup.phone  = Callernumber.
      para.setup.phone  = Callernumber.
      para.setup.eazmsn = CalledNumber.
      para.setup.eazmsn = CalledNumber.
      para.setup.si1    = Service Indicator.
      para.setup.si1    = Service Indicator.
      para.setup.si2    = Additional Service Indicator.
      para.setup.si2    = Additional Service Indicator.
      para.setup.plan   = octet 3 from Calling party number Information Element.
      para.setup.plan   = octet 3 from Calling party number Information Element.
      para.setup.screen = octet 3a from Calling party number Information Element.
      para.setup.screen = octet 3a from Calling party number Information Element.
    Return:
    Return:
      0           = No device matching this call.
      0           = No device matching this call.
      1           = At least one device matching this call (RING on ttyI).
      1           = At least one device matching this call (RING on ttyI).
                    HL-driver may send ALERTING on the D-channel in this case.
                    HL-driver may send ALERTING on the D-channel in this case.
      2           = Call will be rejected.
      2           = Call will be rejected.
      -1          = An error happened. (Invalid parameters for example.)
      -1          = An error happened. (Invalid parameters for example.)
  ISDN_STAT_RUN:
  ISDN_STAT_RUN:
    With this call, the HL-driver signals availability of the ISDN-card.
    With this call, the HL-driver signals availability of the ISDN-card.
    (after initializing, loading firmware)
    (after initializing, loading firmware)
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_RUN
      command     = ISDN_STAT_RUN
      arg         = unused.
      arg         = unused.
      para        = unused.
      para        = unused.
  ISDN_STAT_STOP:
  ISDN_STAT_STOP:
    With this call, the HL-driver signals unavailability of the ISDN-card.
    With this call, the HL-driver signals unavailability of the ISDN-card.
    (before unloading, while resetting/reconfiguring the card)
    (before unloading, while resetting/reconfiguring the card)
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_STOP
      command     = ISDN_STAT_STOP
      arg         = unused.
      arg         = unused.
      para        = unused.
      para        = unused.
  ISDN_STAT_DCONN:
  ISDN_STAT_DCONN:
   With this call, the HL-driver signals the successful establishment of
   With this call, the HL-driver signals the successful establishment of
   a D-Channel-connection. (Response to ISDN_CMD_ACCEPTD or ISDN_CMD_DIAL)
   a D-Channel-connection. (Response to ISDN_CMD_ACCEPTD or ISDN_CMD_DIAL)
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_DCONN
      command     = ISDN_STAT_DCONN
      arg         = channel-number, locally to the driver. (starting with 0)
      arg         = channel-number, locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_STAT_BCONN:
  ISDN_STAT_BCONN:
   With this call, the HL-driver signals the successful establishment of
   With this call, the HL-driver signals the successful establishment of
   a B-Channel-connection. (Response to ISDN_CMD_ACCEPTB or because the
   a B-Channel-connection. (Response to ISDN_CMD_ACCEPTB or because the
   remote-station has initiated establishment)
   remote-station has initiated establishment)
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_BCONN
      command     = ISDN_STAT_BCONN
      arg         = channel-number, locally to the driver. (starting with 0)
      arg         = channel-number, locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_STAT_DHUP:
  ISDN_STAT_DHUP:
   With this call, the HL-driver signals the shutdown of a
   With this call, the HL-driver signals the shutdown of a
   D-Channel-connection. This could be a response to a prior ISDN_CMD_HANGUP,
   D-Channel-connection. This could be a response to a prior ISDN_CMD_HANGUP,
   or caused by a remote-hangup or if the remote-station has actively
   or caused by a remote-hangup or if the remote-station has actively
   rejected a call.
   rejected a call.
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_DHUP
      command     = ISDN_STAT_DHUP
      arg         = channel-number, locally to the driver. (starting with 0)
      arg         = channel-number, locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_STAT_BHUP:
  ISDN_STAT_BHUP:
   With this call, the HL-driver signals the shutdown of a
   With this call, the HL-driver signals the shutdown of a
   B-Channel-connection. This could be a response to a prior ISDN_CMD_HANGUP,
   B-Channel-connection. This could be a response to a prior ISDN_CMD_HANGUP,
   or caused by a remote-hangup.
   or caused by a remote-hangup.
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_BHUP
      command     = ISDN_STAT_BHUP
      arg         = channel-number, locally to the driver. (starting with 0)
      arg         = channel-number, locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_STAT_CINF:
  ISDN_STAT_CINF:
   With this call, the HL-driver delivers charge-unit information to the
   With this call, the HL-driver delivers charge-unit information to the
   LL.
   LL.
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_CINF
      command     = ISDN_STAT_CINF
      arg         = channel-number, locally to the driver. (starting with 0)
      arg         = channel-number, locally to the driver. (starting with 0)
      para.num    = ASCII string containing charge-units (digits only).
      para.num    = ASCII string containing charge-units (digits only).
  ISDN_STAT_LOAD: (currently unused)
  ISDN_STAT_LOAD: (currently unused)
  ISDN_STAT_UNLOAD:
  ISDN_STAT_UNLOAD:
   With this call, the HL-driver signals that it will be unloaded now. This
   With this call, the HL-driver signals that it will be unloaded now. This
   tells the LL to release all corresponding data-structures.
   tells the LL to release all corresponding data-structures.
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_UNLOAD
      command     = ISDN_STAT_UNLOAD
      arg         = unused.
      arg         = unused.
      para        = unused.
      para        = unused.
  ISDN_STAT_BSENT:
  ISDN_STAT_BSENT:
    With this call the HL-driver signals the delivery of a data-packet.
    With this call the HL-driver signals the delivery of a data-packet.
    This callback is used by the network-interfaces only, tty-Emulation
    This callback is used by the network-interfaces only, tty-Emulation
    does not need this call.
    does not need this call.
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_BSENT
      command     = ISDN_STAT_BSENT
      arg         = channel-number, locally to the driver. (starting with 0)
      arg         = channel-number, locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_STAT_NODCH:
  ISDN_STAT_NODCH:
    With this call, the driver has to respond to a prior ISDN_CMD_DIAL, if
    With this call, the driver has to respond to a prior ISDN_CMD_DIAL, if
    no D-Channel is available.
    no D-Channel is available.
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_NODCH
      command     = ISDN_STAT_NODCH
      arg         = channel-number, locally to the driver. (starting with 0)
      arg         = channel-number, locally to the driver. (starting with 0)
      para        = unused.
      para        = unused.
  ISDN_STAT_ADDCH: (currently unused)
  ISDN_STAT_ADDCH: (currently unused)
    This call is planned for HL-drivers, which are unable to check card-type
    This call is planned for HL-drivers, which are unable to check card-type
    or numbers of supported channels before they have loaded any firmware
    or numbers of supported channels before they have loaded any firmware
    using ioctl. Those HL-driver simply set the channel-parameter to zero
    using ioctl. Those HL-driver simply set the channel-parameter to zero
    or a minimum channel-number when registering, and later if they know
    or a minimum channel-number when registering, and later if they know
    the real amount, perform this call, allocating additional channels.
    the real amount, perform this call, allocating additional channels.
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_ADDCH
      command     = ISDN_STAT_ADDCH
      arg         = to be defined.
      arg         = to be defined.
      para        = to be defined.
      para        = to be defined.
  ISDN_STAT_CAUSE:
  ISDN_STAT_CAUSE:
    With this call, the HL-driver delivers CAUSE-messages to the LL.
    With this call, the HL-driver delivers CAUSE-messages to the LL.
    Currently the LL does not use this messages. Their contents is simply
    Currently the LL does not use this messages. Their contents is simply
    logged via kernel-messages. Therefore, currently the format of the
    logged via kernel-messages. Therefore, currently the format of the
    messages is currently completely free. However they should be printable.
    messages is currently completely free. However they should be printable.
    Parameter:
    Parameter:
      driver      = driver-Id
      driver      = driver-Id
      command     = ISDN_STAT_NODCH
      command     = ISDN_STAT_NODCH
      arg         = channel-number, locally to the driver. (starting with 0)
      arg         = channel-number, locally to the driver. (starting with 0)
      para.num    = ASCII string containing CAUSE-message.
      para.num    = ASCII string containing CAUSE-message.
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.