OpenSS7
SS7 for the
Common Man

© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved.
Last modified:

Home Overview Status News Documentation Resources About
   
 Overview
 Status
 News
 Documentation
 Resources
 About

   
Home Index Prev Next More Download Info FAQ Mail   Home -> Resources -> Browse Source -> usr/include/linux/cyclomx.h


File /code/usr/include/linux/cyclomx.h


#ifndef	_CYCLOMX_H
#define	_CYCLOMX_H

#include <linux/config.h>
#include <linux/wanrouter.h>
#include <linux/spinlock.h>

#ifdef	__KERNEL__
/* Kernel Interface */

#include <linux/cycx_drv.h>	/* Cyclom 2X support module API definitions */
#include <linux/cycx_cfm.h>	/* Cyclom 2X firmware module definitions */
#ifdef CONFIG_CYCLOMX_X25
#include <linux/cycx_x25.h>
#endif

#ifndef	min
#define min(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef	max
#define max(a,b) (((a)>(b))?(a):(b))
#endif

#define	is_digit(ch) (((ch)>=(unsigned)'0'&&(ch)<=(unsigned)'9')?1:0)

/* Adapter Data Space.
 * This structure is needed because we handle multiple cards, otherwise
 * static data would do it.
 */
typedef struct cycx {
	char devname[WAN_DRVNAME_SZ+1];	/* card name */
	cycxhw_t hw;			/* hardware configuration */
	wan_device_t wandev;		/* WAN device data space */
	u32 open_cnt;			/* number of open interfaces */
	u32 state_tick;			/* link state timestamp */
	spinlock_t lock;
	char in_isr;			/* interrupt-in-service flag */
	char buff_int_mode_unbusy;      /* flag for carrying out dev_tint */
	wait_queue_head_t wait_stats;  /* to wait for the STATS indication */
	u32 mbox;			/* -> mailbox */
	void (*isr)(struct cycx* card);	/* interrupt service routine */
	int (*exec)(struct cycx* card, void* u_cmd, void* u_data);
	union {
#ifdef CONFIG_CYCLOMX_X25
		struct { /* X.25 specific data */
			u32 lo_pvc;
			u32 hi_pvc;
			u32 lo_svc;
			u32 hi_svc;
			TX25Stats stats;
			spinlock_t lock;
			u32 connection_keys;
		} x;
#endif
	} u;
} cycx_t;

/* Public Functions */
void cyclomx_mod_inc_use_count (cycx_t *card);		/* cycx_main.c */
void cyclomx_mod_dec_use_count (cycx_t *card);		/* cycx_main.c */
void cyclomx_set_state (cycx_t *card, int state);	/* cycx_main.c */

#ifdef CONFIG_CYCLOMX_X25
int cyx_init (cycx_t *card, wandev_conf_t *conf);	/* cycx_x25.c */
#endif
#endif	/* __KERNEL__ */
#endif	/* _CYCLOMX_H */


Home Index Prev Next More Download Info FAQ Mail   Home -> Resources -> Browse Source -> usr/include/linux/cyclomx.h

OpenSS7
SS7 for the
Common Man
Home Overview Status News Documentation Resources About

© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved.
Last modified: