Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * ATM Lan Emulation Daemon driver interface
0004  *
0005  * Marko Kiiskila <mkiiskila@yahoo.com>
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 /* ATM lec daemon control socket */
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 /* Maximum number of LEC interfaces (tweakable) */
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,     /* LANE2 mandates the use of this */
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     /* should we bridge this MAC? */
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;  /* LANE2: 1 for LANEv1, 2 for LANEv2 */
0055     int mtu;
0056     int is_proxy;
0057 };
0058 
0059 struct atmlec_msg {
0060     atmlec_msg_type type;
0061     int sizeoftlvs;     /* LANE2: if != 0, tlvs follow */
0062     union {
0063         struct {
0064             unsigned char mac_addr[ETH_ALEN];
0065             unsigned char atm_addr[ATM_ESA_LEN];
0066             unsigned int flag;  /*
0067                          * Topology_change flag,
0068                          * remoteflag, permanent flag,
0069                          * lecid, transaction id
0070                          */
0071             unsigned int targetless_le_arp; /* LANE2 */
0072             unsigned int no_source_le_narp; /* LANE2 */
0073         } normal;
0074         struct atmlec_config_msg config;
0075         struct {
0076             __u16 lec_id;               /* requestor lec_id  */
0077             __u32 tran_id;              /* transaction id    */
0078             unsigned char mac_addr[ETH_ALEN];   /* dst mac addr      */
0079             unsigned char atm_addr[ATM_ESA_LEN];    /* reqestor ATM addr */
0080         } proxy;    /*
0081                  * For mapping LE_ARP requests to responses. Filled by
0082                  * zeppelin, returned by kernel. Used only when proxying
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;  /* 1= receive vcc, 0 = send vcc */
0091 };
0092 #endif /* _ATMLEC_H_ */