Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
capi.c File Reference
#include "gigaset.h"
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/ratelimit.h>
#include <linux/isdn/capilli.h>
#include <linux/isdn/capicmd.h>
#include <linux/isdn/capiutil.h>
#include <linux/export.h>

Go to the source code of this file.

Data Structures

struct  gigaset_capi_appl
 
struct  gigaset_capi_ctr
 

Macros

#define CapiNcpiNotSupportedByProtocol   0x0001
 
#define CapiFlagsNotSupportedByProtocol   0x0002
 
#define CapiAlertAlreadySent   0x0003
 
#define CapiFacilitySpecificFunctionNotSupported   0x3011
 
#define CAPI_CONNECT_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 2 + 8 * 1)
 
#define CAPI_CONNECT_ACTIVE_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 3 * 1)
 
#define CAPI_CONNECT_B3_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 1)
 
#define CAPI_CONNECT_B3_ACTIVE_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 1)
 
#define CAPI_DATA_B3_REQ_LEN64   (CAPI_MSG_BASELEN + 4 + 4 + 2 + 2 + 2 + 8)
 
#define CAPI_DATA_B3_CONF_LEN   (CAPI_MSG_BASELEN + 4 + 2 + 2)
 
#define CAPI_DISCONNECT_IND_LEN   (CAPI_MSG_BASELEN + 4 + 2)
 
#define CAPI_DISCONNECT_B3_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 2 + 1)
 
#define CAPI_FACILITY_CONF_BASELEN   (CAPI_MSG_BASELEN + 4 + 2 + 2 + 1)
 
#define CAPI_STDCONF_LEN   (CAPI_MSG_BASELEN + 4 + 2)
 
#define CAPI_FACILITY_HANDSET   0x0000
 
#define CAPI_FACILITY_DTMF   0x0001
 
#define CAPI_FACILITY_V42BIS   0x0002
 
#define CAPI_FACILITY_SUPPSVC   0x0003
 
#define CAPI_FACILITY_WAKEUP   0x0004
 
#define CAPI_FACILITY_LI   0x0005
 
#define CAPI_SUPPSVC_GETSUPPORTED   0x0000
 
#define CAPI_SUPPSVC_LISTEN   0x0001
 
#define CAPIMSG_PLCI_PART(m)   CAPIMSG_U8(m, 9)
 
#define CAPIMSG_NCCI_PART(m)   CAPIMSG_U16(m, 10)
 
#define CAPIMSG_HANDLE_REQ(m)   CAPIMSG_U16(m, 18) /* DATA_B3_REQ/_IND only! */
 
#define CAPIMSG_FLAGS(m)   CAPIMSG_U16(m, 20)
 
#define CAPIMSG_SETCONTROLLER(m, contr)   capimsg_setu8(m, 8, contr)
 
#define CAPIMSG_SETPLCI_PART(m, plci)   capimsg_setu8(m, 9, plci)
 
#define CAPIMSG_SETNCCI_PART(m, ncci)   capimsg_setu16(m, 10, ncci)
 
#define CAPIMSG_SETFLAGS(m, flags)   capimsg_setu16(m, 20, flags)
 
#define CAPIMSG_SETHANDLE_CONF(m, handle)   capimsg_setu16(m, 12, handle)
 
#define CAPIMSG_SETINFO_CONF(m, info)   capimsg_setu16(m, 14, info)
 
#define CAPI_FLAGS_DELIVERY_CONFIRMATION   0x04
 
#define CAPI_FLAGS_RESERVED   (~0x1f)
 
#define MAX_BC_OCTETS   11
 
#define MAX_HLC_OCTETS   3
 
#define MAX_NUMBER_DIGITS   20
 
#define MAX_FMT_IE_LEN   20
 
#define APCONN_NONE   0 /* inactive/listening */
 
#define APCONN_SETUP   1 /* connecting */
 
#define APCONN_ACTIVE   2 /* B channel up */
 

Typedefs

typedef void(* capi_send_handler_t )(struct gigaset_capi_ctr *, struct gigaset_capi_appl *, struct sk_buff *)
 

Functions

void gigaset_skb_sent (struct bc_state *bcs, struct sk_buff *dskb)
 
 EXPORT_SYMBOL_GPL (gigaset_skb_sent)
 
void gigaset_skb_rcvd (struct bc_state *bcs, struct sk_buff *skb)
 
 EXPORT_SYMBOL_GPL (gigaset_skb_rcvd)
 
void gigaset_isdn_rcv_err (struct bc_state *bcs)
 
 EXPORT_SYMBOL_GPL (gigaset_isdn_rcv_err)
 
int gigaset_isdn_icall (struct at_state_t *at_state)
 
void gigaset_isdn_connD (struct bc_state *bcs)
 
void gigaset_isdn_hupD (struct bc_state *bcs)
 
void gigaset_isdn_connB (struct bc_state *bcs)
 
void gigaset_isdn_hupB (struct bc_state *bcs)
 
void gigaset_isdn_start (struct cardstate *cs)
 
void gigaset_isdn_stop (struct cardstate *cs)
 
int gigaset_isdn_regdev (struct cardstate *cs, const char *isdnid)
 
void gigaset_isdn_unregdev (struct cardstate *cs)
 
void gigaset_isdn_regdrv (void)
 
void gigaset_isdn_unregdrv (void)
 

Macro Definition Documentation

#define APCONN_ACTIVE   2 /* B channel up */

Definition at line 79 of file capi.c.

#define APCONN_NONE   0 /* inactive/listening */

Definition at line 77 of file capi.c.

#define APCONN_SETUP   1 /* connecting */

Definition at line 78 of file capi.c.

#define CAPI_CONNECT_ACTIVE_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 3 * 1)

Definition at line 31 of file capi.c.

#define CAPI_CONNECT_B3_ACTIVE_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 1)

Definition at line 33 of file capi.c.

#define CAPI_CONNECT_B3_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 1)

Definition at line 32 of file capi.c.

#define CAPI_CONNECT_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 2 + 8 * 1)

Definition at line 30 of file capi.c.

#define CAPI_DATA_B3_CONF_LEN   (CAPI_MSG_BASELEN + 4 + 2 + 2)

Definition at line 35 of file capi.c.

#define CAPI_DATA_B3_REQ_LEN64   (CAPI_MSG_BASELEN + 4 + 4 + 2 + 2 + 2 + 8)

Definition at line 34 of file capi.c.

#define CAPI_DISCONNECT_B3_IND_BASELEN   (CAPI_MSG_BASELEN + 4 + 2 + 1)

Definition at line 37 of file capi.c.

#define CAPI_DISCONNECT_IND_LEN   (CAPI_MSG_BASELEN + 4 + 2)

Definition at line 36 of file capi.c.

#define CAPI_FACILITY_CONF_BASELEN   (CAPI_MSG_BASELEN + 4 + 2 + 2 + 1)

Definition at line 38 of file capi.c.

#define CAPI_FACILITY_DTMF   0x0001

Definition at line 43 of file capi.c.

#define CAPI_FACILITY_HANDSET   0x0000

Definition at line 42 of file capi.c.

#define CAPI_FACILITY_LI   0x0005

Definition at line 47 of file capi.c.

#define CAPI_FACILITY_SUPPSVC   0x0003

Definition at line 45 of file capi.c.

#define CAPI_FACILITY_V42BIS   0x0002

Definition at line 44 of file capi.c.

#define CAPI_FACILITY_WAKEUP   0x0004

Definition at line 46 of file capi.c.

#define CAPI_FLAGS_DELIVERY_CONFIRMATION   0x04

Definition at line 67 of file capi.c.

#define CAPI_FLAGS_RESERVED   (~0x1f)

Definition at line 68 of file capi.c.

#define CAPI_STDCONF_LEN   (CAPI_MSG_BASELEN + 4 + 2)

Definition at line 40 of file capi.c.

#define CAPI_SUPPSVC_GETSUPPORTED   0x0000

Definition at line 49 of file capi.c.

#define CAPI_SUPPSVC_LISTEN   0x0001

Definition at line 50 of file capi.c.

#define CapiAlertAlreadySent   0x0003

Definition at line 26 of file capi.c.

#define CapiFacilitySpecificFunctionNotSupported   0x3011

Definition at line 27 of file capi.c.

#define CapiFlagsNotSupportedByProtocol   0x0002

Definition at line 25 of file capi.c.

#define CAPIMSG_FLAGS (   m)    CAPIMSG_U16(m, 20)

Definition at line 56 of file capi.c.

#define CAPIMSG_HANDLE_REQ (   m)    CAPIMSG_U16(m, 18) /* DATA_B3_REQ/_IND only! */

Definition at line 55 of file capi.c.

#define CAPIMSG_NCCI_PART (   m)    CAPIMSG_U16(m, 10)

Definition at line 54 of file capi.c.

#define CAPIMSG_PLCI_PART (   m)    CAPIMSG_U8(m, 9)

Definition at line 53 of file capi.c.

#define CAPIMSG_SETCONTROLLER (   m,
  contr 
)    capimsg_setu8(m, 8, contr)

Definition at line 57 of file capi.c.

#define CAPIMSG_SETFLAGS (   m,
  flags 
)    capimsg_setu16(m, 20, flags)

Definition at line 60 of file capi.c.

#define CAPIMSG_SETHANDLE_CONF (   m,
  handle 
)    capimsg_setu16(m, 12, handle)

Definition at line 63 of file capi.c.

#define CAPIMSG_SETINFO_CONF (   m,
  info 
)    capimsg_setu16(m, 14, info)

Definition at line 64 of file capi.c.

#define CAPIMSG_SETNCCI_PART (   m,
  ncci 
)    capimsg_setu16(m, 10, ncci)

Definition at line 59 of file capi.c.

#define CAPIMSG_SETPLCI_PART (   m,
  plci 
)    capimsg_setu8(m, 9, plci)

Definition at line 58 of file capi.c.

#define CapiNcpiNotSupportedByProtocol   0x0001

Definition at line 24 of file capi.c.

#define MAX_BC_OCTETS   11

Definition at line 71 of file capi.c.

#define MAX_FMT_IE_LEN   20

Definition at line 74 of file capi.c.

#define MAX_HLC_OCTETS   3

Definition at line 72 of file capi.c.

#define MAX_NUMBER_DIGITS   20

Definition at line 73 of file capi.c.

Typedef Documentation

typedef void(* capi_send_handler_t)(struct gigaset_capi_ctr *, struct gigaset_capi_appl *, struct sk_buff *)

Definition at line 2095 of file capi.c.

Function Documentation

EXPORT_SYMBOL_GPL ( gigaset_skb_sent  )
EXPORT_SYMBOL_GPL ( gigaset_skb_rcvd  )
EXPORT_SYMBOL_GPL ( gigaset_isdn_rcv_err  )
void gigaset_isdn_connB ( struct bc_state bcs)

gigaset_isdn_connB() - signal B channel connect : B channel descriptor structure.

Called by main module at tasklet level to notify the LL that the B channel connection has been established.

Definition at line 830 of file capi.c.

void gigaset_isdn_connD ( struct bc_state bcs)

gigaset_isdn_connD() - signal D channel connect : B channel descriptor structure.

Called by main module at tasklet level to notify the LL that the D channel connection has been established.

Definition at line 735 of file capi.c.

void gigaset_isdn_hupB ( struct bc_state bcs)

gigaset_isdn_hupB() - signal B channel hangup : B channel descriptor structure.

Called by main module to notify the LL that the B channel connection has been shut down.

Definition at line 900 of file capi.c.

void gigaset_isdn_hupD ( struct bc_state bcs)

gigaset_isdn_hupD() - signal D channel hangup : B channel descriptor structure.

Called by main module at tasklet level to notify the LL that the D channel connection has been shut down.

Definition at line 800 of file capi.c.

int gigaset_isdn_icall ( struct at_state_t at_state)

gigaset_isdn_icall() - signal incoming call : connection state structure.

Called by main module at tasklet level to notify the LL that an incoming call has been received. contains the parameters of the call.

Return value: call disposition (ICALL_*)

Definition at line 491 of file capi.c.

void gigaset_isdn_rcv_err ( struct bc_state bcs)

gigaset_isdn_rcv_err() - signal receive error : B channel descriptor structure.

Called by hardware module {bas,ser,usb}_gigaset when a receive error has occurred, for signalling to the LL.

Definition at line 467 of file capi.c.

int gigaset_isdn_regdev ( struct cardstate cs,
const char isdnid 
)

gigaset_isdn_regdev() - register device to LL : device descriptor structure. : device name.

Return value: 0 on success, error code < 0 on failure

Definition at line 2353 of file capi.c.

void gigaset_isdn_regdrv ( void  )

gigaset_isdn_regdrv() - register driver to LL

Definition at line 2414 of file capi.c.

void gigaset_isdn_start ( struct cardstate cs)

gigaset_isdn_start() - signal device availability : device descriptor structure.

Called by main module to notify the LL that the device is available for use.

Definition at line 921 of file capi.c.

void gigaset_isdn_stop ( struct cardstate cs)

gigaset_isdn_stop() - signal device unavailability : device descriptor structure.

Called by main module to notify the LL that the device is no longer available for use.

Definition at line 956 of file capi.c.

void gigaset_isdn_unregdev ( struct cardstate cs)

gigaset_isdn_unregdev() - unregister device from LL : device descriptor structure.

Definition at line 2397 of file capi.c.

void gigaset_isdn_unregdrv ( void  )

gigaset_isdn_unregdrv() - unregister driver from LL

Definition at line 2423 of file capi.c.

void gigaset_skb_rcvd ( struct bc_state bcs,
struct sk_buff skb 
)

gigaset_skb_rcvd() - pass received skb to LL : B channel descriptor structure. : received data.

Called by hardware module {bas,ser,usb}_gigaset when user data has been successfully received, for passing to the LL. Warning: skb must not be accessed anymore!

Definition at line 411 of file capi.c.

void gigaset_skb_sent ( struct bc_state bcs,
struct sk_buff dskb 
)

gigaset_skb_sent() - acknowledge transmission of outgoing skb : B channel descriptor structure. : sent data.

Called by hardware module {bas,ser,usb}_gigaset when the data in a skb has been successfully sent, for signalling completion to the LL.

Definition at line 366 of file capi.c.

Variable Documentation

u8* bc

Definition at line 109 of file capi.c.

Definition at line 2100 of file capi.c.

Definition at line 2101 of file capi.c.

u8* hlc

Definition at line 110 of file capi.c.