Import 2.3.25pre1
[davej-history.git] / include / linux / atmlec.h
blob6b1be5adf2c5e8b7e651510c41a779500fb47aa8
1 /*
2 *
3 * ATM Lan Emulation Daemon vs. driver interface
5 * carnil@cs.tut.fi
7 */
9 #ifndef _ATMLEC_H_
10 #define _ATMLEC_H_
12 #include <linux/atmioc.h>
13 #include <linux/atm.h>
14 #include <linux/if_ether.h>
15 /* ATM lec daemon control socket */
16 #define ATMLEC_CTRL _IO('a',ATMIOC_LANE)
17 #define ATMLEC_DATA _IO('a',ATMIOC_LANE+1)
18 #define ATMLEC_MCAST _IO('a',ATMIOC_LANE+2)
20 /* Maximum number of LEC interfaces (tweakable) */
21 #define MAX_LEC_ITF 48
23 /* From the total of MAX_LEC_ITF, last NUM_TR_DEVS are reserved for Token Ring.
24 * E.g. if MAX_LEC_ITF = 48 and NUM_TR_DEVS = 8, then lec0-lec39 are for
25 * Ethernet ELANs and lec40-lec47 are for Token Ring ELANS.
27 #define NUM_TR_DEVS 8
29 typedef enum {
30 l_set_mac_addr, l_del_mac_addr,
31 l_svc_setup,
32 l_addr_delete, l_topology_change,
33 l_flush_complete, l_arp_update,
34 l_narp_req, /* LANE2 mandates the use of this */
35 l_config, l_flush_tran_id,
36 l_set_lecid, l_arp_xmt,
37 l_rdesc_arp_xmt,
38 l_associate_req,
39 l_should_bridge /* should we bridge this MAC? */
40 } atmlec_msg_type;
42 #define ATMLEC_MSG_TYPE_MAX l_should_bridge
44 struct atmlec_config_msg {
45 unsigned int maximum_unknown_frame_count;
46 unsigned long max_unknown_frame_time;
47 unsigned short max_retry_count;
48 unsigned long aging_time;
49 unsigned long forward_delay_time;
50 unsigned long arp_response_time;
51 unsigned long flush_timeout;
52 unsigned long path_switching_delay;
53 unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */
54 int mtu;
57 struct atmlec_msg {
58 atmlec_msg_type type;
59 int sizeoftlvs; /* LANE2: if != 0, tlvs follow */
60 union {
61 struct {
62 unsigned char mac_addr[ETH_ALEN];
63 unsigned char atm_addr[ATM_ESA_LEN];
64 unsigned long flag;/* Topology_change flag,
65 remoteflag, permanent flag,
66 lecid, transaction id */
67 unsigned int targetless_le_arp; /* LANE2 */
68 unsigned int no_source_le_narp; /* LANE2 */
69 } normal;
70 struct atmlec_config_msg config;
71 struct {
72 uint16_t lec_id; /* requestor lec_id */
73 uint32_t tran_id; /* transaction id */
74 unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */
75 unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */
76 } proxy; /* For mapping LE_ARP requests to responses. Filled by */
77 } content; /* zeppelin, returned by kernel. Used only when proxying */
80 struct atmlec_ioc {
81 int dev_num;
82 unsigned char atm_addr[ATM_ESA_LEN];
83 unsigned char receive; /* 1= receive vcc, 0 = send vcc */
85 #endif /* _ATMLEC_H_ */