/*1* Lec arp cache2*3* Marko Kiiskila <[email protected]>4*/5#ifndef _LEC_ARP_H_6#define _LEC_ARP_H_7#include <linux/atm.h>8#include <linux/atmdev.h>9#include <linux/if_ether.h>10#include <linux/atmlec.h>1112struct lec_arp_table {13struct hlist_node next; /* Linked entry list */14unsigned char atm_addr[ATM_ESA_LEN]; /* Atm address */15unsigned char mac_addr[ETH_ALEN]; /* Mac address */16int is_rdesc; /* Mac address is a route descriptor */17struct atm_vcc *vcc; /* Vcc this entry is attached */18struct atm_vcc *recv_vcc; /* Vcc we receive data from */1920void (*old_push) (struct atm_vcc *vcc, struct sk_buff *skb);21/* Push that leads to daemon */2223void (*old_recv_push) (struct atm_vcc *vcc, struct sk_buff *skb);24/* Push that leads to daemon */2526unsigned long last_used; /* For expiry */27unsigned long timestamp; /* Used for various timestamping things:28* 1. FLUSH started29* (status=ESI_FLUSH_PENDING)30* 2. Counting to31* max_unknown_frame_time32* (status=ESI_ARP_PENDING||33* status=ESI_VC_PENDING)34*/35unsigned char no_tries; /* No of times arp retry has been tried */36unsigned char status; /* Status of this entry */37unsigned short flags; /* Flags for this entry */38unsigned short packets_flooded; /* Data packets flooded */39unsigned long flush_tran_id; /* Transaction id in flush protocol */40struct timer_list timer; /* Arping timer */41struct lec_priv *priv; /* Pointer back */42u8 *tlvs;43u32 sizeoftlvs; /*44* LANE2: Each MAC address can have TLVs45* associated with it. sizeoftlvs tells the46* the length of the tlvs array47*/48struct sk_buff_head tx_wait; /* wait queue for outgoing packets */49atomic_t usage; /* usage count */50};5152/*53* LANE2: Template tlv struct for accessing54* the tlvs in the lec_arp_table->tlvs array55*/56struct tlv {57u32 type;58u8 length;59u8 value[255];60};6162/* Status fields */63#define ESI_UNKNOWN 0 /*64* Next packet sent to this mac address65* causes ARP-request to be sent66*/67#define ESI_ARP_PENDING 1 /*68* There is no ATM address associated with this69* 48-bit address. The LE-ARP protocol is in70* progress.71*/72#define ESI_VC_PENDING 2 /*73* There is a valid ATM address associated with74* this 48-bit address but there is no VC set75* up to that ATM address. The signaling76* protocol is in process.77*/78#define ESI_FLUSH_PENDING 4 /*79* The LEC has been notified of the FLUSH_START80* status and it is assumed that the flush81* protocol is in process.82*/83#define ESI_FORWARD_DIRECT 5 /*84* Either the Path Switching Delay (C22) has85* elapsed or the LEC has notified the Mapping86* that the flush protocol has completed. In87* either case, it is safe to forward packets88* to this address via the data direct VC.89*/9091/* Flag values */92#define LEC_REMOTE_FLAG 0x000193#define LEC_PERMANENT_FLAG 0x00029495#endif /* _LEC_ARP_H_ */969798