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 -> strss7/include/ss7/sdti_ioctl.h


File /code/strss7/include/ss7/sdti_ioctl.h



#ifndef __SDTI_IOCTL_H__
#define __SDTI_IOCTL_H__

#ident "@(#) $Name:  $($Revision: 0.8.2.3 $) Copyright (c) 1997-2002 OpenSS7 Corporation."

#include <linux/ioctl.h>

#define SDT_IOC_MAGIC 't'

/*
 *  PROTOCOL VARIANT AND OPTIONS
 */

#define SDT_IOCGOPTIONS	_IOR(  SDT_IOC_MAGIC, 0, lmi_option_t )
#define SDT_IOCSOPTIONS	_IOW(  SDT_IOC_MAGIC, 1, lmi_option_t )

/*
 *  CONFIGURATION
 */
typedef struct sdt_timers {
	sdt_ulong t8;				/* T8 timer */
} sdt_timers_t;
typedef struct sdt_config {
	sdt_ulong t8;				/* T8 timeout */
	sdt_ulong Tin;				/* AERM normal proving threshold */
	sdt_ulong Tie;				/* AERM emergency proving threshold */
	sdt_ulong T;				/* SUERM error threshold */
	sdt_ulong D;				/* SUERM error rate parameter */
	sdt_ulong Te;				/* EIM error threshold */
	sdt_ulong De;				/* EIM correct decrement */
	sdt_ulong Ue;				/* EIM error increment */
	sdt_ulong N;				/* octets per su in octet-counting mode */
	sdt_ulong m;				/* maximum SIF size */
	sdt_ulong b;				/* transmit block size */
	sdt_ulong f;				/* number of flags between frames */
} sdt_config_t;

#define SDT_FLAGS_ONE	    0
#define SDT_FLAGS_SHARED    1
#define SDT_FLAGS_TWO	    2
#define SDT_FLAGS_THREE	    3

#define SDT_IOCGCONFIG	_IOWR( SDT_IOC_MAGIC, 2, sdt_config_t )
#define SDT_IOCSCONFIG	_IOWR( SDT_IOC_MAGIC, 3, sdt_config_t )
#define SDT_IOCTCONFIG	_IOWR( SDT_IOC_MAGIC, 4, sdt_config_t )
#define SDT_IOCCCONFIG	_IOWR( SDT_IOC_MAGIC, 5, sdt_config_t )

/*
 *  STATE
 */

typedef struct sdt_statem {
	sdt_ulong aerm_state;			/* AERM state variable */
	sdt_ulong aborted_proving;		/* AERM aborted proving */
	sdt_long Ca;				/* AERM error counter */
	sdt_ulong Ti;				/* AERM threshold */
	sdt_ulong suerm_state;			/* SUERM state variable */
	sdt_long Cs;				/* SUERM error counter */
	sdt_ulong Ns;				/* SUERM su counter */
	sdt_ulong eim_state;			/* EIM state variable */
	sdt_long Ce;				/* EIM counter */
	sdt_ulong su_received;			/* EIM su received flag */
	sdt_ulong interval_error;		/* EIM interval error flag */
	sdt_ulong daedt_state;			/* DAEDT state variable */
	sdt_ulong daedr_state;			/* DAEDR state variable */
	sdt_ulong octet_counting_mode;		/* receivers freewheeling */
} sdt_statem_t;

#define SDT_STATE_IDLE		0x00
#define SDT_STATE_IN_SERVICE	0x01
#define SDT_STATE_MONITORING    SDT_STATE_IN_SERVICE
#define SDT_STATE_CONGESTED	0x02

#define SDT_IOCGSTATEM	_IOR(  SDT_IOC_MAGIC, 6, sdt_statem_t )
#define SDT_IOCCMRESET	_IOR(  SDT_IOC_MAGIC, 7, sdt_statem_t )

/*
 *  STATISTICS
 */

typedef struct sdt_stats {
	lmi_sta_t header;
	sdt_ulong tx_bytes;
	sdt_ulong tx_sus;
	sdt_ulong tx_sus_repeated;
	sdt_ulong tx_underruns;
	sdt_ulong tx_aborts;
	sdt_ulong tx_buffer_overflows;
	sdt_ulong tx_sus_in_error;
	sdt_ulong rx_bytes;
	sdt_ulong rx_sus;
	sdt_ulong rx_sus_compressed;
	sdt_ulong rx_overruns;
	sdt_ulong rx_aborts;
	sdt_ulong rx_buffer_overflows;
	sdt_ulong rx_sus_in_error;
	sdt_ulong rx_sync_transitions;
	sdt_ulong rx_bits_octet_counted;
	sdt_ulong rx_crc_errors;
	sdt_ulong rx_frame_errors;
	sdt_ulong rx_frame_overflows;
	sdt_ulong rx_frame_too_long;
	sdt_ulong rx_frame_too_short;
	sdt_ulong rx_residue_errors;
	sdt_ulong rx_length_error;		/* error in length indicator */
	sdt_ulong carrier_cts_lost;
	sdt_ulong carrier_dcd_lost;
	sdt_ulong carrier_lost;
} sdt_stats_t;

#define SDT_IOCGSTATSP	_IOR(  SDT_IOC_MAGIC,  8, lmi_sta_t )
#define SDT_IOCSSTATSP	_IOWR( SDT_IOC_MAGIC,  9, lmi_sta_t )
#define SDT_IOCGSTATS	_IOR(  SDT_IOC_MAGIC, 10, sdt_stats_t )
#define SDT_IOCCSTATS	_IOW(  SDT_IOC_MAGIC, 11, sdt_stats_t )

/*
 *  EVENTS
 */
typedef struct sdt_notify {
	sdt_ulong events;
} sdt_notify_t;

#define SDT_EVT_LOST_SYNC	0x00000001
#define SDT_EVT_SU_ERROR	0x00000002
#define SDT_EVT_TX_FAIL		0x00000004
#define SDT_EVT_RX_FAIL		0x00000008
#define SDT_EVT_CARRIER		0x00000010

#define SDT_IOCGNOTIFY	_IOR(  SDT_IOC_MAGIC, 12, sdt_notify_t )
#define SDT_IOCSNOTIFY	_IOW(  SDT_IOC_MAGIC, 13, sdt_notify_t )
#define SDT_IOCCNOTIFY	_IOW(  SDT_IOC_MAGIC, 14, sdt_notify_t )

/* for testing only */
#define SDT_IOCCABORT	_IO(   SDT_IOC_MAGIC, 15 )

#define SDT_IOC_FIRST    0
#define SDT_IOC_LAST    15
#define SDT_IOC_PRIVATE 32

#endif				/* __SDTI_IOCTL_H__ */


Home Index Prev Next More Download Info FAQ Mail   Home -> Resources -> Browse Source -> strss7/include/ss7/sdti_ioctl.h

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

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