diff options
author | Chas Williams <chas@cmf.nrl.navy.mil> | 2006-09-29 20:13:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-09-29 20:13:24 -0400 |
commit | 1c9d3e72a7164c590437f2ab6c2c4f6da91f1703 (patch) | |
tree | 8a3ab9d20514f1bddc40e9a7e0f3c763410d5abd | |
parent | 1fa9961d631fcde21cc42678157129c6fae7fe6d (diff) |
[ATM]: [lec] header indent, comment and whitespace cleanup
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/atmlec.h | 119 | ||||
-rw-r--r-- | net/atm/lec.h | 172 | ||||
-rw-r--r-- | net/atm/lec_arpc.h | 148 |
3 files changed, 235 insertions, 204 deletions
diff --git a/include/linux/atmlec.h b/include/linux/atmlec.h index f267f2442766..6f5a1bab8f50 100644 --- a/include/linux/atmlec.h +++ b/include/linux/atmlec.h | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * ATM Lan Emulation Daemon driver interface |
3 | * ATM Lan Emulation Daemon vs. driver interface | ||
4 | * | ||
5 | * mkiiskila@yahoo.com | ||
6 | * | 3 | * |
4 | * Marko Kiiskila <mkiiskila@yahoo.com> | ||
7 | */ | 5 | */ |
8 | 6 | ||
9 | #ifndef _ATMLEC_H_ | 7 | #ifndef _ATMLEC_H_ |
@@ -13,76 +11,87 @@ | |||
13 | #include <linux/atmioc.h> | 11 | #include <linux/atmioc.h> |
14 | #include <linux/atm.h> | 12 | #include <linux/atm.h> |
15 | #include <linux/if_ether.h> | 13 | #include <linux/if_ether.h> |
14 | |||
16 | /* ATM lec daemon control socket */ | 15 | /* ATM lec daemon control socket */ |
17 | #define ATMLEC_CTRL _IO('a',ATMIOC_LANE) | 16 | #define ATMLEC_CTRL _IO('a', ATMIOC_LANE) |
18 | #define ATMLEC_DATA _IO('a',ATMIOC_LANE+1) | 17 | #define ATMLEC_DATA _IO('a', ATMIOC_LANE+1) |
19 | #define ATMLEC_MCAST _IO('a',ATMIOC_LANE+2) | 18 | #define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2) |
20 | 19 | ||
21 | /* Maximum number of LEC interfaces (tweakable) */ | 20 | /* Maximum number of LEC interfaces (tweakable) */ |
22 | #define MAX_LEC_ITF 48 | 21 | #define MAX_LEC_ITF 48 |
23 | 22 | ||
24 | /* From the total of MAX_LEC_ITF, last NUM_TR_DEVS are reserved for Token Ring. | 23 | /* |
24 | * From the total of MAX_LEC_ITF, last NUM_TR_DEVS are reserved for Token Ring. | ||
25 | * E.g. if MAX_LEC_ITF = 48 and NUM_TR_DEVS = 8, then lec0-lec39 are for | 25 | * E.g. if MAX_LEC_ITF = 48 and NUM_TR_DEVS = 8, then lec0-lec39 are for |
26 | * Ethernet ELANs and lec40-lec47 are for Token Ring ELANS. | 26 | * Ethernet ELANs and lec40-lec47 are for Token Ring ELANS. |
27 | */ | 27 | */ |
28 | #define NUM_TR_DEVS 8 | 28 | #define NUM_TR_DEVS 8 |
29 | 29 | ||
30 | typedef enum { | 30 | typedef enum { |
31 | l_set_mac_addr, l_del_mac_addr, | 31 | l_set_mac_addr, |
32 | l_svc_setup, | 32 | l_del_mac_addr, |
33 | l_addr_delete, l_topology_change, | 33 | l_svc_setup, |
34 | l_flush_complete, l_arp_update, | 34 | l_addr_delete, |
35 | l_narp_req, /* LANE2 mandates the use of this */ | 35 | l_topology_change, |
36 | l_config, l_flush_tran_id, | 36 | l_flush_complete, |
37 | l_set_lecid, l_arp_xmt, | 37 | l_arp_update, |
38 | l_rdesc_arp_xmt, | 38 | l_narp_req, /* LANE2 mandates the use of this */ |
39 | l_associate_req, | 39 | l_config, |
40 | l_should_bridge /* should we bridge this MAC? */ | 40 | l_flush_tran_id, |
41 | l_set_lecid, | ||
42 | l_arp_xmt, | ||
43 | l_rdesc_arp_xmt, | ||
44 | l_associate_req, | ||
45 | l_should_bridge /* should we bridge this MAC? */ | ||
41 | } atmlec_msg_type; | 46 | } atmlec_msg_type; |
42 | 47 | ||
43 | #define ATMLEC_MSG_TYPE_MAX l_should_bridge | 48 | #define ATMLEC_MSG_TYPE_MAX l_should_bridge |
44 | 49 | ||
45 | struct atmlec_config_msg { | 50 | struct atmlec_config_msg { |
46 | unsigned int maximum_unknown_frame_count; | 51 | unsigned int maximum_unknown_frame_count; |
47 | unsigned int max_unknown_frame_time; | 52 | unsigned int max_unknown_frame_time; |
48 | unsigned short max_retry_count; | 53 | unsigned short max_retry_count; |
49 | unsigned int aging_time; | 54 | unsigned int aging_time; |
50 | unsigned int forward_delay_time; | 55 | unsigned int forward_delay_time; |
51 | unsigned int arp_response_time; | 56 | unsigned int arp_response_time; |
52 | unsigned int flush_timeout; | 57 | unsigned int flush_timeout; |
53 | unsigned int path_switching_delay; | 58 | unsigned int path_switching_delay; |
54 | unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */ | 59 | unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */ |
55 | int mtu; | 60 | int mtu; |
56 | int is_proxy; | 61 | int is_proxy; |
57 | }; | 62 | }; |
58 | 63 | ||
59 | struct atmlec_msg { | 64 | struct atmlec_msg { |
60 | atmlec_msg_type type; | 65 | atmlec_msg_type type; |
61 | int sizeoftlvs; /* LANE2: if != 0, tlvs follow */ | 66 | int sizeoftlvs; /* LANE2: if != 0, tlvs follow */ |
62 | union { | 67 | union { |
63 | struct { | 68 | struct { |
64 | unsigned char mac_addr[ETH_ALEN]; | 69 | unsigned char mac_addr[ETH_ALEN]; |
65 | unsigned char atm_addr[ATM_ESA_LEN]; | 70 | unsigned char atm_addr[ATM_ESA_LEN]; |
66 | unsigned int flag;/* Topology_change flag, | 71 | unsigned int flag; /* |
67 | remoteflag, permanent flag, | 72 | * Topology_change flag, |
68 | lecid, transaction id */ | 73 | * remoteflag, permanent flag, |
69 | unsigned int targetless_le_arp; /* LANE2 */ | 74 | * lecid, transaction id |
70 | unsigned int no_source_le_narp; /* LANE2 */ | 75 | */ |
71 | } normal; | 76 | unsigned int targetless_le_arp; /* LANE2 */ |
72 | struct atmlec_config_msg config; | 77 | unsigned int no_source_le_narp; /* LANE2 */ |
73 | struct { | 78 | } normal; |
74 | uint16_t lec_id; /* requestor lec_id */ | 79 | struct atmlec_config_msg config; |
75 | uint32_t tran_id; /* transaction id */ | 80 | struct { |
76 | unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ | 81 | uint16_t lec_id; /* requestor lec_id */ |
77 | unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ | 82 | uint32_t tran_id; /* transaction id */ |
78 | } proxy; | 83 | unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ |
79 | /* For mapping LE_ARP requests to responses. Filled by */ | 84 | unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ |
80 | } content; /* zeppelin, returned by kernel. Used only when proxying */ | 85 | } proxy; /* |
86 | * For mapping LE_ARP requests to responses. Filled by | ||
87 | * zeppelin, returned by kernel. Used only when proxying | ||
88 | */ | ||
89 | } content; | ||
81 | } __ATM_API_ALIGN; | 90 | } __ATM_API_ALIGN; |
82 | 91 | ||
83 | struct atmlec_ioc { | 92 | struct atmlec_ioc { |
84 | int dev_num; | 93 | int dev_num; |
85 | unsigned char atm_addr[ATM_ESA_LEN]; | 94 | unsigned char atm_addr[ATM_ESA_LEN]; |
86 | unsigned char receive; /* 1= receive vcc, 0 = send vcc */ | 95 | unsigned char receive; /* 1= receive vcc, 0 = send vcc */ |
87 | }; | 96 | }; |
88 | #endif /* _ATMLEC_H_ */ | 97 | #endif /* _ATMLEC_H_ */ |
diff --git a/net/atm/lec.h b/net/atm/lec.h index c22a8bfa1f81..c700472f64df 100644 --- a/net/atm/lec.h +++ b/net/atm/lec.h | |||
@@ -1,14 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Lan Emulation client header file | 2 | * Lan Emulation client header file |
4 | * | 3 | * |
5 | * Marko Kiiskila mkiiskila@yahoo.com | 4 | * Marko Kiiskila <mkiiskila@yahoo.com> |
6 | * | ||
7 | */ | 5 | */ |
8 | 6 | ||
9 | #ifndef _LEC_H_ | 7 | #ifndef _LEC_H_ |
10 | #define _LEC_H_ | 8 | #define _LEC_H_ |
11 | 9 | ||
10 | #include <linux/config.h> | ||
12 | #include <linux/atmdev.h> | 11 | #include <linux/atmdev.h> |
13 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
14 | #include <linux/atmlec.h> | 13 | #include <linux/atmlec.h> |
@@ -16,18 +15,18 @@ | |||
16 | #define LEC_HEADER_LEN 16 | 15 | #define LEC_HEADER_LEN 16 |
17 | 16 | ||
18 | struct lecdatahdr_8023 { | 17 | struct lecdatahdr_8023 { |
19 | unsigned short le_header; | 18 | unsigned short le_header; |
20 | unsigned char h_dest[ETH_ALEN]; | 19 | unsigned char h_dest[ETH_ALEN]; |
21 | unsigned char h_source[ETH_ALEN]; | 20 | unsigned char h_source[ETH_ALEN]; |
22 | unsigned short h_type; | 21 | unsigned short h_type; |
23 | }; | 22 | }; |
24 | 23 | ||
25 | struct lecdatahdr_8025 { | 24 | struct lecdatahdr_8025 { |
26 | unsigned short le_header; | 25 | unsigned short le_header; |
27 | unsigned char ac_pad; | 26 | unsigned char ac_pad; |
28 | unsigned char fc; | 27 | unsigned char fc; |
29 | unsigned char h_dest[ETH_ALEN]; | 28 | unsigned char h_dest[ETH_ALEN]; |
30 | unsigned char h_source[ETH_ALEN]; | 29 | unsigned char h_source[ETH_ALEN]; |
31 | }; | 30 | }; |
32 | 31 | ||
33 | #define LEC_MINIMUM_8023_SIZE 62 | 32 | #define LEC_MINIMUM_8023_SIZE 62 |
@@ -44,17 +43,18 @@ struct lecdatahdr_8025 { | |||
44 | * | 43 | * |
45 | */ | 44 | */ |
46 | struct lane2_ops { | 45 | struct lane2_ops { |
47 | int (*resolve)(struct net_device *dev, u8 *dst_mac, int force, | 46 | int (*resolve) (struct net_device *dev, u8 *dst_mac, int force, |
48 | u8 **tlvs, u32 *sizeoftlvs); | 47 | u8 **tlvs, u32 *sizeoftlvs); |
49 | int (*associate_req)(struct net_device *dev, u8 *lan_dst, | 48 | int (*associate_req) (struct net_device *dev, u8 *lan_dst, |
50 | u8 *tlvs, u32 sizeoftlvs); | 49 | u8 *tlvs, u32 sizeoftlvs); |
51 | void (*associate_indicator)(struct net_device *dev, u8 *mac_addr, | 50 | void (*associate_indicator) (struct net_device *dev, u8 *mac_addr, |
52 | u8 *tlvs, u32 sizeoftlvs); | 51 | u8 *tlvs, u32 sizeoftlvs); |
53 | }; | 52 | }; |
54 | 53 | ||
55 | /* | 54 | /* |
56 | * ATM LAN Emulation supports both LLC & Dix Ethernet EtherType | 55 | * ATM LAN Emulation supports both LLC & Dix Ethernet EtherType |
57 | * frames. | 56 | * frames. |
57 | * | ||
58 | * 1. Dix Ethernet EtherType frames encoded by placing EtherType | 58 | * 1. Dix Ethernet EtherType frames encoded by placing EtherType |
59 | * field in h_type field. Data follows immediatelly after header. | 59 | * field in h_type field. Data follows immediatelly after header. |
60 | * 2. LLC Data frames whose total length, including LLC field and data, | 60 | * 2. LLC Data frames whose total length, including LLC field and data, |
@@ -70,72 +70,88 @@ struct lane2_ops { | |||
70 | #define LEC_ARP_TABLE_SIZE 16 | 70 | #define LEC_ARP_TABLE_SIZE 16 |
71 | 71 | ||
72 | struct lec_priv { | 72 | struct lec_priv { |
73 | struct net_device_stats stats; | 73 | struct net_device_stats stats; |
74 | unsigned short lecid; /* Lecid of this client */ | 74 | unsigned short lecid; /* Lecid of this client */ |
75 | struct lec_arp_table *lec_arp_empty_ones; | 75 | struct lec_arp_table *lec_arp_empty_ones; |
76 | /* Used for storing VCC's that don't have a MAC address attached yet */ | 76 | /* Used for storing VCC's that don't have a MAC address attached yet */ |
77 | struct lec_arp_table *lec_arp_tables[LEC_ARP_TABLE_SIZE]; | 77 | struct lec_arp_table *lec_arp_tables[LEC_ARP_TABLE_SIZE]; |
78 | /* Actual LE ARP table */ | 78 | /* Actual LE ARP table */ |
79 | struct lec_arp_table *lec_no_forward; | 79 | struct lec_arp_table *lec_no_forward; |
80 | /* Used for storing VCC's (and forward packets from) which are to | 80 | /* |
81 | age out by not using them to forward packets. | 81 | * Used for storing VCC's (and forward packets from) which are to |
82 | This is because to some LE clients there will be 2 VCCs. Only | 82 | * age out by not using them to forward packets. |
83 | one of them gets used. */ | 83 | * This is because to some LE clients there will be 2 VCCs. Only |
84 | struct lec_arp_table *mcast_fwds; | 84 | * one of them gets used. |
85 | /* With LANEv2 it is possible that BUS (or a special multicast server) | 85 | */ |
86 | establishes multiple Multicast Forward VCCs to us. This list | 86 | struct lec_arp_table *mcast_fwds; |
87 | collects all those VCCs. LANEv1 client has only one item in this | 87 | /* |
88 | list. These entries are not aged out. */ | 88 | * With LANEv2 it is possible that BUS (or a special multicast server) |
89 | spinlock_t lec_arp_lock; | 89 | * establishes multiple Multicast Forward VCCs to us. This list |
90 | struct atm_vcc *mcast_vcc; /* Default Multicast Send VCC */ | 90 | * collects all those VCCs. LANEv1 client has only one item in this |
91 | struct atm_vcc *lecd; | 91 | * list. These entries are not aged out. |
92 | struct timer_list lec_arp_timer; | 92 | */ |
93 | /* C10 */ | 93 | spinlock_t lec_arp_lock; |
94 | unsigned int maximum_unknown_frame_count; | 94 | struct atm_vcc *mcast_vcc; /* Default Multicast Send VCC */ |
95 | /* Within the period of time defined by this variable, the client will send | 95 | struct atm_vcc *lecd; |
96 | no more than C10 frames to BUS for a given unicast destination. (C11) */ | 96 | struct timer_list lec_arp_timer; /* C10 */ |
97 | unsigned long max_unknown_frame_time; | 97 | unsigned int maximum_unknown_frame_count; |
98 | /* If no traffic has been sent in this vcc for this period of time, | 98 | /* |
99 | vcc will be torn down (C12)*/ | 99 | * Within the period of time defined by this variable, the client will send |
100 | unsigned long vcc_timeout_period; | 100 | * no more than C10 frames to BUS for a given unicast destination. (C11) |
101 | /* An LE Client MUST not retry an LE_ARP_REQUEST for a | 101 | */ |
102 | given frame's LAN Destination more than maximum retry count times, | 102 | unsigned long max_unknown_frame_time; |
103 | after the first LEC_ARP_REQUEST (C13)*/ | 103 | /* |
104 | unsigned short max_retry_count; | 104 | * If no traffic has been sent in this vcc for this period of time, |
105 | /* Max time the client will maintain an entry in its arp cache in | 105 | * vcc will be torn down (C12) |
106 | absence of a verification of that relationship (C17)*/ | 106 | */ |
107 | unsigned long aging_time; | 107 | unsigned long vcc_timeout_period; |
108 | /* Max time the client will maintain an entry in cache when | 108 | /* |
109 | topology change flag is true (C18) */ | 109 | * An LE Client MUST not retry an LE_ARP_REQUEST for a |
110 | unsigned long forward_delay_time; | 110 | * given frame's LAN Destination more than maximum retry count times, |
111 | /* Topology change flag (C19)*/ | 111 | * after the first LEC_ARP_REQUEST (C13) |
112 | int topology_change; | 112 | */ |
113 | /* Max time the client expects an LE_ARP_REQUEST/LE_ARP_RESPONSE | 113 | unsigned short max_retry_count; |
114 | cycle to take (C20)*/ | 114 | /* |
115 | unsigned long arp_response_time; | 115 | * Max time the client will maintain an entry in its arp cache in |
116 | /* Time limit ot wait to receive an LE_FLUSH_RESPONSE after the | 116 | * absence of a verification of that relationship (C17) |
117 | LE_FLUSH_REQUEST has been sent before taking recover action. (C21)*/ | 117 | */ |
118 | unsigned long flush_timeout; | 118 | unsigned long aging_time; |
119 | /* The time since sending a frame to the bus after which the | 119 | /* |
120 | LE Client may assume that the frame has been either discarded or | 120 | * Max time the client will maintain an entry in cache when |
121 | delivered to the recipient (C22) */ | 121 | * topology change flag is true (C18) |
122 | unsigned long path_switching_delay; | 122 | */ |
123 | unsigned long forward_delay_time; /* Topology change flag (C19) */ | ||
124 | int topology_change; | ||
125 | /* | ||
126 | * Max time the client expects an LE_ARP_REQUEST/LE_ARP_RESPONSE | ||
127 | * cycle to take (C20) | ||
128 | */ | ||
129 | unsigned long arp_response_time; | ||
130 | /* | ||
131 | * Time limit ot wait to receive an LE_FLUSH_RESPONSE after the | ||
132 | * LE_FLUSH_REQUEST has been sent before taking recover action. (C21) | ||
133 | */ | ||
134 | unsigned long flush_timeout; | ||
135 | /* The time since sending a frame to the bus after which the | ||
136 | * LE Client may assume that the frame has been either discarded or | ||
137 | * delivered to the recipient (C22) | ||
138 | */ | ||
139 | unsigned long path_switching_delay; | ||
123 | 140 | ||
124 | u8 *tlvs; /* LANE2: TLVs are new */ | 141 | u8 *tlvs; /* LANE2: TLVs are new */ |
125 | u32 sizeoftlvs; /* The size of the tlv array in bytes */ | 142 | u32 sizeoftlvs; /* The size of the tlv array in bytes */ |
126 | int lane_version; /* LANE2 */ | 143 | int lane_version; /* LANE2 */ |
127 | int itfnum; /* e.g. 2 for lec2, 5 for lec5 */ | 144 | int itfnum; /* e.g. 2 for lec2, 5 for lec5 */ |
128 | struct lane2_ops *lane2_ops; /* can be NULL for LANE v1 */ | 145 | struct lane2_ops *lane2_ops; /* can be NULL for LANE v1 */ |
129 | int is_proxy; /* bridge between ATM and Ethernet */ | 146 | int is_proxy; /* bridge between ATM and Ethernet */ |
130 | int is_trdev; /* Device type, 0 = Ethernet, 1 = TokenRing */ | 147 | int is_trdev; /* Device type, 0 = Ethernet, 1 = TokenRing */ |
131 | }; | 148 | }; |
132 | 149 | ||
133 | struct lec_vcc_priv { | 150 | struct lec_vcc_priv { |
134 | void (*old_pop)(struct atm_vcc *vcc, struct sk_buff *skb); | 151 | void (*old_pop) (struct atm_vcc *vcc, struct sk_buff *skb); |
135 | int xoff; | 152 | int xoff; |
136 | }; | 153 | }; |
137 | 154 | ||
138 | #define LEC_VCC_PRIV(vcc) ((struct lec_vcc_priv *)((vcc)->user_back)) | 155 | #define LEC_VCC_PRIV(vcc) ((struct lec_vcc_priv *)((vcc)->user_back)) |
139 | 156 | ||
140 | #endif /* _LEC_H_ */ | 157 | #endif /* _LEC_H_ */ |
141 | |||
diff --git a/net/atm/lec_arpc.h b/net/atm/lec_arpc.h index 397448094648..0230ca148c77 100644 --- a/net/atm/lec_arpc.h +++ b/net/atm/lec_arpc.h | |||
@@ -1,92 +1,98 @@ | |||
1 | /* | 1 | /* |
2 | * Lec arp cache | 2 | * Lec arp cache |
3 | * Marko Kiiskila mkiiskila@yahoo.com | ||
4 | * | 3 | * |
4 | * Marko Kiiskila <mkiiskila@yahoo.com> | ||
5 | */ | 5 | */ |
6 | #ifndef _LEC_ARP_H | 6 | #ifndef _LEC_ARP_H_ |
7 | #define _LEC_ARP_H | 7 | #define _LEC_ARP_H_ |
8 | #include <linux/atm.h> | 8 | #include <linux/atm.h> |
9 | #include <linux/atmdev.h> | 9 | #include <linux/atmdev.h> |
10 | #include <linux/if_ether.h> | 10 | #include <linux/if_ether.h> |
11 | #include <linux/atmlec.h> | 11 | #include <linux/atmlec.h> |
12 | 12 | ||
13 | struct lec_arp_table { | 13 | struct lec_arp_table { |
14 | struct lec_arp_table *next; /* Linked entry list */ | 14 | struct lec_arp_table *next; /* Linked entry list */ |
15 | unsigned char atm_addr[ATM_ESA_LEN]; /* Atm address */ | 15 | unsigned char atm_addr[ATM_ESA_LEN]; /* Atm address */ |
16 | unsigned char mac_addr[ETH_ALEN]; /* Mac address */ | 16 | unsigned char mac_addr[ETH_ALEN]; /* Mac address */ |
17 | int is_rdesc; /* Mac address is a route descriptor */ | 17 | int is_rdesc; /* Mac address is a route descriptor */ |
18 | struct atm_vcc *vcc; /* Vcc this entry is attached */ | 18 | struct atm_vcc *vcc; /* Vcc this entry is attached */ |
19 | struct atm_vcc *recv_vcc; /* Vcc we receive data from */ | 19 | struct atm_vcc *recv_vcc; /* Vcc we receive data from */ |
20 | void (*old_push)(struct atm_vcc *vcc,struct sk_buff *skb); | ||
21 | /* Push that leads to daemon */ | ||
22 | void (*old_recv_push)(struct atm_vcc *vcc, struct sk_buff *skb); | ||
23 | /* Push that leads to daemon */ | ||
24 | void (*old_close)(struct atm_vcc *vcc); | ||
25 | /* We want to see when this | ||
26 | * vcc gets closed */ | ||
27 | unsigned long last_used; /* For expiry */ | ||
28 | unsigned long timestamp; /* Used for various timestamping | ||
29 | * things: | ||
30 | * 1. FLUSH started | ||
31 | * (status=ESI_FLUSH_PENDING) | ||
32 | * 2. Counting to | ||
33 | * max_unknown_frame_time | ||
34 | * (status=ESI_ARP_PENDING|| | ||
35 | * status=ESI_VC_PENDING) | ||
36 | */ | ||
37 | unsigned char no_tries; /* No of times arp retry has been | ||
38 | tried */ | ||
39 | unsigned char status; /* Status of this entry */ | ||
40 | unsigned short flags; /* Flags for this entry */ | ||
41 | unsigned short packets_flooded; /* Data packets flooded */ | ||
42 | unsigned long flush_tran_id; /* Transaction id in flush protocol */ | ||
43 | struct timer_list timer; /* Arping timer */ | ||
44 | struct lec_priv *priv; /* Pointer back */ | ||
45 | 20 | ||
46 | u8 *tlvs; /* LANE2: Each MAC address can have TLVs */ | 21 | void (*old_push) (struct atm_vcc *vcc, struct sk_buff *skb); |
47 | u32 sizeoftlvs; /* associated with it. sizeoftlvs tells the */ | 22 | /* Push that leads to daemon */ |
48 | /* the length of the tlvs array */ | 23 | |
49 | struct sk_buff_head tx_wait; /* wait queue for outgoing packets */ | 24 | void (*old_recv_push) (struct atm_vcc *vcc, struct sk_buff *skb); |
25 | /* Push that leads to daemon */ | ||
26 | |||
27 | void (*old_close) (struct atm_vcc *vcc); | ||
28 | /* We want to see when this vcc gets closed */ | ||
29 | |||
30 | unsigned long last_used; /* For expiry */ | ||
31 | unsigned long timestamp; /* Used for various timestamping things: | ||
32 | * 1. FLUSH started | ||
33 | * (status=ESI_FLUSH_PENDING) | ||
34 | * 2. Counting to | ||
35 | * max_unknown_frame_time | ||
36 | * (status=ESI_ARP_PENDING|| | ||
37 | * status=ESI_VC_PENDING) | ||
38 | */ | ||
39 | unsigned char no_tries; /* No of times arp retry has been tried */ | ||
40 | unsigned char status; /* Status of this entry */ | ||
41 | unsigned short flags; /* Flags for this entry */ | ||
42 | unsigned short packets_flooded; /* Data packets flooded */ | ||
43 | unsigned long flush_tran_id; /* Transaction id in flush protocol */ | ||
44 | struct timer_list timer; /* Arping timer */ | ||
45 | struct lec_priv *priv; /* Pointer back */ | ||
46 | u8 *tlvs; | ||
47 | u32 sizeoftlvs; /* | ||
48 | * LANE2: Each MAC address can have TLVs | ||
49 | * associated with it. sizeoftlvs tells the | ||
50 | * the length of the tlvs array | ||
51 | */ | ||
52 | struct sk_buff_head tx_wait; /* wait queue for outgoing packets */ | ||
50 | }; | 53 | }; |
51 | 54 | ||
52 | struct tlv { /* LANE2: Template tlv struct for accessing */ | 55 | /* |
53 | /* the tlvs in the lec_arp_table->tlvs array*/ | 56 | * LANE2: Template tlv struct for accessing |
54 | u32 type; | 57 | * the tlvs in the lec_arp_table->tlvs array |
55 | u8 length; | 58 | */ |
56 | u8 value[255]; | 59 | struct tlv { |
60 | u32 type; | ||
61 | u8 length; | ||
62 | u8 value[255]; | ||
57 | }; | 63 | }; |
58 | 64 | ||
59 | /* Status fields */ | 65 | /* Status fields */ |
60 | #define ESI_UNKNOWN 0 /* | 66 | #define ESI_UNKNOWN 0 /* |
61 | * Next packet sent to this mac address | 67 | * Next packet sent to this mac address |
62 | * causes ARP-request to be sent | 68 | * causes ARP-request to be sent |
63 | */ | 69 | */ |
64 | #define ESI_ARP_PENDING 1 /* | 70 | #define ESI_ARP_PENDING 1 /* |
65 | * There is no ATM address associated with this | 71 | * There is no ATM address associated with this |
66 | * 48-bit address. The LE-ARP protocol is in | 72 | * 48-bit address. The LE-ARP protocol is in |
67 | * progress. | 73 | * progress. |
68 | */ | 74 | */ |
69 | #define ESI_VC_PENDING 2 /* | 75 | #define ESI_VC_PENDING 2 /* |
70 | * There is a valid ATM address associated with | 76 | * There is a valid ATM address associated with |
71 | * this 48-bit address but there is no VC set | 77 | * this 48-bit address but there is no VC set |
72 | * up to that ATM address. The signaling | 78 | * up to that ATM address. The signaling |
73 | * protocol is in process. | 79 | * protocol is in process. |
74 | */ | 80 | */ |
75 | #define ESI_FLUSH_PENDING 4 /* | 81 | #define ESI_FLUSH_PENDING 4 /* |
76 | * The LEC has been notified of the FLUSH_START | 82 | * The LEC has been notified of the FLUSH_START |
77 | * status and it is assumed that the flush | 83 | * status and it is assumed that the flush |
78 | * protocol is in process. | 84 | * protocol is in process. |
79 | */ | 85 | */ |
80 | #define ESI_FORWARD_DIRECT 5 /* | 86 | #define ESI_FORWARD_DIRECT 5 /* |
81 | * Either the Path Switching Delay (C22) has | 87 | * Either the Path Switching Delay (C22) has |
82 | * elapsed or the LEC has notified the Mapping | 88 | * elapsed or the LEC has notified the Mapping |
83 | * that the flush protocol has completed. In | 89 | * that the flush protocol has completed. In |
84 | * either case, it is safe to forward packets | 90 | * either case, it is safe to forward packets |
85 | * to this address via the data direct VC. | 91 | * to this address via the data direct VC. |
86 | */ | 92 | */ |
87 | 93 | ||
88 | /* Flag values */ | 94 | /* Flag values */ |
89 | #define LEC_REMOTE_FLAG 0x0001 | 95 | #define LEC_REMOTE_FLAG 0x0001 |
90 | #define LEC_PERMANENT_FLAG 0x0002 | 96 | #define LEC_PERMANENT_FLAG 0x0002 |
91 | 97 | ||
92 | #endif | 98 | #endif /* _LEC_ARP_H_ */ |