Description: Code
#ifndef __LMI_IOCTL_H__
#define __LMI_IOCTL_H__
#ident "@(#) lmi_ioctl.h,v openss7-0_9_2_G(0.9.2.8) Copyright (c) 2001-2008 OpenSS7 Corporation."
#define LMI_IOC_MAGIC 'L'
#define LMI_IOCGOPTIONS _IOR( LMI_IOC_MAGIC, 0, lmi_option_t )
#define LMI_IOCSOPTIONS _IOW( LMI_IOC_MAGIC, 1, lmi_option_t )
typedef struct lmi_option {
lmi_ulong pvar;
lmi_ulong popt;
} lmi_option_t;
#define SS7_PVAR_ITUT 0x0100
#define SS7_PVAR_ETSI 0x0200
#define SS7_PVAR_ANSI 0x0300
#define SS7_PVAR_JTTC 0x0400
#define SS7_PVAR_CHIN 0x0500
#define SS7_PVAR_SING 0x0600
#define SS7_PVAR_SPAN 0x0700
#define SS7_PVAR_MASK 0xff00
#define SS7_PVAR_88 0x0000
#define SS7_PVAR_92 0x0001
#define SS7_PVAR_96 0x0002
#define SS7_PVAR_00 0x0003
#define SS7_PVAR_04 0x0004
#define SS7_PVAR_YR 0x00ff
enum {
SS7_PVAR_ITUT_88 = SS7_PVAR_ITUT | SS7_PVAR_88,
SS7_PVAR_ITUT_93 = SS7_PVAR_ITUT | SS7_PVAR_92,
SS7_PVAR_ITUT_96 = SS7_PVAR_ITUT | SS7_PVAR_96,
SS7_PVAR_ITUT_00 = SS7_PVAR_ITUT | SS7_PVAR_00,
SS7_PVAR_ETSI_88 = SS7_PVAR_ETSI | SS7_PVAR_88,
SS7_PVAR_ETSI_93 = SS7_PVAR_ETSI | SS7_PVAR_92,
SS7_PVAR_ETSI_96 = SS7_PVAR_ETSI | SS7_PVAR_96,
SS7_PVAR_ETSI_00 = SS7_PVAR_ETSI | SS7_PVAR_00,
SS7_PVAR_ANSI_88 = SS7_PVAR_ANSI | SS7_PVAR_88,
SS7_PVAR_ANSI_92 = SS7_PVAR_ANSI | SS7_PVAR_92,
SS7_PVAR_ANSI_96 = SS7_PVAR_ANSI | SS7_PVAR_96,
SS7_PVAR_ANSI_00 = SS7_PVAR_ANSI | SS7_PVAR_00,
SS7_PVAR_JTTC_94 = SS7_PVAR_JTTC | SS7_PVAR_92,
SS7_PVAR_CHIN_00 = SS7_PVAR_CHIN | SS7_PVAR_00,
};
enum {
SS7_POPT_MPLEV = 0x00000001,
SS7_POPT_PCR = 0x00000002,
SS7_POPT_HSL = 0x00000004,
SS7_POPT_XSN = 0x00000008,
SS7_POPT_NOPR = 0x00000010,
SS7_POPT_ALL = 0x0000001f
};
typedef struct lmi_config {
lmi_ulong version;
lmi_ulong style;
} lmi_config_t;
#define LMI_IOCGCONFIG _IOWR( LMI_IOC_MAGIC, 2, lmi_config_t )
#define LMI_IOCSCONFIG _IOWR( LMI_IOC_MAGIC, 3, lmi_config_t )
#define LMI_IOCTCONFIG _IOWR( LMI_IOC_MAGIC, 4, lmi_config_t )
#define LMI_IOCCCONFIG _IOWR( LMI_IOC_MAGIC, 5, lmi_config_t )
typedef struct lmi_statem {
lmi_ulong state;
} lmi_statem_t;
#define LMI_IOCGSTATEM _IOR( LMI_IOC_MAGIC, 6, lmi_statem_t )
#define LMI_IOCCMRESET _IOR( LMI_IOC_MAGIC, 7, lmi_statem_t )
typedef struct lmi_sta {
lmi_ulong object_id;
lmi_ulong colperiod;
lmi_ulong timestamp;
} lmi_sta_t;
#define LMI_IOCGSTATSP _IOR( LMI_IOC_MAGIC, 8, lmi_sta_t )
#define LMI_IOCSSTATSP _IOWR( LMI_IOC_MAGIC, 9, lmi_sta_t )
typedef struct lmi_stats {
} lmi_stats_t;
#define LMI_IOCGSTATS _IOR( LMI_IOC_MAGIC, 10, lmi_stats_t )
#define LMI_IOCCSTATS _IOW( LMI_IOC_MAGIC, 11, lmi_stats_t )
typedef struct lmi_notify {
lmi_ulong events;
} lmi_notify_t;
#define LMI_IOCGNOTIFY _IOR( LMI_IOC_MAGIC, 12, lmi_notify_t )
#define LMI_IOCSNOTIFY _IOW( LMI_IOC_MAGIC, 13, lmi_notify_t )
#define LMI_IOCCNOTIFY _IOW( LMI_IOC_MAGIC, 14, lmi_notify_t )
typedef struct lmi_pass {
lmi_long index;
lmi_ulong cmd;
} lmi_pass_t;
#define LMI_IOCCPASS _IOWR( LMI_IOC_MAGIC, 15, lmi_pass_t )
#define LMI_IOC_FIRST 0
#define LMI_IOC_LAST 15
#define LMI_IOC_PRIVATE 32
#endif