Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: atmdev.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/* atmdev.h - ATM device driver declarations and various related items */
[1] Fix | Delete
[2] Fix | Delete
/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
[3] Fix | Delete
[4] Fix | Delete
[5] Fix | Delete
#ifndef LINUX_ATMDEV_H
[6] Fix | Delete
#define LINUX_ATMDEV_H
[7] Fix | Delete
[8] Fix | Delete
[9] Fix | Delete
#include <linux/atmapi.h>
[10] Fix | Delete
#include <linux/atm.h>
[11] Fix | Delete
#include <linux/atmioc.h>
[12] Fix | Delete
[13] Fix | Delete
[14] Fix | Delete
#define ESI_LEN 6
[15] Fix | Delete
[16] Fix | Delete
#define ATM_OC3_PCR (155520000/270*260/8/53)
[17] Fix | Delete
/* OC3 link rate: 155520000 bps
[18] Fix | Delete
SONET overhead: /270*260 (9 section, 1 path)
[19] Fix | Delete
bits per cell: /8/53
[20] Fix | Delete
max cell rate: 353207.547 cells/sec */
[21] Fix | Delete
#define ATM_25_PCR ((25600000/8-8000)/54)
[22] Fix | Delete
/* 25 Mbps ATM cell rate (59111) */
[23] Fix | Delete
#define ATM_OC12_PCR (622080000/1080*1040/8/53)
[24] Fix | Delete
/* OC12 link rate: 622080000 bps
[25] Fix | Delete
SONET overhead: /1080*1040
[26] Fix | Delete
bits per cell: /8/53
[27] Fix | Delete
max cell rate: 1412830.188 cells/sec */
[28] Fix | Delete
#define ATM_DS3_PCR (8000*12)
[29] Fix | Delete
/* DS3: 12 cells in a 125 usec time slot */
[30] Fix | Delete
[31] Fix | Delete
[32] Fix | Delete
#define __AAL_STAT_ITEMS \
[33] Fix | Delete
__HANDLE_ITEM(tx); /* TX okay */ \
[34] Fix | Delete
__HANDLE_ITEM(tx_err); /* TX errors */ \
[35] Fix | Delete
__HANDLE_ITEM(rx); /* RX okay */ \
[36] Fix | Delete
__HANDLE_ITEM(rx_err); /* RX errors */ \
[37] Fix | Delete
__HANDLE_ITEM(rx_drop); /* RX out of memory */
[38] Fix | Delete
[39] Fix | Delete
struct atm_aal_stats {
[40] Fix | Delete
#define __HANDLE_ITEM(i) int i
[41] Fix | Delete
__AAL_STAT_ITEMS
[42] Fix | Delete
#undef __HANDLE_ITEM
[43] Fix | Delete
};
[44] Fix | Delete
[45] Fix | Delete
[46] Fix | Delete
struct atm_dev_stats {
[47] Fix | Delete
struct atm_aal_stats aal0;
[48] Fix | Delete
struct atm_aal_stats aal34;
[49] Fix | Delete
struct atm_aal_stats aal5;
[50] Fix | Delete
} __ATM_API_ALIGN;
[51] Fix | Delete
[52] Fix | Delete
[53] Fix | Delete
#define ATM_GETLINKRATE _IOW('a',ATMIOC_ITF+1,struct atmif_sioc)
[54] Fix | Delete
/* get link rate */
[55] Fix | Delete
#define ATM_GETNAMES _IOW('a',ATMIOC_ITF+3,struct atm_iobuf)
[56] Fix | Delete
/* get interface names (numbers) */
[57] Fix | Delete
#define ATM_GETTYPE _IOW('a',ATMIOC_ITF+4,struct atmif_sioc)
[58] Fix | Delete
/* get interface type name */
[59] Fix | Delete
#define ATM_GETESI _IOW('a',ATMIOC_ITF+5,struct atmif_sioc)
[60] Fix | Delete
/* get interface ESI */
[61] Fix | Delete
#define ATM_GETADDR _IOW('a',ATMIOC_ITF+6,struct atmif_sioc)
[62] Fix | Delete
/* get itf's local ATM addr. list */
[63] Fix | Delete
#define ATM_RSTADDR _IOW('a',ATMIOC_ITF+7,struct atmif_sioc)
[64] Fix | Delete
/* reset itf's ATM address list */
[65] Fix | Delete
#define ATM_ADDADDR _IOW('a',ATMIOC_ITF+8,struct atmif_sioc)
[66] Fix | Delete
/* add a local ATM address */
[67] Fix | Delete
#define ATM_DELADDR _IOW('a',ATMIOC_ITF+9,struct atmif_sioc)
[68] Fix | Delete
/* remove a local ATM address */
[69] Fix | Delete
#define ATM_GETCIRANGE _IOW('a',ATMIOC_ITF+10,struct atmif_sioc)
[70] Fix | Delete
/* get connection identifier range */
[71] Fix | Delete
#define ATM_SETCIRANGE _IOW('a',ATMIOC_ITF+11,struct atmif_sioc)
[72] Fix | Delete
/* set connection identifier range */
[73] Fix | Delete
#define ATM_SETESI _IOW('a',ATMIOC_ITF+12,struct atmif_sioc)
[74] Fix | Delete
/* set interface ESI */
[75] Fix | Delete
#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
[76] Fix | Delete
/* force interface ESI */
[77] Fix | Delete
#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
[78] Fix | Delete
/* register a LECS address */
[79] Fix | Delete
#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
[80] Fix | Delete
/* unregister a LECS address */
[81] Fix | Delete
#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
[82] Fix | Delete
/* retrieve LECS address(es) */
[83] Fix | Delete
[84] Fix | Delete
#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
[85] Fix | Delete
/* get AAL layer statistics */
[86] Fix | Delete
#define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc)
[87] Fix | Delete
/* get AAL layer statistics and zero */
[88] Fix | Delete
#define ATM_GETLOOP _IOW('a',ATMIOC_SARCOM+2,struct atmif_sioc)
[89] Fix | Delete
/* get loopback mode */
[90] Fix | Delete
#define ATM_SETLOOP _IOW('a',ATMIOC_SARCOM+3,struct atmif_sioc)
[91] Fix | Delete
/* set loopback mode */
[92] Fix | Delete
#define ATM_QUERYLOOP _IOW('a',ATMIOC_SARCOM+4,struct atmif_sioc)
[93] Fix | Delete
/* query supported loopback modes */
[94] Fix | Delete
#define ATM_SETSC _IOW('a',ATMIOC_SPECIAL+1,int)
[95] Fix | Delete
/* enable or disable single-copy */
[96] Fix | Delete
#define ATM_SETBACKEND _IOW('a',ATMIOC_SPECIAL+2,atm_backend_t)
[97] Fix | Delete
/* set backend handler */
[98] Fix | Delete
#define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t)
[99] Fix | Delete
/* use backend to make new if */
[100] Fix | Delete
#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
[101] Fix | Delete
/* add party to p2mp call */
[102] Fix | Delete
#ifdef CONFIG_COMPAT
[103] Fix | Delete
/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */
[104] Fix | Delete
#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct compat_atm_iobuf)
[105] Fix | Delete
#endif
[106] Fix | Delete
#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
[107] Fix | Delete
/* drop party from p2mp call */
[108] Fix | Delete
[109] Fix | Delete
/*
[110] Fix | Delete
* These are backend handkers that can be set via the ATM_SETBACKEND call
[111] Fix | Delete
* above. In the future we may support dynamic loading of these - for now,
[112] Fix | Delete
* they're just being used to share the ATMIOC_BACKEND ioctls
[113] Fix | Delete
*/
[114] Fix | Delete
#define ATM_BACKEND_RAW 0
[115] Fix | Delete
#define ATM_BACKEND_PPP 1 /* PPPoATM - RFC2364 */
[116] Fix | Delete
#define ATM_BACKEND_BR2684 2 /* Bridged RFC1483/2684 */
[117] Fix | Delete
[118] Fix | Delete
/* for ATM_GETTYPE */
[119] Fix | Delete
#define ATM_ITFTYP_LEN 8 /* maximum length of interface type name */
[120] Fix | Delete
[121] Fix | Delete
/*
[122] Fix | Delete
* Loopback modes for ATM_{PHY,SAR}_{GET,SET}LOOP
[123] Fix | Delete
*/
[124] Fix | Delete
[125] Fix | Delete
/* Point of loopback CPU-->SAR-->PHY-->line--> ... */
[126] Fix | Delete
#define __ATM_LM_NONE 0 /* no loop back ^ ^ ^ ^ */
[127] Fix | Delete
#define __ATM_LM_AAL 1 /* loop back PDUs --' | | | */
[128] Fix | Delete
#define __ATM_LM_ATM 2 /* loop back ATM cells ---' | | */
[129] Fix | Delete
/* RESERVED 4 loop back on PHY side ---' */
[130] Fix | Delete
#define __ATM_LM_PHY 8 /* loop back bits (digital) ----' | */
[131] Fix | Delete
#define __ATM_LM_ANALOG 16 /* loop back the analog signal --------' */
[132] Fix | Delete
[133] Fix | Delete
/* Direction of loopback */
[134] Fix | Delete
#define __ATM_LM_MKLOC(n) ((n)) /* Local (i.e. loop TX to RX) */
[135] Fix | Delete
#define __ATM_LM_MKRMT(n) ((n) << 8) /* Remote (i.e. loop RX to TX) */
[136] Fix | Delete
[137] Fix | Delete
#define __ATM_LM_XTLOC(n) ((n) & 0xff)
[138] Fix | Delete
#define __ATM_LM_XTRMT(n) (((n) >> 8) & 0xff)
[139] Fix | Delete
[140] Fix | Delete
#define ATM_LM_NONE 0 /* no loopback */
[141] Fix | Delete
[142] Fix | Delete
#define ATM_LM_LOC_AAL __ATM_LM_MKLOC(__ATM_LM_AAL)
[143] Fix | Delete
#define ATM_LM_LOC_ATM __ATM_LM_MKLOC(__ATM_LM_ATM)
[144] Fix | Delete
#define ATM_LM_LOC_PHY __ATM_LM_MKLOC(__ATM_LM_PHY)
[145] Fix | Delete
#define ATM_LM_LOC_ANALOG __ATM_LM_MKLOC(__ATM_LM_ANALOG)
[146] Fix | Delete
[147] Fix | Delete
#define ATM_LM_RMT_AAL __ATM_LM_MKRMT(__ATM_LM_AAL)
[148] Fix | Delete
#define ATM_LM_RMT_ATM __ATM_LM_MKRMT(__ATM_LM_ATM)
[149] Fix | Delete
#define ATM_LM_RMT_PHY __ATM_LM_MKRMT(__ATM_LM_PHY)
[150] Fix | Delete
#define ATM_LM_RMT_ANALOG __ATM_LM_MKRMT(__ATM_LM_ANALOG)
[151] Fix | Delete
[152] Fix | Delete
/*
[153] Fix | Delete
* Note: ATM_LM_LOC_* and ATM_LM_RMT_* can be combined, provided that
[154] Fix | Delete
* __ATM_LM_XTLOC(x) <= __ATM_LM_XTRMT(x)
[155] Fix | Delete
*/
[156] Fix | Delete
[157] Fix | Delete
[158] Fix | Delete
struct atm_iobuf {
[159] Fix | Delete
int length;
[160] Fix | Delete
void *buffer;
[161] Fix | Delete
};
[162] Fix | Delete
[163] Fix | Delete
/* for ATM_GETCIRANGE / ATM_SETCIRANGE */
[164] Fix | Delete
[165] Fix | Delete
#define ATM_CI_MAX -1 /* use maximum range of VPI/VCI */
[166] Fix | Delete
[167] Fix | Delete
struct atm_cirange {
[168] Fix | Delete
signed char vpi_bits; /* 1..8, ATM_CI_MAX (-1) for maximum */
[169] Fix | Delete
signed char vci_bits; /* 1..16, ATM_CI_MAX (-1) for maximum */
[170] Fix | Delete
};
[171] Fix | Delete
[172] Fix | Delete
/* for ATM_SETSC; actually taken from the ATM_VF number space */
[173] Fix | Delete
[174] Fix | Delete
#define ATM_SC_RX 1024 /* enable RX single-copy */
[175] Fix | Delete
#define ATM_SC_TX 2048 /* enable TX single-copy */
[176] Fix | Delete
[177] Fix | Delete
#define ATM_BACKLOG_DEFAULT 32 /* if we get more, we're likely to time out
[178] Fix | Delete
anyway */
[179] Fix | Delete
[180] Fix | Delete
/* MF: change_qos (Modify) flags */
[181] Fix | Delete
[182] Fix | Delete
#define ATM_MF_IMMED 1 /* Block until change is effective */
[183] Fix | Delete
#define ATM_MF_INC_RSV 2 /* Change reservation on increase */
[184] Fix | Delete
#define ATM_MF_INC_SHP 4 /* Change shaping on increase */
[185] Fix | Delete
#define ATM_MF_DEC_RSV 8 /* Change reservation on decrease */
[186] Fix | Delete
#define ATM_MF_DEC_SHP 16 /* Change shaping on decrease */
[187] Fix | Delete
#define ATM_MF_BWD 32 /* Set the backward direction parameters */
[188] Fix | Delete
[189] Fix | Delete
#define ATM_MF_SET (ATM_MF_INC_RSV | ATM_MF_INC_SHP | ATM_MF_DEC_RSV | \
[190] Fix | Delete
ATM_MF_DEC_SHP | ATM_MF_BWD)
[191] Fix | Delete
[192] Fix | Delete
/*
[193] Fix | Delete
* ATM_VS_* are used to express VC state in a human-friendly way.
[194] Fix | Delete
*/
[195] Fix | Delete
[196] Fix | Delete
#define ATM_VS_IDLE 0 /* VC is not used */
[197] Fix | Delete
#define ATM_VS_CONNECTED 1 /* VC is connected */
[198] Fix | Delete
#define ATM_VS_CLOSING 2 /* VC is closing */
[199] Fix | Delete
#define ATM_VS_LISTEN 3 /* VC is listening for incoming setups */
[200] Fix | Delete
#define ATM_VS_INUSE 4 /* VC is in use (registered with atmsigd) */
[201] Fix | Delete
#define ATM_VS_BOUND 5 /* VC is bound */
[202] Fix | Delete
[203] Fix | Delete
#define ATM_VS2TXT_MAP \
[204] Fix | Delete
"IDLE", "CONNECTED", "CLOSING", "LISTEN", "INUSE", "BOUND"
[205] Fix | Delete
[206] Fix | Delete
#define ATM_VF2TXT_MAP \
[207] Fix | Delete
"ADDR", "READY", "PARTIAL", "REGIS", \
[208] Fix | Delete
"RELEASED", "HASQOS", "LISTEN", "META", \
[209] Fix | Delete
"256", "512", "1024", "2048", \
[210] Fix | Delete
"SESSION", "HASSAP", "BOUND", "CLOSE"
[211] Fix | Delete
[212] Fix | Delete
[213] Fix | Delete
[214] Fix | Delete
#endif /* LINUX_ATMDEV_H */
[215] Fix | Delete
[216] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function