| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #ifndef _LINUX_ATMBR2684_H | 
|  | 20 | #define _LINUX_ATMBR2684_H | 
|  | 21 | #include <linux/types.h> | 
|  | 22 | #include <linux/atm.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #include <linux/if.h> | 
|  | 24 | #define BR2684_MEDIA_ETHERNET (0) | 
|  | 25 | #define BR2684_MEDIA_802_4 (1) | 
|  | 26 | #define BR2684_MEDIA_TR (2) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define BR2684_MEDIA_FDDI (3) | 
|  | 28 | #define BR2684_MEDIA_802_6 (4) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | #define BR2684_FLAG_ROUTED (1 << 16) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | #define BR2684_FCSIN_NO (0) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define BR2684_FCSIN_IGNORE (1) | 
|  | 32 | #define BR2684_FCSIN_VERIFY (2) | 
|  | 33 | #define BR2684_FCSOUT_NO (0) | 
|  | 34 | #define BR2684_FCSOUT_SENDZERO (1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define BR2684_FCSOUT_GENERATE (2) | 
|  | 36 | #define BR2684_ENCAPS_VC (0) | 
|  | 37 | #define BR2684_ENCAPS_LLC (1) | 
|  | 38 | #define BR2684_ENCAPS_AUTODETECT (2) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define BR2684_PAYLOAD_ROUTED (0) | 
|  | 40 | #define BR2684_PAYLOAD_BRIDGED (1) | 
|  | 41 | struct atm_newif_br2684 { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 42 | atm_backend_t backend_num; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | int media; | 
|  | 44 | char ifname[IFNAMSIZ]; | 
|  | 45 | int mtu; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define BR2684_FIND_BYNOTHING (0) | 
|  | 48 | #define BR2684_FIND_BYNUM (1) | 
|  | 49 | #define BR2684_FIND_BYIFNAME (2) | 
|  | 50 | struct br2684_if_spec { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | int method; | 
|  | 52 | union { | 
|  | 53 | char ifname[IFNAMSIZ]; | 
|  | 54 | int devnum; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | } spec; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 56 | }; | 
|  | 57 | struct atm_backend_br2684 { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 58 | atm_backend_t backend_num; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | struct br2684_if_spec ifspec; | 
|  | 60 | int fcs_in; | 
|  | 61 | int fcs_out; | 
|  | 62 | int fcs_auto; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | int encaps; | 
|  | 64 | int has_vpiid; | 
|  | 65 | __u8 vpn_id[7]; | 
|  | 66 | int send_padding; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | int min_size; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | }; | 
|  | 69 | struct br2684_filter { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 70 | __be32 prefix; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | __be32 netmask; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 72 | }; | 
|  | 73 | struct br2684_filter_set { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 74 | struct br2684_if_spec ifspec; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | struct br2684_filter filter; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 76 | }; | 
|  | 77 | enum br2684_payload { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 78 | p_routed = BR2684_PAYLOAD_ROUTED, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | p_bridged = BR2684_PAYLOAD_BRIDGED, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 81 | #define BR2684_SETFILT _IOW('a', ATMIOC_BACKEND + 0, struct br2684_filter_set) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | #endif |