Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 2 | * ATM Lan Emulation Daemon driver interface |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 4 | * Marko Kiiskila <mkiiskila@yahoo.com> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _ATMLEC_H_ |
| 8 | #define _ATMLEC_H_ |
| 9 | |
| 10 | #include <linux/atmapi.h> |
| 11 | #include <linux/atmioc.h> |
| 12 | #include <linux/atm.h> |
| 13 | #include <linux/if_ether.h> |
Arnd Bergmann | 9adfbfb | 2009-02-26 00:51:40 +0100 | [diff] [blame] | 14 | #include <linux/types.h> |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 15 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | /* ATM lec daemon control socket */ |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 17 | #define ATMLEC_CTRL _IO('a', ATMIOC_LANE) |
| 18 | #define ATMLEC_DATA _IO('a', ATMIOC_LANE+1) |
| 19 | #define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
| 21 | /* Maximum number of LEC interfaces (tweakable) */ |
| 22 | #define MAX_LEC_ITF 48 |
| 23 | |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 24 | typedef enum { |
| 25 | l_set_mac_addr, |
| 26 | l_del_mac_addr, |
| 27 | l_svc_setup, |
| 28 | l_addr_delete, |
| 29 | l_topology_change, |
| 30 | l_flush_complete, |
| 31 | l_arp_update, |
| 32 | l_narp_req, /* LANE2 mandates the use of this */ |
| 33 | l_config, |
| 34 | l_flush_tran_id, |
| 35 | l_set_lecid, |
| 36 | l_arp_xmt, |
| 37 | l_rdesc_arp_xmt, |
| 38 | l_associate_req, |
| 39 | l_should_bridge /* should we bridge this MAC? */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | } atmlec_msg_type; |
| 41 | |
| 42 | #define ATMLEC_MSG_TYPE_MAX l_should_bridge |
| 43 | |
| 44 | struct atmlec_config_msg { |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 45 | unsigned int maximum_unknown_frame_count; |
| 46 | unsigned int max_unknown_frame_time; |
| 47 | unsigned short max_retry_count; |
| 48 | unsigned int aging_time; |
| 49 | unsigned int forward_delay_time; |
| 50 | unsigned int arp_response_time; |
| 51 | unsigned int flush_timeout; |
| 52 | unsigned int path_switching_delay; |
| 53 | unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */ |
| 54 | int mtu; |
| 55 | int is_proxy; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | }; |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 57 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | struct atmlec_msg { |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 59 | atmlec_msg_type type; |
| 60 | int sizeoftlvs; /* LANE2: if != 0, tlvs follow */ |
| 61 | union { |
| 62 | struct { |
| 63 | unsigned char mac_addr[ETH_ALEN]; |
| 64 | unsigned char atm_addr[ATM_ESA_LEN]; |
| 65 | unsigned int flag; /* |
| 66 | * Topology_change flag, |
| 67 | * remoteflag, permanent flag, |
| 68 | * lecid, transaction id |
| 69 | */ |
| 70 | unsigned int targetless_le_arp; /* LANE2 */ |
| 71 | unsigned int no_source_le_narp; /* LANE2 */ |
| 72 | } normal; |
| 73 | struct atmlec_config_msg config; |
| 74 | struct { |
Arnd Bergmann | 9adfbfb | 2009-02-26 00:51:40 +0100 | [diff] [blame] | 75 | __u16 lec_id; /* requestor lec_id */ |
| 76 | __u32 tran_id; /* transaction id */ |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 77 | unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ |
| 78 | unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ |
| 79 | } proxy; /* |
| 80 | * For mapping LE_ARP requests to responses. Filled by |
| 81 | * zeppelin, returned by kernel. Used only when proxying |
| 82 | */ |
| 83 | } content; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | } __ATM_API_ALIGN; |
| 85 | |
| 86 | struct atmlec_ioc { |
Chas Williams | 1c9d3e7 | 2006-09-29 17:13:24 -0700 | [diff] [blame] | 87 | int dev_num; |
| 88 | unsigned char atm_addr[ATM_ESA_LEN]; |
| 89 | unsigned char receive; /* 1= receive vcc, 0 = send vcc */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 90 | }; |
| 91 | #endif /* _ATMLEC_H_ */ |