/* SPDX-License-Identifier: GPL-2.0 */1/*2* Lec arp cache3*4* Marko Kiiskila <[email protected]>5*/6#ifndef _LEC_ARP_H_7#define _LEC_ARP_H_8#include <linux/atm.h>9#include <linux/atmdev.h>10#include <linux/if_ether.h>11#include <linux/atmlec.h>1213struct lec_arp_table {14struct hlist_node next; /* Linked entry list */15unsigned char atm_addr[ATM_ESA_LEN]; /* Atm address */16unsigned char mac_addr[ETH_ALEN]; /* Mac address */17int is_rdesc; /* Mac address is a route descriptor */18struct atm_vcc *vcc; /* Vcc this entry is attached */19struct atm_vcc *recv_vcc; /* Vcc we receive data from */2021void (*old_push) (struct atm_vcc *vcc, struct sk_buff *skb);22/* Push that leads to daemon */2324void (*old_recv_push) (struct atm_vcc *vcc, struct sk_buff *skb);25/* Push that leads to daemon */2627unsigned long last_used; /* For expiry */28unsigned long timestamp; /* Used for various timestamping things:29* 1. FLUSH started30* (status=ESI_FLUSH_PENDING)31* 2. Counting to32* max_unknown_frame_time33* (status=ESI_ARP_PENDING||34* status=ESI_VC_PENDING)35*/36unsigned char no_tries; /* No of times arp retry has been tried */37unsigned char status; /* Status of this entry */38unsigned short flags; /* Flags for this entry */39unsigned short packets_flooded; /* Data packets flooded */40unsigned long flush_tran_id; /* Transaction id in flush protocol */41struct timer_list timer; /* Arping timer */42struct lec_priv *priv; /* Pointer back */43u8 *tlvs;44u32 sizeoftlvs; /*45* LANE2: Each MAC address can have TLVs46* associated with it. sizeoftlvs tells47* the length of the tlvs array48*/49struct sk_buff_head tx_wait; /* wait queue for outgoing packets */50refcount_t usage; /* usage count */51};5253/*54* LANE2: Template tlv struct for accessing55* the tlvs in the lec_arp_table->tlvs array56*/57struct tlv {58u32 type;59u8 length;60u8 value[255];61};6263/* Status fields */64#define ESI_UNKNOWN 0 /*65* Next packet sent to this mac address66* causes ARP-request to be sent67*/68#define ESI_ARP_PENDING 1 /*69* There is no ATM address associated with this70* 48-bit address. The LE-ARP protocol is in71* progress.72*/73#define ESI_VC_PENDING 2 /*74* There is a valid ATM address associated with75* this 48-bit address but there is no VC set76* up to that ATM address. The signaling77* protocol is in process.78*/79#define ESI_FLUSH_PENDING 4 /*80* The LEC has been notified of the FLUSH_START81* status and it is assumed that the flush82* protocol is in process.83*/84#define ESI_FORWARD_DIRECT 5 /*85* Either the Path Switching Delay (C22) has86* elapsed or the LEC has notified the Mapping87* that the flush protocol has completed. In88* either case, it is safe to forward packets89* to this address via the data direct VC.90*/9192/* Flag values */93#define LEC_REMOTE_FLAG 0x000194#define LEC_PERMANENT_FLAG 0x00029596#endif /* _LEC_ARP_H_ */979899