linux/drivers/isdn/capi/capiutil.c

/* $Id: capiutil.c,v 1.13.6.4 2001/09/23 22:24:33 kai Exp $
 *
 * CAPI 2.0 convert capi message to capi message struct
 *
 * From CAPI 2.0 Development Kit AVM 1995 (msg.c)
 * Rewritten for Linux 1996 by Carsten Paeth <[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/module.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/isdn/capiutil.h>
#include <linux/slab.h>

#include "kcapi.h"

/* from CAPI2.0 DDK AVM Berlin GmbH */

_cdef;

#define _CBYTE
#define _CWORD
#define _CDWORD
#define _CSTRUCT
#define _CMSTRUCT
#define _CEND

static _cdef cdef[] =;

static unsigned char *cpars[] =;

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

#define byteTLcpy(x, y)
#define wordTLcpy(x, y)
#define dwordTLcpy(x, y)
#define structTLcpy(x, y, l)
#define structTLcpyovl(x, y, l)

#define byteTRcpy(x, y)
#define wordTRcpy(x, y)
#define dwordTRcpy(x, y)
#define structTRcpy(x, y, l)
#define structTRcpyovl(x, y, l)

/*-------------------------------------------------------*/
static unsigned command_2_index(u8 c, u8 sc)
{}

/**
 * capi_cmd2par() - find parameter string for CAPI 2.0 command/subcommand
 * @cmd:	command number
 * @subcmd:	subcommand number
 *
 * Return value: static string, NULL if command/subcommand unknown
 */

static unsigned char *capi_cmd2par(u8 cmd, u8 subcmd)
{}

/*-------------------------------------------------------*/
#define TYP
#define OFF

static void jumpcstruct(_cmsg *cmsg)
{}

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

static char *mnames[] =;

/**
 * capi_cmd2str() - convert CAPI 2.0 command/subcommand number to name
 * @cmd:	command number
 * @subcmd:	subcommand number
 *
 * Return value: static string
 */

char *capi_cmd2str(u8 cmd, u8 subcmd)
{}


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

#ifdef CONFIG_CAPI_TRACE

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

static char *pnames[] =;

#include <linux/stdarg.h>

/*-------------------------------------------------------*/
static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt, ...)
{}

static _cdebbuf *printstructlen(_cdebbuf *cdb, u8 *m, unsigned len)
{}

static _cdebbuf *printstruct(_cdebbuf *cdb, u8 *m)
{}

/*-------------------------------------------------------*/
#define NAME

static _cdebbuf *protocol_message_2_pars(_cdebbuf *cdb, _cmsg *cmsg, int level)
{}
/*-------------------------------------------------------*/

static _cdebbuf *g_debbuf;
static u_long g_debbuf_lock;
static _cmsg *g_cmsg;

static _cdebbuf *cdebbuf_alloc(void)
{}

/**
 * cdebbuf_free() - free CAPI debug buffer
 * @cdb:	buffer to free
 */

void cdebbuf_free(_cdebbuf *cdb)
{}


/**
 * capi_message2str() - format CAPI 2.0 message for printing
 * @msg:	CAPI 2.0 message
 *
 * Allocates a CAPI debug buffer and fills it with a printable representation
 * of the CAPI 2.0 message in @msg.
 * Return value: allocated debug buffer, NULL on error
 * The returned buffer should be freed by a call to cdebbuf_free() after use.
 */

_cdebbuf *capi_message2str(u8 *msg)
{}

int __init cdebug_init(void)
{}

void cdebug_exit(void)
{}

#else /* !CONFIG_CAPI_TRACE */

static _cdebbuf g_debbuf = {"CONFIG_CAPI_TRACE not enabled", NULL, 0, 0};

_cdebbuf *capi_message2str(u8 *msg)
{
	return &g_debbuf;
}

_cdebbuf *capi_cmsg2str(_cmsg *cmsg)
{
	return &g_debbuf;
}

void cdebbuf_free(_cdebbuf *cdb)
{
}

int __init cdebug_init(void)
{
	return 0;
}

void cdebug_exit(void)
{
}

#endif