4 #include <linux/atmioc.h>
7 #define ATMMPC_CTRL _IO('a', ATMIOC_MPOA)
8 #define ATMMPC_DATA _IO('a', ATMIOC_MPOA+1)
10 #define MPC_SOCKET_INGRESS 1
11 #define MPC_SOCKET_EGRESS 2
15 uint32_t ipaddr
; /* the IP address of the shortcut */
16 int type
; /* ingress or egress */
19 typedef struct in_ctrl_info
{
20 uint8_t Last_NHRP_CIE_code
;
21 uint8_t Last_Q2931_cause_value
;
22 uint8_t eg_MPC_ATM_addr
[ATM_ESA_LEN
];
24 uint32_t in_dst_ip
; /* IP address this ingress MPC sends packets to */
25 uint16_t holding_time
;
29 typedef struct eg_ctrl_info
{
30 uint8_t DLL_header
[256];
35 uint32_t eg_dst_ip
; /* IP address to which ingress MPC sends packets */
36 uint8_t in_MPC_data_ATM_addr
[ATM_ESA_LEN
];
37 uint16_t holding_time
;
40 struct mpc_parameters
{
41 uint16_t mpc_p1
; /* Shortcut-Setup Frame Count */
42 uint16_t mpc_p2
; /* Shortcut-Setup Frame Time */
43 uint8_t mpc_p3
[8]; /* Flow-detection Protocols */
44 uint16_t mpc_p4
; /* MPC Initial Retry Time */
45 uint16_t mpc_p5
; /* MPC Retry Time Maximum */
46 uint16_t mpc_p6
; /* Hold Down Time */
52 uint8_t MPS_ctrl
[ATM_ESA_LEN
];
56 struct mpc_parameters params
;
61 struct llc_snap_hdr
{ /* RFC 1483 LLC/SNAP encapsulation for routed IP PDUs */
62 uint8_t dsap
; /* Destination Service Access Point (0xAA) */
63 uint8_t ssap
; /* Source Service Access Point (0xAA) */
64 uint8_t ui
; /* Unnumbered Information (0x03) */
65 uint8_t org
[3]; /* Organizational identification (0x000000) */
66 uint8_t type
[2]; /* Ether type (for IP) (0x0800) */
69 /* TLVs this MPC recognizes */
70 #define TLV_MPOA_DEVICE_TYPE 0x00a03e2a
72 /* MPOA device types in MPOA Device Type TLV */
79 /* MPC parameter defaults */
81 #define MPC_P1 10 /* Shortcut-Setup Frame Count */
82 #define MPC_P2 1 /* Shortcut-Setup Frame Time */
83 #define MPC_P3 0 /* Flow-detection Protocols */
84 #define MPC_P4 5 /* MPC Initial Retry Time */
85 #define MPC_P5 40 /* MPC Retry Time Maximum */
86 #define MPC_P6 160 /* Hold Down Time */
87 #define HOLDING_TIME_DEFAULT 1200 /* same as MPS-p7 */
91 #define MPC_C1 2 /* Retry Time Multiplier */
92 #define MPC_C2 60 /* Initial Keep-Alive Lifetime */
94 /* Message types - to MPOA daemon */
96 #define SND_MPOA_RES_RQST 201
97 #define SET_MPS_CTRL_ADDR 202
98 #define SND_MPOA_RES_RTRY 203 /* Different type in a retry due to req id */
99 #define STOP_KEEP_ALIVE_SM 204
100 #define EGRESS_ENTRY_REMOVED 205
101 #define SND_EGRESS_PURGE 206
102 #define DIE 207 /* tell the daemon to exit() */
103 #define DATA_PLANE_PURGE 208 /* Data plane purge because of egress cache hit miss or dead MPS */
104 #define OPEN_INGRESS_SVC 209
106 /* Message types - from MPOA daemon */
108 #define MPOA_TRIGGER_RCVD 101
109 #define MPOA_RES_REPLY_RCVD 102
110 #define INGRESS_PURGE_RCVD 103
111 #define EGRESS_PURGE_RCVD 104
112 #define MPS_DEATH 105
113 #define CACHE_IMPOS_RCVD 106
114 #define SET_MPC_CTRL_ADDR 107 /* Our MPC's control ATM address */
115 #define SET_MPS_MAC_ADDR 108
116 #define CLEAN_UP_AND_EXIT 109
117 #define SET_MPC_PARAMS 110 /* MPC configuration parameters */
119 /* Message types - bidirectional */
121 #define RELOAD 301 /* kill -HUP the daemon for reload */
123 #endif /* _ATMMPC_H_ */