0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _ATMLEC_H_
0009 #define _ATMLEC_H_
0010
0011 #include <linux/atmapi.h>
0012 #include <linux/atmioc.h>
0013 #include <linux/atm.h>
0014 #include <linux/if_ether.h>
0015 #include <linux/types.h>
0016
0017
0018 #define ATMLEC_CTRL _IO('a', ATMIOC_LANE)
0019 #define ATMLEC_DATA _IO('a', ATMIOC_LANE+1)
0020 #define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2)
0021
0022
0023 #define MAX_LEC_ITF 48
0024
0025 typedef enum {
0026 l_set_mac_addr,
0027 l_del_mac_addr,
0028 l_svc_setup,
0029 l_addr_delete,
0030 l_topology_change,
0031 l_flush_complete,
0032 l_arp_update,
0033 l_narp_req,
0034 l_config,
0035 l_flush_tran_id,
0036 l_set_lecid,
0037 l_arp_xmt,
0038 l_rdesc_arp_xmt,
0039 l_associate_req,
0040 l_should_bridge
0041 } atmlec_msg_type;
0042
0043 #define ATMLEC_MSG_TYPE_MAX l_should_bridge
0044
0045 struct atmlec_config_msg {
0046 unsigned int maximum_unknown_frame_count;
0047 unsigned int max_unknown_frame_time;
0048 unsigned short max_retry_count;
0049 unsigned int aging_time;
0050 unsigned int forward_delay_time;
0051 unsigned int arp_response_time;
0052 unsigned int flush_timeout;
0053 unsigned int path_switching_delay;
0054 unsigned int lane_version;
0055 int mtu;
0056 int is_proxy;
0057 };
0058
0059 struct atmlec_msg {
0060 atmlec_msg_type type;
0061 int sizeoftlvs;
0062 union {
0063 struct {
0064 unsigned char mac_addr[ETH_ALEN];
0065 unsigned char atm_addr[ATM_ESA_LEN];
0066 unsigned int flag;
0067
0068
0069
0070
0071 unsigned int targetless_le_arp;
0072 unsigned int no_source_le_narp;
0073 } normal;
0074 struct atmlec_config_msg config;
0075 struct {
0076 __u16 lec_id;
0077 __u32 tran_id;
0078 unsigned char mac_addr[ETH_ALEN];
0079 unsigned char atm_addr[ATM_ESA_LEN];
0080 } proxy;
0081
0082
0083
0084 } content;
0085 } __ATM_API_ALIGN;
0086
0087 struct atmlec_ioc {
0088 int dev_num;
0089 unsigned char atm_addr[ATM_ESA_LEN];
0090 unsigned char receive;
0091 };
0092 #endif