sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget'/translations/zh_CN/isdn/interface_capimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/isdn/interface_capimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/isdn/interface_capimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/isdn/interface_capimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/isdn/interface_capimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/isdn/interface_capimodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h)Kernel CAPI Interface to Hardware Driversh]h)Kernel CAPI Interface to Hardware Drivers}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/isdn/interface_capi.rsthKubh)}(hhh](h)}(h 1. Overviewh]h 1. Overview}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hFrom the CAPI 2.0 specification: COMMON-ISDN-API (CAPI) is an application programming interface standard used to access ISDN equipment connected to basic rate interfaces (BRI) and primary rate interfaces (PRI).h]hFrom the CAPI 2.0 specification: COMMON-ISDN-API (CAPI) is an application programming interface standard used to access ISDN equipment connected to basic rate interfaces (BRI) and primary rate interfaces (PRI).}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXNKernel CAPI operates as a dispatching layer between CAPI applications and CAPI hardware drivers. Hardware drivers register ISDN devices (controllers, in CAPI lingo) with Kernel CAPI to indicate their readiness to provide their service to CAPI applications. CAPI applications also register with Kernel CAPI, requesting association with a CAPI device. Kernel CAPI then dispatches the application registration to an available device, forwarding it to the corresponding hardware driver. Kernel CAPI then forwards CAPI messages in both directions between the application and the hardware driver.h]hXNKernel CAPI operates as a dispatching layer between CAPI applications and CAPI hardware drivers. Hardware drivers register ISDN devices (controllers, in CAPI lingo) with Kernel CAPI to indicate their readiness to provide their service to CAPI applications. CAPI applications also register with Kernel CAPI, requesting association with a CAPI device. Kernel CAPI then dispatches the application registration to an available device, forwarding it to the corresponding hardware driver. Kernel CAPI then forwards CAPI messages in both directions between the application and the hardware driver.}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hFormat and semantics of CAPI messages are specified in the CAPI 2.0 standard. This standard is freely available from https://www.capi.org.h](huFormat and semantics of CAPI messages are specified in the CAPI 2.0 standard. This standard is freely available from }(huFormat and semantics of CAPI messages are specified in the CAPI 2.0 standard. This standard is freely available from hhhhhNhNubh reference)}(hhttps://www.capi.orgh]hhttps://www.capi.org}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]refurihuh1hhhubh.}(h.hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]overviewah ]h"] 1. overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h!2. Driver and Device Registrationh]h!2. Driver and Device Registration}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXCAPI drivers must register each of the ISDN devices they control with Kernel CAPI by calling the Kernel CAPI function attach_capi_ctr() with a pointer to a struct capi_ctr before they can be used. This structure must be filled with the names of the driver and controller, and a number of callback function pointers which are subsequently used by Kernel CAPI for communicating with the driver. The registration can be revoked by calling the function detach_capi_ctr() with a pointer to the same struct capi_ctr.h]hXCAPI drivers must register each of the ISDN devices they control with Kernel CAPI by calling the Kernel CAPI function attach_capi_ctr() with a pointer to a struct capi_ctr before they can be used. This structure must be filled with the names of the driver and controller, and a number of callback function pointers which are subsequently used by Kernel CAPI for communicating with the driver. The registration can be revoked by calling the function detach_capi_ctr() with a pointer to the same struct capi_ctr.}(hj&hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX;Before the device can be actually used, the driver must fill in the device information fields 'manu', 'version', 'profile' and 'serial' in the capi_ctr structure of the device, and signal its readiness by calling capi_ctr_ready(). From then on, Kernel CAPI may call the registered callback functions for the device.h]hXKBefore the device can be actually used, the driver must fill in the device information fields ‘manu’, ‘version’, ‘profile’ and ‘serial’ in the capi_ctr structure of the device, and signal its readiness by calling capi_ctr_ready(). From then on, Kernel CAPI may call the registered callback functions for the device.}(hj4hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjhhubh)}(hIf the device becomes unusable for any reason (shutdown, disconnect ...), the driver has to call capi_ctr_down(). This will prevent further calls to the callback functions by Kernel CAPI.h]hIf the device becomes unusable for any reason (shutdown, disconnect ...), the driver has to call capi_ctr_down(). This will prevent further calls to the callback functions by Kernel CAPI.}(hjBhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjhhubeh}(h]driver-and-device-registrationah ]h"]!2. driver and device registrationah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h-3. Application Registration and Communicationh]h-3. Application Registration and Communication}(hj[hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhhhhhK1ubh)}(hXKernel CAPI forwards registration requests from applications (calls to CAPI operation CAPI_REGISTER) to an appropriate hardware driver by calling its register_appl() callback function. A unique Application ID (ApplID, u16) is allocated by Kernel CAPI and passed to register_appl() along with the parameter structure provided by the application. This is analogous to the open() operation on regular files or character devices.h]hXKernel CAPI forwards registration requests from applications (calls to CAPI operation CAPI_REGISTER) to an appropriate hardware driver by calling its register_appl() callback function. A unique Application ID (ApplID, u16) is allocated by Kernel CAPI and passed to register_appl() along with the parameter structure provided by the application. This is analogous to the open() operation on regular files or character devices.}(hjihjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjVhhubh)}(hXiAfter a successful return from register_appl(), CAPI messages from the application may be passed to the driver for the device via calls to the send_message() callback function. Conversely, the driver may call Kernel CAPI's capi_ctr_handle_message() function to pass a received CAPI message to Kernel CAPI for forwarding to an application, specifying its ApplID.h]hXkAfter a successful return from register_appl(), CAPI messages from the application may be passed to the driver for the device via calls to the send_message() callback function. Conversely, the driver may call Kernel CAPI’s capi_ctr_handle_message() function to pass a received CAPI message to Kernel CAPI for forwarding to an application, specifying its ApplID.}(hjwhjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjVhhubh)}(hX-Deregistration requests (CAPI operation CAPI_RELEASE) from applications are forwarded as calls to the release_appl() callback function, passing the same ApplID as with register_appl(). After return from release_appl(), no CAPI messages for that application may be passed to or from the device anymore.h]hX-Deregistration requests (CAPI operation CAPI_RELEASE) from applications are forwarded as calls to the release_appl() callback function, passing the same ApplID as with register_appl(). After return from release_appl(), no CAPI messages for that application may be passed to or from the device anymore.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hjVhhubeh}(h]*application-registration-and-communicationah ]h"]-3. application registration and communicationah$]h&]uh1hhhhhhhhK1ubh)}(hhh](h)}(h4. Data Structuresh]h4. Data Structures}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKGubh)}(hhh](h)}(h4.1 struct capi_driverh]h4.1 struct capi_driver}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKJubh)}(hThis structure describes a Kernel CAPI driver itself. It is used in the register_capi_driver() and unregister_capi_driver() functions, and contains the following non-private fields, all to be set by the driver before calling register_capi_driver():h]hThis structure describes a Kernel CAPI driver itself. It is used in the register_capi_driver() and unregister_capi_driver() functions, and contains the following non-private fields, all to be set by the driver before calling register_capi_driver():}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjhhubhdefinition_list)}(hhh](hdefinition_list_item)}(hK``char name[32]`` the name of the driver, as a zero-terminated ASCII stringh](hterm)}(h``char name[32]``h]hliteral)}(hjh]h char name[32]}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKQhjubh definition)}(hhh]h)}(h9the name of the driver, as a zero-terminated ASCII stringh]h9the name of the driver, as a zero-terminated ASCII string}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKQhjubj)}(h[``char revision[32]`` the revision number of the driver, as a zero-terminated ASCII string h](j)}(h``char revision[32]``h]j)}(hjh]hchar revision[32]}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKThjubj)}(hhh]h)}(hDthe revision number of the driver, as a zero-terminated ASCII stringh]hDthe revision number of the driver, as a zero-terminated ASCII string}(hj.hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThj)ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKThjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]struct-capi-driverah ]h"]4.1 struct capi_driverah$]h&]uh1hhjhhhhhKJubh)}(hhh](h)}(h4.2 struct capi_ctrh]h4.2 struct capi_ctr}(hjYhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThhhhhKWubh)}(hX This structure describes an ISDN device (controller) handled by a Kernel CAPI driver. After registration via the attach_capi_ctr() function it is passed to all controller specific lower layer interface and callback functions to identify the controller to operate on.h]hX This structure describes an ISDN device (controller) handled by a Kernel CAPI driver. After registration via the attach_capi_ctr() function it is passed to all controller specific lower layer interface and callback functions to identify the controller to operate on.}(hjghjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjThhubh)}(h-It contains the following non-private fields:h]h-It contains the following non-private fields:}(hjuhjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjThhubh)}(hhh](h)}(h9to be set by the driver before calling attach_capi_ctr():h]h9to be set by the driver before calling attach_capi_ctr():}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKaubj)}(hhh](j)}(hH``struct module *owner`` pointer to the driver module owning the device h](j)}(h``struct module *owner``h]j)}(hjh]hstruct module *owner}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKdhjubj)}(hhh]h)}(h.pointer to the driver module owning the deviceh]h.pointer to the driver module owning the device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKdhjubj)}(h[``void *driverdata`` an opaque pointer to driver specific data, not touched by Kernel CAPI h](j)}(h``void *driverdata``h]j)}(hjh]hvoid *driverdata}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKghjubj)}(hhh]h)}(hEan opaque pointer to driver specific data, not touched by Kernel CAPIh]hEan opaque pointer to driver specific data, not touched by Kernel CAPI}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKghjhhubj)}(hP``char name[32]`` the name of the controller, as a zero-terminated ASCII string h](j)}(h``char name[32]``h]j)}(hj h]h char name[32]}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhKjhjubj)}(hhh]h)}(h=the name of the controller, as a zero-terminated ASCII stringh]h=the name of the controller, as a zero-terminated ASCII string}(hj%hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKjhjhhubj)}(hP``char *driver_name`` the name of the driver, as a zero-terminated ASCII string h](j)}(h``char *driver_name``h]j)}(hjCh]hchar *driver_name}(hhhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1jhhhKmhj=ubj)}(hhh]h)}(h9the name of the driver, as a zero-terminated ASCII stringh]h9the name of the driver, as a zero-terminated ASCII string}(hj]hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjXubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhhhKmhjhhubj)}(hXp``int (*load_firmware)(struct capi_ctr *ctrlr, capiloaddata *ldata)`` (optional) pointer to a callback function for sending firmware and configuration data to the device The function may return before the operation has completed. Completion must be signalled by a call to capi_ctr_ready(). Return value: 0 on success, error code on error Called in process context. h](j)}(hE``int (*load_firmware)(struct capi_ctr *ctrlr, capiloaddata *ldata)``h]j)}(hj{h]hAint (*load_firmware)(struct capi_ctr *ctrlr, capiloaddata *ldata)}(hhhj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1jhhhKxhjuubj)}(hhh](h)}(hc(optional) pointer to a callback function for sending firmware and configuration data to the deviceh]hc(optional) pointer to a callback function for sending firmware and configuration data to the device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubh)}(h;The function may return before the operation has completed.h]h;The function may return before the operation has completed.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjubh)}(h;Completion must be signalled by a call to capi_ctr_ready().h]h;Completion must be signalled by a call to capi_ctr_ready().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjubh)}(hJReturn value: 0 on success, error code on error Called in process context.h]hJReturn value: 0 on success, error code on error Called in process context.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubeh}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhhhKxhjhhubj)}(hX,``void (*reset_ctr)(struct capi_ctr *ctrlr)`` (optional) pointer to a callback function for stopping the device, releasing all registered applications The function may return before the operation has completed. Completion must be signalled by a call to capi_ctr_down(). Called in process context. h](j)}(h-``void (*reset_ctr)(struct capi_ctr *ctrlr)``h]j)}(hjh]h)void (*reset_ctr)(struct capi_ctr *ctrlr)}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh](h)}(hh(optional) pointer to a callback function for stopping the device, releasing all registered applicationsh]hh(optional) pointer to a callback function for stopping the device, releasing all registered applications}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubh)}(h;The function may return before the operation has completed.h]h;The function may return before the operation has completed.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hjubh)}(h:Completion must be signalled by a call to capi_ctr_down().h]h:Completion must be signalled by a call to capi_ctr_down().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hCalled in process context.h]hCalled in process context.}(hj!hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX``void (*register_appl)(struct capi_ctr *ctrlr, u16 applid, capi_register_params *rparam)`` pointers to callback function for registration of applications with the device Calls to these functions are serialized by Kernel CAPI so that only one call to any of them is active at any time. h](j)}(h[``void (*register_appl)(struct capi_ctr *ctrlr, u16 applid, capi_register_params *rparam)``h]j)}(hj?h]hWvoid (*register_appl)(struct capi_ctr *ctrlr, u16 applid, capi_register_params *rparam)}(hhhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1jhhhKhj9ubj)}(hhh](h)}(hNpointers to callback function for registration of applications with the deviceh]hNpointers to callback function for registration of applications with the device}(hjYhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjTubh)}(hrCalls to these functions are serialized by Kernel CAPI so that only one call to any of them is active at any time.h]hrCalls to these functions are serialized by Kernel CAPI so that only one call to any of them is active at any time.}(hjghjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjTubeh}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h``void (*release_appl)(struct capi_ctr *ctrlr, u16 applid)`` pointers to callback functions deregistration of applications with the device Calls to these functions are serialized by Kernel CAPI so that only one call to any of them is active at any time. h](j)}(h<``void (*release_appl)(struct capi_ctr *ctrlr, u16 applid)``h]j)}(hjh]h8void (*release_appl)(struct capi_ctr *ctrlr, u16 applid)}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh](h)}(hMpointers to callback functions deregistration of applications with the deviceh]hMpointers to callback functions deregistration of applications with the device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hrCalls to these functions are serialized by Kernel CAPI so that only one call to any of them is active at any time.h]hrCalls to these functions are serialized by Kernel CAPI so that only one call to any of them is active at any time.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX ``u16 (*send_message)(struct capi_ctr *ctrlr, struct sk_buff *skb)`` pointer to a callback function for sending a CAPI message to the device Return value: CAPI error code If the method returns 0 (CAPI_NOERROR) the driver has taken ownership of the skb and the caller may no longer access it. If it returns a non-zero (error) value then ownership of the skb returns to the caller who may reuse or free it. The return value should only be used to signal problems with respect to accepting or queueing the message. Errors occurring during the actual processing of the message should be signaled with an appropriate reply message. May be called in process or interrupt context. Calls to this function are not serialized by Kernel CAPI, ie. it must be prepared to be re-entered. h](j)}(hE``u16 (*send_message)(struct capi_ctr *ctrlr, struct sk_buff *skb)``h]j)}(hjh]hAu16 (*send_message)(struct capi_ctr *ctrlr, struct sk_buff *skb)}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh](h)}(hGpointer to a callback function for sending a CAPI message to the deviceh]hGpointer to a callback function for sending a CAPI message to the device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hReturn value: CAPI error codeh]hReturn value: CAPI error code}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hIf the method returns 0 (CAPI_NOERROR) the driver has taken ownership of the skb and the caller may no longer access it. If it returns a non-zero (error) value then ownership of the skb returns to the caller who may reuse or free it.h]hIf the method returns 0 (CAPI_NOERROR) the driver has taken ownership of the skb and the caller may no longer access it. If it returns a non-zero (error) value then ownership of the skb returns to the caller who may reuse or free it.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe return value should only be used to signal problems with respect to accepting or queueing the message. Errors occurring during the actual processing of the message should be signaled with an appropriate reply message.h]hThe return value should only be used to signal problems with respect to accepting or queueing the message. Errors occurring during the actual processing of the message should be signaled with an appropriate reply message.}(hjhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h.May be called in process or interrupt context.h]h.May be called in process or interrupt context.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hcCalls to this function are not serialized by Kernel CAPI, ie. it must be prepared to be re-entered.h]hcCalls to this function are not serialized by Kernel CAPI, ie. it must be prepared to be re-entered.}(hj+hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h``char *(*procinfo)(struct capi_ctr *ctrlr)`` pointer to a callback function returning the entry for the device in the CAPI controller info table, /proc/capi/controller h](j)}(h-``char *(*procinfo)(struct capi_ctr *ctrlr)``h]j)}(hjIh]h)char *(*procinfo)(struct capi_ctr *ctrlr)}(hhhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1jhhhKhjCubj)}(hhh]h)}(hzpointer to a callback function returning the entry for the device in the CAPI controller info table, /proc/capi/controllerh]hzpointer to a callback function returning the entry for the device in the CAPI controller info table, /proc/capi/controller}(hjchjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj^ubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hVNote: Callback functions except send_message() are never called in interrupt context. h](j)}(hNote:h]hNote:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj{ubj)}(hhh]h)}(hOCallback functions except send_message() are never called in interrupt context.h]hOCallback functions except send_message() are never called in interrupt context.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]6to-be-set-by-the-driver-before-calling-attach-capi-ctrah ]h"]9to be set by the driver before calling attach_capi_ctr():ah$]h&]uh1hhjThhhhhKaubh)}(hhh](h)}(h0to be filled in before calling capi_ctr_ready():h]h0to be filled in before calling capi_ctr_ready():}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hhh](j)}(hM``u8 manu[CAPI_MANUFACTURER_LEN]`` value to return for CAPI_GET_MANUFACTURER h](j)}(h"``u8 manu[CAPI_MANUFACTURER_LEN]``h]j)}(hjh]hu8 manu[CAPI_MANUFACTURER_LEN]}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h)value to return for CAPI_GET_MANUFACTURERh]h)value to return for CAPI_GET_MANUFACTURER}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h>``capi_version version`` value to return for CAPI_GET_VERSION h](j)}(h``capi_version version``h]j)}(hj h]hcapi_version version}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h$value to return for CAPI_GET_VERSIONh]h$value to return for CAPI_GET_VERSION}(hj$hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h>``capi_profile profile`` value to return for CAPI_GET_PROFILE h](j)}(h``capi_profile profile``h]j)}(hjBh]hcapi_profile profile}(hhhjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jhhhKhj<ubj)}(hhh]h)}(h$value to return for CAPI_GET_PROFILEh]h$value to return for CAPI_GET_PROFILE}(hj\hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjWubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hD``u8 serial[CAPI_SERIAL_LEN]`` value to return for CAPI_GET_SERIAL h](j)}(h``u8 serial[CAPI_SERIAL_LEN]``h]j)}(hjzh]hu8 serial[CAPI_SERIAL_LEN]}(hhhj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1jhhhKhjtubj)}(hhh]h)}(h#value to return for CAPI_GET_SERIALh]h#value to return for CAPI_GET_SERIAL}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]-to-be-filled-in-before-calling-capi-ctr-readyah ]h"]0to be filled in before calling capi_ctr_ready():ah$]h&]uh1hhjThhhhhKubeh}(h]struct-capi-ctrah ]h"]4.2 struct capi_ctrah$]h&]uh1hhjhhhhhKWubh)}(hhh](h)}(h4.3 SKBsh]h4.3 SKBs}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hCAPI messages are passed between Kernel CAPI and the driver via send_message() and capi_ctr_handle_message(), stored in the data portion of a socket buffer (skb). Each skb contains a single CAPI message coded according to the CAPI 2.0 standard.h]hCAPI messages are passed between Kernel CAPI and the driver via send_message() and capi_ctr_handle_message(), stored in the data portion of a socket buffer (skb). Each skb contains a single CAPI message coded according to the CAPI 2.0 standard.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX:For the data transfer messages, DATA_B3_REQ and DATA_B3_IND, the actual payload data immediately follows the CAPI message itself within the same skb. The Data and Data64 parameters are not used for processing. The Data64 parameter may be omitted by setting the length field of the CAPI message to 22 instead of 30.h]hX:For the data transfer messages, DATA_B3_REQ and DATA_B3_IND, the actual payload data immediately follows the CAPI message itself within the same skb. The Data and Data64 parameters are not used for processing. The Data64 parameter may be omitted by setting the length field of the CAPI message to 22 instead of 30.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]skbsah ]h"]4.3 skbsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h4.4 The _cmsg Structureh]h4.4 The _cmsg Structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h%(declared in )h]h%(declared in )}(hj hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX The _cmsg structure stores the contents of a CAPI 2.0 message in an easily accessible form. It contains members for all possible CAPI 2.0 parameters, including subparameters of the Additional Info and B Protocol structured parameters, with the following exceptions:h]hX The _cmsg structure stores the contents of a CAPI 2.0 message in an easily accessible form. It contains members for all possible CAPI 2.0 parameters, including subparameters of the Additional Info and B Protocol structured parameters, with the following exceptions:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh bullet_list)}(hhh](h list_item)}(h*second Calling party number (CONNECT_IND) h]h)}(h)second Calling party number (CONNECT_IND)h]h)second Calling party number (CONNECT_IND)}(hj1hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ubah}(h]h ]h"]h$]h&]uh1j)hj&hhhhhNubj*)}(h%Data64 (DATA_B3_REQ and DATA_B3_IND) h]h)}(h$Data64 (DATA_B3_REQ and DATA_B3_IND)h]h$Data64 (DATA_B3_REQ and DATA_B3_IND)}(hjIhjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjCubah}(h]h ]h"]h$]h&]uh1j)hj&hhhhhNubj*)}(hMSending complete (subparameter of Additional Info, CONNECT_REQ and INFO_REQ) h]h)}(hLSending complete (subparameter of Additional Info, CONNECT_REQ and INFO_REQ)h]hLSending complete (subparameter of Additional Info, CONNECT_REQ and INFO_REQ)}(hjahj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[ubah}(h]h ]h"]h$]h&]uh1j)hj&hhhhhNubj*)}(hgGlobal Configuration (subparameter of B Protocol, CONNECT_REQ, CONNECT_RESP and SELECT_B_PROTOCOL_REQ) h]h)}(hfGlobal Configuration (subparameter of B Protocol, CONNECT_REQ, CONNECT_RESP and SELECT_B_PROTOCOL_REQ)h]hfGlobal Configuration (subparameter of B Protocol, CONNECT_REQ, CONNECT_RESP and SELECT_B_PROTOCOL_REQ)}(hjyhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjsubah}(h]h ]h"]h$]h&]uh1j)hj&hhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1j$hhhKhjhhubh)}(hOnly those parameters appearing in the message type currently being processed are actually used. Unused members should be set to zero.h]hOnly those parameters appearing in the message type currently being processed are actually used. Unused members should be set to zero.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hMembers are named after the CAPI 2.0 standard names of the parameters they represent. See for the exact spelling. Member data types are:h]hMembers are named after the CAPI 2.0 standard names of the parameters they represent. See for the exact spelling. Member data types are:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKAuh1jhjubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hu8h]hu8}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"for CAPI parameters of type 'byte'h]h&for CAPI parameters of type ‘byte’}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hu16h]hu16}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"for CAPI parameters of type 'word'h]h&for CAPI parameters of type ‘word’}(hj.hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hu32h]hu32}(hjNhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIubah}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh]h)}(h#for CAPI parameters of type 'dword'h]h'for CAPI parameters of type ‘dword’}(hjehjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj`ubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h_cstructh]h_cstruct}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj}ubj)}(hhh]h)}(hX for CAPI parameters of type 'struct' The member is a pointer to a buffer containing the parameter in CAPI encoding (length + content). It may also be NULL, which will be taken to represent an empty (zero length) parameter. Subparameters are stored in encoded form within the content part.h]hX$for CAPI parameters of type ‘struct’ The member is a pointer to a buffer containing the parameter in CAPI encoding (length + content). It may also be NULL, which will be taken to represent an empty (zero length) parameter. Subparameters are stored in encoded form within the content part.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h _cmstructh]h _cmstruct}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hXralternative representation for CAPI parameters of type 'struct' (used only for the 'Additional Info' and 'B Protocol' parameters) The representation is a single byte containing one of the values: CAPI_DEFAULT: The parameter is empty/absent. CAPI_COMPOSE: The parameter is present. Subparameter values are stored individually in the corresponding _cmsg structure members.h]hX~alternative representation for CAPI parameters of type ‘struct’ (used only for the ‘Additional Info’ and ‘B Protocol’ parameters) The representation is a single byte containing one of the values: CAPI_DEFAULT: The parameter is empty/absent. CAPI_COMPOSE: The parameter is present. Subparameter values are stored individually in the corresponding _cmsg structure members.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]the-cmsg-structureah ]h"]4.4 the _cmsg structureah$]h&]uh1hhjhhhhhKubeh}(h]data-structuresah ]h"]4. data structuresah$]h&]uh1hhhhhhhhKGubh)}(hhh](h)}(h"5. Lower Layer Interface Functionsh]h"5. Lower Layer Interface Functions}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh literal_block)}(hWint attach_capi_ctr(struct capi_ctr *ctrlr) int detach_capi_ctr(struct capi_ctr *ctrlr)h]hWint attach_capi_ctr(struct capi_ctr *ctrlr) int detach_capi_ctr(struct capi_ctr *ctrlr)}(hhhj! ubah}(h]h ]h"]h$]h&] xml:spacepreserveuh1j hhhMhj hhubh)}(h:register/unregister a device (controller) with Kernel CAPIh]h:register/unregister a device (controller) with Kernel CAPI}(hj3 hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj )}(hVvoid capi_ctr_ready(struct capi_ctr *ctrlr) void capi_ctr_down(struct capi_ctr *ctrlr)h]hVvoid capi_ctr_ready(struct capi_ctr *ctrlr) void capi_ctr_down(struct capi_ctr *ctrlr)}(hhhj? ubah}(h]h ]h"]h$]h&]j/ j0 uh1j hhhM hj hhubh)}(h!signal controller ready/not readyh]h!signal controller ready/not ready}(hjO hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj )}(hsvoid capi_ctr_handle_message(struct capi_ctr * ctrlr, u16 applid, struct sk_buff *skb)h]hsvoid capi_ctr_handle_message(struct capi_ctr * ctrlr, u16 applid, struct sk_buff *skb)}(hhhj[ ubah}(h]h ]h"]h$]h&]j/ j0 uh1j hhhMhj hhubh)}(hWpass a received CAPI message to Kernel CAPI for forwarding to the specified applicationh]hWpass a received CAPI message to Kernel CAPI for forwarding to the specified application}(hjk hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]lower-layer-interface-functionsah ]h"]"5. lower layer interface functionsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h6. Helper Functions and Macrosh]h6. Helper Functions and Macros}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hbMacros to extract/set element values from/in a CAPI message header (from ):h]hbMacros to extract/set element values from/in a CAPI message header (from ):}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubhthead)}(hhh]j)}(hhh](j)}(hhh]h)}(h Get Macroh]h Get Macro}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h Set Macroh]h Set Macro}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hElement (Type)h]hElement (Type)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hCAPIMSG_LEN(m)h]hCAPIMSG_LEN(m)}(hj& hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj! ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hCAPIMSG_SETLEN(m, len)h]hCAPIMSG_SETLEN(m, len)}(hj= hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj8 ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hTotal Length (u16)h]hTotal Length (u16)}(hjT hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjO ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hCAPIMSG_APPID(m)h]hCAPIMSG_APPID(m)}(hjt hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjo ubah}(h]h ]h"]h$]h&]uh1jhjl ubj)}(hhh]h)}(hCAPIMSG_SETAPPID(m, applid)h]hCAPIMSG_SETAPPID(m, applid)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj ubah}(h]h ]h"]h$]h&]uh1jhjl ubj)}(hhh]h)}(h ApplID (u16)h]h ApplID (u16)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj ubah}(h]h ]h"]h$]h&]uh1jhjl ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hCAPIMSG_COMMAND(m)h]hCAPIMSG_COMMAND(m)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hCAPIMSG_SETCOMMAND(m,cmd)h]hCAPIMSG_SETCOMMAND(m,cmd)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h Command (u8)h]h Command (u8)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hCAPIMSG_SUBCOMMAND(m)h]hCAPIMSG_SUBCOMMAND(m)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hCAPIMSG_SETSUBCOMMAND(m, cmd)h]hCAPIMSG_SETSUBCOMMAND(m, cmd)}(hj' hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj" ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hSubcommand (u8)h]hSubcommand (u8)}(hj> hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj9 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hCAPIMSG_CMD(m)h]hCAPIMSG_CMD(m)}(hj^ hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjY ubah}(h]h ]h"]h$]h&]uh1jhjV ubj)}(hhh]j%)}(hhh]j*)}(hhh]h}(h]h ]h"]h$]h&]uh1j)hjs ubah}(h]h ]h"]h$]h&]j-uh1j$hhhM&hjp ubah}(h]h ]h"]h$]h&]uh1jhjV ubj)}(hhh]h)}(hCommand*256 + Subcommand (u16)h]hCommand*256 + Subcommand (u16)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hj ubah}(h]h ]h"]h$]h&]uh1jhjV ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hCAPIMSG_MSGID(m)h]hCAPIMSG_MSGID(m)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hCAPIMSG_SETMSGID(m, msgid)h]hCAPIMSG_SETMSGID(m, msgid)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hMessage Number (u16)h]hMessage Number (u16)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hCAPIMSG_CONTROL(m)h]hCAPIMSG_CONTROL(m)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hCAPIMSG_SETCONTROL(m, contr)h]hCAPIMSG_SETCONTROL(m, contr)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hController/PLCI/NCCI (u32)h]hController/PLCI/NCCI (u32)}(hj- hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj( ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hCAPIMSG_DATALEN(m)h]hCAPIMSG_DATALEN(m)}(hjM hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjH ubah}(h]h ]h"]h$]h&]uh1jhjE ubj)}(hhh]h)}(hCAPIMSG_SETDATALEN(m, len)h]hCAPIMSG_SETDATALEN(m, len)}(hjd hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj_ ubah}(h]h ]h"]h$]h&]uh1jhjE ubj)}(hhh]h)}(hData Length (u16)h]hData Length (u16)}(hj{ hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjv ubah}(h]h ]h"]h$]h&]uh1jhjE ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1jhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubh)}(hSLibrary functions for working with _cmsg structures (from ):h]hSLibrary functions for working with _cmsg structures (from ):}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj hhubj)}(hhh]j)}(hX``char *capi_cmd2str(u8 Command, u8 Subcommand)`` Returns the CAPI 2.0 message name corresponding to the given command and subcommand values, as a static ASCII string. The return value may be NULL if the command/subcommand is not one of those defined in the CAPI 2.0 standard. h](j)}(h1``char *capi_cmd2str(u8 Command, u8 Subcommand)``h]j)}(hj h]h-char *capi_cmd2str(u8 Command, u8 Subcommand)}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhM8hj ubj)}(hhh]h)}(hReturns the CAPI 2.0 message name corresponding to the given command and subcommand values, as a static ASCII string. The return value may be NULL if the command/subcommand is not one of those defined in the CAPI 2.0 standard.h]hReturns the CAPI 2.0 message name corresponding to the given command and subcommand values, as a static ASCII string. The return value may be NULL if the command/subcommand is not one of those defined in the CAPI 2.0 standard.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhM8hj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h]helper-functions-and-macrosah ]h"]6. helper functions and macrosah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h 7. Debuggingh]h 7. Debugging}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM;ubh)}(hXThe module kernelcapi has a module parameter showcapimsgs controlling some debugging output produced by the module. It can only be set when the module is loaded, via a parameter "showcapimsgs=" to the modprobe command, either on the command line or in the configuration file.h]hXThe module kernelcapi has a module parameter showcapimsgs controlling some debugging output produced by the module. It can only be set when the module is loaded, via a parameter “showcapimsgs=” to the modprobe command, either on the command line or in the configuration file.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj hhubh)}(hhIf the lowest bit of showcapimsgs is set, kernelcapi logs controller and application up and down events.h]hhIf the lowest bit of showcapimsgs is set, kernelcapi logs controller and application up and down events.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj hhubh)}(hX_In addition, every registered CAPI controller has an associated traceflag parameter controlling how CAPI messages sent from and to the controller are logged. The traceflag parameter is initialized with the value of the showcapimsgs parameter when the controller is registered, but can later be changed via the MANUFACTURER_REQ command KCAPI_CMD_TRACE.h]hX_In addition, every registered CAPI controller has an associated traceflag parameter controlling how CAPI messages sent from and to the controller are logged. The traceflag parameter is initialized with the value of the showcapimsgs parameter when the controller is registered, but can later be changed via the MANUFACTURER_REQ command KCAPI_CMD_TRACE.}(hj, hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj hhubh)}(hIf the value of traceflag is non-zero, CAPI messages are logged. DATA_B3 messages are only logged if the value of traceflag is > 2.h]hIf the value of traceflag is non-zero, CAPI messages are logged. DATA_B3 messages are only logged if the value of traceflag is > 2.}(hj: hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhj hhubh)}(hIf the lowest bit of traceflag is set, only the command/subcommand and message length are logged. Otherwise, kernelcapi logs a readable representation of the entire message.h]hIf the lowest bit of traceflag is set, only the command/subcommand and message length are logged. Otherwise, kernelcapi logs a readable representation of the entire message.}(hjH hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhj hhubeh}(h] debuggingah ]h"] 7. debuggingah$]h&]uh1hhhhhhhhM;ubeh}(h])kernel-capi-interface-to-hardware-driversah ]h"])kernel capi interface to hardware driversah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confapep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(ja j^ jj jSjPjjj j jQjNjjjjjjjjj j j| jy j j jY jV u nametypes}(ja NjNjSNjNj NjQNjNjNjNjNj Nj| Nj NjY Nuh}(j^ hj hjPjjjVj jjNjjjTjjjjjjj jjy j j j jV j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.