| 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 _UAPI_LINUX_ATM_H | 
|  | 20 | #define _UAPI_LINUX_ATM_H | 
|  | 21 | #include <linux/compiler.h> | 
|  | 22 | #include <linux/atmapi.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #include <linux/atmsap.h> | 
|  | 24 | #include <linux/atmioc.h> | 
|  | 25 | #include <linux/types.h> | 
|  | 26 | #define ATM_CELL_SIZE 53 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define ATM_CELL_PAYLOAD 48 | 
|  | 28 | #define ATM_AAL0_SDU 52 | 
|  | 29 | #define ATM_MAX_AAL34_PDU 65535 | 
|  | 30 | #define ATM_AAL5_TRAILER 8 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define ATM_MAX_AAL5_PDU 65535 | 
|  | 32 | #define ATM_MAX_CDV 9999 | 
|  | 33 | #define ATM_NOT_RSV_VCI 32 | 
|  | 34 | #define ATM_MAX_VPI 255 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define ATM_MAX_VPI_NNI 4096 | 
|  | 36 | #define ATM_MAX_VCI 65535 | 
|  | 37 | #define ATM_NO_AAL 0 | 
|  | 38 | #define ATM_AAL0 13 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define ATM_AAL1 1 | 
|  | 40 | #define ATM_AAL2 2 | 
|  | 41 | #define ATM_AAL34 3 | 
|  | 42 | #define ATM_AAL5 5 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | #define __SO_ENCODE(l,n,t) ((((l) & 0x1FF) << 22) | ((n) << 16) | sizeof(t)) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | #define __SO_LEVEL_MATCH(c,m) (((c) >> 22) == ((m) & 0x1FF)) | 
|  | 45 | #define __SO_NUMBER(c) (((c) >> 16) & 0x3f) | 
|  | 46 | #define __SO_SIZE(c) ((c) & 0x3fff) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | #define SO_SETCLP __SO_ENCODE(SOL_ATM, 0, int) | 
|  | 48 | #define SO_CIRANGE __SO_ENCODE(SOL_ATM, 1, struct atm_cirange) | 
|  | 49 | #define SO_ATMQOS __SO_ENCODE(SOL_ATM, 2, struct atm_qos) | 
|  | 50 | #define SO_ATMSAP __SO_ENCODE(SOL_ATM, 3, struct atm_sap) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | #define SO_ATMPVC __SO_ENCODE(SOL_ATM, 4, struct sockaddr_atmpvc) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | #define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int) | 
|  | 53 | #define ATM_HDR_GFC_MASK 0xf0000000 | 
|  | 54 | #define ATM_HDR_GFC_SHIFT 28 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #define ATM_HDR_VPI_MASK 0x0ff00000 | 
|  | 56 | #define ATM_HDR_VPI_SHIFT 20 | 
|  | 57 | #define ATM_HDR_VCI_MASK 0x000ffff0 | 
|  | 58 | #define ATM_HDR_VCI_SHIFT 4 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define ATM_HDR_PTI_MASK 0x0000000e | 
|  | 60 | #define ATM_HDR_PTI_SHIFT 1 | 
|  | 61 | #define ATM_HDR_CLP 0x00000001 | 
|  | 62 | #define ATM_PTI_US0 0 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define ATM_PTI_US1 1 | 
|  | 64 | #define ATM_PTI_UCES0 2 | 
|  | 65 | #define ATM_PTI_UCES1 3 | 
|  | 66 | #define ATM_PTI_SEGF5 4 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #define ATM_PTI_E2EF5 5 | 
|  | 68 | #define ATM_PTI_RSV_RM 6 | 
|  | 69 | #define ATM_PTI_RSV 7 | 
|  | 70 | #define ATM_NONE 0 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | #define ATM_UBR 1 | 
|  | 72 | #define ATM_CBR 2 | 
|  | 73 | #define ATM_VBR 3 | 
|  | 74 | #define ATM_ABR 4 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | #define ATM_ANYCLASS 5 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 | #define ATM_MAX_PCR - 1 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 77 | struct atm_trafprm { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 78 | unsigned char traffic_class; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | int max_pcr; | 
|  | 80 | int pcr; | 
|  | 81 | int min_pcr; | 
|  | 82 | int max_cdv; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | int max_sdu; | 
|  | 84 | unsigned int icr; | 
|  | 85 | unsigned int tbe; | 
|  | 86 | unsigned int frtt : 24; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | unsigned int rif : 4; | 
|  | 88 | unsigned int rdf : 4; | 
|  | 89 | unsigned int nrm_pres : 1; | 
|  | 90 | unsigned int trm_pres : 1; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | unsigned int adtf_pres : 1; | 
|  | 92 | unsigned int cdf_pres : 1; | 
|  | 93 | unsigned int nrm : 3; | 
|  | 94 | unsigned int trm : 3; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | unsigned int adtf : 10; | 
|  | 96 | unsigned int cdf : 3; | 
|  | 97 | unsigned int spare : 9; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 99 | struct atm_qos { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 | struct atm_trafprm txtp; | 
|  | 101 | struct atm_trafprm rxtp __ATM_API_ALIGN; | 
|  | 102 | unsigned char aal __ATM_API_ALIGN; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 104 | #define ATM_ITF_ANY - 1 | 
|  | 105 | #define ATM_VPI_ANY - 1 | 
|  | 106 | #define ATM_VCI_ANY - 1 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 107 | #define ATM_VPI_UNSPEC - 2 | 
|  | 108 | #define ATM_VCI_UNSPEC - 2 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 109 | struct sockaddr_atmpvc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 110 | unsigned short sap_family; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 111 | struct { | 
|  | 112 | short itf; | 
|  | 113 | short vpi; | 
|  | 114 | int vci; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 115 | } sap_addr __ATM_API_ALIGN; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 116 | }; | 
|  | 117 | #define ATM_ESA_LEN 20 | 
|  | 118 | #define ATM_E164_LEN 12 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | #define ATM_AFI_DCC 0x39 | 
|  | 120 | #define ATM_AFI_ICD 0x47 | 
|  | 121 | #define ATM_AFI_E164 0x45 | 
|  | 122 | #define ATM_AFI_LOCAL 0x49 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 123 | #define ATM_AFI_DCC_GROUP 0xBD | 
|  | 124 | #define ATM_AFI_ICD_GROUP 0xC5 | 
|  | 125 | #define ATM_AFI_E164_GROUP 0xC3 | 
|  | 126 | #define ATM_AFI_LOCAL_GROUP 0xC7 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 127 | #define ATM_LIJ_NONE 0 | 
|  | 128 | #define ATM_LIJ 1 | 
|  | 129 | #define ATM_LIJ_RPJ 2 | 
|  | 130 | #define ATM_LIJ_NJ 3 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | struct sockaddr_atmsvc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 132 | unsigned short sas_family; | 
|  | 133 | struct { | 
|  | 134 | unsigned char prv[ATM_ESA_LEN]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 135 | char pub[ATM_E164_LEN + 1]; | 
|  | 136 | char lij_type; | 
|  | 137 | __u32 lij_id; | 
|  | 138 | } sas_addr __ATM_API_ALIGN; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 139 | }; | 
|  | 140 | struct atmif_sioc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 141 | int number; | 
|  | 142 | int length; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 143 | void __user * arg; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 144 | }; | 
|  | 145 | typedef unsigned short atm_backend_t; | 
|  | 146 | #endif |