aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/lec_arpc.h
diff options
context:
space:
mode:
authorChas Williams <chas@cmf.nrl.navy.mil>2006-09-29 20:13:24 -0400
committerDavid S. Miller <davem@davemloft.net>2006-09-29 20:13:24 -0400
commit1c9d3e72a7164c590437f2ab6c2c4f6da91f1703 (patch)
tree8a3ab9d20514f1bddc40e9a7e0f3c763410d5abd /net/atm/lec_arpc.h
parent1fa9961d631fcde21cc42678157129c6fae7fe6d (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>
Diffstat (limited to 'net/atm/lec_arpc.h')
-rw-r--r--net/atm/lec_arpc.h148
1 files changed, 77 insertions, 71 deletions
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
13struct lec_arp_table { 13struct 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
52struct 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]; 59struct 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_ */