📄 mtpi_ioctl.h
字号:
mtp_ulong rsid; /* routeset of adjacent signalling point */ mtp_ulong ni; /* network indicator for link set */ mtp_ulong slot; /* slot of SLS for this link set */} mtp_conf_lk_t;/* * Combined link set configuration */typedef struct mtp_conf_ls { mtp_ulong spid; /* signalling point id */ mtp_ulong sls_mask; /* mask of bits selecting link set */} mtp_conf_ls_t;/* * Route configuration */typedef struct mtp_conf_rt { mtp_ulong rlid; /* route list id */ mtp_ulong lkid; /* link id */ mtp_ulong slot; /* slot of SLS for this route */} mtp_conf_rt_t;/* * Route list configuration */typedef struct mtp_conf_rl { mtp_ulong rsid; /* route set id */ mtp_ulong lsid; /* combined link set id */ mtp_ulong cost; /* cost in routeset */} mtp_conf_rl_t;/* * Route set configuration */typedef struct mtp_conf_rs { mtp_ulong spid; /* signalling point id */ mtp_ulong dest; /* destination point code */ mtp_ulong flags; /* options flags */} mtp_conf_rs_t;/* * Signalling point configuration */typedef struct mtp_conf_sp { mtp_ulong naid; /* network appearance id */ mtp_ulong pc; /* point code */ mtp_ulong users; /* mask of equipped users */ mtp_ulong flags; /* options flags */} mtp_conf_sp_t;/* * Network appearance configuration */typedef struct mtp_conf_na { struct lmi_option options; /* protocol options */ struct { mtp_ulong member; /* PC member mask */ mtp_ulong cluster; /* PC cluster mask */ mtp_ulong network; /* PC network mask */ } mask; mtp_ulong sls_bits; /* bits in SLS */} mtp_conf_na_t;/* additional MTP protocol options */#define SS7_POPT_TFR 0x00010000 /* old broadcast method - no responsive */#define SS7_POPT_TFRB 0x00020000 /* new broadcast method - no regulation */#define SS7_POPT_TFRR 0x00040000 /* new responsive method - regulated */#define SS7_POPT_MCSTA 0x00080000 /* multiple congestion states *//* * Default configuration */typedef struct mtp_conf_df {} mtp_conf_df_t;typedef union mtp_conf_obj { struct mtp_conf_na na; /* Network Appearance */ struct mtp_conf_sp sp; /* Signalling Point */ struct mtp_conf_rs rs; /* Route Set */ struct mtp_conf_rl rl; /* Route List */ struct mtp_conf_rt rt; /* Route */ struct mtp_conf_ls ls; /* Combined Link Set */ struct mtp_conf_lk lk; /* Link Set */ struct mtp_conf_sl sl; /* Signalling Link */ struct mtp_conf_df df; /* Default */} mtp_conf_obj_t;/* * CONFIGURATION */typedef struct mtp_config { mtp_ulong type; /* object type */ mtp_ulong id; /* object id */ mtp_ulong cmd; /* configuration command */ /* followed by object-specific configuration structure */ mtp_conf_obj_t config[0];} mtp_config_t;#define MTP_GET 0 /* get configuration */#define MTP_ADD 1 /* add configuration */#define MTP_CHA 2 /* cha configuration */#define MTP_DEL 3 /* del configuration */#define MTP_IOCGCONFIG _IOWR( MTP_IOC_MAGIC, 2, mtp_config_t )#define MTP_IOCSCONFIG _IOWR( MTP_IOC_MAGIC, 3, mtp_config_t )#define MTP_IOCTCONFIG _IOWR( MTP_IOC_MAGIC, 4, mtp_config_t )#define MTP_IOCCCONFIG _IOWR( MTP_IOC_MAGIC, 5, mtp_config_t )/* * Common state. *//* primary states */#define MTP_ALLOWED 0x00UL /* Entity Allowed */#define MTP_DANGER 0x01UL /* Entity Danger of congestion (primary or secondary) */#define MTP_CONGESTED 0x02UL /* Entity Congested (Link Set congestion, primary or secondary ) */#define MTP_RESTRICTED 0x03UL /* Entity Restricted (Route Failure or received TFR) */#define MTP_RESTART 0x04UL /* Entity Restarting */#define MTP_PROHIBITED 0x05UL /* Entity Prohibited (Received TFP) */#define MTP_INHIBITED 0x06UL /* Entity Inhibited (Management inhibited) */#define MTP_BLOCKED 0x07UL /* Entity Blocked (Local Link Set failure) */#define MTP_INACTIVE 0x08UL /* Entity Inactive (Link out of service) *//* pseudo-states */#define MTP_NODANGER 0x11UL /* Entity Out of Danger (transient state) */#define MTP_UNCONGESTED 0x12UL /* Entity Uncongested (transient state) */#define MTP_RESTARTED 0x14UL /* Entity Restarted */#define MTP_UNINHIBITED 0x16UL /* Entity Uninhibited (transient state) */#define MTP_UNBLOCKED 0x17UL /* Entity Unblocked (transient state) */#define MTP_ACTIVE 0x18UL /* Entity Active (Link in service) */#define MTP_RESTART_PHASE_1 0x24UL /* Entity Restarting Phase 1 */#define MTP_RESTART_PHASE_2 0x34UL /* Entity Restarting Phase 2 *//* state flags */#define MTPF_ALLOWED (1<< MTP_ALLOWED) /* Entity is allowed */#define MTPF_DANGER (1<< MTP_DANGER) /* Entity is in danger of congestion */#define MTPF_CONGESTED (1<< MTP_CONGESTED) /* Entity is congested */#define MTPF_RESTRICTED (1<< MTP_RESTRICTED) /* Entity is restricted */#define MTPF_RESTART (1<< MTP_RESTART) /* Entity is restarting */#define MTPF_PROHIBITED (1<< MTP_PROHIBITED) /* Entity is prohibited */#define MTPF_INHIBITED (1<< MTP_INHIBITED) /* Entity is inhibited */#define MTPF_BLOCKED (1<< MTP_BLOCKED) /* Entity is blocked */#define MTPF_INACTIVE (1<< MTP_INACTIVE) /* Entity is inactive *//* additional state flags */#define MTPF_TRAFFIC (1<< 9) /* Entity has sent traffic */#define MTPF_COO_RECV (1<<10) /* Entity has received a COO */#define MTPF_ECO_RECV (1<<11) /* Entity has received a ECO */#define MTPF_WACK_SLTM (1<<12) /* Entity waiting for response to 1st SLTM */#define MTPF_WACK_SLTM2 (1<<13) /* Entity waiting for response to 2nd SLTM */#define MTPF_WACK_SSLTM (1<<14) /* Entity waiting for response to 1st SSLTM */#define MTPF_WACK_SSLTM2 (1<<15) /* Entity waiting for response to 2nd SSLTM */#define MTPF_TFR_PENDING (1<<16) /* Entity has TFR pending *//* non-state (options) flags */#define MTPF_CLUSTER (1<<17) /* Entity is cluster route */#define MTPF_XFER_FUNC (1<<18) /* Entity has transfer function */#define MTPF_SECURITY (1<<19) /* Entity has additional security procedures */#define MTPF_ADJACENT (1<<20) /* Entity is adjacent */#define MTPF_LOSC_PROC_A (1<<21) /* Entity uses link oscillation procedure A */#define MTPF_LOSC_PROC_B (1<<22) /* Entity uses link oscillation procedure B */#define MTPF_RESTART_PHASE_1 (1<<23) /* Entity restarting phase 1 */#define MTPF_RESTART_PHASE_2 (1<<24) /* Entity restarting phase 2 */#define MTPF_RESTART_LOCKOUT (1<<25) /* Entity restarting but locked out (T27a) *//* * Signalling link state */typedef struct mtp_timers_sl { mtp_timer_t t1; /* timer t1 */ mtp_timer_t t2; /* timer t2 */ mtp_timer_t t3; /* timer t3 */ mtp_timer_t t4; /* timer t4 */ mtp_timer_t t5; /* timer t5 */ mtp_timer_t t12; /* timer t12 */ mtp_timer_t t13; /* timer t13 */ mtp_timer_t t14; /* timer t14 */ mtp_timer_t t17; /* timer t17 */ mtp_timer_t t19a; /* timer t19a */ mtp_timer_t t20a; /* timer t20a */ mtp_timer_t t21a; /* timer t21a */ mtp_timer_t t22; /* timer t22 */ mtp_timer_t t23; /* timer t23 */ mtp_timer_t t24; /* timer t24 */ mtp_timer_t t31a; /* timer t31a */ mtp_timer_t t32a; /* timer t32a */ mtp_timer_t t33a; /* timer t33a */ mtp_timer_t t34a; /* timer t34a */ mtp_timer_t t1t; /* timer t1t */ mtp_timer_t t2t; /* timer t2t */ mtp_timer_t t1s; /* timer t1s */} mtp_timers_sl_t;typedef struct mtp_statem_sl { struct mtp_timers_sl timers;} mtp_statem_sl_t;#define SLS_OUT_OF_SERVICE 0 /* out of service */#define SLS_PROC_OUTG 1 /* processor outage */#define SLS_IN_SERVICE 2 /* in service */#define SLS_WACK_COO 3 /* waiting COA/ECA in response to COO */#define SLS_WACK_ECO 4 /* waiting COA/ECA in response to ECO */#define SLS_WCON_RET 5 /* waiting for retrieval confrimation */#define SLS_WIND_CLRB 6 /* waiting for clear buffers indication */#define SLS_WIND_BSNT 7 /* waiting for BSNT indication */#define SLS_WIND_INSI 8 /* waiting for in service indication */#define SLS_WACK_SLTM 9 /* waiting SLTA in response to 1st SLTM */#define SL_RESTORED (MTP_ALLOWED) /* Sig link Activated/Restored/Resumed */#define SL_DANGER (MTP_DANGER) /* Sig link Danger of congestion (overloaded) */#define SL_CONGESTED (MTP_CONGESTED) /* Sig link Congested (link congestion) */#define SL_UNUSABLE (MTP_RESTRICTED) /* Sig link Unusable (Local Processor Outage) */#define SL_RETRIEVAL (MTP_RESTART) /* Sig link Retrieving */#define SL_FAILED (MTP_PROHIBITED) /* Sig link Failed */#define SL_INHIBITED (MTP_INHIBITED) /* Sig link Inhibited (Management inhibited) */#define SL_BLOCKED (MTP_BLOCKED) /* Sig link Blocked (Processor Outage) */#define SL_INACTIVE (MTP_INACTIVE) /* Sig link Inactive (Out of Service) */#define SL_NODANGER (MTP_NODANGER) /* Sig link Out of Danger (transient state) */#define SL_UNCONGESTED (MTP_UNCONGESTED) /* Sig link Uncongested (transient state) */#define SL_UPDATED (MTP_RESTARTED) /* Sig link Buffer Update Complete (transient state) */#define SL_UNINHIBITED (MTP_UNINHIBITED) /* Sig link Uninhibited (transient state) */#define SL_UNBLOCKED (MTP_UNBLOCKED) /* Sig link Unblocked (transient state) */#define SL_ACTIVE (MTP_ACTIVE) /* Sig link Active (Link in service) */#define SLF_TRAFFIC (MTPF_TRAFFIC) /* Sig link has sent traffic */#define SLF_COO_RECV (MTPF_COO_RECV) /* Sig link has received a COO */#define SLF_ECO_RECV (MTPF_ECO_RECV) /* Sig link has received a ECO */#define SLF_WACK_SLTM (MTPF_WACK_SLTM) /* Sig link waiting for response to 1st SLTM */#define SLF_WACK_SLTM2 (MTPF_WACK_SLTM2) /* Sig link waiting for response to 2nd SLTM */#define SLF_WACK_SSLTM (MTPF_WACK_SSLTM) /* Sig link waiting for response to 1st SSLTM */#define SLF_WACK_SSLTM2 (MTPF_WACK_SSLTM2) /* Sig link waiting for response to 2nd SSLTM */#define SLF_RESTORED (MTPF_ALLOWED) /* Sig link Activated/Restored */#define SLF_DANGER (MTPF_DANGER) /* Sig link Danger of congestion (overloaded) */#define SLF_CONGESTED (MTPF_CONGESTED) /* Sig link Congested (link congestion) */#define SLF_UNUSABLE (MTPF_RESTRICTED) /* Sig link Unusable (Local Processor Outage) */#define SLF_RETRIEVAL (MTPF_RESTART) /* Sig link Retrieving */#define SLF_FAILED (MTPF_PROHIBITED) /* Sig link Failed */#define SLF_INHIBITED (MTPF_INHIBITED) /* Sig link Inhibited (Management inhibited) */#define SLF_BLOCKED (MTPF_BLOCKED) /* Sig link Blocked (Processor Outage) */#define SLF_INACTIVE (MTPF_INACTIVE) /* Sig link Inactive (Out of Service) */#define SLF_LOSC_PROC_A (MTPF_LOSC_PROC_A) /* Sig link uses link oscillation procedure A */#define SLF_LOSC_PROC_B (MTPF_LOSC_PROC_B) /* Sig link uses link oscillation procedure B */#define SLF_RESTART_LOCKOUT (MTPF_RESTART_LOCKOUT) /* Sig link restart lockout (T27a running) *//* * Link set state */typedef struct mtp_timers_lk { mtp_timer_t t7; /* timer t7 */ mtp_timer_t t19; /* timer t19 */ mtp_timer_t t21; /* timer t21 */ mtp_timer_t t25a; /* timer t25a */ mtp_timer_t t28a; /* timer t28a */ mtp_timer_t t29a; /* timer t29a */ mtp_timer_t t30a; /* timer t30a */} mtp_timers_lk_t;typedef struct mtp_statem_lk { struct mtp_timers_lk timers;} mtp_statem_lk_t;#define LK_ALLOWED (MTP_ALLOWED) /* Link Set Allowed */#define LK_DANGER (MTP_DANGER) /* Link Set Danger of congestion (primary or secondary) */#define LK_CONGESTED (MTP_CONGESTED) /* Link Set Congested (Link Set congestion, primary or secondary ) */#define LK_RESTRICTED (MTP_RESTRICTED) /* Link Set Restricted (Route Failure or received TFR) */#define LK_RESTART (MTP_RESTART) /* Link Set Restarting */#define LK_PROHIBITED (MTP_PROHIBITED) /* Link Set Prohibited (Received TFP) */#define LK_INHIBITED (MTP_INHIBITED) /* Link Set Inhibited (Management inhibited) */#define LK_BLOCKED (MTP_BLOCKED) /* Link Set Blocked (Local Link Set failure) */#define LK_INACTIVE (MTP_INACTIVE) /* Link Set Inactive (Link out of service) */#define LK_NODANGER (MTP_NODANGER) /* Link Set Out of Danger (transient state) */#define LK_UNCONGESTED (MTP_UNCONGESTED) /* Link Set Uncongested (transient state) */#define LK_RESTARTED (MTP_RESTARTED) /* Link Set Restarted */#define LK_UNINHIBITED (MTP_UNINHIBITED) /* Link Set Uninhibited (transient state) */#define LK_UNBLOCKED (MTP_UNBLOCKED) /* Link Set Unblocked (transient state) */#define LK_ACTIVE (MTP_ACTIVE) /* Link Set Active (Link in service) */#define LKF_ALLOWED (MTPF_ALLOWED) /* Link Set is active */#define LKF_DANGER (MTPF_DANGER) /* Link Set is in danger of congestion */#define LKF_CONGESTED (MTPF_CONGESTED) /* Link Set is congested */#define LKF_UNUSABLE (MTPF_RESTRICTED) /* Link Set is unusable (local processor outage) */#define LKF_RESTART (MTPF_RESTART) /* Link Set is restarting */#define LKF_FAILED (MTPF_PROHIBITED) /* Link Set is failed */#define LKF_INHIBITED (MTPF_INHIBITED) /* Link Set is inhibited (management inhibited) */#define LKF_BLOCKED (MTPF_BLOCKED) /* Link Set is blocked (remote processor outage) */#define LKF_INACTIVE (MTPF_INACTIVE) /* Link Set is out of service *//* * Combined link set state */typedef struct mtp_timers_ls {} mtp_timers_ls_t;typedef struct mtp_statem_ls { struct mtp_timers_ls timers;} mtp_statem_ls_t;#define LS_ALLOWED (MTP_ALLOWED) /* Linkset Allowed */#define LS_DANGER (MTP_DANGER) /* Linkset Danger of congestion (primary or secondary) */#define LS_CONGESTED (MTP_CONGESTED) /* Linkset Congested (Link Set congestion, primary or secondary ) */#define LS_RESTRICTED (MTP_RESTRICTED) /* Linkset Restricted (Route Failure or received TFR) */#define LS_RESTART (MTP_RESTART) /* Linkset Restarting */#define LS_PROHIBITED (MTP_PROHIBITED) /* Linkset Prohibited (Received TFP) */#define LS_INHIBITED (MTP_INHIBITED) /* Linkset Inhibited (Management inhibited) */#define LS_BLOCKED (MTP_BLOCKED) /* Linkset Blocked (Local Link Set failure) */#define LS_INACTIVE (MTP_INACTIVE) /* Linkset Inactive (Link out of service) */#define LS_NODANGER (MTP_NODANGER) /* Linkset Out of Danger (transient state) */#define LS_UNCONGESTED (MTP_UNCONGESTED) /* Linkset Uncongested (transient state) */#define LS_RESTARTED (MTP_RESTARTED) /* Linkset Restarted */#define LS_UNINHIBITED (MTP_UNINHIBITED) /* Linkset Uninhibited (transient state) */#define LS_UNBLOCKED (MTP_UNBLOCKED) /* Linkset Unblocked (transient state) */#define LS_ACTIVE (MTP_ACTIVE) /* Linkset Active (Link in service) *//* * Route state */typedef struct mtp_timers_rt { mtp_timer_t t6; /* timer t6 */ mtp_timer_t t10; /* timer t10 */} mtp_timers_rt_t;typedef struct mtp_statem_rt { struct mtp_timers_rt timers;} mtp_statem_rt_t;#define RT_ALLOWED (MTP_ALLOWED) /* Route Allowed */#define RT_DANGER (MTP_DANGER) /* Route Danger of congestion (primary or secondary) */#define RT_CONGESTED (MTP_CONGESTED) /* Route Congested (Link Set congestion, primary or secondary ) */#define RT_RESTRICTED (MTP_RESTRICTED) /* Route Restricted (Route Failure or received TFR) */#define RT_RESTART (MTP_RESTART) /* Route Restarting */#define RT_PROHIBITED (MTP_PROHIBITED) /* Route Prohibited (Received TFP) */#define RT_INHIBITED (MTP_INHIBITED) /* Route Inhibited (Management inhibited) */#define RT_BLOCKED (MTP_BLOCKED) /* Route Blocked (Local Link Set failure) */#define RT_INACTIVE (MTP_INACTIVE) /* Route Inactive (Link out of service) */#define RT_NODANGER (MTP_NODANGER) /* Route Out of Danger (transient state) */#define RT_UNCONGESTED (MTP_UNCONGESTED) /* Route Uncongested (transient state) */#define RT_RESTARTED (MTP_RESTARTED) /* Route Restarted */#define RT_UNINHIBITED (MTP_UNINHIBITED) /* Route Uninhibited (transient state) */#define RT_UNBLOCKED (MTP_UNBLOCKED) /* Route Unblocked (transient state) */#define RT_ACTIVE (MTP_ACTIVE) /* Route Active (Link in service) */// #define RT_RESTART_PHASE_1 (MTP_RESTART_PHASE_1) /* Route Restarting Phase 1 */// #define RT_RESTART_PHASE_2 (MTP_RESTART_PHASE_2) /* Route Restarting Phase 2 */#define RTF_ALLOWED (MTPF_ALLOWED) /* Route is allowed */#define RTF_DANGER (MTPF_DANGER) /* Route is in danger of congestion */#define RTF_CONGESTED (MTPF_CONGESTED) /* Route is congested */#define RTF_RESTRICTED (MTPF_RESTRICTED) /* Route is restricted */#define RTF_RESTART (MTPF_RESTART) /* Route is restarting */#define RTF_PROHIBITED (MTPF_PROHIBITED) /* Route is prohibited */#define RTF_INHIBITED (MTPF_INHIBITED) /* Route is inhibited */#define RTF_BLOCKED (MTPF_BLOCKED) /* Route is blocked */#define RTF_INACTIVE (MTPF_INACTIVE) /* Route is inactive *//* * Route list state */typedef struct mtp_timers_rl {} mtp_timers_rl_t;typedef struct mtp_statem_rl { struct mtp_timers_rl timers;} mtp_statem_rl_t;// #define RL_ALLOWED (MTP_ALLOWED) /* Routelist Allowed */// #define RL_DANGER (MTP_DANGER) /* Routelist Danger of congestion (primary or secondary) */// #define RL_CONGESTED (MTP_CONGESTED) /* Routelist Congested (Link Set cong, primary or// secondary) */#define RL_RESTRICTED (MTP_RESTRICTED) /* Routelist Restricted (Route Failure or received TFR) */#define RL_RESTART (MTP_RESTART) /* Routelist Restarting */// #define RL_PROHIBITED (MTP_PROHIBITED) /* Routelist Prohibited (Received TFP) */// #define RL_INHIBITED (MTP_INHIBITED) /* Routelist Inhibited (Management inhibited) */// #define RL_BLOCKED (MTP_BLOCKED) /* Routelist Blocked (Local Link Set failure) */// #define RL_INACTIVE (MTP_INACTIVE) /* Routelist Inactive (Link out of service) */// #define RL_NODANGER (MTP_NODANGER) /* Routelist Out of Danger (transient state) */// #define RL_UNCONGESTED (MTP_UNCONGESTED) /* Routelist Uncongested (transient state) */// #define RL_RESTARTED (MTP_RESTARTED) /* Routelist Restarted */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -