linux/drivers/isdn/capi/kcapi.h

/*
 * Kernel CAPI 2.0 Module
 *
 * Copyright 1999 by Carsten Paeth <[email protected]>
 * Copyright 2002 by Kai Germaschewski <[email protected]>
 *
 * This software may be used and distributed according to the terms
 * of the GNU General Public License, incorporated herein by reference.
 *
 */


#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/isdn/capilli.h>

#ifdef KCAPI_DEBUG
#define DBG
#else
#define DBG(format, arg...)
#endif

enum {};

extern struct capi_ctr *capi_controller[CAPI_MAXCONTR];
extern struct mutex capi_controller_lock;

extern struct capi20_appl *capi_applications[CAPI_MAXAPPL];

void kcapi_proc_init(void);
void kcapi_proc_exit(void);

struct capi20_appl {};

u16 capi20_isinstalled(void);
u16 capi20_register(struct capi20_appl *ap);
u16 capi20_release(struct capi20_appl *ap);
u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb);
u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]);
u16 capi20_get_version(u32 contr, struct capi_version *verp);
u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]);
u16 capi20_get_profile(u32 contr, struct capi_profile *profp);
int capi20_manufacturer(unsigned long cmd, void __user *data);

#define CAPICTR_UP
#define CAPICTR_DOWN

int kcapi_init(void);
void kcapi_exit(void);

/*----- basic-type definitions -----*/

_cstruct;

_cmstruct;

/*
   The _cmsg structure contains all possible CAPI 2.0 parameter.
   All parameters are stored here first. The function CAPI_CMSG_2_MESSAGE
   assembles the parameter and builds CAPI2.0 conform messages.
   CAPI_MESSAGE_2_CMSG disassembles CAPI 2.0 messages and stores the
   parameter in the _cmsg structure
 */

_cmsg;

/*-----------------------------------------------------------------------*/

/*
 * Debugging / Tracing functions
 */

char *capi_cmd2str(__u8 cmd, __u8 subcmd);

_cdebbuf;

#define CDEBUG_SIZE
#define CDEBUG_GSIZE

void cdebbuf_free(_cdebbuf *cdb);
int cdebug_init(void);
void cdebug_exit(void);

_cdebbuf *capi_message2str(__u8 *msg);