diff options
Diffstat (limited to 'net/atm/lec_arpc.h')
| -rw-r--r-- | net/atm/lec_arpc.h | 146 |
1 files changed, 75 insertions, 71 deletions
diff --git a/net/atm/lec_arpc.h b/net/atm/lec_arpc.h index 397448094648..ec67435a40a6 100644 --- a/net/atm/lec_arpc.h +++ b/net/atm/lec_arpc.h | |||
| @@ -1,92 +1,96 @@ | |||
| 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 hlist_node 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 | unsigned long last_used; /* For expiry */ | ||
| 28 | unsigned long timestamp; /* Used for various timestamping things: | ||
| 29 | * 1. FLUSH started | ||
| 30 | * (status=ESI_FLUSH_PENDING) | ||
| 31 | * 2. Counting to | ||
| 32 | * max_unknown_frame_time | ||
| 33 | * (status=ESI_ARP_PENDING|| | ||
| 34 | * status=ESI_VC_PENDING) | ||
| 35 | */ | ||
| 36 | unsigned char no_tries; /* No of times arp retry has been tried */ | ||
| 37 | unsigned char status; /* Status of this entry */ | ||
| 38 | unsigned short flags; /* Flags for this entry */ | ||
| 39 | unsigned short packets_flooded; /* Data packets flooded */ | ||
| 40 | unsigned long flush_tran_id; /* Transaction id in flush protocol */ | ||
| 41 | struct timer_list timer; /* Arping timer */ | ||
| 42 | struct lec_priv *priv; /* Pointer back */ | ||
| 43 | u8 *tlvs; | ||
| 44 | u32 sizeoftlvs; /* | ||
| 45 | * LANE2: Each MAC address can have TLVs | ||
| 46 | * associated with it. sizeoftlvs tells the | ||
| 47 | * the length of the tlvs array | ||
| 48 | */ | ||
| 49 | struct sk_buff_head tx_wait; /* wait queue for outgoing packets */ | ||
| 50 | atomic_t usage; /* usage count */ | ||
| 50 | }; | 51 | }; |
| 51 | 52 | ||
| 52 | struct tlv { /* LANE2: Template tlv struct for accessing */ | 53 | /* |
| 53 | /* the tlvs in the lec_arp_table->tlvs array*/ | 54 | * LANE2: Template tlv struct for accessing |
| 54 | u32 type; | 55 | * the tlvs in the lec_arp_table->tlvs array |
| 55 | u8 length; | 56 | */ |
| 56 | u8 value[255]; | 57 | struct tlv { |
| 58 | u32 type; | ||
| 59 | u8 length; | ||
| 60 | u8 value[255]; | ||
| 57 | }; | 61 | }; |
| 58 | 62 | ||
| 59 | /* Status fields */ | 63 | /* Status fields */ |
| 60 | #define ESI_UNKNOWN 0 /* | 64 | #define ESI_UNKNOWN 0 /* |
| 61 | * Next packet sent to this mac address | 65 | * Next packet sent to this mac address |
| 62 | * causes ARP-request to be sent | 66 | * causes ARP-request to be sent |
| 63 | */ | 67 | */ |
| 64 | #define ESI_ARP_PENDING 1 /* | 68 | #define ESI_ARP_PENDING 1 /* |
| 65 | * There is no ATM address associated with this | 69 | * There is no ATM address associated with this |
| 66 | * 48-bit address. The LE-ARP protocol is in | 70 | * 48-bit address. The LE-ARP protocol is in |
| 67 | * progress. | 71 | * progress. |
| 68 | */ | 72 | */ |
| 69 | #define ESI_VC_PENDING 2 /* | 73 | #define ESI_VC_PENDING 2 /* |
| 70 | * There is a valid ATM address associated with | 74 | * There is a valid ATM address associated with |
| 71 | * this 48-bit address but there is no VC set | 75 | * this 48-bit address but there is no VC set |
| 72 | * up to that ATM address. The signaling | 76 | * up to that ATM address. The signaling |
| 73 | * protocol is in process. | 77 | * protocol is in process. |
| 74 | */ | 78 | */ |
| 75 | #define ESI_FLUSH_PENDING 4 /* | 79 | #define ESI_FLUSH_PENDING 4 /* |
| 76 | * The LEC has been notified of the FLUSH_START | 80 | * The LEC has been notified of the FLUSH_START |
| 77 | * status and it is assumed that the flush | 81 | * status and it is assumed that the flush |
| 78 | * protocol is in process. | 82 | * protocol is in process. |
| 79 | */ | 83 | */ |
| 80 | #define ESI_FORWARD_DIRECT 5 /* | 84 | #define ESI_FORWARD_DIRECT 5 /* |
| 81 | * Either the Path Switching Delay (C22) has | 85 | * Either the Path Switching Delay (C22) has |
| 82 | * elapsed or the LEC has notified the Mapping | 86 | * elapsed or the LEC has notified the Mapping |
| 83 | * that the flush protocol has completed. In | 87 | * that the flush protocol has completed. In |
| 84 | * either case, it is safe to forward packets | 88 | * either case, it is safe to forward packets |
| 85 | * to this address via the data direct VC. | 89 | * to this address via the data direct VC. |
| 86 | */ | 90 | */ |
| 87 | 91 | ||
| 88 | /* Flag values */ | 92 | /* Flag values */ |
| 89 | #define LEC_REMOTE_FLAG 0x0001 | 93 | #define LEC_REMOTE_FLAG 0x0001 |
| 90 | #define LEC_PERMANENT_FLAG 0x0002 | 94 | #define LEC_PERMANENT_FLAG 0x0002 |
| 91 | 95 | ||
| 92 | #endif | 96 | #endif /* _LEC_ARP_H_ */ |
