INTERFACE 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  1. $Id: INTERFACE,v 1.15.8.2 2001/03/13 16:17:07 kai Exp $
  2. Description of the Interface between Linklevel and Hardwarelevel
  3. of isdn4linux:
  4. The Communication between Linklevel (LL) and Hardwarelevel (HL)
  5. is based on the struct isdn_if (defined in isdnif.h).
  6. An HL-driver can register itself at LL by calling the function
  7. register_isdn() with a pointer to that struct. Prior to that, it has
  8. to preset some of the fields of isdn_if. The LL sets the rest of
  9. the fields. All further communication is done via callbacks using
  10. the function-pointers defined in isdn_if.
  11. Changes/Version numbering:
  12. During development of the ISDN subsystem, several changes have been
  13. made to the interface. Before it went into kernel, the package
  14. had a unique version number. The last version, distributed separately
  15. was 0.7.4. When the subsystem went into kernel, every functional unit
  16. got a separate version number. These numbers are shown at initialization,
  17. separated by slashes:
  18. c.c/t.t/n.n/p.p/a.a/v.v
  19. where
  20. c.c is the revision of the common code.
  21. t.t is the revision of the tty related code.
  22. n.n is the revision of the network related code.
  23. p.p is the revision of the ppp related code.
  24. a.a is the revision of the audio related code.
  25. v.v is the revision of the V.110 related code.
  26. Changes in this document are marked with '***CHANGEx' where x representing
  27. the version number. If that number starts with 0, it refers to the old,
  28. separately distributed package. If it starts with one of the letters
  29. above, it refers to the revision of the corresponding module.
  30. ***CHANGEIx refers to the revision number of the isdnif.h
  31. 1. Description of the fields of isdn_if:
  32. int channels;
  33. This field has to be set by the HL-driver to the number of channels
  34. supported prior to calling register_isdn(). Upon return of the call,
  35. the LL puts an id there, which has to be used by the HL-driver when
  36. invoking the other callbacks.
  37. int maxbufsize;
  38. ***CHANGE0.6: New since this version.
  39. Also to be preset by the HL-driver. With this value the HL-driver
  40. tells the LL the maximum size of a data-packet it will accept.
  41. unsigned long features;
  42. To be preset by the HL-driver. Using this field, the HL-driver
  43. announces the features supported. At the moment this is limited to
  44. report the supported layer2 and layer3-protocols. For setting this
  45. field the constants ISDN_FEATURE..., declared in isdnif.h have to be
  46. used.
  47. ***CHANGE0.7.1: The line type (1TR6, EDSS1) has to be set.
  48. unsigned short hl_hdrlen;
  49. ***CHANGE0.7.4: New field.
  50. To be preset by the HL-driver, if it supports sk_buff's. The driver
  51. should put here the amount of additional space needed in sk_buff's for
  52. its internal purposes. Drivers not supporting sk_buff's should
  53. initialize this field to 0.
  54. void (*rcvcallb_skb)(int, int, struct sk_buff *)
  55. ***CHANGE0.7.4: New field.
  56. This field will be set by LL. The HL-driver delivers received data-
  57. packets by calling this function. Upon calling, the HL-driver must
  58. already have its private data pulled off the head of the sk_buff.
  59. Parameter:
  60. int driver-Id
  61. int Channel-number locally to the driver. (starting with 0)
  62. struct sk_buff * Pointer to sk_buff, containing received data.
  63. int (*statcallb)(isdn_ctrl*);
  64. This field will be set by LL. This function has to be called by the
  65. HL-driver for signaling status-changes or other events to the LL.
  66. Parameter:
  67. isdn_ctrl*
  68. The struct isdn_ctrl also defined in isdn_if. The exact meanings of its
  69. fields are described together with the descriptions of the possible
  70. events. Here is only a short description of the fields:
  71. driver = driver Id.
  72. command = event-type. (one of the constants ISDN_STAT_...)
  73. arg = depends on event-type.
  74. num = depends on event-type.
  75. Returnvalue:
  76. 0 on success, else -1
  77. int (*command)(isdn_ctrl*);
  78. This field has to be preset by the HL-driver. It points to a function,
  79. to be called by LL to perform functions like dialing, B-channel
  80. setup, etc. The exact meaning of the parameters is described with the
  81. descriptions of the possible commands.
  82. Parameter:
  83. isdn_ctrl*
  84. driver = driver-Id
  85. command = command to perform. (one of the constants ISDN_CMD_...)
  86. arg = depends on command.
  87. num = depends on command.
  88. Returnvalue:
  89. >=0 on success, else error-code (-ENODEV etc.)
  90. int (*writebuf_skb)(int, int, int, struct sk_buff *)
  91. ***CHANGE0.7.4: New field.
  92. ***CHANGEI.1.21: New field.
  93. This field has to be preset by the HL-driver. The given function will
  94. be called by the LL for delivering data to be send via B-Channel.
  95. Parameter:
  96. int driver-Id ***CHANGE0.7.4: New parameter.
  97. int channel-number locally to the HL-driver. (starts with 0)
  98. int ack ***ChangeI1.21: New parameter
  99. If this is !0, the driver has to signal the delivery
  100. by sending an ISDN_STAT_BSENT. If this is 0, the driver
  101. MUST NOT send an ISDN_STAT_BSENT.
  102. struct sk_buff * Pointer to sk_buff containing data to be send via
  103. B-channel.
  104. Returnvalue:
  105. Length of data accepted on success, else error-code (-EINVAL on
  106. oversized packets etc.)
  107. int (*writecmd)(u_char*, int, int, int, int);
  108. This field has to be preset by the HL-driver. The given function will be
  109. called to perform write-requests on /dev/isdnctrl (i.e. sending commands
  110. to the card) The data-format is hardware-specific. This function is
  111. intended for debugging only. It is not necessary for normal operation
  112. and never will be called by the tty-emulation- or network-code. If
  113. this function is not supported, the driver has to set NULL here.
  114. Parameter:
  115. u_char* pointer to data.
  116. int length of data.
  117. int flag: 0 = call from within kernel-space. (HL-driver must use
  118. memcpy, may NOT use schedule())
  119. 1 = call from user-space. (HL-driver must use
  120. memcpy_fromfs, use of schedule() allowed)
  121. int driver-Id.
  122. int channel-number locally to the HL-driver. (starts with 0)
  123. ***CHANGEI1.14: The driver-Id and channel-number are new since this revision.
  124. Returnvalue:
  125. Length of data accepted on success, else error-code (-EINVAL etc.)
  126. int (*readstat)(u_char*, int, int, int, int);
  127. This field has to be preset by the HL-driver. The given function will be
  128. called to perform read-requests on /dev/isdnctrl (i.e. reading replies
  129. from the card) The data-format is hardware-specific. This function is
  130. intended for debugging only. It is not necessary for normal operation
  131. and never will be called by the tty-emulation- or network-code. If
  132. this function is not supported, the driver has to set NULL here.
  133. Parameter:
  134. u_char* pointer to data.
  135. int length of data.
  136. int flag: 0 = call from within kernel-space. (HL-driver must use
  137. memcpy, may NOT use schedule())
  138. 1 = call from user-space. (HL-driver must use
  139. memcpy_fromfs, use of schedule() allowed)
  140. int driver-Id.
  141. int channel-number locally to the HL-driver. (starts with 0)
  142. ***CHANGEI1.14: The driver-Id and channel-number are new since this revision.
  143. Returnvalue:
  144. Length of data on success, else error-code (-EINVAL etc.)
  145. char id[20];
  146. ***CHANGE0.7: New since this version.
  147. This string has to be preset by the HL-driver. Its purpose is for
  148. identification of the driver by the user. Eg.: it is shown in the
  149. status-info of /dev/isdninfo. Furthermore it is used as Id for binding
  150. net-interfaces to a specific channel. If a string of length zero is
  151. given, upon return, isdn4linux will replace it by a generic name. (line0,
  152. line1 etc.) It is recommended to make this string configurable during
  153. module-load-time. (copy a global variable to this string.) For doing that,
  154. modules 1.2.8 or newer are necessary.
  155. 2. Description of the commands, a HL-driver has to support:
  156. All commands will be performed by calling the function command() described
  157. above from within the LL. The field command of the struct-parameter will
  158. contain the desired command, the field driver is always set to the
  159. appropriate driver-Id.
  160. Until now, the following commands are defined:
  161. ***CHANGEI1.34: The parameter "num" has been replaced by a union "parm" containing
  162. the old "num" and a new setup_type struct used for ISDN_CMD_DIAL
  163. and ISDN_STAT_ICALL callback.
  164. ISDN_CMD_IOCTL:
  165. This command is intended for performing ioctl-calls for configuring
  166. hardware or similar purposes (setting port-addresses, loading firmware
  167. etc.) For this purpose, in the LL all ioctl-calls with an argument
  168. >= IIOCDRVCTL (0x100) will be handed transparently to this
  169. function after subtracting 0x100 and placing the result in arg.
  170. Example:
  171. If a userlevel-program calls ioctl(0x101,...) the function gets
  172. called with the field command set to 1.
  173. Parameter:
  174. driver = driver-Id.
  175. command = ISDN_CMD_IOCTL
  176. arg = Original ioctl-cmd - IIOCDRVCTL
  177. parm.num = first bytes filled with (unsigned long)arg
  178. Returnvalue:
  179. Depending on driver.
  180. ISDN_CMD_DIAL:
  181. This command is used to tell the HL-driver it should dial a given
  182. number.
  183. Parameter:
  184. driver = driver-Id.
  185. command = ISDN_CMD_DIAL
  186. arg = channel-number locally to the driver. (starting with 0)
  187. parm.setup.phone = An ASCII-String containing the number to dial.
  188. parm.setup.eazmsn = An ASCII-Sting containing the own EAZ or MSN.
  189. parm.setup.si1 = The Service-Indicator.
  190. parm.setup.si2 = Additional Service-Indicator.
  191. If the Line has been designed as SPV (a special german
  192. feature, meaning semi-leased-line) the phone has to
  193. start with an "S".
  194. ***CHANGE0.6: In previous versions the EAZ has been given in the
  195. highbyte of arg.
  196. ***CHANGE0.7.1: New since this version: ServiceIndicator and AddInfo.
  197. ISDN_CMD_ACCEPTD:
  198. With this command, the HL-driver is told to accept a D-Channel-setup.
  199. (Response to an incoming call)
  200. Parameter:
  201. driver = driver-Id.
  202. command = ISDN_CMD_ACCEPTD
  203. arg = channel-number locally to the driver. (starting with 0)
  204. parm = unused.
  205. ISDN_CMD_ACCEPTB:
  206. With this command, the HL-driver is told to perform a B-Channel-setup.
  207. (after establishing D-Channel-Connection)
  208. Parameter:
  209. driver = driver-Id.
  210. command = ISDN_CMD_ACCEPTB
  211. arg = channel-number locally to the driver. (starting with 0)
  212. parm = unused.
  213. ISDN_CMD_HANGUP:
  214. With this command, the HL-driver is told to hangup (B-Channel if
  215. established first, then D-Channel). This command is also used for
  216. actively rejecting an incoming call.
  217. Parameter:
  218. driver = driver-Id.
  219. command = ISDN_CMD_HANGUP
  220. arg = channel-number locally to the driver. (starting with 0)
  221. parm = unused.
  222. ISDN_CMD_CLREAZ:
  223. With this command, the HL-driver is told not to signal incoming
  224. calls to the LL.
  225. Parameter:
  226. driver = driver-Id.
  227. command = ISDN_CMD_CLREAZ
  228. arg = channel-number locally to the driver. (starting with 0)
  229. parm = unused.
  230. ISDN_CMD_SETEAZ:
  231. With this command, the HL-driver is told to signal incoming calls for
  232. the given EAZs/MSNs to the LL.
  233. Parameter:
  234. driver = driver-Id.
  235. command = ISDN_CMD_SETEAZ
  236. arg = channel-number locally to the driver. (starting with 0)
  237. parm.num = ASCII-String, containing the desired EAZ's/MSN's
  238. (comma-separated). If an empty String is given, the
  239. HL-driver should respond to ALL incoming calls,
  240. regardless of the destination-address.
  241. ***CHANGE0.6: New since this version the "empty-string"-feature.
  242. ISDN_CMD_GETEAZ: (currently unused)
  243. With this command, the HL-driver is told to report the current setting
  244. given with ISDN_CMD_SETEAZ.
  245. Parameter:
  246. driver = driver-Id.
  247. command = ISDN_CMD_GETEAZ
  248. arg = channel-number locally to the driver. (starting with 0)
  249. parm.num = ASCII-String, containing the current EAZ's/MSN's
  250. ISDN_CMD_SETSIL: (currently unused)
  251. With this command, the HL-driver is told to signal only incoming
  252. calls with the given Service-Indicators.
  253. Parameter:
  254. driver = driver-Id.
  255. command = ISDN_CMD_SETSIL
  256. arg = channel-number locally to the driver. (starting with 0)
  257. parm.num = ASCII-String, containing the desired Service-Indicators.
  258. ISDN_CMD_GETSIL: (currently unused)
  259. With this command, the HL-driver is told to return the current
  260. Service-Indicators it will respond to.
  261. Parameter:
  262. driver = driver-Id.
  263. command = ISDN_CMD_SETSIL
  264. arg = channel-number locally to the driver. (starting with 0)
  265. parm.num = ASCII-String, containing the current Service-Indicators.
  266. ISDN_CMD_SETL2:
  267. With this command, the HL-driver is told to select the given Layer-2-
  268. protocol. This command is issued by the LL prior to ISDN_CMD_DIAL or
  269. ISDN_CMD_ACCEPTD.
  270. Parameter:
  271. driver = driver-Id.
  272. command = ISDN_CMD_SETL2
  273. arg = channel-number locally to the driver. (starting with 0)
  274. logical or'ed with (protocol-Id << 8)
  275. protocol-Id is one of the constants ISDN_PROTO_L2...
  276. parm = unused.
  277. ISDN_CMD_GETL2: (currently unused)
  278. With this command, the HL-driver is told to return the current
  279. setting of the Layer-2-protocol.
  280. Parameter:
  281. driver = driver-Id.
  282. command = ISDN_CMD_GETL2
  283. arg = channel-number locally to the driver. (starting with 0)
  284. parm = unused.
  285. Returnvalue:
  286. current protocol-Id (one of the constants ISDN_L2_PROTO)
  287. ISDN_CMD_SETL3:
  288. With this command, the HL-driver is told to select the given Layer-3-
  289. protocol. This command is issued by the LL prior to ISDN_CMD_DIAL or
  290. ISDN_CMD_ACCEPTD.
  291. Parameter:
  292. driver = driver-Id.
  293. command = ISDN_CMD_SETL3
  294. arg = channel-number locally to the driver. (starting with 0)
  295. logical or'ed with (protocol-Id << 8)
  296. protocol-Id is one of the constants ISDN_PROTO_L3...
  297. parm.fax = Pointer to T30_s fax struct. (fax usage only)
  298. ISDN_CMD_GETL2: (currently unused)
  299. With this command, the HL-driver is told to return the current
  300. setting of the Layer-3-protocol.
  301. Parameter:
  302. driver = driver-Id.
  303. command = ISDN_CMD_GETL3
  304. arg = channel-number locally to the driver. (starting with 0)
  305. parm = unused.
  306. Returnvalue:
  307. current protocol-Id (one of the constants ISDN_L3_PROTO)
  308. ISDN_CMD_PROCEED:
  309. With this command, the HL-driver is told to proceed with a incoming call.
  310. Parameter:
  311. driver = driver-Id.
  312. command = ISDN_CMD_PROCEED
  313. arg = channel-number locally to the driver. (starting with 0)
  314. setup.eazmsn= empty string or string send as uus1 in DSS1 with
  315. PROCEED message
  316. ISDN_CMD_ALERT:
  317. With this command, the HL-driver is told to alert a proceeding call.
  318. Parameter:
  319. driver = driver-Id.
  320. command = ISDN_CMD_ALERT
  321. arg = channel-number locally to the driver. (starting with 0)
  322. setup.eazmsn= empty string or string send as uus1 in DSS1 with
  323. ALERT message
  324. ISDN_CMD_REDIR:
  325. With this command, the HL-driver is told to redirect a call in proceeding
  326. or alerting state.
  327. Parameter:
  328. driver = driver-Id.
  329. command = ISDN_CMD_REDIR
  330. arg = channel-number locally to the driver. (starting with 0)
  331. setup.eazmsn= empty string or string send as uus1 in DSS1 protocol
  332. setup.screen= screening indicator
  333. setup.phone = redirected to party number
  334. ISDN_CMD_PROT_IO:
  335. With this call, the LL-driver invokes protocol specific features through
  336. the LL.
  337. The call is not implicitely bound to a connection.
  338. Parameter:
  339. driver = driver-Id
  340. command = ISDN_CMD_PROT_IO
  341. arg = The lower 8 Bits define the addressed protocol as defined
  342. in ISDN_PTYPE..., the upper bits are used to differentiate
  343. the protocol specific CMD.
  344. para = protocol and function specific. See isdnif.h for detail.
  345. ISDN_CMD_FAXCMD:
  346. With this command the HL-driver receives a fax sub-command.
  347. For details refer to INTERFACE.fax
  348. Parameter:
  349. driver = driver-Id.
  350. command = ISDN_CMD_FAXCMD
  351. arg = channel-number locally to the driver. (starting with 0)
  352. parm = unused.
  353. 3. Description of the events to be signaled by the HL-driver to the LL.
  354. All status-changes are signaled via calling the previously described
  355. function statcallb(). The field command of the struct isdn_cmd has
  356. to be set by the HL-driver with the appropriate Status-Id (event-number).
  357. The field arg has to be set to the channel-number (locally to the driver,
  358. starting with 0) to which this event applies. (Exception: STAVAIL-event)
  359. Until now, the following Status-Ids are defined:
  360. ISDN_STAT_AVAIL:
  361. With this call, the HL-driver signals the availability of new data
  362. for readstat(). Used only for debugging-purposes, see description
  363. of readstat().
  364. Parameter:
  365. driver = driver-Id
  366. command = ISDN_STAT_STAVAIL
  367. arg = length of available data.
  368. parm = unused.
  369. ISDN_STAT_ICALL:
  370. ISDN_STAT_ICALLW:
  371. With this call, the HL-driver signals an incoming call to the LL.
  372. If ICALLW is signalled the incoming call is a waiting call without
  373. a available B-chan.
  374. Parameter:
  375. driver = driver-Id
  376. command = ISDN_STAT_ICALL
  377. arg = channel-number, locally to the driver. (starting with 0)
  378. para.setup.phone = Callernumber.
  379. para.setup.eazmsn = CalledNumber.
  380. para.setup.si1 = Service Indicator.
  381. para.setup.si2 = Additional Service Indicator.
  382. para.setup.plan = octet 3 from Calling party number Information Element.
  383. para.setup.screen = octet 3a from Calling party number Information Element.
  384. Return:
  385. 0 = No device matching this call.
  386. 1 = At least one device matching this call (RING on ttyI).
  387. HL-driver may send ALERTING on the D-channel in this case.
  388. 2 = Call will be rejected.
  389. 3 = Incoming called party number is currently incomplete.
  390. Additional digits are required.
  391. Used for signalling with PtP connections.
  392. 4 = Call will be held in a proceeding state
  393. (HL driver sends PROCEEDING)
  394. Used when a user space prog needs time to interpret a call
  395. para.setup.eazmsn may be filled with an uus1 message of
  396. 30 octets maximum. Empty string if no uus.
  397. 5 = Call will be actively deflected to another party
  398. Only available in DSS1/EURO protocol
  399. para.setup.phone must be set to destination party number
  400. para.setup.eazmsn may be filled with an uus1 message of
  401. 30 octets maximum. Empty string if no uus.
  402. -1 = An error happened. (Invalid parameters for example.)
  403. The keypad support now is included in the dial command.
  404. ISDN_STAT_RUN:
  405. With this call, the HL-driver signals availability of the ISDN-card.
  406. (after initializing, loading firmware)
  407. Parameter:
  408. driver = driver-Id
  409. command = ISDN_STAT_RUN
  410. arg = unused.
  411. parm = unused.
  412. ISDN_STAT_STOP:
  413. With this call, the HL-driver signals unavailability of the ISDN-card.
  414. (before unloading, while resetting/reconfiguring the card)
  415. Parameter:
  416. driver = driver-Id
  417. command = ISDN_STAT_STOP
  418. arg = unused.
  419. parm = unused.
  420. ISDN_STAT_DCONN:
  421. With this call, the HL-driver signals the successful establishment of
  422. a D-Channel-connection. (Response to ISDN_CMD_ACCEPTD or ISDN_CMD_DIAL)
  423. Parameter:
  424. driver = driver-Id
  425. command = ISDN_STAT_DCONN
  426. arg = channel-number, locally to the driver. (starting with 0)
  427. parm = unused.
  428. ISDN_STAT_BCONN:
  429. With this call, the HL-driver signals the successful establishment of
  430. a B-Channel-connection. (Response to ISDN_CMD_ACCEPTB or because the
  431. remote-station has initiated establishment)
  432. The HL driver should call this when the logical l2/l3 protocol
  433. connection on top of the physical B-channel is established.
  434. Parameter:
  435. driver = driver-Id
  436. command = ISDN_STAT_BCONN
  437. arg = channel-number, locally to the driver. (starting with 0)
  438. parm.num = ASCII-String, containing type of connection (for analog
  439. modem only). This will be appended to the CONNECT message
  440. e.g. 14400/V.32bis
  441. ISDN_STAT_DHUP:
  442. With this call, the HL-driver signals the shutdown of a
  443. D-Channel-connection. This could be a response to a prior ISDN_CMD_HANGUP,
  444. or caused by a remote-hangup or if the remote-station has actively
  445. rejected a call.
  446. Parameter:
  447. driver = driver-Id
  448. command = ISDN_STAT_DHUP
  449. arg = channel-number, locally to the driver. (starting with 0)
  450. parm = unused.
  451. ISDN_STAT_BHUP:
  452. With this call, the HL-driver signals the shutdown of a
  453. B-Channel-connection. This could be a response to a prior ISDN_CMD_HANGUP,
  454. or caused by a remote-hangup.
  455. The HL driver should call this as soon as the logical l2/l3 protocol
  456. connection on top of the physical B-channel is released.
  457. Parameter:
  458. driver = driver-Id
  459. command = ISDN_STAT_BHUP
  460. arg = channel-number, locally to the driver. (starting with 0)
  461. parm = unused.
  462. ISDN_STAT_CINF:
  463. With this call, the HL-driver delivers charge-unit information to the
  464. LL.
  465. Parameter:
  466. driver = driver-Id
  467. command = ISDN_STAT_CINF
  468. arg = channel-number, locally to the driver. (starting with 0)
  469. parm.num = ASCII string containing charge-units (digits only).
  470. ISDN_STAT_LOAD: (currently unused)
  471. ISDN_STAT_UNLOAD:
  472. With this call, the HL-driver signals that it will be unloaded now. This
  473. tells the LL to release all corresponding data-structures.
  474. Parameter:
  475. driver = driver-Id
  476. command = ISDN_STAT_UNLOAD
  477. arg = unused.
  478. parm = unused.
  479. ISDN_STAT_BSENT:
  480. With this call the HL-driver signals the delivery of a data-packet.
  481. This callback is used by the network-interfaces only, tty-Emulation
  482. does not need this call.
  483. Parameter:
  484. driver = driver-Id
  485. command = ISDN_STAT_BSENT
  486. arg = channel-number, locally to the driver. (starting with 0)
  487. parm.length = ***CHANGEI.1.21: New field.
  488. the driver has to set this to the original length
  489. of the skb at the time of receiving it from the linklevel.
  490. ISDN_STAT_NODCH:
  491. With this call, the driver has to respond to a prior ISDN_CMD_DIAL, if
  492. no D-Channel is available.
  493. Parameter:
  494. driver = driver-Id
  495. command = ISDN_STAT_NODCH
  496. arg = channel-number, locally to the driver. (starting with 0)
  497. parm = unused.
  498. ISDN_STAT_ADDCH:
  499. This call is for HL-drivers, which are unable to check card-type
  500. or numbers of supported channels before they have loaded any firmware
  501. using ioctl. Those HL-driver simply set the channel-parameter to a
  502. minimum channel-number when registering, and later if they know
  503. the real amount, perform this call, allocating additional channels.
  504. Parameter:
  505. driver = driver-Id
  506. command = ISDN_STAT_ADDCH
  507. arg = number of channels to be added.
  508. parm = unused.
  509. ISDN_STAT_CAUSE:
  510. With this call, the HL-driver delivers CAUSE-messages to the LL.
  511. Currently the LL does not use this messages. Their contents is simply
  512. logged via kernel-messages. Therefore, currently the format of the
  513. messages is completely free. However they should be printable.
  514. Parameter:
  515. driver = driver-Id
  516. command = ISDN_STAT_NODCH
  517. arg = channel-number, locally to the driver. (starting with 0)
  518. parm.num = ASCII string containing CAUSE-message.
  519. ISDN_STAT_DISPLAY:
  520. With this call, the HL-driver delivers DISPLAY-messages to the LL.
  521. Currently the LL does not use this messages.
  522. Parameter:
  523. driver = driver-Id
  524. command = ISDN_STAT_DISPLAY
  525. arg = channel-number, locally to the driver. (starting with 0)
  526. para.display= string containing DISPLAY-message.
  527. ISDN_STAT_PROT:
  528. With this call, the HL-driver delivers protocol specific infos to the LL.
  529. The call is not implicitely bound to a connection.
  530. Parameter:
  531. driver = driver-Id
  532. command = ISDN_STAT_PROT
  533. arg = The lower 8 Bits define the addressed protocol as defined
  534. in ISDN_PTYPE..., the upper bits are used to differentiate
  535. the protocol specific STAT.
  536. para = protocol and function specific. See isdnif.h for detail.
  537. ISDN_STAT_DISCH:
  538. With this call, the HL-driver signals the LL to disable or enable the
  539. use of supplied channel and driver.
  540. The call may be used to reduce the available number of B-channels after
  541. loading the driver. The LL has to ignore a disabled channel when searching
  542. for free channels. The HL driver itself never delivers STAT callbacks for
  543. disabled channels.
  544. The LL returns a nonzero code if the operation was not successful or the
  545. selected channel is actually regarded as busy.
  546. Parameter:
  547. driver = driver-Id
  548. command = ISDN_STAT_DISCH
  549. arg = channel-number, locally to the driver. (starting with 0)
  550. parm.num[0] = 0 if channel shall be disabled, else enabled.
  551. ISDN_STAT_L1ERR:
  552. ***CHANGEI1.21 new status message.
  553. A signal can be sent to the linklevel if an Layer1-error results in
  554. packet-loss on receive or send. The field errcode of the cmd.parm
  555. union describes the error more precisely.
  556. Parameter:
  557. driver = driver-Id
  558. command = ISDN_STAT_L1ERR
  559. arg = channel-number, locally to the driver. (starting with 0)
  560. parm.errcode= ISDN_STAT_L1ERR_SEND: Packet lost while sending.
  561. ISDN_STAT_L1ERR_RECV: Packet lost while receiving.
  562. ISDN_STAT_FAXIND:
  563. With this call the HL-driver signals a fax sub-command to the LL.
  564. For details refer to INTERFACE.fax
  565. Parameter:
  566. driver = driver-Id.
  567. command = ISDN_STAT_FAXIND
  568. arg = channel-number, locally to the driver. (starting with 0)
  569. parm = unused.