1
2
3
4
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>
12
13struct lec_arp_table {
14 struct lec_arp_table *next;
15 unsigned char atm_addr[ATM_ESA_LEN];
16 unsigned char mac_addr[ETH_ALEN];
17 int is_rdesc;
18 struct atm_vcc *vcc;
19 struct atm_vcc *recv_vcc;
20 void (*old_push)(struct atm_vcc *vcc,struct sk_buff *skb);
21
22 void (*old_recv_push)(struct atm_vcc *vcc, struct sk_buff *skb);
23
24 void (*old_close)(struct atm_vcc *vcc);
25
26
27 unsigned long last_used;
28 unsigned long timestamp;
29
30
31
32
33
34
35
36
37 unsigned char no_tries;
38
39 unsigned char status;
40 unsigned short flags;
41 unsigned short packets_flooded;
42 unsigned long flush_tran_id;
43 struct timer_list timer;
44 struct lec_priv *priv;
45
46 u8 *tlvs;
47 u32 sizeoftlvs;
48
49 struct sk_buff_head tx_wait;
50};
51
52struct tlv {
53
54 u32 type;
55 u8 length;
56 u8 value[255];
57};
58
59
60#define ESI_UNKNOWN 0
61
62
63
64#define ESI_ARP_PENDING 1
65
66
67
68
69#define ESI_VC_PENDING 2
70
71
72
73
74
75#define ESI_FLUSH_PENDING 4
76
77
78
79
80#define ESI_FORWARD_DIRECT 5
81
82
83
84
85
86
87
88
89#define LEC_REMOTE_FLAG 0x0001
90#define LEC_PERMANENT_FLAG 0x0002
91
92
93void lec_arp_init(struct lec_priv *priv);
94int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc);
95void lec_arp_destroy(struct lec_priv *priv);
96void lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc);
97
98struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
99 unsigned char *mac_to_addr,
100 int is_rdesc,
101 struct lec_arp_table **ret_entry);
102void lec_vcc_added(struct lec_priv *dev,
103 struct atmlec_ioc *ioc_data, struct atm_vcc *vcc,
104 void (*old_push)(struct atm_vcc *vcc, struct sk_buff *skb));
105void lec_arp_check_empties(struct lec_priv *priv,
106 struct atm_vcc *vcc, struct sk_buff *skb);
107int lec_addr_delete(struct lec_priv *priv,
108 unsigned char *mac_addr, unsigned long permanent);
109void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id);
110void lec_arp_update(struct lec_priv *priv,
111 unsigned char *mac_addr, unsigned char *atm_addr,
112 unsigned long remoteflag, unsigned int targetless_le_arp);
113void lec_set_flush_tran_id(struct lec_priv *priv,
114 unsigned char *mac_addr, unsigned long tran_id);
115
116#endif
117