Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: atm.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/* atm.h - general ATM declarations */
[1] Fix | Delete
[2] Fix | Delete
/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
[3] Fix | Delete
[4] Fix | Delete
[5] Fix | Delete
/*
[6] Fix | Delete
* WARNING: User-space programs should not #include <linux/atm.h> directly.
[7] Fix | Delete
* Instead, #include <atm.h>
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef _LINUX_ATM_H
[11] Fix | Delete
#define _LINUX_ATM_H
[12] Fix | Delete
[13] Fix | Delete
/*
[14] Fix | Delete
* BEGIN_xx and END_xx markers are used for automatic generation of
[15] Fix | Delete
* documentation. Do not change them.
[16] Fix | Delete
*/
[17] Fix | Delete
[18] Fix | Delete
[19] Fix | Delete
#include <linux/atmapi.h>
[20] Fix | Delete
#include <linux/atmsap.h>
[21] Fix | Delete
#include <linux/atmioc.h>
[22] Fix | Delete
#include <linux/types.h>
[23] Fix | Delete
[24] Fix | Delete
[25] Fix | Delete
/* general ATM constants */
[26] Fix | Delete
#define ATM_CELL_SIZE 53 /* ATM cell size incl. header */
[27] Fix | Delete
#define ATM_CELL_PAYLOAD 48 /* ATM payload size */
[28] Fix | Delete
#define ATM_AAL0_SDU 52 /* AAL0 SDU size */
[29] Fix | Delete
#define ATM_MAX_AAL34_PDU 65535 /* maximum AAL3/4 PDU payload */
[30] Fix | Delete
#define ATM_AAL5_TRAILER 8 /* AAL5 trailer size */
[31] Fix | Delete
#define ATM_MAX_AAL5_PDU 65535 /* maximum AAL5 PDU payload */
[32] Fix | Delete
#define ATM_MAX_CDV 9999 /* maximum (default) CDV */
[33] Fix | Delete
#define ATM_NOT_RSV_VCI 32 /* first non-reserved VCI value */
[34] Fix | Delete
[35] Fix | Delete
#define ATM_MAX_VPI 255 /* maximum VPI at the UNI */
[36] Fix | Delete
#define ATM_MAX_VPI_NNI 4096 /* maximum VPI at the NNI */
[37] Fix | Delete
#define ATM_MAX_VCI 65535 /* maximum VCI */
[38] Fix | Delete
[39] Fix | Delete
[40] Fix | Delete
/* "protcol" values for the socket system call */
[41] Fix | Delete
#define ATM_NO_AAL 0 /* AAL not specified */
[42] Fix | Delete
#define ATM_AAL0 13 /* "raw" ATM cells */
[43] Fix | Delete
#define ATM_AAL1 1 /* AAL1 (CBR) */
[44] Fix | Delete
#define ATM_AAL2 2 /* AAL2 (VBR) */
[45] Fix | Delete
#define ATM_AAL34 3 /* AAL3/4 (data) */
[46] Fix | Delete
#define ATM_AAL5 5 /* AAL5 (data) */
[47] Fix | Delete
[48] Fix | Delete
/*
[49] Fix | Delete
* socket option name coding functions
[50] Fix | Delete
*
[51] Fix | Delete
* Note that __SO_ENCODE and __SO_LEVEL are somewhat a hack since the
[52] Fix | Delete
* << 22 only reserves 9 bits for the level. On some architectures
[53] Fix | Delete
* SOL_SOCKET is 0xFFFF, so that's a bit of a problem
[54] Fix | Delete
*/
[55] Fix | Delete
[56] Fix | Delete
#define __SO_ENCODE(l,n,t) ((((l) & 0x1FF) << 22) | ((n) << 16) | \
[57] Fix | Delete
sizeof(t))
[58] Fix | Delete
#define __SO_LEVEL_MATCH(c,m) (((c) >> 22) == ((m) & 0x1FF))
[59] Fix | Delete
#define __SO_NUMBER(c) (((c) >> 16) & 0x3f)
[60] Fix | Delete
#define __SO_SIZE(c) ((c) & 0x3fff)
[61] Fix | Delete
[62] Fix | Delete
/*
[63] Fix | Delete
* ATM layer
[64] Fix | Delete
*/
[65] Fix | Delete
[66] Fix | Delete
#define SO_SETCLP __SO_ENCODE(SOL_ATM,0,int)
[67] Fix | Delete
/* set CLP bit value - TODO */
[68] Fix | Delete
#define SO_CIRANGE __SO_ENCODE(SOL_ATM,1,struct atm_cirange)
[69] Fix | Delete
/* connection identifier range; socket must be
[70] Fix | Delete
bound or connected */
[71] Fix | Delete
#define SO_ATMQOS __SO_ENCODE(SOL_ATM,2,struct atm_qos)
[72] Fix | Delete
/* Quality of Service setting */
[73] Fix | Delete
#define SO_ATMSAP __SO_ENCODE(SOL_ATM,3,struct atm_sap)
[74] Fix | Delete
/* Service Access Point */
[75] Fix | Delete
#define SO_ATMPVC __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc)
[76] Fix | Delete
/* "PVC" address (also for SVCs); get only */
[77] Fix | Delete
#define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int)
[78] Fix | Delete
/* make this vc a p2mp */
[79] Fix | Delete
[80] Fix | Delete
[81] Fix | Delete
/*
[82] Fix | Delete
* Note @@@: since the socket layers don't really distinguish the control and
[83] Fix | Delete
* the data plane but generally seems to be data plane-centric, any layer is
[84] Fix | Delete
* about equally wrong for the SAP. If you have a better idea about this,
[85] Fix | Delete
* please speak up ...
[86] Fix | Delete
*/
[87] Fix | Delete
[88] Fix | Delete
[89] Fix | Delete
/* ATM cell header (for AAL0) */
[90] Fix | Delete
[91] Fix | Delete
/* BEGIN_CH */
[92] Fix | Delete
#define ATM_HDR_GFC_MASK 0xf0000000
[93] Fix | Delete
#define ATM_HDR_GFC_SHIFT 28
[94] Fix | Delete
#define ATM_HDR_VPI_MASK 0x0ff00000
[95] Fix | Delete
#define ATM_HDR_VPI_SHIFT 20
[96] Fix | Delete
#define ATM_HDR_VCI_MASK 0x000ffff0
[97] Fix | Delete
#define ATM_HDR_VCI_SHIFT 4
[98] Fix | Delete
#define ATM_HDR_PTI_MASK 0x0000000e
[99] Fix | Delete
#define ATM_HDR_PTI_SHIFT 1
[100] Fix | Delete
#define ATM_HDR_CLP 0x00000001
[101] Fix | Delete
/* END_CH */
[102] Fix | Delete
[103] Fix | Delete
[104] Fix | Delete
/* PTI codings */
[105] Fix | Delete
[106] Fix | Delete
/* BEGIN_PTI */
[107] Fix | Delete
#define ATM_PTI_US0 0 /* user data cell, congestion not exp, SDU-type 0 */
[108] Fix | Delete
#define ATM_PTI_US1 1 /* user data cell, congestion not exp, SDU-type 1 */
[109] Fix | Delete
#define ATM_PTI_UCES0 2 /* user data cell, cong. experienced, SDU-type 0 */
[110] Fix | Delete
#define ATM_PTI_UCES1 3 /* user data cell, cong. experienced, SDU-type 1 */
[111] Fix | Delete
#define ATM_PTI_SEGF5 4 /* segment OAM F5 flow related cell */
[112] Fix | Delete
#define ATM_PTI_E2EF5 5 /* end-to-end OAM F5 flow related cell */
[113] Fix | Delete
#define ATM_PTI_RSV_RM 6 /* reserved for traffic control/resource mgmt */
[114] Fix | Delete
#define ATM_PTI_RSV 7 /* reserved */
[115] Fix | Delete
/* END_PTI */
[116] Fix | Delete
[117] Fix | Delete
[118] Fix | Delete
/*
[119] Fix | Delete
* The following items should stay in linux/atm.h, which should be linked to
[120] Fix | Delete
* netatm/atm.h
[121] Fix | Delete
*/
[122] Fix | Delete
[123] Fix | Delete
/* Traffic description */
[124] Fix | Delete
[125] Fix | Delete
#define ATM_NONE 0 /* no traffic */
[126] Fix | Delete
#define ATM_UBR 1
[127] Fix | Delete
#define ATM_CBR 2
[128] Fix | Delete
#define ATM_VBR 3
[129] Fix | Delete
#define ATM_ABR 4
[130] Fix | Delete
#define ATM_ANYCLASS 5 /* compatible with everything */
[131] Fix | Delete
[132] Fix | Delete
#define ATM_MAX_PCR -1 /* maximum available PCR */
[133] Fix | Delete
[134] Fix | Delete
struct atm_trafprm {
[135] Fix | Delete
unsigned char traffic_class; /* traffic class (ATM_UBR, ...) */
[136] Fix | Delete
int max_pcr; /* maximum PCR in cells per second */
[137] Fix | Delete
int pcr; /* desired PCR in cells per second */
[138] Fix | Delete
int min_pcr; /* minimum PCR in cells per second */
[139] Fix | Delete
int max_cdv; /* maximum CDV in microseconds */
[140] Fix | Delete
int max_sdu; /* maximum SDU in bytes */
[141] Fix | Delete
/* extra params for ABR */
[142] Fix | Delete
unsigned int icr; /* Initial Cell Rate (24-bit) */
[143] Fix | Delete
unsigned int tbe; /* Transient Buffer Exposure (24-bit) */
[144] Fix | Delete
unsigned int frtt : 24; /* Fixed Round Trip Time (24-bit) */
[145] Fix | Delete
unsigned int rif : 4; /* Rate Increment Factor (4-bit) */
[146] Fix | Delete
unsigned int rdf : 4; /* Rate Decrease Factor (4-bit) */
[147] Fix | Delete
unsigned int nrm_pres :1; /* nrm present bit */
[148] Fix | Delete
unsigned int trm_pres :1; /* rm present bit */
[149] Fix | Delete
unsigned int adtf_pres :1; /* adtf present bit */
[150] Fix | Delete
unsigned int cdf_pres :1; /* cdf present bit*/
[151] Fix | Delete
unsigned int nrm :3; /* Max # of Cells for each forward RM cell (3-bit) */
[152] Fix | Delete
unsigned int trm :3; /* Time between forward RM cells (3-bit) */
[153] Fix | Delete
unsigned int adtf :10; /* ACR Decrease Time Factor (10-bit) */
[154] Fix | Delete
unsigned int cdf :3; /* Cutoff Decrease Factor (3-bit) */
[155] Fix | Delete
unsigned int spare :9; /* spare bits */
[156] Fix | Delete
};
[157] Fix | Delete
[158] Fix | Delete
struct atm_qos {
[159] Fix | Delete
struct atm_trafprm txtp; /* parameters in TX direction */
[160] Fix | Delete
struct atm_trafprm rxtp __ATM_API_ALIGN;
[161] Fix | Delete
/* parameters in RX direction */
[162] Fix | Delete
unsigned char aal __ATM_API_ALIGN;
[163] Fix | Delete
};
[164] Fix | Delete
[165] Fix | Delete
/* PVC addressing */
[166] Fix | Delete
[167] Fix | Delete
#define ATM_ITF_ANY -1 /* "magic" PVC address values */
[168] Fix | Delete
#define ATM_VPI_ANY -1
[169] Fix | Delete
#define ATM_VCI_ANY -1
[170] Fix | Delete
#define ATM_VPI_UNSPEC -2
[171] Fix | Delete
#define ATM_VCI_UNSPEC -2
[172] Fix | Delete
[173] Fix | Delete
[174] Fix | Delete
struct sockaddr_atmpvc {
[175] Fix | Delete
unsigned short sap_family; /* address family, AF_ATMPVC */
[176] Fix | Delete
struct { /* PVC address */
[177] Fix | Delete
short itf; /* ATM interface */
[178] Fix | Delete
short vpi; /* VPI (only 8 bits at UNI) */
[179] Fix | Delete
int vci; /* VCI (only 16 bits at UNI) */
[180] Fix | Delete
} sap_addr __ATM_API_ALIGN; /* PVC address */
[181] Fix | Delete
};
[182] Fix | Delete
[183] Fix | Delete
/* SVC addressing */
[184] Fix | Delete
[185] Fix | Delete
#define ATM_ESA_LEN 20 /* ATM End System Address length */
[186] Fix | Delete
#define ATM_E164_LEN 12 /* maximum E.164 number length */
[187] Fix | Delete
[188] Fix | Delete
#define ATM_AFI_DCC 0x39 /* DCC ATM Format */
[189] Fix | Delete
#define ATM_AFI_ICD 0x47 /* ICD ATM Format */
[190] Fix | Delete
#define ATM_AFI_E164 0x45 /* E.164 ATM Format */
[191] Fix | Delete
#define ATM_AFI_LOCAL 0x49 /* Local ATM Format */
[192] Fix | Delete
[193] Fix | Delete
#define ATM_AFI_DCC_GROUP 0xBD /* DCC ATM Group Format */
[194] Fix | Delete
#define ATM_AFI_ICD_GROUP 0xC5 /* ICD ATM Group Format */
[195] Fix | Delete
#define ATM_AFI_E164_GROUP 0xC3 /* E.164 ATM Group Format */
[196] Fix | Delete
#define ATM_AFI_LOCAL_GROUP 0xC7 /* Local ATM Group Format */
[197] Fix | Delete
[198] Fix | Delete
#define ATM_LIJ_NONE 0 /* no leaf-initiated join */
[199] Fix | Delete
#define ATM_LIJ 1 /* request joining */
[200] Fix | Delete
#define ATM_LIJ_RPJ 2 /* set to root-prompted join */
[201] Fix | Delete
#define ATM_LIJ_NJ 3 /* set to network join */
[202] Fix | Delete
[203] Fix | Delete
[204] Fix | Delete
struct sockaddr_atmsvc {
[205] Fix | Delete
unsigned short sas_family; /* address family, AF_ATMSVC */
[206] Fix | Delete
struct { /* SVC address */
[207] Fix | Delete
unsigned char prv[ATM_ESA_LEN];/* private ATM address */
[208] Fix | Delete
char pub[ATM_E164_LEN+1]; /* public address (E.164) */
[209] Fix | Delete
/* unused addresses must be bzero'ed */
[210] Fix | Delete
char lij_type; /* role in LIJ call; one of ATM_LIJ* */
[211] Fix | Delete
__u32 lij_id; /* LIJ call identifier */
[212] Fix | Delete
} sas_addr __ATM_API_ALIGN; /* SVC address */
[213] Fix | Delete
};
[214] Fix | Delete
[215] Fix | Delete
[216] Fix | Delete
static __inline__ int atmsvc_addr_in_use(struct sockaddr_atmsvc addr)
[217] Fix | Delete
{
[218] Fix | Delete
return *addr.sas_addr.prv || *addr.sas_addr.pub;
[219] Fix | Delete
}
[220] Fix | Delete
[221] Fix | Delete
[222] Fix | Delete
static __inline__ int atmpvc_addr_in_use(struct sockaddr_atmpvc addr)
[223] Fix | Delete
{
[224] Fix | Delete
return addr.sap_addr.itf || addr.sap_addr.vpi || addr.sap_addr.vci;
[225] Fix | Delete
}
[226] Fix | Delete
[227] Fix | Delete
[228] Fix | Delete
/*
[229] Fix | Delete
* Some stuff for linux/sockios.h
[230] Fix | Delete
*/
[231] Fix | Delete
[232] Fix | Delete
struct atmif_sioc {
[233] Fix | Delete
int number;
[234] Fix | Delete
int length;
[235] Fix | Delete
void *arg;
[236] Fix | Delete
};
[237] Fix | Delete
[238] Fix | Delete
[239] Fix | Delete
typedef unsigned short atm_backend_t;
[240] Fix | Delete
#endif /* _LINUX_ATM_H */
[241] Fix | Delete
[242] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function