1
2
3
4
5
6
7
8 #ifndef _ATMLEC_H_
9 #define _ATMLEC_H_
10
11 #include <linux/atmapi.h>
12 #include <linux/atmioc.h>
13 #include <linux/atm.h>
14 #include <linux/if_ether.h>
15 #include <linux/types.h>
16
17
18 #define ATMLEC_CTRL _IO('a', ATMIOC_LANE)
19 #define ATMLEC_DATA _IO('a', ATMIOC_LANE+1)
20 #define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2)
21
22
23 #define MAX_LEC_ITF 48
24
25 typedef enum {
26 l_set_mac_addr,
27 l_del_mac_addr,
28 l_svc_setup,
29 l_addr_delete,
30 l_topology_change,
31 l_flush_complete,
32 l_arp_update,
33 l_narp_req,
34 l_config,
35 l_flush_tran_id,
36 l_set_lecid,
37 l_arp_xmt,
38 l_rdesc_arp_xmt,
39 l_associate_req,
40 l_should_bridge
41 } atmlec_msg_type;
42
43 #define ATMLEC_MSG_TYPE_MAX l_should_bridge
44
45 struct atmlec_config_msg {
46 unsigned int maximum_unknown_frame_count;
47 unsigned int max_unknown_frame_time;
48 unsigned short max_retry_count;
49 unsigned int aging_time;
50 unsigned int forward_delay_time;
51 unsigned int arp_response_time;
52 unsigned int flush_timeout;
53 unsigned int path_switching_delay;
54 unsigned int lane_version;
55 int mtu;
56 int is_proxy;
57 };
58
59 struct atmlec_msg {
60 atmlec_msg_type type;
61 int sizeoftlvs;
62 union {
63 struct {
64 unsigned char mac_addr[ETH_ALEN];
65 unsigned char atm_addr[ATM_ESA_LEN];
66 unsigned int flag;
67
68
69
70
71 unsigned int targetless_le_arp;
72 unsigned int no_source_le_narp;
73 } normal;
74 struct atmlec_config_msg config;
75 struct {
76 __u16 lec_id;
77 __u32 tran_id;
78 unsigned char mac_addr[ETH_ALEN];
79 unsigned char atm_addr[ATM_ESA_LEN];
80 } proxy;
81
82
83
84 } content;
85 } __ATM_API_ALIGN;
86
87 struct atmlec_ioc {
88 int dev_num;
89 unsigned char atm_addr[ATM_ESA_LEN];
90 unsigned char receive;
91 };
92 #endif