aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/atmmpc.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/atmmpc.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/atmmpc.h')
-rw-r--r--include/linux/atmmpc.h125
1 files changed, 125 insertions, 0 deletions
diff --git a/include/linux/atmmpc.h b/include/linux/atmmpc.h
new file mode 100644
index 000000000000..5fbfa68136d3
--- /dev/null
+++ b/include/linux/atmmpc.h
@@ -0,0 +1,125 @@
1#ifndef _ATMMPC_H_
2#define _ATMMPC_H_
3
4#include <linux/atmapi.h>
5#include <linux/atmioc.h>
6#include <linux/atm.h>
7
8#define ATMMPC_CTRL _IO('a', ATMIOC_MPOA)
9#define ATMMPC_DATA _IO('a', ATMIOC_MPOA+1)
10
11#define MPC_SOCKET_INGRESS 1
12#define MPC_SOCKET_EGRESS 2
13
14struct atmmpc_ioc {
15 int dev_num;
16 uint32_t ipaddr; /* the IP address of the shortcut */
17 int type; /* ingress or egress */
18};
19
20typedef struct in_ctrl_info {
21 uint8_t Last_NHRP_CIE_code;
22 uint8_t Last_Q2931_cause_value;
23 uint8_t eg_MPC_ATM_addr[ATM_ESA_LEN];
24 uint32_t tag;
25 uint32_t in_dst_ip; /* IP address this ingress MPC sends packets to */
26 uint16_t holding_time;
27 uint32_t request_id;
28} in_ctrl_info;
29
30typedef struct eg_ctrl_info {
31 uint8_t DLL_header[256];
32 uint8_t DH_length;
33 uint32_t cache_id;
34 uint32_t tag;
35 uint32_t mps_ip;
36 uint32_t eg_dst_ip; /* IP address to which ingress MPC sends packets */
37 uint8_t in_MPC_data_ATM_addr[ATM_ESA_LEN];
38 uint16_t holding_time;
39} eg_ctrl_info;
40
41struct mpc_parameters {
42 uint16_t mpc_p1; /* Shortcut-Setup Frame Count */
43 uint16_t mpc_p2; /* Shortcut-Setup Frame Time */
44 uint8_t mpc_p3[8]; /* Flow-detection Protocols */
45 uint16_t mpc_p4; /* MPC Initial Retry Time */
46 uint16_t mpc_p5; /* MPC Retry Time Maximum */
47 uint16_t mpc_p6; /* Hold Down Time */
48} ;
49
50struct k_message {
51 uint16_t type;
52 uint32_t ip_mask;
53 uint8_t MPS_ctrl[ATM_ESA_LEN];
54 union {
55 in_ctrl_info in_info;
56 eg_ctrl_info eg_info;
57 struct mpc_parameters params;
58 } content;
59 struct atm_qos qos;
60} __ATM_API_ALIGN;
61
62struct llc_snap_hdr {
63 /* RFC 1483 LLC/SNAP encapsulation for routed IP PDUs */
64 uint8_t dsap; /* Destination Service Access Point (0xAA) */
65 uint8_t ssap; /* Source Service Access Point (0xAA) */
66 uint8_t ui; /* Unnumbered Information (0x03) */
67 uint8_t org[3]; /* Organizational identification (0x000000) */
68 uint8_t type[2]; /* Ether type (for IP) (0x0800) */
69};
70
71/* TLVs this MPC recognizes */
72#define TLV_MPOA_DEVICE_TYPE 0x00a03e2a
73
74/* MPOA device types in MPOA Device Type TLV */
75#define NON_MPOA 0
76#define MPS 1
77#define MPC 2
78#define MPS_AND_MPC 3
79
80
81/* MPC parameter defaults */
82
83#define MPC_P1 10 /* Shortcut-Setup Frame Count */
84#define MPC_P2 1 /* Shortcut-Setup Frame Time */
85#define MPC_P3 0 /* Flow-detection Protocols */
86#define MPC_P4 5 /* MPC Initial Retry Time */
87#define MPC_P5 40 /* MPC Retry Time Maximum */
88#define MPC_P6 160 /* Hold Down Time */
89#define HOLDING_TIME_DEFAULT 1200 /* same as MPS-p7 */
90
91/* MPC constants */
92
93#define MPC_C1 2 /* Retry Time Multiplier */
94#define MPC_C2 60 /* Initial Keep-Alive Lifetime */
95
96/* Message types - to MPOA daemon */
97
98#define SND_MPOA_RES_RQST 201
99#define SET_MPS_CTRL_ADDR 202
100#define SND_MPOA_RES_RTRY 203 /* Different type in a retry due to req id */
101#define STOP_KEEP_ALIVE_SM 204
102#define EGRESS_ENTRY_REMOVED 205
103#define SND_EGRESS_PURGE 206
104#define DIE 207 /* tell the daemon to exit() */
105#define DATA_PLANE_PURGE 208 /* Data plane purge because of egress cache hit miss or dead MPS */
106#define OPEN_INGRESS_SVC 209
107
108/* Message types - from MPOA daemon */
109
110#define MPOA_TRIGGER_RCVD 101
111#define MPOA_RES_REPLY_RCVD 102
112#define INGRESS_PURGE_RCVD 103
113#define EGRESS_PURGE_RCVD 104
114#define MPS_DEATH 105
115#define CACHE_IMPOS_RCVD 106
116#define SET_MPC_CTRL_ADDR 107 /* Our MPC's control ATM address */
117#define SET_MPS_MAC_ADDR 108
118#define CLEAN_UP_AND_EXIT 109
119#define SET_MPC_PARAMS 110 /* MPC configuration parameters */
120
121/* Message types - bidirectional */
122
123#define RELOAD 301 /* kill -HUP the daemon for reload */
124
125#endif /* _ATMMPC_H_ */