0001
0002 #ifndef _ATMMPC_H_
0003 #define _ATMMPC_H_
0004
0005 #include <linux/atmapi.h>
0006 #include <linux/atmioc.h>
0007 #include <linux/atm.h>
0008 #include <linux/types.h>
0009
0010 #define ATMMPC_CTRL _IO('a', ATMIOC_MPOA)
0011 #define ATMMPC_DATA _IO('a', ATMIOC_MPOA+1)
0012
0013 #define MPC_SOCKET_INGRESS 1
0014 #define MPC_SOCKET_EGRESS 2
0015
0016 struct atmmpc_ioc {
0017 int dev_num;
0018 __be32 ipaddr;
0019 int type;
0020 };
0021
0022 typedef struct in_ctrl_info {
0023 __u8 Last_NHRP_CIE_code;
0024 __u8 Last_Q2931_cause_value;
0025 __u8 eg_MPC_ATM_addr[ATM_ESA_LEN];
0026 __be32 tag;
0027 __be32 in_dst_ip;
0028 __u16 holding_time;
0029 __u32 request_id;
0030 } in_ctrl_info;
0031
0032 typedef struct eg_ctrl_info {
0033 __u8 DLL_header[256];
0034 __u8 DH_length;
0035 __be32 cache_id;
0036 __be32 tag;
0037 __be32 mps_ip;
0038 __be32 eg_dst_ip;
0039 __u8 in_MPC_data_ATM_addr[ATM_ESA_LEN];
0040 __u16 holding_time;
0041 } eg_ctrl_info;
0042
0043 struct mpc_parameters {
0044 __u16 mpc_p1;
0045 __u16 mpc_p2;
0046 __u8 mpc_p3[8];
0047 __u16 mpc_p4;
0048 __u16 mpc_p5;
0049 __u16 mpc_p6;
0050 } ;
0051
0052 struct k_message {
0053 __u16 type;
0054 __be32 ip_mask;
0055 __u8 MPS_ctrl[ATM_ESA_LEN];
0056 union {
0057 in_ctrl_info in_info;
0058 eg_ctrl_info eg_info;
0059 struct mpc_parameters params;
0060 } content;
0061 struct atm_qos qos;
0062 } __ATM_API_ALIGN;
0063
0064 struct llc_snap_hdr {
0065
0066 __u8 dsap;
0067 __u8 ssap;
0068 __u8 ui;
0069 __u8 org[3];
0070 __u8 type[2];
0071 };
0072
0073
0074 #define TLV_MPOA_DEVICE_TYPE 0x00a03e2a
0075
0076
0077 #define NON_MPOA 0
0078 #define MPS 1
0079 #define MPC 2
0080 #define MPS_AND_MPC 3
0081
0082
0083
0084
0085 #define MPC_P1 10
0086 #define MPC_P2 1
0087 #define MPC_P3 0
0088 #define MPC_P4 5
0089 #define MPC_P5 40
0090 #define MPC_P6 160
0091 #define HOLDING_TIME_DEFAULT 1200
0092
0093
0094
0095 #define MPC_C1 2
0096 #define MPC_C2 60
0097
0098
0099
0100 #define SND_MPOA_RES_RQST 201
0101 #define SET_MPS_CTRL_ADDR 202
0102 #define SND_MPOA_RES_RTRY 203
0103 #define STOP_KEEP_ALIVE_SM 204
0104 #define EGRESS_ENTRY_REMOVED 205
0105 #define SND_EGRESS_PURGE 206
0106 #define DIE 207
0107 #define DATA_PLANE_PURGE 208
0108 #define OPEN_INGRESS_SVC 209
0109
0110
0111
0112 #define MPOA_TRIGGER_RCVD 101
0113 #define MPOA_RES_REPLY_RCVD 102
0114 #define INGRESS_PURGE_RCVD 103
0115 #define EGRESS_PURGE_RCVD 104
0116 #define MPS_DEATH 105
0117 #define CACHE_IMPOS_RCVD 106
0118 #define SET_MPC_CTRL_ADDR 107
0119 #define SET_MPS_MAC_ADDR 108
0120 #define CLEAN_UP_AND_EXIT 109
0121 #define SET_MPC_PARAMS 110
0122
0123
0124
0125 #define RELOAD 301
0126
0127 #endif