Links

GitHub

Open HUB

Quick Links

Download

STREAMS

SIGTRAN

SS7

Hardware

SCTP

Browse Source

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

Operating System

Resources

Packages

Sys Req

Repositories

Download

Mailing Lists

Browse Source

CVS Archive

Bug Reports

Library

Hardware

Vendor Links

Home

Overview

Status

Documentation

Resources

About

News

Description: Code

File /code/strss7/src/include/ss7/sdli_ioctl.h



#ifndef __SDLI_IOCTL_H__
#define __SDLI_IOCTL_H__

#ident "@(#) sdli_ioctl.h,v openss7-0_9_2_G(0.9.2.15) Copyright (c) 2001-2008 OpenSS7 Corporation."

#include <linux/ioctl.h>

#define	SDL_IOC_MAGIC	'd'

#define	SDL_IOCGOPTIONS	_IOR(	SDL_IOC_MAGIC,	 0,	lmi_option_t	)
#define	SDL_IOCSOPTIONS	_IOW(	SDL_IOC_MAGIC,	 1,	lmi_option_t	)

#ifdef __KERNEL__
#ifdef _MPS_SOURCE
typedef struct sdl_timers {
	mblk_t *t9;
} sdl_timers_t;
#else
typedef struct sdl_timers {
	toid_t t9;
} sdl_timers_t;
#endif
#endif

#define SDL_SYNCS 4

typedef struct sdl_config {
	const char *ifname;
	volatile sdl_ulong ifflags;
#	define	SDL_IF_UP		0x01
#	define	SDL_IF_RX_RUNNING	0x02
#	define	SDL_IF_TX_RUNNING	0x04
	sdl_ulong iftype;
#	define	SDL_TYPE_NONE		0
#	define	SDL_TYPE_V35		1
#	define	SDL_TYPE_DS0		2
#	define	SDL_TYPE_DS0A		3
#	define	SDL_TYPE_E1		4
#	define	SDL_TYPE_T1		5
#	define	SDL_TYPE_J1		6
#	define	SDL_TYPE_ATM		7
#	define	SDL_TYPE_PACKET		8
	sdl_ulong ifrate;
#	define	SDL_RATE_NONE		0
#	define	SDL_RATE_DS0A		56000
#	define	SDL_RATE_DS0		64000
#	define	SDL_RATE_T1		1544000
#	define	SDL_RATE_J1		1544000
#	define	SDL_RATE_E1		2048000
#	define	SDL_RATE_T2		6312000
#	define	SDL_RATE_E2		8488000
#	define	SDL_RATE_E3		0
#	define	SDL_RATE_T3		44736000
	sdl_ulong ifgtype;
#	define	SDL_GTYPE_NONE		0
#	define	SDL_GTYPE_T1		1
#	define	SDL_GTYPE_E1		2
#	define	SDL_GTYPE_J1		3
#	define	SDL_GTYPE_ATM		4
#	define	SDL_GTYPE_ETH		5
#	define	SDL_GTYPE_IP		6
#	define	SDL_GTYPE_UDP		7
#	define	SDL_GTYPE_TCP		8
#	define	SDL_GTYPE_RTP		9
#	define	SDL_GTYPE_SCTP		10
#	define	SDL_GTYPE_T2		11
#	define	SDL_GTYPE_E2		12
#	define	SDL_GTYPE_E3		13
#	define	SDL_GTYPE_T3		14
#	define	SDL_GTYPE_OC3		15
#	define	SDL_GTYPE_OC12		16
#	define	SDL_GTYPE_OC48		17
#	define	SDL_GTYPE_OC192		18
	sdl_ulong ifgrate;
#	define	SDL_GRATE_NONE		0
#	define	SDL_GRATE_T1		1544000
#	define	SDL_GRATE_J1		1544000
#	define	SDL_GRATE_E1		2048000
#	define	SDL_GRATE_T2		6312000
#	define	SDL_GRATE_E2		8488000
#	define	SDL_GRATE_E3		0
#	define	SDL_GRATE_T3		44736000
#	define	SDL_GRATE_OC3		0
#	define	SDL_GRATE_OC12		0
#	define	SDL_GRATE_OC48		0
#	define	SDL_GRATE_OC192		0
	sdl_ulong ifmode;
#	define	SDL_MODE_NONE		0
#	define	SDL_MODE_DSU		1
#	define	SDL_MODE_CSU		2
#	define	SDL_MODE_DTE		3
#	define	SDL_MODE_DCE		4
#	define	SDL_MODE_CLIENT		5
#	define	SDL_MODE_SERVER		6
#	define	SDL_MODE_PEER		7
#	define	SDL_MODE_ECHO		8
#	define	SDL_MODE_REM_LB		9
#	define	SDL_MODE_LOC_LB		10
#	define	SDL_MODE_LB_ECHO	11
#	define	SDL_MODE_TEST		12
	sdl_ulong ifgmode;
#	define	SDL_GMODE_NONE		0
#	define	SDL_GMODE_LOC_LB	1
#	define	SDL_GMODE_REM_LB	2
	sdl_ulong ifgcrc;
#	define	SDL_GCRC_NONE		0
#	define	SDL_GCRC_CRC4		1
#	define	SDL_GCRC_CRC5		2
#	define	SDL_GCRC_CRC6		3
#	define	SDL_GCRC_CRC6J		4
	sdl_ulong ifclock;
#	define	SDL_CLOCK_NONE		0
#	define	SDL_CLOCK_INT		1
#	define	SDL_CLOCK_EXT		2
#	define	SDL_CLOCK_LOOP		3
#	define	SDL_CLOCK_MASTER	4
#	define	SDL_CLOCK_SLAVE		5
#	define	SDL_CLOCK_DPLL		6
#	define	SDL_CLOCK_ABR		7
#	define	SDL_CLOCK_SHAPER	8
#	define	SDL_CLOCK_TICK		9
	sdl_ulong ifcoding;
#	define	SDL_CODING_NONE		0
#	define	SDL_CODING_NRZ		1
#	define	SDL_CODING_NRZI		2
#	define	SDL_CODING_AMI		3
#	define	SDL_CODING_B6ZS		4
#	define	SDL_CODING_B8ZS		5
#	define	SDL_CODING_HDB3		6
#	define	SDL_CODING_AAL1		7
#	define	SDL_CODING_AAL2		8
#	define	SDL_CODING_AAL5		9
	sdl_ulong ifframing;
#	define	SDL_FRAMING_NONE	0
#	define	SDL_FRAMING_CCS		1
#	define	SDL_FRAMING_CAS		2
#	define	SDL_FRAMING_SF		3
#	define	SDL_FRAMING_ESF		4
#	define	SDL_FRAMING_D4		SDL_FRAMING_SF
	sdl_ulong ifblksize;
	volatile sdl_ulong ifleads;
#	define	SDL_LEAD_DTR		0x01
#	define	SDL_LEAD_RTS		0x02
#	define	SDL_LEAD_DCD		0x04
#	define	SDL_LEAD_CTS		0x08
#	define	SDL_LEAD_DSR		0x10
	volatile sdl_ulong ifbpv;
	volatile sdl_ulong ifalarms;
#	define	SDL_ALARM_RED		0x01
#	define	SDL_ALARM_BLU		0x02
#	define	SDL_ALARM_YEL		0x04
#	define	SDL_ALARM_REC		0x08
	volatile sdl_ulong ifrxlevel;
	volatile sdl_ulong iftxlevel;
#	define	SDL_TXLEVEL_NONE	0
#	define	SDL_TXLEVEL_DSX_133FT	1
#	define	SDL_TXLEVEL_DSX_266FT	2
#	define	SDL_TXLEVEL_DSX_399FT	3
#	define	SDL_TXLEVEL_DSX_533FT	4
#	define	SDL_TXLEVEL_DSX_666FT	5
#	define	SDL_TXLEVEL_CSU_0DB	1
#	define	SDL_TXLEVEL_CSU_8DB	6
#	define	SDL_TXLEVEL_CSU_15DB	7
#	define	SDL_TXLEVEL_CSU_23DB	8
#	define	SDL_TXLEVEL_75OHM_NM	1
#	define	SDL_TXLEVEL_120OHM_NM	2
#	define	SDL_TXLEVEL_75OHM_PR	3
#	define	SDL_TXLEVEL_120OHM_PR	4
#	define	SDL_TXLEVEL_75OHM_HRL	5
#	define	SDL_TXLEVEL_120OHM_HRL	6
#	define	SDL_TXLEVEL_MON_0DB	9
#	define	SDL_TXLEVEL_MON_12DB	10
#	define	SDL_TXLEVEL_MON_20DB	11
#	define	SDL_TXLEVEL_MON_26DB	11
#	define	SDL_TXLEVEL_MON_30DB	11
#	define	SDL_TXLEVEL_MON_32DB	12
	volatile sdl_ulong ifsync;
	sdl_ulong ifsyncsrc[SDL_SYNCS];
} sdl_config_t;

#define	SDL_IOCGCONFIG	_IOR(	SDL_IOC_MAGIC,	 2,	sdl_config_t	)
#define	SDL_IOCSCONFIG	_IOWR(	SDL_IOC_MAGIC,	 3,	sdl_config_t	)
#define	SDL_IOCTCONFIG	_IOWR(	SDL_IOC_MAGIC,	 4,	sdl_config_t	)
#define	SDL_IOCCCONFIG	_IOR(	SDL_IOC_MAGIC,	 5,	sdl_config_t	)

typedef struct sdl_statem {
	volatile sdl_ulong tx_state;
	volatile sdl_ulong rx_state;
} sdl_statem_t;

#define	SDL_STATE_IDLE		0x00
#define	SDL_STATE_IN_SERVICE	0x01
#define	SDL_STATE_CONGESTED	0x02

#define	SDL_IOCGSTATEM	_IOR(	SDL_IOC_MAGIC,	6,	sdl_statem_t	)
#define	SDL_IOCCMRESET	_IOR(	SDL_IOC_MAGIC,	7,	sdl_statem_t	)

typedef struct sdl_stats {
	lmi_sta_t header;
	sdl_ulong rx_octets;
	sdl_ulong tx_octets;
	sdl_ulong rx_overruns;
	sdl_ulong tx_underruns;
	sdl_ulong rx_buffer_overflows;
	sdl_ulong tx_buffer_overflows;
	sdl_ulong lead_cts_lost;
	sdl_ulong lead_dcd_lost;
	sdl_ulong carrier_lost;
} sdl_stats_t;

#define	SDL_IOCGSTATSP	_IOR(	SDL_IOC_MAGIC,	 8,	sdl_stats_t	)
#define	SDL_IOCSSTATSP	_IOWR(	SDL_IOC_MAGIC,	 9,	sdl_stats_t	)
#define	SDL_IOCGSTATS	_IOR(	SDL_IOC_MAGIC,	10,	sdl_stats_t	)
#define	SDL_IOCCSTATS	_IOW(	SDL_IOC_MAGIC,	11,	sdl_stats_t	)

typedef struct sdl_notify {
	sdl_ulong events;
#	define	SDL_EVT_LOST_SYNC	0x0000001
#	define	SDL_EVT_SU_ERROR	0x0000002
#	define	SDL_EVT_TX_FAIL		0x0000004
#	define	SDL_EVT_RX_FAIL		0x0000008
} sdl_notify_t;

#define	SDL_IOCGNOTIFY	_IOR(	SDL_IOC_MAGIC,	12,	sdl_notify_t	)
#define	SDL_IOCSNOTIFY	_IOW(	SDL_IOC_MAGIC,	13,	sdl_notify_t	)
#define	SDL_IOCCNOTIFY	_IOW(	SDL_IOC_MAGIC,	14,	sdl_notify_t	)

typedef struct sdl_pass {
	sdl_long index;
	sdl_ulong cmd;

} sdl_pass_t;

#define	SDL_IOCCPASS	_IOWR(	SDL_IOC_MAGIC,	15,	sdl_pass_t	)

#define	SDL_IOCCDISCTX	_IO(	SDL_IOC_MAGIC,	16	)
#define	SDL_IOCCCONNTX	_IO(	SDL_IOC_MAGIC,	17	)

#define	SDL_IOC_FIRST	 0
#define	SDL_IOC_LAST	17
#define	SDL_IOC_PRIVATE	32

#endif

Last modified: Thu, 28 Nov 2024 20:46:23 GMT  
Copyright © 2014 OpenSS7 Corporation All Rights Reserved.