Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 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 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_ATM_H |
| 8 | #define _UAPI_LINUX_ATM_H |
| 9 | #include <linux/compiler.h> |
| 10 | #include <linux/atmapi.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #include <linux/atmsap.h> |
| 12 | #include <linux/atmioc.h> |
| 13 | #include <linux/types.h> |
| 14 | #define ATM_CELL_SIZE 53 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define ATM_MAX_VPI_NNI 4096 |
| 24 | #define ATM_MAX_VCI 65535 |
| 25 | #define ATM_NO_AAL 0 |
| 26 | #define ATM_AAL0 13 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define ATM_AAL1 1 |
| 28 | #define ATM_AAL2 2 |
| 29 | #define ATM_AAL34 3 |
| 30 | #define ATM_AAL5 5 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | #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] | 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) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 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) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | #define SO_ATMPVC __SO_ENCODE(SOL_ATM, 4, struct sockaddr_atmpvc) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | #define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int) |
| 41 | #define ATM_HDR_GFC_MASK 0xf0000000 |
| 42 | #define ATM_HDR_GFC_SHIFT 28 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define ATM_PTI_US1 1 |
| 52 | #define ATM_PTI_UCES0 2 |
| 53 | #define ATM_PTI_UCES1 3 |
| 54 | #define ATM_PTI_SEGF5 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #define ATM_PTI_E2EF5 5 |
| 56 | #define ATM_PTI_RSV_RM 6 |
| 57 | #define ATM_PTI_RSV 7 |
| 58 | #define ATM_NONE 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define ATM_UBR 1 |
| 60 | #define ATM_CBR 2 |
| 61 | #define ATM_VBR 3 |
| 62 | #define ATM_ABR 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define ATM_ANYCLASS 5 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 64 | #define ATM_MAX_PCR - 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 65 | struct atm_trafprm { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 66 | unsigned char traffic_class; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | int max_pcr; |
| 68 | int pcr; |
| 69 | int min_pcr; |
| 70 | int max_cdv; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | int max_sdu; |
| 72 | unsigned int icr; |
| 73 | unsigned int tbe; |
| 74 | unsigned int frtt : 24; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | unsigned int rif : 4; |
| 76 | unsigned int rdf : 4; |
| 77 | unsigned int nrm_pres : 1; |
| 78 | unsigned int trm_pres : 1; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | unsigned int adtf_pres : 1; |
| 80 | unsigned int cdf_pres : 1; |
| 81 | unsigned int nrm : 3; |
| 82 | unsigned int trm : 3; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | unsigned int adtf : 10; |
| 84 | unsigned int cdf : 3; |
| 85 | unsigned int spare : 9; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 86 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | struct atm_qos { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 88 | struct atm_trafprm txtp; |
| 89 | struct atm_trafprm rxtp __ATM_API_ALIGN; |
| 90 | unsigned char aal __ATM_API_ALIGN; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 92 | #define ATM_ITF_ANY - 1 |
| 93 | #define ATM_VPI_ANY - 1 |
| 94 | #define ATM_VCI_ANY - 1 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | #define ATM_VPI_UNSPEC - 2 |
| 96 | #define ATM_VCI_UNSPEC - 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 97 | struct sockaddr_atmpvc { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 98 | unsigned short sap_family; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 | struct { |
| 100 | short itf; |
| 101 | short vpi; |
| 102 | int vci; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 103 | } sap_addr __ATM_API_ALIGN; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 104 | }; |
| 105 | #define ATM_ESA_LEN 20 |
| 106 | #define ATM_E164_LEN 12 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | #define ATM_AFI_DCC 0x39 |
| 108 | #define ATM_AFI_ICD 0x47 |
| 109 | #define ATM_AFI_E164 0x45 |
| 110 | #define ATM_AFI_LOCAL 0x49 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 115 | #define ATM_LIJ_NONE 0 |
| 116 | #define ATM_LIJ 1 |
| 117 | #define ATM_LIJ_RPJ 2 |
| 118 | #define ATM_LIJ_NJ 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | struct sockaddr_atmsvc { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 120 | unsigned short sas_family; |
| 121 | struct { |
| 122 | unsigned char prv[ATM_ESA_LEN]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 123 | char pub[ATM_E164_LEN + 1]; |
| 124 | char lij_type; |
| 125 | __u32 lij_id; |
| 126 | } sas_addr __ATM_API_ALIGN; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 127 | }; |
| 128 | struct atmif_sioc { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 129 | int number; |
| 130 | int length; |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 131 | void * arg; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 132 | }; |
| 133 | typedef unsigned short atm_backend_t; |
| 134 | #endif |