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