;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EI_NIDENT equ 16 ;
EI_MAG0 = 0 ; File identification byte 0 index */
ELFMAG0 = 0x7f ; Magic number byte 0 */
EI_MAG1 = 1 ; File identification byte 1 index */
ELFMAG1 = 'E' ; Magic number byte 1 */
EI_MAG2 = 2 ; File identification byte 2 index */
ELFMAG2 = 'L' ; Magic number byte 2 */
EI_MAG3 = 3 ; File identification byte 3 index */
ELFMAG3 = 'F' ; Magic number byte 3 */
ELFMAG = "\177ELF" ;
SELFMAG = 4 ;
EI_CLASS = 4 ; File class byte index
ELFCLASSNONE = 0 ; Invalid class
ELFCLASS32 = 1 ; 32-bit objects
ELFCLASS64 = 2 ; 64-bit objects
ELF_CLASS32 = 1 ;
ELF_CLASS64 = 2 ;
ELFCLASSNUM = 3 ;
EI_DATA = 5 ; Data encoding byte index
ELFDATANONE = 0 ; Invalid data encoding
ELFDATA2LSB = 1 ; 2's complement, little endian
ELFDATA2MSB = 2 ; 2's complement, big endian
ELFDATANUM = 3 ;
EI_VERSION = 6 ; File version byte index - Value must be EV_CURRENT
EI_OSABI = 7 ; OS ABI identification
ELFOSABI_NONE = 0 ; UNIX System V ABI
ELFOSABI_SYSV = 0 ; Alias
ELFOSABI_HPUX = 1 ; HP-UX
ELFOSABI_NETBSD = 2 ; NetBSD
ELFOSABI_GNU = 3 ; Object uses GNU ELF extensions
ELFOSABI_LINUX equ ELFOSABI_GNU ; Compatibility alias
ELFOSABI_SOLARIS = 6 ; Sun Solaris
ELFOSABI_AIX = 7 ; IBM AIX
ELFOSABI_IRIX = 8 ; SGI Irix
ELFOSABI_FREEBSD = 9 ; FreeBSD
ELFOSABI_TRU64 = 10 ; Compaq TRU64 UNIX
ELFOSABI_MODESTO = 11 ; Novell Modesto
ELFOSABI_OPENBSD = 12 ; OpenBSD
ELFOSABI_ARM_AEABI = 64 ; ARM EABI
ELFOSABI_ARM = 97 ; ARM
ELFOSABI_STANDALONE = 255 ; Standalone (embedded) application
EI_ABIVERSION = 8 ; ABI version
EI_PAD = 9 ; Byte index of padding bytes
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ET_NONE = 0 ; No file type
ET_REL = 1 ; Relocatable file
ET_EXEC = 2 ; Executable file
ET_DYN = 3 ; Shared object file
ET_CORE = 4 ; Core file
ET_NUM = 5 ; Number of defined types
ET_LOOS = 0xfe00 ; Operating system-specific
ET_HIOS = 0xfeff ; Operating system-specific
ET_LOPROC = 0xff00 ; Processor-specific
ET_HIPROC = 0xffff ; Processor-specific
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E_IDENT.ELFCLASS64 = 2 ;
E_IDENT.ELFDATA2LSB = 1 ;
E_IDENT.EV_CURRENT = 1 ;
E_IDENT.ELFOSABI_LINUX = 3 ;
E_IDENT.E_IDENT_SIZE = 16 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;ELF_NOTE_SOLARIS "SUNW Solaris"
;ELF_NOTE_GNU "GNU"
NT_GNU_ABI_TAG = 1
ELF_NOTE_PAGESIZE_HINT = 1
ELF_NOTE_ABI equ NT_GNU_ABI_TAG ; Old name
ELF_NOTE_OS_LINUX = 0
ELF_NOTE_OS_GNU = 1
ELF_NOTE_OS_SOLARIS2 = 2
ELF_NOTE_OS_FREEBSD = 3
NT_GNU_HWCAP = 2
NT_GNU_BUILD_ID = 3
NT_GNU_GOLD_VERSION = 4
NT_GNU_PROPERTY_TYPE_0 = 5
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;NOTE_GNU_PROPERTY_SECTION_NAME = ".note.gnu.property" ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GNU_PROPERTY_STACK_SIZE = 1 ;
GNU_PROPERTY_NO_COPY_ON_PROTECTED = 2 ;
GNU_PROPERTY_LOPROC = 0xc0000000 ;
GNU_PROPERTY_HIPROC = 0xdfffffff ;
GNU_PROPERTY_LOUSER = 0xe0000000 ;
GNU_PROPERTY_HIUSER = 0xffffffff ;
GNU_PROPERTY_X86_ISA_1_USED = 0xc0000000 ;
GNU_PROPERTY_X86_ISA_1_NEEDED = 0xc0000001 ;
GNU_PROPERTY_X86_FEATURE_1_AND = 0xc0000002 ;
GNU_PROPERTY_X86_ISA_1_486 equ 1U << 0 ;
GNU_PROPERTY_X86_ISA_1_586 equ 1U << 1 ;
GNU_PROPERTY_X86_ISA_1_686 equ 1U << 2 ;
GNU_PROPERTY_X86_ISA_1_SSE equ 1U << 3 ;
GNU_PROPERTY_X86_ISA_1_SSE2 equ 1U << 4 ;
GNU_PROPERTY_X86_ISA_1_SSE3 equ 1U << 5 ;
GNU_PROPERTY_X86_ISA_1_SSSE3 equ 1U << 6 ;
GNU_PROPERTY_X86_ISA_1_SSE4_1 equ 1U << 7 ;
GNU_PROPERTY_X86_ISA_1_SSE4_2 equ 1U << 8 ;
GNU_PROPERTY_X86_ISA_1_AVX equ 1U << 9 ;
GNU_PROPERTY_X86_ISA_1_AVX2 equ 1U << 10 ;
GNU_PROPERTY_X86_ISA_1_AVX512F equ 1U << 11 ;
GNU_PROPERTY_X86_ISA_1_AVX512CD equ 1U << 12 ;
GNU_PROPERTY_X86_ISA_1_AVX512ER equ 1U << 13 ;
GNU_PROPERTY_X86_ISA_1_AVX512PF equ 1U << 14 ;
GNU_PROPERTY_X86_ISA_1_AVX512VL equ 1U << 15 ;
GNU_PROPERTY_X86_ISA_1_AVX512DQ equ 1U << 16 ;
GNU_PROPERTY_X86_ISA_1_AVX512BW equ 1U << 17 ;
GNU_PROPERTY_X86_FEATURE_1_IBT equ 1U << 0 ;
GNU_PROPERTY_X86_FEATURE_1_SHSTK equ 1U << 1 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;define ELF32_M_SYM(info) ((info) >>
;define ELF32_M_SIZE(info) ((unsigned char) (info))
;define ELF32_M_INFO(sym, size) (((sym) << + (unsigned char) (size))
;define ELF64_M_SYM(info) ELF32_M_SYM (info)
;define ELF64_M_SIZE(info) ELF32_M_SIZE (info)
;define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EM_NONE = 0 ; No machine
EM_M32 = 1 ; AT&T WE 32100
EM_SPARC = 2 ; SUN SPARC
EM_386 = 3 ; Intel 80386 <<-- (INTEL)
EM_68K = 4 ; Motorola m68k family
EM_88K = 5 ; Motorola m88k family
EM_IAMCU = 6 ; Intel MCU
EM_860 = 7 ; Intel 80860
EM_MIPS = 8 ; MIPS R3000 big-endian
EM_S370 = 9 ; IBM System/370
EM_MIPS_RS3_LE = 10 ; MIPS R3000 little-endian
EM_PARISC = 15 ; HPPA
EM_VPP500 = 17 ; Fujitsu VPP500
EM_SPARC32PLUS = 18 ; Sun's "v8plus"
EM_960 = 19 ; Intel 80960
EM_PPC = 20 ; PowerPC
EM_PPC64 = 21 ; PowerPC 64-bit
EM_S390 = 22 ; IBM S390
EM_SPU = 23 ; IBM SPU/SPC
EM_V800 = 36 ; NEC V800 series
EM_FR20 = 37 ; Fujitsu FR20
EM_RH32 = 38 ; TRW RH-32
EM_RCE = 39 ; Motorola RCE
EM_ARM = 40 ; ARM
EM_FAKE_ALPHA = 41 ; Digital Alpha
EM_SH = 42 ; Hitachi SH
EM_SPARCV9 = 43 ; SPARC v9 64-bit
EM_TRICORE = 44 ; Siemens Tricore
EM_ARC = 45 ; Argonaut RISC Core
EM_H8_300 = 46 ; Hitachi H8/300
EM_H8_300H = 47 ; Hitachi H8/300H
EM_H8S = 48 ; Hitachi H8S
EM_H8_500 = 49 ; Hitachi H8/500
EM_IA_64 = 50 ; Intel Merced
EM_MIPS_X = 51 ; Stanford MIPS-X
EM_COLDFIRE = 52 ; Motorola Coldfire
EM_68HC12 = 53 ; Motorola M68HC12
EM_MMA = 54 ; Fujitsu MMA Multimedia Accelerator
EM_PCP = 55 ; Siemens PCP
EM_NCPU = 56 ; Sony nCPU embeeded RISC
EM_NDR1 = 57 ; Denso NDR1 microprocessor
EM_STARCORE = 58 ; Motorola Start*Core processor
EM_ME16 = 59 ; Toyota ME16 processor
EM_ST100 = 60 ; STMicroelectronic ST100 processor
EM_TINYJ = 61 ; Advanced Logic Corp. Tinyj emb.fam
EM_X86_64 = 62 ; AMD x86-64 architecture <<-- (INTEL)
EM_PDSP = 63 ; Sony DSP Processor
EM_PDP10 = 64 ; Digital PDP-10
EM_PDP11 = 65 ; Digital PDP-11
EM_FX66 = 66 ; Siemens FX66 microcontroller
EM_ST9PLUS = 67 ; STMicroelectronics ST9+ 8/16 mc
EM_ST7 = 68 ; STmicroelectronics ST7 8 bit mc
EM_68HC16 = 69 ; Motorola MC68HC16 microcontroller
EM_68HC11 = 70 ; Motorola MC68HC11 microcontroller
EM_68HC08 = 71 ; Motorola MC68HC08 microcontroller
EM_68HC05 = 72 ; Motorola MC68HC05 microcontroller
EM_SVX = 73 ; Silicon Graphics SVx
EM_ST19 = 74 ; STMicroelectronics ST19 8 bit mc
EM_VAX = 75 ; Digital VAX
EM_CRIS = 76 ; Axis Communications 32-bit emb.proc
EM_JAVELIN = 77 ; Infineon Technologies 32-bit emb.proc
EM_FIREPATH = 78 ; Element 14 64-bit DSP Processor
EM_ZSP = 79 ; LSI Logic 16-bit DSP Processor
EM_MMIX = 80 ; Donald Knuth's educational 64-bit proc
EM_HUANY = 81 ; Harvard University machine-independent object files
EM_PRISM = 82 ; SiTera Prism
EM_AVR = 83 ; Atmel AVR 8-bit microcontroller
EM_FR30 = 84 ; Fujitsu FR30
EM_D10V = 85 ; Mitsubishi D10V
EM_D30V = 86 ; Mitsubishi D30V
EM_V850 = 87 ; NEC v850 */
EM_M32R = 88 ; Mitsubishi M32R
EM_MN10300 = 89 ; Matsushita MN10300
EM_MN10200 = 90 ; Matsushita MN10200
EM_PJ = 91 ; picoJava
EM_OPENRISC = 92 ; OpenRISC 32-bit embedded processor
EM_ARC_COMPACT = 93 ; ARC International ARCompact
EM_XTENSA = 94 ; Tensilica Xtensa Architecture
EM_VIDEOCORE = 95 ; Alphamosaic VideoCore
EM_TMM_GPP = 96 ; Thompson Multimedia General Purpose Proc
EM_NS32K = 97 ; National Semi. 32000
EM_TPC = 98 ; Tenor Network TPC
EM_SNP1K = 99 ; Trebia SNP 1000
EM_ST200 = 100 ; STMicroelectronics ST200
EM_IP2K = 101 ; Ubicom IP2xxx
EM_MAX = 102 ; MAX processor
EM_CR = 103 ; National Semi. CompactRISC
EM_F2MC16 = 104 ; Fujitsu F2MC16
EM_MSP430 = 105 ; Texas Instruments msp430
EM_BLACKFIN = 106 ; Analog Devices Blackfin DSP
EM_SE_C33 = 107 ; Seiko Epson S1C33 family
EM_SEP = 108 ; Sharp embedded microprocessor
EM_ARCA = 109 ; Arca RISC
EM_UNICORE = 110 ; PKU-Unity & MPRC Peking Uni. mc series
EM_EXCESS = 111 ; eXcess configurable cpu
EM_DXP = 112 ; Icera Semi. Deep Execution Processor
EM_ALTERA_NIOS2 = 113 ; Altera Nios II
EM_CRX = 114 ; National Semi. CompactRISC CRX
EM_XGATE = 115 ; Motorola XGATE
EM_C166 = 116 ; Infineon C16x/XC16x
EM_M16C = 117 ; Renesas M16C
EM_DSPIC30F = 118 ; Microch ip Technology dsPIC30F
EM_CE = 119 ; Freescale Communication Engine RISC
EM_M32C = 120 ; Renesas M32C
EM_TSK3000 = 131 ; Altium TSK3000
EM_RS08 = 132 ; Freescale RS08
EM_SHARC = 133 ; Analog Devices SHARC family
EM_ECOG2 = 134 ; Cyan Technology eCOG2
EM_SCORE7 = 135 ; Sunplus S+core7 RISC
EM_DSP24 = 136 ; New Japan Radio (NJR) 24-bit DSP
EM_VIDEOCORE3 = 137 ; Broadcom VideoCore III
EM_LATTICEMICO32 = 138 ; RISC for Lattice FPGA
EM_SE_C17 = 139 ; Seiko Epson C17
EM_TI_C6000 = 140 ; Texas Instruments TMS320C6000 DSP
EM_TI_C2000 = 141 ; Texas Instruments TMS320C2000 DSP
EM_TI_C5500 = 142 ; Texas Instruments TMS320C55x DSP
EM_TI_ARP32 = 143 ; Texas Instruments App. Specific RISC
EM_TI_PRU = 144 ; Texas Instruments Prog. Realtime Unit
EM_MMDSP_PLUS = 160 ; STMicroelectronics 64bit VLIW DSP
EM_CYPRESS_M8C = 161 ; Cypress M8C
EM_R32C = 162 ; Renesas R32C
EM_TRIMEDIA = 163 ; NXP Semi. TriMedia
EM_QDSP6 = 164 ; QUALCOMM DSP6
EM_8051 = 165 ; Intel 8051 and variants
EM_STXP7X = 166 ; STMicroelectronics STxP7x
EM_NDS32 = 167 ; Andes Tech. compact code emb. RISC
EM_ECOG1X = 168 ; Cyan Technology eCOG1X
EM_MAXQ30 = 169 ; Dallas Semi. MAXQ30 mc
EM_XIMO16 = 170 ; New Japan Radio (NJR) 16-bit DSP
EM_MANIK = 171 ; M2000 Reconfigurable RISC
EM_CRAYNV2 = 172 ; Cray NV2 vector architecture
EM_RX = 173 ; Renesas RX
EM_METAG = 174 ; Imagination Tech. META
EM_MCST_ELBRUS = 175 ; MCST Elbrus
EM_ECOG16 = 176 ; Cyan Technology eCOG16
EM_CR16 = 177 ; National Semi. CompactRISC CR16
EM_ETPU = 178 ; Freescale Extended Time Processing Unit
EM_SLE9X = 179 ; Infineon Tech. SLE9X
EM_L10M = 180 ; Intel L10M
EM_K10M = 181 ; Intel K10M
EM_AARCH64 = 183 ; ARM AARCH64
EM_AVR32 = 185 ; Amtel 32-bit microprocessor
EM_STM8 = 186 ; STMicroelectronics STM8
EM_TILE64 = 187 ; Tileta TILE64
EM_TILEPRO = 188 ; Tilera TILEPro
EM_MICROBLAZE = 189 ; Xilinx MicroBlaze
EM_CUDA = 190 ; NVIDIA CUDA
EM_TILEGX = 191 ; Tilera TILE-Gx
EM_CLOUDSHIELD = 192 ; CloudShield
EM_COREA_1ST = 193 ; KIPO-KAIST Core-A 1st gen
EM_COREA_2ND = 194 ; KIPO-KAIST Core-A 2nd gen
EM_ARC_COMPACT2 = 195 ; Synopsys ARCompact V2
EM_OPEN8 = 196 ; Open8 RISC
EM_RL78 = 197 ; Renesas RL78
EM_VIDEOCORE5 = 198 ; Broadcom VideoCore V
EM_78KOR = 199 ; Renesas 78KOR
EM_56800EX = 200 ; Freescale 56800EX DSC
EM_BA1 = 201 ; Beyond BA1
EM_BA2 = 202 ; Beyond BA2
EM_XCORE = 203 ; XMOS xCORE
EM_MCHP_PIC = 204 ; Microchip 8-bit PIC(r)
EM_KM32 = 210 ; KM211 KM32
EM_KMX32 = 211 ; KM211 KMX32
EM_EMX16 = 212 ; KM211 KMX16
EM_EMX8 = 213 ; KM211 KMX8
EM_KVARC = 214 ; KM211 KVARC
EM_CDP = 215 ; Paneve CDP
EM_COGE = 216 ; Cognitive Smart Memory Processor
EM_COOL = 217 ; Bluechip CoolEngine
EM_NORC = 218 ; Nanoradio Optimized RISC
EM_CSR_KALIMBA = 219 ; CSR Kalimba
EM_Z80 = 220 ; Zilog Z80
EM_VISIUM = 221 ; Controls and Data Services VISIUMcore
EM_FT32 = 222 ; FTDI Chip FT32
EM_MOXIE = 223 ; Moxie processor
EM_AMDGPU = 224 ; AMD GPU
EM_RISCV = 243 ; RISC-V
EM_BPF = 247 ; Linux BPF -- in-kernel virtual machine
EM_CSKY = 252 ; C-SKY
EM_NUM = 253 ;
EM_ARC_A5 equ EM_ARC_COMPACT ;
EM_ALPHA = 0x9026 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EV_NONE = 0 ; Invalid version
EV_CURRENT = 1 ; Current version
EV_NUM = 2 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DT_NULL = 0 ; Marks end of dynamic section
DT_NEEDED = 1 ; Name of needed library
DT_PLTRELSZ = 2 ; Size in bytes of PLT relocs
DT_PLTGOT = 3 ; Processor defined value
DT_HASH = 4 ; Address of symbol hash table
DT_STRTAB = 5 ; Address of string table
DT_SYMTAB = 6 ; Address of symbol table
DT_RELA = 7 ; Address of Rela relocs
DT_RELASZ = 8 ; Total size of Rela relocs
DT_RELAENT = 9 ; Size of one Rela reloc
DT_STRSZ = 10 ; Size of string table
DT_SYMENT = 11 ; Size of one symbol table entry
DT_INIT = 12 ; Address of init function
DT_FINI = 13 ; Address of termination function
DT_SONAME = 14 ; Name of shared object
DT_RPATH = 15 ; Library search path (deprecated)
DT_SYMBOLIC = 16 ; Start symbol search here
DT_REL = 17 ; Address of Rel relocs
DT_RELSZ = 18 ; Total size of Rel relocs
DT_RELENT = 19 ; Size of one Rel reloc
DT_PLTREL = 20 ; Type of reloc in PLT
DT_DEBUG = 21 ; For debugging; unspecified
DT_TEXTREL = 22 ; Reloc might modify .text
DT_JMPREL = 23 ; Address of PLT relocs
DT_BIND_NOW = 24 ; Process relocations of object
DT_INIT_ARRAY = 25 ; Array with addresses of init fct
DT_FINI_ARRAY = 26 ; Array with addresses of fini fct
DT_INIT_ARRAYSZ = 27 ; Size in bytes of DT_INIT_ARRAY
DT_FINI_ARRAYSZ = 28 ; Size in bytes of DT_FINI_ARRAY
DT_RUNPATH = 29 ; Library search path
DT_FLAGS = 30 ; Flags for the object being loaded
DT_ENCODING = 32 ; Start of encoded range
DT_PREINIT_ARRAY = 32 ; Array with addresses of preinit fct
DT_PREINIT_ARRAYSZ = 33 ; size in bytes of DT_PREINIT_ARRAY
DT_SYMTAB_SHNDX = 34 ; Address of SYMTAB_SHNDX section
DT_NUM = 35 ; Number used
DT_LOOS = 0x6000000d ; Start of OS-specific
DT_HIOS = 0x6ffff000 ; End of OS-specific
DT_LOPROC = 0x70000000 ; Start of processor-specific
DT_HIPROC = 0x7fffffff ; End of processor-specific
DT_PROCNUM equ DT_MIPS_NUM ; Most used by any processor
;
DT_VALRNGLO = 0x6ffffd00 ;
DT_GNU_PRELINKED = 0x6ffffdf5 ; Prelinking timestamp <<-- (#)
DT_GNU_CONFLICTSZ = 0x6ffffdf6 ; Size of conflict section
DT_GNU_LIBLISTSZ = 0x6ffffdf7 ; Size of library list
DT_CHECKSUM = 0x6ffffdf8 ;
DT_PLTPADSZ = 0x6ffffdf9 ;
DT_MOVEENT = 0x6ffffdfa ;
DT_MOVESZ = 0x6ffffdfb ;
DT_FEATURE_1 = 0x6ffffdfc ; Feature selection (DTF_*)
DT_POSFLAG_1 = 0x6ffffdfd ; Flags for DT_* entries, effecting the following DT_* entry
DT_SYMINSZ = 0x6ffffdfe ; Size of syminfo table (in bytes)
DT_SYMINENT = 0x6ffffdff ; Entry size of syminfo
DT_VALRNGHI = 0x6ffffdff ;
DT_VALNUM = 12 ;
;
DT_ADDRRNGLO = 0x6ffffe00 ;
DT_GNU_HASH = 0x6ffffef5 ; GNU-style hash table
DT_TLSDESC_PLT = 0x6ffffef6 ;
DT_TLSDESC_GOT = 0x6ffffef7 ;
DT_GNU_CONFLICT = 0x6ffffef8 ; Start of conflict section
DT_GNU_LIBLIST = 0x6ffffef9 ; Library list
DT_CONFIG = 0x6ffffefa ; Configuration information
DT_DEPAUDIT = 0x6ffffefb ; Dependency auditing
DT_AUDIT = 0x6ffffefc ; Object auditing
DT_PLTPAD = 0x6ffffefd ; PLT padding
DT_MOVETAB = 0x6ffffefe ; Move table
DT_SYMINFO = 0x6ffffeff ; Syminfo table
DT_ADDRRNGHI = 0x6ffffeff ;
DT_ADDRNUM = 11 ;
;
DT_VERSYM = 0x6ffffff0 ; <<-- (#)
DT_RELACOUNT = 0x6ffffff9 ;
DT_RELCOUNT = 0x6ffffffa ;
;
DT_FLAGS_1 = 0x6ffffffb ; State flags, see DF_1_* below
DT_VERDEF = 0x6ffffffc ; Address of version definition table
DT_VERDEFNUM = 0x6ffffffd ; Number of version definitions
DT_VERNEED = 0x6ffffffe ; Address of table with needed versions
DT_VERNEEDNUM = 0x6fffffff ; Number of needed versions
DT_VERSIONTAGNUM = 16 ;
;
DT_AUXILIARY = 0x7ffffffd ; Shared object to load before self
DT_FILTER = 0x7fffffff ; Shared object to get values from
DT_EXTRANUM = 3 ;
;
DF_ORIGIN = 0x00000001 ; Object may use DF_ORIGIN
DF_SYMBOLIC = 0x00000002 ; Symbol resolutions starts here
DF_TEXTREL = 0x00000004 ; Object contains text relocations
DF_BIND_NOW = 0x00000008 ; No lazy binding for this object
DF_STATIC_TLS = 0x00000010 ; Module uses the static TLS model
;
DF_1_NOW = 0x00000001 ; Set RTLD_NOW for this object
DF_1_GLOBAL = 0x00000002 ; Set RTLD_GLOBAL for this object
DF_1_GROUP = 0x00000004 ; Set RTLD_GROUP for this object
DF_1_NODELETE = 0x00000008 ; Set RTLD_NODELETE for this object
DF_1_LOADFLTR = 0x00000010 ; Trigger filtee loading at runtime
DF_1_INITFIRST = 0x00000020 ; Set RTLD_INITFIRST for this object
DF_1_NOOPEN = 0x00000040 ; Set RTLD_NOOPEN for this object
DF_1_ORIGIN = 0x00000080 ; $ORIGIN must be handled
DF_1_DIRECT = 0x00000100 ; Direct binding enabled
DF_1_TRANS = 0x00000200 ;
DF_1_INTERPOSE = 0x00000400 ; Object is used to interpose
DF_1_NODEFLIB = 0x00000800 ; Ignore default lib search path
DF_1_NODUMP = 0x00001000 ; Object can't be dldump'ed
DF_1_CONFALT = 0x00002000 ; Configuration alternative created
DF_1_ENDFILTEE = 0x00004000 ; Filtee terminates filters search
DF_1_DISPRELDNE = 0x00008000 ; Disp reloc applied at build time
DF_1_DISPRELPND = 0x00010000 ; Disp reloc applied at run-time
DF_1_NODIRECT = 0x00020000 ; Object has no-direct binding
DF_1_IGNMULDEF = 0x00040000 ;
DF_1_NOKSYMS = 0x00080000 ;
DF_1_NOHDR = 0x00100000 ;
DF_1_EDITED = 0x00200000 ; Object is modified after built
DF_1_NORELOC = 0x00400000 ;
DF_1_SYMINTPOSE = 0x00800000 ; Object has individual interposers
DF_1_GLOBAUDIT = 0x01000000 ; Global auditing required
DF_1_SINGLETON = 0x02000000 ; Singleton symbols are used
DF_1_STUB = 0x04000000 ;
DF_1_PIE = 0x08000000 ;
DF_1_KMOD = 0x10000000 ;
DF_1_WEAKFILTER = 0x20000000 ;
DF_1_NOCOMMON = 0x40000000 ;
;
DTF_1_PARINIT = 0x00000001 ;
DTF_1_CONFEXP = 0x00000002 ;
;
DF_P1_LAZYLOAD = 0x00000001 ; Lazyload following object
DF_P1_GROUPPERM = 0x00000002 ; Symbols from next object are not
;
VER_DEF_NONE = 0 ; No version
VER_DEF_CURRENT = 1 ; Current version
VER_DEF_NUM = 2 ; Given version number
;
VER_FLG_BASE = 0x1 ; Version definition of file itself
VER_FLG_WEAK = 0x2 ; Weak version identifier
;
VER_NDX_LOCAL = 0 ; Symbol is local
VER_NDX_GLOBAL = 1 ; Symbol is global
VER_NDX_LORESERVE = 0xff00 ; Beginning of reserved entries
VER_NDX_ELIMINATE = 0xff01 ; Symbol is to be eliminated
;
VER_NEED_NONE = 0 ; No version
VER_NEED_CURRENT = 1 ; Current version
VER_NEED_NUM = 2 ; Given version number
;
VER_FLG_WEAK = 0x2 ; Weak version identifier
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag)) ; Reverse order!
;DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) ; Reverse order!
;DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) ; Reverse order!
;DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SHF_WRITE = 0x1 ; Writable
SHF_ALLOC = 0x2 ; Occupies memory during execution
SHF_EXECINSTR = 0x4 ; Executable
SHF_MERGE = 0x10 ; Might be merged
SHF_STRINGS = 0x20 ; Contains nul-terminated strings
SHF_INFO_LINK = 0x40 ; (sh_info) - contains SHT index + (U)
SHF_LINK_ORDER = 0x80 ; Preserve order after combining + (U)
SHF_OS_NONCONFORMING = 0x100 ; Non-standard OS specific handling required + (U)
SHF_GROUP = 0x200 ; Section is member of a group + (U)
SHF_TLS = 0x400 ; Section hold thread-local data + (U)
SHF_COMPRESSED = 0x800 ; Section with compressed data + (U)
SHF_MASKOS = 0x0ff00000 ; OS-specific
SHF_MASKPROC = 0xf0000000 ; Processor-specific
SHF_EXCLUDE = 0x80000000 ; Section is excluded unless referenced or allocated (Solaris) + (U)
SHF_ORDERED equ 1 << 30 ; Special ordering requirement (Solaris)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;define SHF_LOADREGION ; <<-- (NEW-!!-)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SHT_NULL = 0x0 ; Section header table entry unused
SHT_PROGBITS = 1 ; Program data
SHT_SYMTAB = 2 ; Symbol table
SHT_STRTAB = 3 ; String table
SHT_RELA = 4 ; Relocation entries with addends
SHT_HASH = 5 ; Symbol hash table
SHT_DYNAMIC = 6 ; Dynamic linking information
SHT_NOTE = 7 ; Notes
SHT_NOBITS = 8 ; Program space with no data (bss)
SHT_REL = 9 ; Relocation entries, no addends
SHT_SHLIB = 10 ; Reserved
SHT_DYNSYM = 11 ; Dynamic linker symbol table
SHT_INIT_ARRAY = 14 ; Array of constructors
SHT_FINI_ARRAY = 15 ; Array of destructors
SHT_PREINIT_ARRAY = 16 ; Array of pre-constructors
SHT_GROUP = 17 ; Section group
SHT_SYMTAB_SHNDX = 18 ; Extended section indeces
SHT_NUM = 19 ; Number of defined types
SHT_LOOS = 0x60000000 ; Start OS-specific
SHT_GNU_ATTRIBUTES = 0x6ffffff5 ; Object attributes
SHT_GNU_HASH = 0x6ffffff6 ; GNU-style hash table
SHT_GNU_LIBLIST = 0x6ffffff7 ; Prelink library list
SHT_CHECKSUM = 0x6ffffff8 ; Checksum for DSO content
SHT_LOSUNW = 0x6ffffffa ; Sun-specific low bound
SHT_SUNW_move = 0x6ffffffa ;
SHT_SUNW_COMDAT = 0x6ffffffb ;
SHT_SUNW_syminfo = 0x6ffffffc ;
SHT_GNU_verdef = 0x6ffffffd ; Version definition section
SHT_GNU_verneed = 0x6ffffffe ; Version needs section
SHT_GNU_versym = 0x6fffffff ; Version symbol table
SHT_HISUNW = 0x6fffffff ; Sun-specific high bound
SHT_HIOS = 0x6fffffff ; End OS-specific type
SHT_LOPROC = 0x70000000 ; Start of processor-specific
SHT_HIPROC = 0x7fffffff ; End of processor-specific
SHT_LOUSER = 0x80000000 ; Start of application-specific
SHT_HIUSER = 0x8fffffff ; End of application-specific
SHN_UNDEF = 0x0000 ; Undefined section
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SHN_LORESERVE = 0xff00 ; Start of reserved indices
SHN_LOPROC = 0xff00 ; Start of processor-specific
SHN_BEFORE = 0xff00 ; Order section before all others (Solaris)
SHN_AFTER = 0xff01 ; Order section after all other (Solaris)
SHN_HIPROC = 0xff1f ; End of processor-specific
SHN_LOOS = 0xff20 ; Start of OS-specific
SHN_HIOS = 0xff3f ; End of OS-specific
SHN_ABS = 0xfff1 ; Associated symbol is absolute
SHN_COMMON = 0xfff2 ; Associated symbol is common
SHN_XINDEX = 0xffff ; Index is in extra table
SHN_HIRESERVE = 0xffff ; End of reserved indices
SHN_UNDEF = 0 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;define XSHN_UNDEF ((int16_t)SHN_UNDEF) ; Undefined section
;define XSHN_LORESERVE ((int16_t)SHN_LORESERVE) ; Start of reserved indices
;define XSHN_LOPROC ((int16_t)SHN_LOPROC) ; Start of processor-specific
;define XSHN_HIPROC ((int16_t)SHN_HIPROC) ; End of processor-specific
;define XSHN_ABS ((int16_t)SHN_ABS) ; Associated symbol is absolute
;define XSHN_COMMON ((int16_t)SHN_COMMON) ; Associated symbol is common
;define XSHN_XINDEX ((int16_t)SHN_XINDEX) ; Index is in extra table
;define XSHN_HIRESERVE ((int16_t)SHN_HIRESERVE) ; End of reserved indices
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SHA_ANY = 1 ; No alignment constraint
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ELFCOMPRESS_ZLIB = 1 ; ZLIB/DEFLATE algorithm
ELFCOMPRESS_LOOS = 0x60000000 ; Start of OS-specific
ELFCOMPRESS_HIOS = 0x6fffffff ; End of OS-specific
ELFCOMPRESS_LOPROC = 0x70000000 ; Start of processor-specific
ELFCOMPRESS_HIPROC = 0x7fffffff ; End of processor-specific
;
GRP_COMDAT = 0x1 ; Mark group as COMDAT
;
SYMINFO_BT_SELF = 0xffff ; Symbol bound to self
SYMINFO_BT_PARENT = 0xfffe ; Symbol bound to parent
SYMINFO_BT_LOWRESERVE = 0xff00 ; Beginning of reserved entries
SYMINFO_FLG_DIRECT = 0x0001 ; Direct bound symbol
SYMINFO_FLG_PASSTHRU = 0x0002 ; Pass-thru symbol for translator
SYMINFO_FLG_COPY = 0x0004 ; Symbol is a copy-reloc
SYMINFO_FLG_LAZYLOAD = 0x0008 ; Symbol bound to object to be lazy loaded
SYMINFO_NONE = 0 ;
SYMINFO_CURRENT = 1 ;
SYMINFO_NUM = 2 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NT_PRSTATUS = 1 ; Contains copy of prstatus struct
NT_PRFPREG = 2 ; Contains copy of fpregset struct
NT_FPREGSET = 2 ; Contains copy of fpregset struct
NT_PRPSINFO = 3 ; Contains copy of prpsinfo struct
NT_PRXREG = 4 ; Contains copy of prxregset struct
NT_TASKSTRUCT = 4 ; Contains copy of task structure
NT_PLATFORM = 5 ; String from sysinfo (SI_PLATFORM)
NT_AUXV = 6 ; Contains copy of auxv array
NT_GWINDOWS = 7 ; Contains copy of gwindows struct
NT_ASRS = 8 ; Contains copy of asrset struct
NT_PSTATUS = 10 ; Contains copy of pstatus struct
NT_PSINFO = 13 ; Contains copy of psinfo struct
NT_PRCRED = 14 ; Contains copy of prcred struct
NT_UTSNAME = 15 ; Contains copy of utsname struct
NT_LWPSTATUS = 16 ; Contains copy of lwpstatus struct
NT_LWPSINFO = 17 ; Contains copy of lwpinfo struct
NT_PRFPXREG = 20 ; Contains copy of fprxregset struct
NT_SIGINFO = 0x53494749 ; Contains copy of siginfo_t, size might increase
NT_FILE = 0x46494c45 ; Contains information about mapped files
NT_PRXFPREG = 0x46e62b7f ; Contains copy of user_fxsr_struct
NT_PPC_VMX = 0x100 ; PowerPC Altivec/VMX registers
NT_PPC_SPE = 0x101 ; PowerPC SPE/EVR registers
NT_PPC_VSX = 0x102 ; PowerPC VSX registers
NT_PPC_TAR = 0x103 ; Target Address Register
NT_PPC_PPR = 0x104 ; Program Priority Register
NT_PPC_DSCR = 0x105 ; Data Stream Control Register
NT_PPC_EBB = 0x106 ; Event Based Branch Registers
NT_PPC_PMU = 0x107 ; Performance Monitor Registers
NT_PPC_TM_CGPR = 0x108 ; TM checkpointed GPR Registers
NT_PPC_TM_CFPR = 0x109 ; TM checkpointed FPR Registers
NT_PPC_TM_CVMX = 0x10a ; TM checkpointed VMX Registers
NT_PPC_TM_CVSX = 0x10b ; TM checkpointed VSX Registers
NT_PPC_TM_SPR = 0x10c ; TM Special Purpose Registers
NT_PPC_TM_CTAR = 0x10d ; TM checkpointed Target Address Register
NT_PPC_TM_CPPR = 0x10e ; TM checkpointed Program Priority Register
NT_PPC_TM_CDSCR = 0x10f ; TM checkpointed Data Stream Control Register
NT_PPC_PKEY = 0x110 ; Memory Protection Keys registers
NT_386_TLS = 0x200 ; i386 TLS slots (struct user_desc)
NT_386_IOPERM = 0x201 ; x86 io permission bitmap (1=deny)
NT_X86_XSTATE = 0x202 ; x86 extended state using xsave
NT_S390_HIGH_GPRS = 0x300 ; s390 upper register halves
NT_S390_TIMER = 0x301 ; s390 timer register
NT_S390_TODCMP = 0x302 ; s390 TOD clock comparator register
NT_S390_TODPREG = 0x303 ; s390 TOD programmable register
NT_S390_CTRS = 0x304 ; s390 control registers
NT_S390_PREFIX = 0x305 ; s390 prefix register
NT_S390_LAST_BREAK = 0x306 ; s390 breaking event address
NT_S390_SYSTEM_CALL = 0x307 ; s390 system call restart data
NT_S390_TDB = 0x308 ; s390 transaction diagnostic block
NT_S390_VXRS_LOW = 0x309 ; s390 vector registers 0-15 upper half
NT_S390_VXRS_HIGH = 0x30a ; s390 vector registers 16-31
NT_S390_GS_CB = 0x30b ; s390 guarded storage registers
NT_S390_GS_BC = 0x30c ; s390 guarded storage broadcast control block
NT_S390_RI_CB = 0x30d ; s390 runtime instrumentation
NT_ARM_VFP = 0x400 ; ARM VFP/NEON registers
NT_ARM_TLS = 0x401 ; ARM TLS register
NT_ARM_HW_BREAK = 0x402 ; ARM hardware breakpoint registers
NT_ARM_HW_WATCH = 0x403 ; ARM hardware watchpoint registers
NT_ARM_SYSTEM_CALL = 0x404 ; ARM system call number
NT_ARM_SVE = 0x405 ; ARM Scalable Vector Extension registers
NT_ARM_PAC_MASK = 0x406 ; ARM pointer authentication code masks
NT_VMCOREDD = 0x700 ; Vmcore Device Dump Note
NT_MIPS_DSP = 0x800 ; MIPS DSP ASE registers
NT_MIPS_FP_MODE = 0x801 ; MIPS floating-point mode
NT_MIPS_MSA = 0x802 ; MIPS SIMD registers
NT_VERSION = 1 ; Contains a version string
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
STB_LOCAL = 0 ; Local symbol
STB_GLOBAL = 1 ; Global symbol
STB_WEAK = 2 ; Weak symbol
STB_NUM = 3 ; Number of defined types
STB_LOOS = 10 ; Start of OS-specific
STB_GNU_UNIQUE = 10 ; Unique symbol
STB_HIOS = 12 ; End of OS-specific
STB_LOPROC = 13 ; Start of processor-specific
STB_HIPROC = 15 ; End of processor-specific
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
STT_NOTYPE = 0 ; Symbol type is unspecified
STT_OBJECT = 1 ; Symbol is a data object
STT_FUNC = 2 ; Symbol is a code object
STT_SECTION = 3 ; Symbol associated with a section
STT_FILE = 4 ; Symbol's name is file name
STT_COMMON = 5 ; Symbol is a common data object
STT_TLS = 6 ; Symbol is thread-local data object
STT_NUM = 7 ; Number of defined types.
STT_LOOS = 10 ; Start of OS-specific
STT_GNU_IFUNC = 10 ; Symbol is indirect code object
STT_HIOS = 12 ; End of OS-specific
STT_LOPROC = 13 ; Start of processor-specific
STT_HIPROC = 15 ; End of processor-specific
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;define ELF32_ST_VISIBILITY(o) ((o) & 0x03) ;
;define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
STV_DEFAULT = 0 ; Default symbol visibility rules
STV_INTERNAL = 1 ; Processor specific hidden class
STV_HIDDEN = 2 ; Sym unavailable in other modules
STV_PROTECTED = 3 ; Not preemptible, not exported
STV_EXPORTED = 4 ; Ensures that a symbol remains global
STV_SINGLETON = 5 ; Symbol remains Global + Symbol Definition is Bound to by all References within a Process
STV_ELIMINATE = 6 ; Visibility attribute extends STV_HIDDEN + Not Written to any SYM Table of a Dynamic EXEC
;
PN_XNUM = 0xffff ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;define ELF32_R_SYM(val) ((val) >> ;
;define ELF32_R_TYPE(val) ((val) & 0xff) ;
;define ELF32_R_INFO(sym, type) (((sym) << + ((type) & 0xff)) ;
;
;define ELF64_R_SYM(i) ((i) >> 32) ;
;define ELF64_R_TYPE(i) ((i) & 0xffffffff) ;
;define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R_386_32 = 1 ;
R_X86_64_NONE = 0 ; No reloc
R_X86_64_64 = 1 ; Direct 64 bit #<<-- (DIRECT=64+Large code model)-(.rel.data)------******(L)**
R_X86_64_PC32 = 2 ; PC relative 32 bit signed <<-- (REL=32)-()-*
R_X86_64_GOT32 = 3 ; 32 bit GOT entry = -(.o)- <<-- (32)------------------------(GCC)-*
R_X86_64_PLT32 = 4 ; 32 bit PLT address = -(.o)- <<-- (32)------------------------(GCC)-*
R_X86_64_COPY = 5 ; Copy symbol at runtime <<-- (COPY)----------------------(.rel.bss)
R_X86_64_GLOB_DAT = 6 ; Create GOT entry #<<-- (GLOB-DAT)-JMPREL-----------(.rel.got)
R_X86_64_JUMP_SLOT = 7 ; Create PLT entry #<<-- (JUMP-SLOT)-JMPREL----------(.rel.plt)
R_X86_64_RELATIVE = 8 ; Adjust by program base #<<-- (RELATIVE)-()
R_X86_64_GOTPCREL = 9 ; 32 bit signed PC relative offset to GOT <<-- (32)-(PIC)-------------------------------------******(PIC)**
R_X86_64_32 = 10 ; Direct 32 bit zero extended <<-- (ZERO=32)-------------------(.rel.data)
R_X86_64_32S = 11 ; Direct 32 bit sign extended <<-- (SIGN=32)-------------------(.rel.data)
R_X86_64_16 = 12 ; Direct 16 bit zero extended <<-- (DIRECT=16)-()
R_X86_64_PC16 = 13 ; 16 bit sign extended pc relative <<-- (SE=16)-()
R_X86_64_8 = 14 ; Direct 8 bit sign extended <<-- (DIRECT=-()
R_X86_64_PC8 = 15 ; 8 bit sign extended pc relative <<-- (SE-PCREL=-()
R_X86_64_DTPMOD64 = 16 ; ID of module containing symbol <<-- (tells the dynamic linker to find out the module ID (l_tls_modid)--** NEW
R_X86_64_DTPOFF64 = 17 ; Offset in module's TLS block <<-- (?)
R_X86_64_TPOFF64 = 18 ; Offset in initial TLS block <<-- (TLS & Large code model)-----------------------******(L-TLS)**
R_X86_64_TLSGD = 19 ; 32 bit signed PC relative offset to two GOT entries for - (GD symbol) <<-- (S-PCREL=32)-(TLS & PIC)-----------------------******(TLS-PIC)**
R_X86_64_TLSLD = 20 ; 32 bit signed PC relative offset to two GOT entries for - (LD symbol) <<-- (S-PCREL=32)-()
R_X86_64_DTPOFF32 = 21 ; Offset in TLS block <<-- ()
R_X86_64_GOTTPOFF = 22 ; 32 bit signed PC relative offset to GOT entry for - (IE symbol) <<-- (S-PCREL=32)-()
R_X86_64_TPOFF32 = 23 ; Offset in initial TLS block <<-- ()
R_X86_64_PC64 = 24 ; PC relative 64 bit #<<-- (PCREL=64)-(Large code model)------------------******(L)**
R_X86_64_GOTOFF64 = 25 ; 64 bit offset to GOT = -(.o)- <<--*(GOTOFF64)-(PIC & Large code model)------------******(L-PIC)**
R_X86_64_GOTPC32 = 26 ; 32 bit signed pc relative offset to GOT = -(.o)- <<-- (S-PCREL=32)-()
R_X86_64_GOT64 = 27 ; 64-bit GOT entry offset = -(.o)- <<-- (*PIC & Large code model*)---------------------******(L-PIC)**
R_X86_64_GOTPCREL64 = 28 ; 64-bit PC relative offset to GOT entry <<-- (PIC & Large code model)-----------------------******(L-PIC)**
R_X86_64_GOTPC64 = 29 ; 64-bit PC relative offset to GOT <<-- (PIC & Large code model)-----------------------******(L-PIC)**
R_X86_64_GOTPLT64 = 30 ; like GOT64, says PLT entry needed <<-- (PIC & Large code model)-----------------------******(L-PIC)**
R_X86_64_PLTOFF64 = 31 ; 64-bit GOT relative offset to PLT entry <<--*(PLTOFF64)-(PIC & Large code model)------------******(L-PIC)**
R_X86_64_SIZE32 = 32 ; Size of symbol plus 32-bit addend <<-- ()
R_X86_64_SIZE64 = 33 ; Size of symbol plus 64-bit addend <<-- ()
R_X86_64_GOTPC32_TLSDESC = 34 ; GOT offset for TLS descriptor <<-- ()
R_X86_64_TLSDESC_CALL = 35 ; Marker for call through TLS descriptor <<-- ()
R_X86_64_TLSDESC = 36 ; TLS descriptor <<-- ()
R_X86_64_IRELATIVE = 37 ; Adjust indirectly by program base <<-- ()
R_X86_64_RELATIVE64 = 38 ; 64-bit adjust by program base <<-- (RELATIVE64)-----------------(.rel.data)-*
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
read=4 ;
write=2 ;
execute=1 ;
xo=1 ;
wo=2 ;
wx=3 ;
ro=4 ;
rx=5 ;
;rw=6 ; (!)
rwx=7 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; None = 0 ; All access denied All access denied
; PF_X = 1 ; Execute only Read, execute
; PF_W = 2 ; Write only Read, write, execute
; PF_W + PF_X = 3 ; Write, execute Read, write, execute
; PF_R = 4 ; Read only Read, execute
; PF_R + PF_X = 5 ; Read, execute Read, execute
; PF_R + PF_W = 6 ; Read, write Read, write, execute
; PF_R + PF_W + PF_X = 7 ; Read, write, execute Read, write, execute
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PF_X equ 1 << 0 ; Segment is executable
PF_W equ 1 << 1 ; Segment is writable
PF_R equ 1 << 2 ; Segment is readable
PF_MASKOS = 0x0ff00000 ; OS-specific
PF_MASKPROC = 0xf0000000 ; Processor-specific
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PT_NULL = 0 ; Program header table entry unused
PT_LOAD = 1 ; Loadable program segment
PT_DYNAMIC = 2 ; Dynamic linking information
PT_INTERP = 3 ; Program interpreter
PT_NOTE = 4 ; Auxiliary information
PT_SHLIB = 5 ; Reserved
PT_PHDR = 6 ; Entry for header table itself
PT_TLS = 7 ; Thread-local storage segment
PT_NUM = 8 ; Number of defined types
PT_LOOS = 0x60000000 ; Start of OS-specific
PT_GNU_EH_FRAME = 0x6474e550 ; GCC .eh_frame_hdr segment
PT_GNU_STACK = 0x6474e551 ; Indicates stack executability
PT_GNU_RELRO = 0x6474e552 ; Read-only after relocation
PT_LOSUNW = 0x6ffffffa ;
PT_SUNWBSS = 0x6ffffffa ; Sun Specific segment
PT_SUNWSTACK = 0x6ffffffb ; Stack segment
PT_HISUNW = 0x6fffffff ;
PT_HIOS = 0x6fffffff ; End of OS-specific
PT_LOPROC = 0x70000000 ; Start of processor-specific
PT_HIPROC = 0x7fffffff ; End of processor-specific
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SYS_WRITE = 1 ;
SYS_EXIT = 60 ;
SYS_READ = 0 ;
SYS_OPEN = 2 ;
SYS_MPROTECT = 10 ;
SYS_EXIT_GROUP = 231 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
STD_INPUT = 0 ;
STD_OUTPUT = 1 ;
STD_OUTPUT = 1 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
END_OF_RELOCATIONS = -1 ;
PAGE_ALIGNMENT = not 0xfff ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O_ACCMODE = 00000003o ; = (This macro is a mask that can be bitwise-ANDed with the file status flag value to recover the file access mode)
O_RDONLY = 00000000o ; = (Open the file for read access)
O_WRONLY = 00000001o ; = (Open the file for write access)
O_RDWR = 00000002o ; = (Open the file for both reading and writing)
O_CREAT = 00000100o ; = (If pathname does not exist, create it as a regular file)
O_EXCL = 00000200o ; = (Ensure that this call creates the file: if this flag is specified in conj with O_CREAT, and pathname already exists)
O_NOCTTY = 00000400o ; = (If pathname refers to a TERM device it will not become the PROC controlling TERM even if the PROC does not have one)
O_TRUNC = 00001000o ; = (If the file already exists and is a regular file and the access mode allows writing = O_RDWR or O_WRONLY)
O_APPEND = 00002000o ; = (file is opened in append mode)
O_NONBLOCK = 00004000o ; = (file is opened in nonblocking mode = SAME ?)
O_NDELAY = O_NONBLOCK ; = (file is opened in nonblocking mode = SAME ?)
O_SYNC = 04010000o ; = (Write operations on the file will complete according to the requirements of synchronized I/O file integrity completion)
O_FSYNC = O_SYNC ; = (Linux uses O_SYNC and O_DSYNC + O_RSYNC = All related)
O_ASYNC = 00020000o ; = (Enable signal-driven I/O: generate a signal SIGIO by default = terminals/pseudoterminals/sockets/pipes/FIFOs)
O_DIRECTORY = 00200000o ; = (If pathname is not a directory, cause the open to fail)
O_NOFOLLOW = 00400000o ; = (If the trailing component (i.e. - basename) of pathname is a symbolic link, then the open fails)
O_CLOEXEC = 02000000o ; = (Close on Execution)
O_DIRECT = 00040000o ; = (O_DIRECT flag on its own makes an effort to transfer data synchronously = guarantee synchronous I/O, O_SYNC must be used)
O_NOATIME = 01000000o ; = (Dont update file last access time (st_atime/inode) when the file is read + Effective UID of PROC matches the owner UID)
O_PATH = 10000000o ; = (Obtain a FD for the file, but dont open the file for READ/WRITE.PERM CHECKS for file itself are skipped when the file opened)
O_DSYNC = 00010000o ; = (Write operations on the file will complete according to the requirements of synchronized I/O data integrity completion)
O_RSYNC = O_SYNC ; = ((Linux uses O_SYNC and O_DSYNC + O_RSYNC = All related)
O_LARGEFILE = 00100000o ; = (LFS = Allow files whose sizes cannot be represented in an off_t (but can be represented in an off64_t) to be opened)
O_TMPFILE = 4259840 ; = (Create an unnamed temp regular file. The pathname arg spec a dir; An unnamed inode will be created in that dir FS)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IPC_CREAT = 00001000o ; Create key if key does not exist = Mode bits for `msgget', `semget', and `shmget' - (0x200)
IPC_EXCL = 00002000o ; Fail if key exists = Mode bits for `msgget', `semget', and `shmget' - (0x400)
IPC_NOWAIT = 00004000o ; Return error on wait = Mode bits for `msgget', `semget', and `shmget' - (0x1000)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IPC_RMID = 0 ; Remove identifier = Control commands for `msgctl', `semctl', and `shmctl'
IPC_SET = 1 ; Set `ipc_perm' options = Control commands for `msgctl', `semctl', and `shmctl'
IPC_STAT = 2 ; Get `ipc_perm' options = Control commands for `msgctl', `semctl', and `shmctl'
IPC_INFO = 3 ; See ipcs = Control commands for `msgctl', `semctl', and `shmctl'
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IPC_PRIVATE = 0 ; Private key = Special key values + IPC_NEW - (CHECK!)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IPC_CREAT = 00001000o ; create if key is nonexistent
IPC_EXCL = 00002000o ; fail if key exists
IPC_NOWAIT = 00004000o ; return error on wait
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SHM_R = 0400 ; or S_IRUGO from <linux/stat.h>
SHM_W = 0200 ; or S_IWUGO from <linux/stat.h>
SHM_RDONLY = 010000 ; read-only access
SHM_RND = 020000 ; round attach address to SHMLBA boundary
SHM_REMAP = 040000 ; take-over region on attach
SHM_EXEC = 0100000 ; execution access
SHM_LOCK = 11 ; super user shmctl commands
SHM_UNLOCK = 12 ; super user shmctl commands
SHM_STAT = 13 ; ipcs ctl commands
SHM_INFO = 14 ; ipcs ctl commands
SHMMAX = 0x2000000 ; max shared seg size (bytes)
SHMMIN = 1 ; min shared seg size (bytes)
SHMMNI = 4096 ; max num of segs system wide
SHMSEG = SHMMNI ; max shared segs per process
SHM_DEST = 01000 ; segment will be destroyed on last detach = shm_mode upper byte flags
SHM_LOCKED = 02000 ; segment will not be swapped = shm_mode upper byte flags
SHM_HUGETLB = 04000 ; segment is mapped via hugetlb = shm_mode upper byte flags
SHM_NORESERVE = 010000 ; don't check for reservations = shm_mode upper byte flags
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
S_ISUID = 4000o ; This is equivalent to ‘(S_IROTH | S_IWOTH | S_IXOTH)’
S_ISGID = 2000o ; This is the set-group-ID on execute bit, usually 02000. See How an Application Can Change Persona
S_ISVTX = 1000o ; This is the sticky bit, usually 01000 - *!*
S_IRUSR = 0400o ; Read permission bit for the owner of the file. On many systems this bit is 0400
S_IWUSR = 0200o ; Write permission bit for the owner of the file. Usually 0200
S_IXUSR = 0100o ; Execute (for ordinary files) or search (for directories) permission bit for the owner of the file. Usually 0100
S_IRGRP = 0040o ; Read permission bit for the group owner of the file. Usually 040
S_IWGRP = 0020o ; Write permission bit for the group owner of the file. Usually 020
S_IXGRP = 0010o ; Execute or search permission bit for the group owner of the file. Usually 010
S_IROTH = 0004o ; Read permission bit for other users. Usually 04
S_IWOTH = 0002o ; Write permission bit for other users. Usually 02
S_IXOTH = 0001o ; Execute or search permission bit for other users. Usually 01
S_IREAD = 00400o ; Read permission bit for the owner of the file. On many systems this bit is 0400
S_IWRITE = 00200o ; Write permission bit for the owner of the file. Usually 0200
S_IEXEC = 00100o ; Execute (for ordinary files) or search (for directories) permission bit for the owner of the file. Usually 0100
S_IRWXU = 00700o ; This is equivalent to ‘(S_IRUSR | S_IWUSR | S_IXUSR)’ = user (file owner) has read, write and execute permission
S_IRWXG = 00070o ; This is equivalent to ‘(S_IRGRP | S_IWGRP | S_IXGRP)’ = group has read, write and execute permission
S_IRWXO = 00007o ; This is equivalent to ‘(S_IROTH | S_IWOTH | S_IXOTH)’ = others have read, write and execute permission
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
S_IFMT = 61440 ; bit mask for the file type bit fields = (File Types)
S_IFSOCK = 49152 ; socket = (File Types)
S_IFLNK = 40960 ; symbolic link = (File Types)
S_IFREG = 32768 ; regular file = (File Types)
S_IFBLK = 24576 ; block device = (File Types)
S_IFDIR = 16384 ; directory = (File Types)
S_IFCHR = 8192 ; character device = (File Types)
S_IFIFO = 4096 ; FIFO = (File Types)
S_ISUID = 2048 ; set UID bit = (File Types)
S_ISGID = 1024 ; set-group-ID bit = (File Types)
S_ISVTX = 512 ; sticky bit = (File Types)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TCGETS = 5401h ; termios instruction to read flags = Possible I/O devices for the console = IOCTL values
TCSETS = 5402h ; termios instruction to write flags = Possible I/O devices for the console = IOCTL values
TIOCGWINSZ = 5413h ; winsize = Possible I/O devices for the console = IOCTL values
ICANON = 2 ; Terminos
ECHO = 8 ; Terminos
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CLOCK_REALTIME = 0 ; (NASM-TIME.INC)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
P_ALL = 0 ; Wait for any child
P_PID = 1 ; Wait for specified process.
P_PGID = 2 ; Wait for members of process group.
WNOHANG = 1 ; Don't block waiting.
WUNTRACED = 2 ; Report status of stopped children.
WSTOPPED = 2 ; Report stopped child (same as WUNTRACED) = Bits in the fourth argument to `waitid'
WEXITED = 4 ; Report dead child = Bits in the fourth argument to `waitid'
WCONTINUED = 8 ; Report continued child = Bits in the fourth argument to `waitid'
WNOWAIT = 0x01000000 ; Don't reap, just poll status = Bits in the fourth argument to `waitid'
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__WNOTHREAD = 0x20000000 ; Don't wait on children of other threads in this group = Bits in the fourth argument to `waitid'
__WALL = 0x40000000 ; Wait for any child = Bits in the fourth argument to `waitid'
__WCLONE = 0x80000000 ; Wait for cloned process = Bits in the fourth argument to `waitid'
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
W_CONTINUED = 0xffff ;
WCOREFLAG = 0x80 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SHM_TS_NP = 00100000o ; If creating a new shared memory segment, make the shared memory segment a teraspace shared memory segment
SHM_RESIZE_NP = 00040000o ; Teraspace shared memory segment, allow the size of the shared memory segment to be changed with the shmctl + shmctl64
SHM_MAP_FIXED_NP = 00100000o ; Teraspace shared memory segment, make all jobs that success attach to the (SM) segment attach to the (SM) at the same address
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R_OK = 4 ; Test for read permission.
W_OK = 2 ; Test for write permission.
X_OK = 1 ; Test for execute permission.
F_OK = 0 ; Test for existence.
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SEEK_SET = 0 ; Seek from beginning of file.
SEEK_CUR = 1 ; Seek from current position.
SEEK_END = 2 ; Seek from end of file
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F_ULOCK = 0 ; Unlock a previously locked region
F_LOCK = 1 ; Lock a region for exclusive use
F_TLOCK = 2 ; Test and lock a region for exclusive use
F_TEST = 3 ; Test a region for other processes locks
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F_DUPFD = 0 ; dup
F_GETFD = 1 ; get close_on_exec
F_SETFD = 2 ; set/clear close_on_exec
F_GETFL = 3 ; get file->f_flags
F_SETFL = 4 ; set file->f_flags
F_GETLK = 5 ;
F_SETLK = 6 ;
F_SETLKW = 7 ;
F_SETOWN = 8 ; for sockets
F_GETOWN = 9 ; for sockets
F_SETSIG = 10 ; for sockets
F_GETSIG = 11 ; for sockets
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F_GETLK64 = 12 ; using 'struct flock64'
F_SETLK64 = 13 ;
F_SETLKW64 = 14 ;
F_SETOWN_EX = 15 ;
F_GETOWN_EX = 16 ;
F_GETOWNER_UIDS = 17 ;
F_OWNER_TID = 0 ;
F_OWNER_PID = 1 ;
F_OWNER_PGRP = 2 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FD_CLOEXEC = 1 ; actually anything with low bit set goes = for F_[GET|SET]FL
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F_RDLCK = 0 ; for posix fcntl() and lockf()
F_WRLCK = 1 ; for posix fcntl() and lockf()
F_UNLCK = 2 ; for posix fcntl() and lockf()
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F_EXLCK = 4 ; or 3 + for old implementation of bsd flock ()
F_SHLCK = 8 ; or 4 ; for old implementation of bsd flock ()
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOCK_SH = 1 ; shared lock + operations for bsd flock()
LOCK_EX = 2 ; exclusive lock + operations for bsd flock()
LOCK_NB = 4 ; or'd with one of the above to prevent blocking + operations for bsd flock()
LOCK_UN = 8 ; remove lock + operations for bsd flock()
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOCK_MAND = 32 ; This is a mandatory flock ...
LOCK_READ = 64 ; which allows concurrent read operations
LOCK_WRITE = 128 ; which allows concurrent write operations
LOCK_RW = 192 ; which allows concurrent read & write ops
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MFD_ALLOW_SEALING = 2 ; Allow Sealing
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F_SEAL_SEAL = 1 ; prevent further seals from being set
F_SEAL_SHRINK = 2 ; prevent file from shrinking
F_SEAL_GROW = 4 ; prevent file from growing
F_SEAL_WRITE = 8 ; prevent writes
F_SEAL_FUTURE_WRITE = 16 ; prevent future writes
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DN_ACCESS = 0x00000001 ; File accessed
DN_MODIFY = 0x00000002 ; File modified
DN_CREATE = 0x00000004 ; File created
DN_DELETE = 0x00000008 ; File removed
DN_RENAME = 0x00000010 ; File renamed
DN_ATTRIB = 0x00000020 ; File changed attibutes
DN_MULTISHOT = 0x80000000 ; Don't remove notifier
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AT_NULL = 0 ; End of vector
AT_IGNORE = 1 ; Entry should be ignored
AT_EXECFD = 2 ; File descriptor of program
AT_PHDR = 3 ; Program headers for program
AT_PHENT = 4 ; Size of program header entry
AT_PHNUM = 5 ; Number of program headers
AT_PAGESZ = 6 ; System page size
AT_BASE = 7 ; Base address of interpreter
AT_FLAGS = 8 ; Flags
AT_ENTRY = 9 ; Entry point of program
AT_NOTELF = 10 ; Program is not ELF
AT_UID = 11 ; Real uid
AT_EUID = 12 ; Effective uid
AT_GID = 13 ; Real gid
AT_EGID = 14 ; Effective gid
AT_CLKTCK = 17 ; Frequency of times()
AT_PLATFORM = 15 ; String identifying platform
AT_HWCAP = 16 ; Machine-dependent hints about processor capabilities
AT_FPUCW = 18 ; Used FPU control word
AT_DCACHEBSIZE = 19 ; Data cache block size
AT_ICACHEBSIZE = 20 ; Instruction cache block size
AT_UCACHEBSIZE = 21 ; Unified cache block size
AT_IGNOREPPC = 22 ; Entry should be ignored
AT_SECURE = 23 ; Boolean, was exec setuid-like?
AT_BASE_PLATFORM = 24 ; String identifying real platforms
AT_RANDOM = 25 ; Address of 16 random bytes
AT_HWCAP2 = 26 ; More machine-dependent hints about processor capabilities
AT_EXECFN = 31 ; Filename of executable
AT_SYSINFO = 32 ;
AT_SYSINFO_EHDR = 33 ;
AT_L1I_CACHESHAPE = 34 ;
AT_L1D_CACHESHAPE = 35 ;
AT_L2_CACHESHAPE = 36 ;
AT_L3_CACHESHAPE = 37 ;
AT_L1I_CACHESIZE = 40 ;
AT_L1I_CACHEGEOMETRY = 41 ;
AT_L1D_CACHESIZE = 42 ;
AT_L1D_CACHEGEOMETRY = 43 ;
AT_L2_CACHESIZE = 44 ;
AT_L2_CACHEGEOMETRY = 45 ;
AT_L3_CACHESIZE = 46 ;
AT_L3_CACHEGEOMETRY = 47 ;
AT_MINSIGSTKSZ = 51 ; Stack needed for signal delivery - AArch64)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EPOLL_CLOEXEC = 0x02000000 ;
EPOLLIN = 0x001 ; EPOLL events
EPOLLPRI = 0x002 ; EPOLL events
EPOLLOUT = 0x004 ; EPOLL events
EPOLLRDNORM = 0x040 ; EPOLL events
EPOLLRDBAND = 0x080 ; EPOLL events
EPOLLWRNORM = 0x100 ; EPOLL events
EPOLLWRBAND = 0x200 ; EPOLL events
EPOLLMSG = 0x400 ; EPOLL events
EPOLLERR = 0x008 ; EPOLL events
EPOLLHUP = 0x010 ; EPOLL events
EPOLLRDHUP = 0x2000 ; EPOLL events
EPOLLWAKEUP = 0x20000000 ; 1u << 29 = EPOLL events
EPOLLONESHOT = 0x40000000 ; 1u << 30 = EPOLL events
EPOLLET = 0x800000000 ; 1u << 31 = EPOLL events
EPOLL_CTL_ADD = 1 ; Add a file descriptor to the interface = Valid opcodes ( "op" parameter ) to issue to epoll_ctl()
EPOLL_CTL_DEL = 2 ; Remove a file descriptor from the interface = Valid opcodes ( "op" parameter ) to issue to epoll_ctl()
EPOLL_CTL_MOD = 3 ; Change file descriptor epoll_event structure = Valid opcodes ( "op" parameter ) to issue to epoll_ctl()
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DT_UNKNOWN = 0 ; file type unknown
DT_FIFO = 1 ; named pipe
DT_CHR = 2 ; character device
DT_DIR = 4 ; directory
DT_BLK = 6 ; block device
DT_REG = 8 ; regular file
DT_LNK = 10 ; symbolic link
DT_SOCK = 12 ; UNIX domain socket
DT_WHT = 14 ; entry without file type ; undocumented
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PAGE_SHIFT = 12 ; (PAGE.INC - NASM)
;PAGE_SIZE = (1 << PAGE_SHIFT) ; (PAGE.INC - NASM) - (Invalid Size)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MAP_SHARED = $01 ;
MAP_PRIVATE = $02 ;
MAP_TYPE = $0F ;
MAP_FIXED = $10 ;
MAP_ANONYMOUS = $20 ;
MAP_ANON = MAP_ANONYMOUS ;
MAP_FILE = 0 ;
MAP_HUGE_SHIFT = 26 ;
MAP_HUGE_MASK = $3F ;
MAP_32BIT = $40 ;
MAP_GROWSUP = $00200 ;
MAP_GROWSDOWN = $00100 ;
MAP_DENYWRITE = $00800 ;
MAP_EXECUTABLE = $01000 ;
MAP_LOCKED = $02000 ;
MAP_NORESERVE = $04000 ;
MAP_POPULATE = $08000 ;
MAP_NONBLOCK = $10000 ;
MAP_STACK = $20000 ;
MAP_HUGETLB = $40000 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MS_ASYNC = 1 ;
MS_SYNC = 4 ;
MS_INVALIDATE = 2 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MCL_CURRENT = 1 ;
MCL_FUTURE = 2 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MREMAP_MAYMOVE = 1 ;
MREMAP_FIXED = 2 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MADV_NORMAL = 0 ;
MADV_RANDOM = 1 ;
MADV_SEQUENTIAL = 2 ;
MADV_WILLNEED = 3 ;
MADV_DONTNEED = 4 ;
MADV_REMOVE = 9 ;
MADV_DONTFORK = 10 ;
MADV_DOFORK = 11 ;
MADV_MERGEABLE = 12 ;
MADV_UNMERGEABLE = 13 ;
MADV_HUGEPAGE = 14 ;
MADV_NOHUGEPAGE = 15 ;
MADV_HWPOISON = 100 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SEEK_6 = $0B ;
SEEK_10 = $2B ;
SEEK_SET = 0 ;
SEEK_CUR = 1 ;
SEEK_END = 2 ;
SEEK_DATA = 3 ;
SEEK_HOLE = 4 ;
SEEK_MAX = SEEK_HOLE ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CSIGNAL = $000000FF ;
CLONE_VM = $00000100 ;
CLONE_FS = $00000200 ;
CLONE_FILES = $00000400 ;
CLONE_SIGHAND = $00000800 ;
CLONE_PTRACE = $00002000 ;
CLONE_VFORK = $00004000 ;
CLONE_PARENT = $00008000 ;
CLONE_THREAD = $00010000 ;
CLONE_NEWNS = $00020000 ;
CLONE_SYSVSEM = $00040000 ;
CLONE_SETTLS = $00080000 ;
CLONE_PARENT_SETTID = $00100000 ;
CLONE_CHILD_CLEARTID = $00200000 ;
CLONE_DETACHED = $00400000 ;
CLONE_UNTRACED = $00800000 ;
CLONE_CHILD_SETTID = $01000000 ;
CLONE_NEWUTS = $04000000 ;
CLONE_NEWIPC = $08000000 ;
CLONE_NEWUSER = $10000000 ;
CLONE_NEWPID = $20000000 ;
CLONE_NEWNET = $40000000 ;
CLONE_IO = $80000000 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SEM_UNDO = 0x1000 ; undo the operation on exit = Get system dependent definition of `struct semid_ds' and more
GETPID = 11 ; get sempid = Commands for `semctl'
GETVAL = 12 ; get semval = Commands for `semctl'
GETALL = 13 ; get all semval's = Commands for `semctl'
GETNCNT = 14 ; get semncnt = Commands for `semctl'
GETZCNT = 15 ; get semzcnt = Commands for `semctl'
SETVAL = 16 ; set semval = Commands for `semctl'
SETALL = 17 ; set all semval's = Commands for `semctl'
SEM_STAT = 18 ; ipcs ctl cmds
SEM_INFO = 19 ; ipcs ctl cmds
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SIGHUP = 1 ; Hangup = (*Linux x64 signals*)
SIGINT = 2 ; User interrupt requested from terminal, e.g. when Ctrl-C is pressed = (*Linux x64 signals*)
SIGQUIT = 3 ; Quit, e.g. when Ctrl-\ is pressed = (*Linux x64 signals*)
SIGILL = 4 ; Illegal instruction = (*Linux x64 signals*)
SIGTRAP = 5 ; Trace trap (used by debugger) = (*Linux x64 signals*)
SIGABRT = 6 ; abort = (*Linux x64 signals*)
SIGBUS = 7 ; Bus error = (*Linux x64 signals*)
SIGFPE = 8 ; Floating-point arithmetic exception = (*Linux x64 signals*)
SIGKILL = 9 ; Kill (Cannot be caught or ignored) = (*Linux x64 signals*)
SIGUSR1 = 10 ; User-defined signal 1 = (*Linux x64 signals*)
SIGSEGV = 11 ; Segmentation violation = (*Linux x64 signals*)
SIGUSR2 = 12 ; User-defined signal 2 = (*Linux x64 signals*)
SIGPIPE = 13 ; Broken pipe (attempt to write to a pipe without a process connected to the other end) = (*Linux x64 signals*)
SIGALRM = 14 ; Timer set by alarm or setitimer function expired = (*Linux x64 signals*)
SIGTERM = 15 ; Software termination signal from kill = (*Linux x64 signals*)
SIGSTKFLT = 16 ; x86 FPU stack fault = (*Linux x64 signals*)
SIGCHLD = 17 ; Child process status has changed = (*Linux x64 signals*)
SIGCONT = 18 ; The stopped process is continued = (*Linux x64 signals*)
SIGSTOP = 19 ; Stop (Cannot be caught or ignored) = (*Linux x64 signals*)
SIGTSTP = 20 ; User stop requested from terminal, e.g. when Ctrl-Z is pressed = (*Linux x64 signals*)
SIGTTIN = 21 ; Terminal read attempted when the process is in the background = (*Linux x64 signals*)
SIGTTOU = 22 ; Terminal write attempted when the process is in the background = (*Linux x64 signals*)
SIGURG = 23 ; Urgent condition on socket, e.g. out-of-band data is received on a network connection = (*Linux x64 signals*)
SIGXCPU = 24 ; CPU limit exceeded = (*Linux x64 signals*)
SIGXFSZ = 25 ; File size limit exceeded = (*Linux x64 signals*)
SIGVTALRM = 26 ; Virtual interval timer set by the setitimer function expired = (*Linux x64 signals*)
SIGPROF = 27 ; Profiling interval timer set by the setitimer function expired = (*Linux x64 signals*)
SIGWINCH = 28 ; Terminal window size change = (*Linux x64 signals*)
SIGIO = 29 ; Pollable or async I/O event occurred = (*Linux x64 signals*)
SIGPWR = 30 ; Power failure restart = (*Linux x64 signals*)
SIGSYS = 31 ; Illegal system call = (*Linux x64 signals*)
SIGRTMIN = 32 ; (Application-Defined Purposes)
SIGRTMAX = 64 ; (Application-Defined Purposes)
SIGIOT = SIGABRT ;
SIGPOLL = SIGIO ;
SIGLOST = SIGIO ;
SIGIO = SIGPOLL ;
SIGINFO = SIGPWR ;
SIGUNUSED = SIGSYS ;
SIGCLD = SIGCHLD ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSIG = 64 ; Sigset constants
NSIG_BPW = 8 ; Sigset constants
NSIG_WORDS = NSIG ; Sigset constants - (*Option*)
NSIG_WORDS = NSIG_BPW ; Sigset constants - (*Option*)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SA_NOCLDSTOP = 0x00000001 ; SA_NOCLDSTOP flag to turn off SIGCHLD when children stop
SA_NOCLDWAIT = 0x00000002 ; SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies
SA_SIGINFO = 0x00000004 ; use sa_sigaction instead of sa_handler
SA_ONSTACK = 0x08000000 ; SA_ONSTACK indicates that a registered stack_t will be used
SA_RESTART = 0x10000000 ; SA_RESTART flag to get restarting signals (which were the default long ago)
SA_NODEFER = 0x40000000 ; SA_NODEFER prevents the current signal from being masked in the handler
SA_RESETHAND = 0x80000000 ; SA_RESETHAND clears the handler when the signal is delivered
SA_NOMASK = SA_NODEFER ;
SA_ONESHOT = SA_RESETHAND ; SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
SA_RESTORER = 0x04000000 ;
SS_ONSTACK = 1 ; sigaltstack controls
SS_DISABLE = 2 ; sigaltstack controls
MINSIGSTKSZ = 2048 ; sigaltstack controls
SIGSTKSZ = 8192 ; sigaltstack controls
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SYSCALL_EXIT = 1 ; syscall to function exit() - CHECK
SYSCALL_WRITE = 4 ; syscall to function write() - CHECK
SYSCALL_SIGACTION = 67 ; syscall to function sigaction() - CHECK
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TTY_BUF_SIZE = 1024 ;
NCC = 8 ;
NCCS = 17 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VINTR = 0 ; c_cc characters = (Generate a SIGINT - ^C by default)
VQUIT = 1 ; c_cc characters = (FS, Ctrl-\ = Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input)
VERASE = 2 ; c_cc characters = (Erase the previous character. This tends to be one of ^H and ^? (ASCII 0x7f) by default) - (OC)*
VKILL = 3 ; c_cc characters = (Ctrl-U/Ctrl-X/@) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input) - (OC)*
VEOF = 4 ; c_cc characters = (EOF. Sends the current line to the program without waiting for EOL or, as the first Char on the line, causes the next read call by the slave to return EOF - (^D default) - (OC)*
VTIME = 5 ; c_cc characters = (Timeout in deciseconds for noncanonical read TIME)
VMIN = 6 ; c_cc characters = (Minimum number of characters for noncanonical read MIN)
VSWTC = 7 ; c_cc characters = (VSWTCH ? | 0, NUL = Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control)
VSTART = 8 ; c_cc characters = (^S and ^Q by default, stop and start output)
VSTOP = 9 ; c_cc characters = (^S and ^Q by default, stop and start output)
VSUSP = 10 ; c_cc characters = (Generate a SIGTSTP (stop the program) - ^Z by default)
VEOL = 11 ; c_cc characters = (0, NUL = Additional end-of-line character (EOL). Recognized when ICANON is set) - (OC)*
VREPRINT = 12 ; c_cc characters = (DC2, Ctrl-R = Reprint unread char (REPRINT). Rec when ICANON and IEXTEN are set, and then not passed as input) - (lets you see the line you are typing clearly again.) - (OC)*
VDISCARD = 13 ; c_cc characters = (NOT Linux - Toggle: start/stop discard pending output. Recognized when IEXTEN is set, and then not passed as input)
VWERASE = 14 ; c_cc characters = (ETB, Ctrl-W = Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input) - (erases an entire word of prior input + WSPACE after it) - (OC)*
VLNEXT = 15 ; c_cc characters = (SYN, Ctrl-V = Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input)
VEOL2 = 16 ; c_cc characters = (0, NUL = Yet another end-of-line character (EOL2). Recognized when ICANON is set) - (*SAME AS VEOL BUT CAN BE DIFFERANT CHARACTER*)
;VDSUPD = ; c_cc characters = (Delayed suspend char (DSUSP): send SIGTSTP signal when the char is read by user prog. Recognised when IEXTEN and ISIG set, and the sys supp (JC), and then not passed as input)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IGNBRK = 0000001 ; c_iflag bits = (Ignore BREAK condition on input)
BRKINT = 0000002 ; c_iflag bits = (If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed + cause a SIGINT to be sent)
IGNPAR = 0000004 ; c_iflag bits = (Ignore framing errors and parity errors)
PARMRK = 0000010 ; c_iflag bits = (If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set)
INPCK = 0000020 ; c_iflag bits = (Enable input parity checking)
ISTRIP = 0000040 ; c_iflag bits = (Strip off eighth bit)
INLCR = 0000100 ; c_iflag bits = (Translate NL to CR on input)
IGNCR = 0000200 ; c_iflag bits = (Ignore carriage return on input)
ICRNL = 0000400 ; c_iflag bits = (Translate carriage return to newline on input - unless IGNCR is set)
IUCLC = 0001000 ; c_iflag bits = (Map uppercase characters to lowercase on input) -*CHECK*
IXON = 0002000 ; c_iflag bits = (Enables “flow control” mediated by ^S and ^Q With IXON, once ^S has been received by master pty, slave will not accept any output (writes hang) until ^Q is recieved by master pty)
IXANY = 0004000 ; c_iflag bits = (XSI = Typing any character will restart stopped output - The default is to allow just the START character to restart output)
IXOFF = 0010000 ; c_iflag bits = (Enable XON/XOFF flow control on input)
IMAXBEL = 0020000 ; c_iflag bits = (Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set)
IUTF8 = 0040000 ; c_iflag bits = (Tells termios that the input stream is utf-8 encoded, which permits the correct handling of backspace)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OPOST = 0000001 ; c_oflag bits = (Enable implementation-defined output processing)
OLCUC = 0000002 ; c_oflag bits = (lowercase characters to uppercase on output)
ONLCR = 0000004 ; c_oflag bits = (XSI = Map NL to CR-NL on output)
OCRNL = 0000010 ; c_oflag bits = (Map CR to NL on output)
ONOCR = 0000020 ; c_oflag bits = (Don't output CR at column 0)
ONLRET = 0000040 ; c_oflag bits = (Don't output CR)
OFILL = 0000100 ; c_oflag bits = (Send fill characters for a delay, rather than using a timed delay)
OFDEL = 0000200 ; c_oflag bits = (Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL ('\0'). (Not implemented on Linux)
NLDLY = 0000400 ; c_oflag bits = (Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE])
NL0 = 0000000 ; c_oflag bits = (*)
NL1 = 0000400 ; c_oflag bits = (*)
CRDLY = 0003000 ; c_oflag bits = (Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE])
;CR0 = 0000000 ; c_oflag bits = (*) - (^X^) - FASM ERROR
;CR1 = 0001000 ; c_oflag bits = (*) - (^X^) - FASM ERROR
;CR2 = 0002000 ; c_oflag bits = (*) - (^X^) - FASM ERROR
;CR3 = 0003000 ; c_oflag bits = (*) - (^X^) - FASM ERROR
TABDLY = 0014000 ; c_oflag bits = (Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns)
TAB0 = 0000000 ; c_oflag bits = (*)
TAB1 = 0004000 ; c_oflag bits = (*)
TAB2 = 0010000 ; c_oflag bits = (*)
TAB3 = 0014000 ; c_oflag bits = (*)
XTABS = 0014000 ; c_oflag bits = (*)
BSDLY = 0020000 ; c_oflag bits = (Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE])
BS0 = 0000000 ; c_oflag bits = (*)
BS1 = 0020000 ; c_oflag bits = (*)
VTDLY = 0040000 ; c_oflag bits = (Vertical tab delay mask. Values are VT0 or VT1)
VT0 = 0000000 ; c_oflag bits = (*)
VT1 = 0040000 ; c_oflag bits = (*)
FFDLY = 0040000 ; c_oflag bits = (Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE])
FF0 = 0000000 ; c_oflag bits = (*)
FF1 = 0040000 ; c_oflag bits = (*)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CBAUD = 0000017 ; c_cflag bit meaning = (Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE])
B0 = 0000000 ; c_cflag bit meaning = (hang up)
B50 = 0000001 ; c_cflag bit meaning = (*)
B75 = 0000002 ; c_cflag bit meaning = (*)
B110 = 0000003 ; c_cflag bit meaning = (*)
B134 = 0000004 ; c_cflag bit meaning = (*)
B150 = 0000005 ; c_cflag bit meaning = (*)
B200 = 0000006 ; c_cflag bit meaning = (*)
B300 = 0000007 ; c_cflag bit meaning = (*)
B600 = 0000010 ; c_cflag bit meaning = (*)
B1200 = 0000011 ; c_cflag bit meaning = (*)
B1800 = 0000012 ; c_cflag bit meaning = (*)
B2400 = 0000013 ; c_cflag bit meaning = (*)
B4800 = 0000014 ; c_cflag bit meaning = (*)
B9600 = 0000015 ; c_cflag bit meaning = (*)
B19200 = 0000016 ; c_cflag bit meaning = (*)
B38400 = 0000017 ; c_cflag bit meaning = (*)
EXTA = B19200 ; c_cflag bit meaning = (*termbits.h*) - !
EXTB = B38400 ; c_cflag bit meaning = (*termbits.h*) - !
CSIZE = 0000060 ; c_cflag bit meaning = (Character size mask. Values are CS5, CS6, CS7, or CS8)
CS5 = 0000000 ; c_cflag bit meaning = (*)
CS6 = 0000020 ; c_cflag bit meaning = (*)
CS7 = 0000040 ; c_cflag bit meaning = (*)
CS8 = 0000060 ; c_cflag bit meaning = (*)
CSTOPB = 0000100 ; c_cflag bit meaning = (Set two stop bits, rather than one)
CREAD = 0000200 ; c_cflag bit meaning = (Enable receiver)
PARENB = 0000400 ; c_cflag bit meaning = (*termbits.h*) - !
PARODD = 0001000 ; c_cflag bit meaning = (*termbits.h*) - !
CPARENB = 0000400 ; c_cflag bit meaning = (Enable parity generation on output and parity checking for input)
CPARODD = 0001000 ; c_cflag bit meaning = (If set, then parity for input and output is odd; otherwise even parity is used)
HUPCL = 0002000 ; c_cflag bit meaning = (Lower modem control lines after last process closes the device - hang up)
CLOCAL = 0004000 ; c_cflag bit meaning = (Ignore modem control lines)
CIBAUD = 03600000 ; c_cflag bit meaning = (input baud rate - not used)
CRTSCTS = 020000000000 ; c_cflag bit meaning = (flow control)
CBAUDEX = 0010000 ; c_cflag bit meaning = (*termbits.h*) - !
BOTHER = 0010000 ; c_cflag bit meaning = (*termbits.h*) - !
B57600 = 0010001 ; c_cflag bit meaning = (*termbits.h*) - !
B115200 = 0010002 ; c_cflag bit meaning = (*termbits.h*) - !
B230400 = 0010003 ; c_cflag bit meaning = (*termbits.h*) - !
B460800 = 0010004 ; c_cflag bit meaning = (*termbits.h*) - !
B500000 = 0010005 ; c_cflag bit meaning = (*termbits.h*) - !
B576000 = 0010006 ; c_cflag bit meaning = (*termbits.h*) - !
B921600 = 0010007 ; c_cflag bit meaning = (*termbits.h*) - !
B1000000 = 0010010 ; c_cflag bit meaning = (*termbits.h*) - !
B1152000 = 0010011 ; c_cflag bit meaning = (*termbits.h*) - !
B1500000 = 0010012 ; c_cflag bit meaning = (*termbits.h*) - !
B2000000 = 0010013 ; c_cflag bit meaning = (*termbits.h*) - !
B2500000 = 0010014 ; c_cflag bit meaning = (*termbits.h*) - !
B3000000 = 0010015 ; c_cflag bit meaning = (*termbits.h*) - !
B3500000 = 0010016 ; c_cflag bit meaning = (*termbits.h*) - !
B4000000 = 0010017 ; c_cflag bit meaning = (*termbits.h*) - !
CMSPAR = 010000000000 ; c_cflag bit meaning = (Use "stick" (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0)
CRTSCTS = 020000000000 ; c_cflag bit meaning = (Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE])
IBSHIFT = 16 ; c_cflag bit meaning = (*termbits.h*) = (Shift from CBAUD to CIBAUD)
;LOBLK = ? ; c_cflag bit meaning = (Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux)
;CBAUDEX = ? ; c_cflag bit meaning = (Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE])
;EXTPROC ; ?
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ISIG = 0000001 ; c_lflag bits = (When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal)
ICANON = 0000002 ; c_lflag bits = (Do erase and kill processing) - 2
XCASE = 0000004 ; c_lflag bits = (If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \)
ECHO = 0000010 ; c_lflag bits = (Enable echo) - 8
ECHOE = 0000020 ; c_lflag bits = (If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word)
ECHOK = 0000040 ; c_lflag bits = (If ICANON is also set, the KILL character erases the current line)
ECHONL = 0000100 ; c_lflag bits = (If ICANON is also set, echo the NL character even if ECHO is not set)
NOFLSH = 0000200 ; c_lflag bits = (Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters)
TOSTOP = 0000400 ; c_lflag bits = (Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal)
ECHOCTL = 0001000 ; c_lflag bits = (If ECHO is also set, terminal special char other than TAB, NL, START, and STOP are echoed as ^X, where X is the char with ASCII code 0x40 greater than the special char)
ECHOKE = 0004000 ; c_lflag bits = (If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE])
FLUSHO = 0010000 ; c_lflag bits = (Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE])
PENDIN = 0040000 ; c_lflag bits = (All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way) [requires _BSD_SOURCE or _SVID_SOURCE])
IEXTEN = 0100000 ; c_lflag bits = (This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TIOCM_LE = 0x001 ; modem lines = ()
TIOCM_DTR = 0x002 ; modem lines = ()
TIOCM_RTS = 0x004 ; modem lines = ()
TIOCM_ST = 0x008 ; modem lines = ()
TIOCM_SR = 0x010 ; modem lines = ()
TIOCM_CTS = 0x020 ; modem lines = ()
TIOCM_CAR = 0x040 ; modem lines = ()
TIOCM_RNG = 0x080 ; modem lines = ()
TIOCM_DSR = 0x100 ; modem lines = ()
TIOCM_CD = TIOCM_CAR ; modem lines = ()
TIOCM_RI = TIOCM_RNG ; modem lines = ()
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TCOOFF = 0 ; tcflow() and TCXONC use these = (suspends output)
TCOON = 1 ; tcflow() and TCXONC use these = (restarts suspended output)
TCIOFF = 2 ; tcflow() and TCXONC use these = (transmits a STOP character, which stops the terminal device from transmitting data to the system)
TCION = 3 ; tcflow() and TCXONC use these = (transmits a START character, which starts the terminal device transmitting data to the system)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TCIFLUSH = 0 ; tcflush() and TCFLSH use these = (flushes data received but not read)
TCOFLUSH = 1 ; tcflush() and TCFLSH use these = (flushes data written but not transmitted)
TCIOFLUSH = 2 ; tcflush() and TCFLSH use these = (flushes both data received but not read, and data written but not transmitted)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TCSANOW = 0 ; tcsetattr uses these = (the change occurs immediately)
TCSADRAIN = 1 ; tcsetattr uses these = (the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output)
TCSAFLUSH = 2 ; tcsetattr uses these = (the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TCGETS = 0x5401 ; termios instruction to read flags + (TCGETS equ 5401h) - (termios2-!)
TCSETS = 0x5402 ; termios instruction to write flags + (TCSETS equ 5402h) - (termios2-!)
TCSETSW = 0x5403 ; Allow the output buffer to drain, and set the current serial port settings = Equivalent to tcsetattr(fd, TCSADRAIN, argp) - (termios2-!)
TCSETSF = 0x5404 ; Allow the output buffer to drain, discard pending input, and set the current serial port settings = Equivalent to tcsetattr(fd, TCSAFLUSH, argp) - (termios2-!)
TCGETA = 0x5405 ; (Same as above but takes = struct termio *instead of a struct termios*)
TCSETA = 0x5406 ; (Same as above but takes = struct termio *instead of a struct termios*)
TCSETAW = 0x5407 ; (Same as above but takes = struct termio *instead of a struct termios*)
TCSETAF = 0x5408 ; (Same as above but takes = struct termio *instead of a struct termios*)
TCSBRK = 0x5409 ; (If the terminal is using asynchronous serial data transmission, and arg is zero, then send a break (a stream of zero bits) for between 0.25 and 0.5 seconds)
TCXONC = 0x540A ; (Software flow control = Equivalent to tcflow (fd, arg)
TCFLSH = 0x540B ; (Buffer count and flushing)
TIOCEXCL = 0x540C ; Put the terminal into exclusive mode. No further open(2) operations on the terminal are permitted. (They fail with EBUSY, except for a process with the CAP_SYS_ADMIN capability)
TIOCNXCL = 0x540D ; (Disable exclusive mode)
TIOCSCTTY = 0x540E ; Make the given terminal the controlling terminal of the calling process -*
TIOCGPGRP = 0x540F ; (Get the process group ID of the foreground process group on this terminal = When successful, equivalent to *argp = tcgetpgrp(fd)
TIOCSPGRP = 0x5410 ; (Set the foreground process group ID of this terminal = Equivalent to tcsetpgrp(fd, *argp)
TIOCOUTQ = 0x5411 ; (Get the number of bytes in the output buffer)
TIOCSTI = 0x5412 ; (Insert the given byte in the input queue)
TIOCGWINSZ = 0x5413 ; Get window size + (TIOCGSIZE defined (using a ttysize structure)) = (Most tty drivers don't support pushing it the other way) - (*!*)
TIOCSWINSZ = 0x5414 ; Set window size = (*struct winsize*) + (TIOCSSIZE) - ! - TIOSWINSZ
TIOCMGET = 0x5415 ; (Get the status of modem bits)
TIOCMBIS = 0x5416 ; (Set the indicated modem bits)
TIOCMBIC = 0x5417 ; (Clear the indicated modem bits)
TIOCMSET = 0x5418 ; (Set the status of modem bits)
TIOCGSOFTCAR = 0x5419 ; ("Get software carrier flag" = Get the status of the CLOCAL flag in the c_cflag field of the termios structure)
TIOCSSOFTCAR = 0x541A ; ("Set software carrier flag" = Set the CLOCAL flag in the termios structure when *argp is nonzero, and clear it otherwise)
FIONREAD = 0x541B ; (Get the number of bytes in the input buffer)
TIOCINQ = FIONREAD ; (Buffer count and flushing = Same as FIONREAD)
TIOCLINUX = 0x541C ; (Dump the screen = subcode=1 / subcode=10)
TIOCCONS = 0x541D ; Redirect output that would have gone to /dev/console or /dev/tty0 to the given terminal -*
TIOCGSERIAL = 0x541E ; (Gets the serial line information. A caller can potentially get a lot of serial line information from the tty device all at once in this call)
TIOCSSERIAL = 0x541F ; (Sets the serial line information. This is the opposite of TIOCGSERIAL and allows the user to set the serial line status of the tty device all at once)
TIOCPKT = 0x5420 ; (Enable (when *argp is nonzero) or disable packet mode +Can be applied to the master side of a pseudoterminal only and will return ENOTTY otherwise)
FIONBIO = 0x5421 ; (Sets or clears nonblocking input/output for a socket. The arg parameter is a pointer to an integer. If the integer is 0, nonblocking input/output on the socket is cleared) <<-- (*Socket*)
TIOCNOTTY = 0x5422 ; If the given terminal was the controlling terminal of the calling process, give up this controlling terminal -*
TIOCSETD = 0x5423 ; (Set the line discipline of the terminal)
TIOCGETD = 0x5424 ; (Get the line discipline of the terminal)
TCSBRKP = 0x5425 ; Needed for POSIX tcsendbreak()
TIOCSBRK = 0x5427 ; BSD compatibility
TIOCCBRK = 0x5428 ; BSD compatibility
TIOCGSID = 0x5429 ; Get the session ID of the given terminal. This fails with the error ENOTTY if the terminal is not a master pseudoterminal and not our controlling terminal
TCGETX = 0x5432 ; SYS5 TCGETX compatibility
TCSETX = 0x5433 ;
TCSETXF = 0x5434 ;
TCSETXW = 0x5435 ;
TIOCVHANGUP = 0x5437 ; (prevents tty_port_close() from decrementing port->count due to tty_hung_up_p() == true) <<-- (*Check*)
FIONCLEX = 0x5450 ;
FIOCLEX = 0x5451 ;
FIOASYNC = 0x5452 ;
TIOCSERCONFIG = 0x5453 ;
TIOCSERGWILD = 0x5454 ;
TIOCSERSWILD = 0x5455 ;
TIOCGLCKTRMIOS = 0x5456 ; Gets the locking status of the termios structure of the terminal
TIOCSLCKTRMIOS = 0x5457 ; Sets the locking status of the termios structure of the terminal
TIOCSERGSTRUCT = 0x5458 ; For debugging only
TIOCSERGETLSR = 0x5459 ; Get line status register
TIOCSERGETMULTI = 0x545A ; Get multiport config
TIOCSERSETMULTI = 0x545B ; Set multiport config
TIOCMIWAIT = 0x545C ; wait for a change on serial input line(s)
TIOCGICOUNT = 0x545D ; read serial port __inline__ interrupt counts
TIOCPKT_DATA = 0 ; Used for packet mode
TIOCPKT_FLUSHREAD = 1 ; Used for packet mode = The read queue for the terminal is flushed
TIOCPKT_FLUSHWRITE = 2 ; Used for packet mode = The write queue for the terminal is flushed
TIOCPKT_STOP = 4 ; Used for packet mode = Output to the terminal is stopped
TIOCPKT_START = 8 ; Used for packet mode = Output to the terminal is restarted
TIOCPKT_NOSTOP = 16 ; Used for packet mode = The start and stop characters are not ^S/^Q
TIOCPKT_DOSTOP = 32 ; Used for packet mode = The start and stop characters are ^S/^Q
TIOCPKT_IOCTL = 64 ; Used for packet mode
TIOCSER_TEMT = 0x01 ; Transmitter physically empty
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TTY_ON = 0x01 ; enable logins - start ty_getty program)
TTY_SECURE = 0x02 ; allow UID 0 to login
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EDEADLK = -35 ; Resource deadlock would occur
ENAMETOOLONG = -36 ; File name too long
ENOLCK = -37 ; No record locks available
ENOSYS = -38 ; Function not implemented
ENOTEMPTY = -39 ; Directory not empty
ELOOP = -40 ; Too many symbolic links encountered
EWOULDBLOCK = -11 ; Operation would block, same as EAGAIN
ENOMSG = -42 ; No message of desired type
EIDRM = -43 ; Identifier removed
ECHRNG = -44 ; Channel number out of range
EL2NSYNC = -45 ; Level 2 not synchronized
EL3HLT = -46 ; Level 3 halted
EL3RST = -47 ; Level 3 reset
ELNRNG = -48 ; Link number out of range
EUNATCH = -49 ; Protocol driver not attached
ENOCSI = -50 ; No CSI structure available
EL2HLT = -51 ; Level 2 halted
EBADE = -52 ; Invalid exchange
EBADR = -53 ; Invalid request descriptor
EXFULL = -54 ; Exchange full
ENOANO = -55 ; No anode
EBADRQC = -56 ; Invalid request code
EBADSLT = -57 ; Invalid slot
EDEADLOCK = -35 ; Resource deadlock would occur, same as EDEADLK
EBFONT = -59 ; Bad font file format
ENOSTR = -60 ; Device not a stream
ENODATA = -61 ; No data available
ETIME = -62 ; Timer expired
ENOSR = -63 ; Out of streams resources
ENONET = -64 ; Machine is not on the network
ENOPKG = -65 ; Package not installed
EREMOTE = -66 ; Object is remote
ENOLINK = -67 ; Link has been severed
EADV = -68 ; Advertise error
ESRMNT = -69 ; Srmount error
ECOMM = -70 ; Communication error on send
EPROTO = -71 ; Protocol error
EMULTIHOP = -72 ; Multihop attempted
EDOTDOT = -73 ; RFS specific error
EBADMSG = -74 ; Not a data message
EOVERFLOW = -75 ; Value too large for defined data type
ENOTUNIQ = -76 ; Name not unique on network
EBADFD = -77 ; File descriptor in bad state
EREMCHG = -78 ; Remote address changed
ELIBACC = -79 ; Can not access a needed shared library
ELIBBAD = -80 ; Accessing a corrupted shared library
ELIBSCN = -81 ; .lib section in a.out corrupted
ELIBMAX = -82 ; Attempting to link in too many shared libraries
ELIBEXEC = -83 ; Cannot exec a shared library directly
EILSEQ = -84 ; Illegal byte sequence
ERESTART = -85 ; Interrupted system call should be restarted
ESTRPIPE = -86 ; Streams pipe error
EUSERS = -87 ; Too many users
ENOTSOCK = -88 ; Socket operation on non-socket
EDESTADDRREQ = -89 ; Destination address required
EMSGSIZE = -90 ; Message too long
EPROTOTYPE = -91 ; Protocol wrong type for socket
ENOPROTOOPT = -92 ; Protocol not available
EPROTONOSUPPORT = -93 ; Protocol not supported
ESOCKTNOSUPPORT = -94 ; Socket type not supported
EOPNOTSUPP = -95 ; Operation not supported on transport endpoint
EPFNOSUPPORT = -96 ; Protocol family not supported
EAFNOSUPPORT = -97 ; Address family not supported by protocol
EADDRINUSE = -98 ; Address already in use
EADDRNOTAVAIL = -99 ; Cannot assign requested address
ENETDOWN = -100 ; Network is down
ENETUNREACH = -101 ; Network is unreachable
ENETRESET = -102 ; Network dropped connection because of reset
ECONNABORTED = -103 ; Software caused connection abort
ECONNRESET = -104 ; Connection reset by peer
ENOBUFS = -105 ; No buffer space available
EISCONN = -106 ; Transport endpoint is already connected
ENOTCONN = -107 ; Transport endpoint is not connected
ESHUTDOWN = -108 ; Cannot send after transport endpoint shutdown
ETOOMANYREFS = -109 ; Too many references: cannot splice
ETIMEDOUT = -110 ; Connection timed out
ECONNREFUSED = -111 ; Connection refused
EHOSTDOWN = -112 ; Host is down
EHOSTUNREACH = -113 ; No route to host
EALREADY = -114 ; Operation already in progress
EINPROGRESS = -115 ; Operation now in progress
ESTALE = -116 ; Stale NFS file handle
EUCLEAN = -117 ; Structure needs cleaning
ENOTNAM = -118 ; Not a XENIX named type file
ENAVAIL = -119 ; No XENIX semaphores available
EISNAM = -120 ; Is a named type file
EREMOTEIO = -121 ; Remote I/O error
EDQUOT = -122 ; Quota exceeded
ENOMEDIUM = -123 ; No medium found
EMEDIUMTYPE = -124 ; Wrong medium type
ECANCELED = -125 ; Operation Canceled
ENOKEY = -126 ; Required key not available
EKEYEXPIRED = -127 ; Key has expired
EKEYREVOKED = -128 ; Key has been revoked
EKEYREJECTED = -129 ; Key was rejected by service
EOWNERDEAD = -130 ; Owner died - for robust mutexes
ENOTRECOVERABLE = -131 ; State not recoverable - for robust mutexes
ERFKILL = -132 ; Operation not possible due to RF-kill - for robust mutexes
EHWPOISON = -133 ; Memory page has hardware error - for robust mutexes
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INET_ADDRSTRLEN = 16
INET6_ADDRSTRLEN = 46
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SCM_RIGHTS = 0x01 ; rw: access rights (array of int)
SCM_CREDENTIALS = 0x02 ; rw: struct ucred
SCM_SECURITY = 0x03 ; rw: security label
SCM_PIDFD = 0x04 ; ro: pidfd (int)
AF_UNSPEC = 0 ;
AF_UNIX = 1 ; Unix domain sockets
AF_LOCAL = 1 ; POSIX name for AF_UNIX
AF_INET = 2 ; Internet IP Protocol
AF_AX25 = 3 ; Amateur Radio AX.25
AF_IPX = 4 ; Novell IPX
AF_APPLETALK = 5 ; AppleTalk DDP
AF_NETROM = 6 ; Amateur Radio NET/ROM
AF_BRIDGE = 7 ; Multiprotocol bridge
AF_ATMPVC = 8 ; ATM PVCs
AF_X25 = 9 ; Reserved for X.25 project
AF_INET6 = 10 ; IP version 6
AF_ROSE = 11 ; Amateur Radio X.25 PLP
AF_DECnet = 12 ; Reserved for DECnet project
AF_NETBEUI = 13 ; Reserved for 802.2LLC project
AF_SECURITY = 14 ; Security callback pseudo AF
AF_KEY = 15 ; PF_KEY key management API
AF_NETLINK = 16 ;
AF_ROUTE equ AF_NETLINK ; Alias to emulate 4.4BSD
AF_PACKET = 17 ; Packet family
AF_ASH = 18 ; Ash
AF_ECONET = 19 ; Acorn Econet
AF_ATMSVC = 20 ; ATM SVCs
AF_RDS = 21 ; RDS sockets
AF_SNA = 22 ; Linux SNA Project (nutters!)
AF_IRDA = 23 ; IRDA sockets
AF_PPPOX = 24 ; PPPoX sockets
AF_WANPIPE = 25 ; Wanpipe API Sockets
AF_LLC = 26 ; Linux LLC
AF_IB = 27 ; Native InfiniBand address
AF_MPLS = 28 ; MPLS
AF_CAN = 29 ; Controller Area Network
AF_TIPC = 30 ; TIPC sockets
AF_BLUETOOTH = 31 ; Bluetooth sockets
AF_IUCV = 32 ; IUCV sockets
AF_RXRPC = 33 ; RxRPC sockets
AF_ISDN = 34 ; mISDN sockets
AF_PHONET = 35 ; Phonet sockets
AF_IEEE802154 = 36 ; IEEE802154 sockets
AF_CAIF = 37 ; CAIF sockets
AF_ALG = 38 ; Algorithm sockets
AF_NFC = 39 ; NFC sockets
AF_VSOCK = 40 ; vSockets
AF_KCM = 41 ; Kernel Connection Multiplexor
AF_QIPCRTR = 42 ; Qualcomm IPC Router
AF_SMC = 43 ; smc sockets: reserve number for * PF_SMC protocol family that * reuses AF_INET address family
AF_XDP = 44 ; XDP sockets
AF_MCTP = 45 ; Management component transport protocol
AF_MAX = 46 ; For now..
PF_UNSPEC equ AF_UNSPEC ; Protocol families, same as address families + (ALL BELOW)
PF_UNIX equ AF_UNIX ;
PF_LOCAL equ AF_LOCAL ;
PF_INET equ AF_INET ;
PF_AX25 equ AF_AX25 ;
PF_IPX equ AF_IPX ;
PF_APPLETALK equ AF_APPLETALK ;
PF_NETROM equ AF_NETROM ;
PF_BRIDGE equ AF_BRIDGE ;
PF_ATMPVC equ AF_ATMPVC ;
PF_X25 equ AF_X25 ;
PF_INET6 equ AF_INET6 ;
PF_ROSE equ AF_ROSE ;
PF_DECnet equ AF_DECnet ;
PF_NETBEUI equ AF_NETBEUI ;
PF_SECURITY equ AF_SECURITY ;
PF_KEY equ AF_KEY ;
PF_NETLINK equ AF_NETLINK ;
PF_ROUTE equ AF_ROUTE ;
PF_PACKET equ AF_PACKET ;
PF_ASH equ AF_ASH ;
PF_ECONET equ AF_ECONET ;
PF_ATMSVC equ AF_ATMSVC ;
PF_RDS equ AF_RDS ;
PF_SNA equ AF_SNA ;
PF_IRDA equ AF_IRDA ;
PF_PPPOX equ AF_PPPOX ;
PF_WANPIPE equ AF_WANPIPE ;
PF_LLC equ AF_LLC ;
PF_IB equ AF_IB ;
PF_MPLS equ AF_MPLS ;
PF_CAN equ AF_CAN ;
PF_TIPC equ AF_TIPC ;
PF_BLUETOOTH equ AF_BLUETOOTH ;
PF_IUCV equ AF_IUCV ;
PF_RXRPC equ AF_RXRPC ;
PF_ISDN equ AF_ISDN ;
PF_PHONET equ AF_PHONET ;
PF_IEEE802154 equ AF_IEEE802154 ;
PF_CAIF equ AF_CAIF ;
PF_ALG equ AF_ALG ;
PF_NFC equ AF_NFC ;
PF_VSOCK equ AF_VSOCK ;
PF_KCM equ AF_KCM ;
PF_QIPCRTR equ AF_QIPCRTR ;
PF_SMC equ AF_SMC ;
PF_XDP equ AF_XDP ;
PF_MCTP equ AF_MCTP ;
PF_MAX equ AF_MAX ;
SOMAXCONN = 4096 ; Maximum queue length specifiable by listen
MSG_OOB = 1 ; Flags we can use with send/ and recv. Added those for 1003.1g not all are supported yet + (ALL BELOW)
MSG_PEEK = 2 ;
MSG_DONTROUTE = 4 ;
MSG_TRYHARD = 4 ; Synonym for MSG_DONTROUTE for DECnet
MSG_CTRUNC = 8 ;
MSG_PROBE = 0x10 ; Do not send. Only probe path f.e. for MTU
MSG_TRUNC = 0x20 ;
MSG_DONTWAIT = 0x40 ; Nonblocking io
MSG_EOR = 0x80 ; End of record
MSG_WAITALL = 0x100 ; Wait for a full request
MSG_FIN = 0x200 ;
MSG_SYN = 0x400 ;
MSG_CONFIRM = 0x800 ; Confirm path validity
MSG_RST = 0x1000 ;
MSG_ERRQUEUE = 0x2000 ; Fetch message from error queue
MSG_NOSIGNAL = 0x4000 ; Do not generate SIGPIPE
MSG_MORE = 0x8000 ; Sender will send more
MSG_WAITFORONE = 0x10000 ; recvmmsg(): block until 1+ packets avail
MSG_SENDPAGE_NOPOLICY = 0x10000 ; sendpage() internal : do no apply policy
MSG_BATCH = 0x40000 ; sendmmsg(): more messages coming
MSG_EOF equ MSG_FIN ;
MSG_NO_SHARED_FRAGS = 0x80000 ; sendpage() internal : page frags are not shared
MSG_SENDPAGE_DECRYPTED = 0x100000 ; sendpage() internal : page may carry plain text and require encryption
MSG_ZEROCOPY = 0x4000000 ; Use user data in kernel path
MSG_SPLICE_PAGES = 0x8000000 ; Splice the pages from the iterator in sendmsg()
MSG_FASTOPEN = 0x20000000 ; Send data in TCP SYN
MSG_CMSG_CLOEXEC = 0x40000000 ; Set close_on_exec for file descriptor received through SCM_RIGHTS
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; MSG_CMSG_COMPAT = 0x80000000 ; This message needs 32 bit fixups + (#if defined(CONFIG_COMPAT)
; MSG_CMSG_COMPAT = 0 ; We never have 32 bit fixups + (#else)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;MSG_INTERNAL_SENDMSG_FLAGS = MSG_SENDPAGE_NOPOLICY ; (MSG_SPLICE_PAGES | MSG_SENDPAGE_NOPOLICY | MSG_SENDPAGE_DECRYPTED) + Flags to be cleared on entry by sendmsg and sendmmsg syscalls
SOL_IP = 0 ; Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx
;SOL_ICMP = ; No-no-no! Due to Linux we cannot use SOL_ICMP=1
SOL_TCP = 6 ;
SOL_UDP = 17 ;
SOL_IPV6 = 41 ;
SOL_ICMPV6 = 58 ;
SOL_SCTP = 132 ;
SOL_UDPLITE = 136 ; UDP-Lite (RFC 3828)
SOL_RAW = 255 ;
SOL_IPX = 256 ;
SOL_AX25 = 257 ;
SOL_ATALK = 258 ;
SOL_NETROM = 259 ;
SOL_ROSE = 260 ;
SOL_DECNET = 261 ;
SOL_X25 = 262 ;
SOL_PACKET = 263 ;
SOL_ATM = 264 ; ATM layer (cell level)
SOL_AAL = 265 ; ATM Adaption Layer (packet level)
SOL_IRDA = 266 ;
SOL_NETBEUI = 267 ;
SOL_LLC = 268 ;
SOL_DCCP = 269 ;
SOL_NETLINK = 270 ;
SOL_TIPC = 271 ;
SOL_RXRPC = 272 ;
SOL_PPPOL2TP = 273 ;
SOL_BLUETOOTH = 274 ;
SOL_PNPIPE = 275 ;
SOL_RDS = 276 ;
SOL_IUC = 277 ;
SOL_CAI = 278 ;
SOL_ALG = 279 ;
SOL_NFC = 280 ;
SOL_KCM = 281 ;
SOL_TLS = 282 ;
SOL_XDP = 283 ;
SOL_MPTCP = 284 ;
SOL_MCTP = 285 ;
SOL_SMC = 286 ;
SOL_VSOCK = 287 ;
IPX_TYPE = 1 ; IPX options
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOL_SOCKET = 1 ; For setsockopt(2)
SO_DEBUG = 1 ; For setsockopt(2)
SO_REUSEADDR = 2 ; For setsockopt(2)
SO_TYPE = 3 ; For setsockopt(2)
SO_ERROR = 4 ; For setsockopt(2)
SO_DONTROUTE = 5 ; For setsockopt(2)
SO_BROADCAST = 6 ; For setsockopt(2)
SO_SNDBUF = 7 ; For setsockopt(2)
SO_RCVBUF = 8 ; For setsockopt(2)
SO_SNDBUFFORCE = 32 ; For setsockopt(2)
SO_RCVBUFFORCE = 33 ; For setsockopt(2)
SO_KEEPALIVE = 9 ; For setsockopt(2)
SO_OOBINLINE = 10 ; For setsockopt(2)
SO_NO_CHECK = 11 ; For setsockopt(2)
SO_PRIORITY = 12 ; For setsockopt(2)
SO_LINGER = 13 ; For setsockopt(2)
SO_BSDCOMPAT = 14 ; For setsockopt(2)
SO_REUSEPORT = 15 ; For setsockopt(2) + To add :#define SO_REUSEPORT 15 - ?
SO_PASSCRED = 16 ; For setsockopt(2)
SO_PEERCRED = 17 ; For setsockopt(2)
SO_RCVLOWAT = 18 ; For setsockopt(2)
SO_SNDLOWAT = 19 ; For setsockopt(2)
SO_RCVTIMEO = 20 ; For setsockopt(2)
SO_SNDTIMEO = 21 ; For setsockopt(2)
SO_SECURITY_AUTHENTICATION = 22 ; Security levels - as per NRL IPv6 - don't actually do anything
SO_SECURITY_ENCRYPTION_TRANSPORT = 23 ; Security levels - as per NRL IPv6 - don't actually do anything
SO_SECURITY_ENCRYPTION_NETWORK = 24 ; Security levels - as per NRL IPv6 - don't actually do anything
SO_BINDTODEVICE = 25 ; Security levels - as per NRL IPv6 - don't actually do anything
SO_ATTACH_FILTER = 26 ; Socket filtering *
SO_DETACH_FILTER = 27 ; Socket filtering *
SO_PEERNAME = 28 ; Socket filtering *
SO_TIMESTAMP = 29 ; Socket filtering *
SCM_TIMESTAMP equ SO_TIMESTAMP ; Socket filtering *
SO_ACCEPTCONN = 30 ; Socket filtering *
SO_PEERSEC = 31 ; Socket filtering *
SO_PASSSEC = 34 ; Socket filtering *
SO_TIMESTAMPNS = 35 ; Socket filtering *
SCM_TIMESTAMPNS equ SO_TIMESTAMPNS ; Socket filtering *
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FIOSETOWN = 0x8901 ; Socket-level I/O control calls
SIOCSPGRP = 0x8902 ; Socket-level I/O control calls
FIOGETOWN = 0x8903 ; Socket-level I/O control calls
SIOCGPGRP = 0x8904 ; Socket-level I/O control calls
SIOCATMARK = 0x8905 ; Socket-level I/O control calls
SIOCGSTAMP = 0x8906 ; Get stamp (timeval) - Socket-level I/O control calls
SIOCGSTAMPNS = 0x8907 ; Get stamp (timespec) - Socket-level I/O control calls
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SIOCADDRT = 0x890B ; add routing table entry = Routing table calls
SIOCDELRT = 0x890C ; delete routing table entry = Routing table calls
SIOCRTMSG = 0x890D ; call to routing system = Routing table calls
SIOCGIFNAME = 0x8910 ; get iface name = Socket configuration controls
SIOCSIFLINK = 0x8911 ; set iface channel = Socket configuration controls
SIOCGIFCONF = 0x8912 ; get iface list = Socket configuration controls
SIOCGIFFLAGS = 0x8913 ; get flags = Socket configuration controls
SIOCSIFFLAGS = 0x8914 ; set flags = Socket configuration controls
SIOCGIFADDR = 0x8915 ; get PA address = Socket configuration controls
SIOCSIFADDR = 0x8916 ; set PA address = Socket configuration controls
SIOCGIFDSTADDR = 0x8917 ; get remote PA address = Socket configuration controls
SIOCSIFDSTADDR = 0x8918 ; set remote PA address = Socket configuration controls
SIOCGIFBRDADDR = 0x8919 ; get broadcast PA address = Socket configuration controls
SIOCSIFBRDADDR = 0x891a ; set broadcast PA address = Socket configuration controls
SIOCGIFNETMASK = 0x891b ; get network PA mask = Socket configuration controls
SIOCSIFNETMASK = 0x891c ; set network PA mask = Socket configuration controls
SIOCGIFMETRIC = 0x891d ; get metric = Socket configuration controls
SIOCSIFMETRIC = 0x891e ; set metric = Socket configuration controls
SIOCGIFMEM = 0x891f ; get memory address (BSD) = Socket configuration controls
SIOCSIFMEM = 0x8920 ; set memory address (BSD) = Socket configuration controls
SIOCGIFMTU = 0x8921 ; get MTU size = Socket configuration controls
SIOCSIFMTU = 0x8922 ; set MTU size = Socket configuration controls
SIOCSIFNAME = 0x8923 ; set interface name = Socket configuration controls
SIOCSIFHWADDR = 0x8924 ; set hardware address = Socket configuration controls
SIOCGIFENCAP = 0x8925 ; get/set encapsulations = Socket configuration controls
SIOCSIFENCAP = 0x8926 ;
SIOCGIFHWADDR = 0x8927 ; Get hardware address = Socket configuration controls
SIOCGIFSLAVE = 0x8929 ; Driver slaving support = Socket configuration controls
SIOCSIFSLAVE = 0x8930 ;
SIOCADDMULTI = 0x8931 ; Multicast address lists = Socket configuration controls
SIOCDELMULTI = 0x8932 ;
SIOCGIFINDEX = 0x8933 ; name -> if_index mapping = Socket configuration controls
SIOGIFINDEX = SIOCGIFINDEX ; misprint compatibility = Socket configuration controls
SIOCSIFPFLAGS = 0x8934 ; set/get extended flags set = Socket configuration controls
SIOCGIFPFLAGS = 0x8935 ;
SIOCDIFADDR = 0x8936 ; delete PA address = Socket configuration controls
SIOCSIFHWBROADCAST = 0x8937 ; set hardware broadcast addr = Socket configuration controls
SIOCGIFCOUNT = 0x8938 ; get number of devices = Socket configuration controls
SIOCGIFBR = 0x8940 ; Bridging support = Socket configuration controls
SIOCSIFBR = 0x8941 ; Set bridging options = Socket configuration controls
SIOCGIFTXQLEN = 0x8942 ; Get the tx queue length = Socket configuration controls
SIOCSIFTXQLEN = 0x8943 ; Set the tx queue length = Socket configuration controls
;SIOCGIFDIVERT was: 0x8944 ; UAPI - Frame diversion support
;SIOCSIFDIVERT was: 0x8945 ; UAPI - Set frame diversion options
SIOCETHTOOL = 0x8946 ; UAPI - Ethtool interface
SIOCGMIIPHY = 0x8947 ; UAPI - Get address of MII PHY in use
SIOCGMIIREG = 0x8948 ; UAPI - Read MII PHY register
SIOCSMIIREG = 0x8949 ; UAPI - Write MII PHY register
SIOCWANDEV = 0x894A ; UAPI - get/set netdev parameters
SIOCOUTQNSD = 0x894B ; UAPI - output queue size (not sent only)
SIOCGSKNS = 0x894C ; UAPI - get socket network namespace
SIOCDARP = 0x8953 ; delete ARP table entry = ARP cache control calls + (0x8950 - 0x8952 * obsolete calls, don't re-use = ARP cache control calls)
SIOCGARP = 0x8954 ; get ARP table entry = ARP cache control calls + (0x8950 - 0x8952 * obsolete calls, don't re-use = ARP cache control calls)
SIOCSARP = 0x8955 ; set ARP table entry = ARP cache control calls + (0x8950 - 0x8952 * obsolete calls, don't re-use = ARP cache control calls)
SIOCDRARP = 0x8960 ; delete RARP table entry = RARP cache control calls
SIOCGRARP = 0x8961 ; get RARP table entry = RARP cache control calls
SIOCSRARP = 0x8962 ; set RARP table entry = RARP cache control calls
SIOCGIFMAP = 0x8970 ; Get device parameters = Driver configuration calls
SIOCSIFMAP = 0x8971 ; Set device parameters = Driver configuration calls
SIOCADDDLCI = 0x8980 ; Create new DLCI device = DLCI configuration calls
SIOCDELDLCI = 0x8981 ; Delete DLCI device = DLCI configuration calls
SIOCGIFVLAN = 0x8982 ; UAPI - 802.1Q VLAN support
SIOCSIFVLAN = 0x8983 ; UAPI - Set 802.1Q VLAN options
SIOCDEVPRIVATE = 0x89F0 ; to 89FF = Device private ioctl calls
SIOCPROTOPRIVATE = 0x89E0 ; to 89EF = protocol private
SIOCBONDENSLAVE = 0x8990 ; UAPI - bonding calls - enslave a device to the bond
SIOCBONDRELEASE = 0x8991 ; UAPI - bonding calls - release a slave from the bond
SIOCBONDSETHWADDR = 0x8992 ; UAPI - bonding calls - set the hw addr of the bond
SIOCBONDSLAVEINFOQUERY = 0x8993 ; UAPI - bonding calls - rtn info about slave state
SIOCBONDINFOQUERY = 0x8994 ; UAPI - bonding calls - rtn info about bond state
SIOCBONDCHANGEACTIVE = 0x8995 ; UAPI - bonding calls - update to a new active slave
SIOCBRADDBR = 0x89a0 ; UAPI - bridge calls - create new bridge device
SIOCBRDELBR = 0x89a1 ; UAPI - bridge calls - remove bridge device
SIOCBRADDIF = 0x89a2 ; UAPI - bridge calls - add interface to bridge
SIOCBRDELIF = 0x89a3 ; UAPI - bridge calls - remove interface from bridge
SIOCSHWTSTAMP = 0x89b0 ; UAPI - hardware time stamping: parameters in linux/net_tstamp.h - set and get config
SIOCGHWTSTAMP = 0x89b1 ; UAPI - hardware time stamping: parameters in linux/net_tstamp.h - get config
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOCK_DIAG_BY_FAMILY = 20 ;
SOCK_DESTROY = 21 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MAPS_RELAX_COMPAT = 0x01 ; Flags to direct loading requirements
; SK_LOOKUP
; SO_ATTACH_REUSEPORT_EBPF
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; /usr/lib/modules/6.6.8-arch1-1/build/include/linux/atm_tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/linux/nvme-tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/linux/tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/linux/netfilter/nf_conntrack_tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/net/espintcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/net/mptcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/net/tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/scsi/libiscsi_tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/trace/events/mptcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/trace/events/tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/uapi/linux/atm_tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/uapi/linux/mptcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/uapi/linux/tcp.h
; /usr/lib/modules/6.6.8-arch1-1/build/include/uapi/linux/netfilter/nf_conntrack_tcp.h
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
define TCP_MSS_DEFAULT 536U ; (TCP general constants - IPv4 - RFC1122, RFC2581)
define TCP_MSS_DESIRED 1220U ; (TCP general constants - IPv6 - tunneled), EDNS0 - RFC3226)
TCP_NODELAY = 1 ; TCP socket options - Turn off Nagle's algorithm
TCP_MAXSEG = 2 ; TCP socket options - Limit MSS
TCP_CORK = 3 ; TCP socket options - Never send partially complete segments
TCP_KEEPIDLE = 4 ; TCP socket options - Start keeplives after this period
TCP_KEEPINTVL = 5 ; TCP socket options - Interval between keepalives
TCP_KEEPCNT = 6 ; TCP socket options - Number of keepalives before death
TCP_SYNCNT = 7 ; TCP socket options - Number of SYN retransmits
TCP_LINGER2 = 8 ; TCP socket options - Life time of orphaned FIN-WAIT-2 state
TCP_DEFER_ACCEPT = 9 ; TCP socket options - Wake up listener only when data arrive
TCP_WINDOW_CLAMP = 10 ; TCP socket options - Bound advertised window
TCP_INFO = 11 ; TCP socket options - Information about this connection.
TCP_QUICKACK = 12 ; TCP socket options - Block/reenable quick acks
TCP_CONGESTION = 13 ; TCP socket options - Congestion control algorithm
TCP_MD5SIG = 14 ; TCP socket options - TCP MD5 Signature (RFC2385)
TCP_THIN_LINEAR_TIMEOUTS = 16 ; TCP socket options - Use linear timeouts for thin streams
TCP_THIN_DUPACK = 17 ; TCP socket options - Fast retrans. after 1 dupack
TCP_USER_TIMEOUT = 18 ; TCP socket options - How long for loss retry before timeout
TCP_REPAIR = 19 ; TCP socket options - TCP sock is under repair right now
TCP_REPAIR_QUEUE = 20 ; TCP socket options
TCP_QUEUE_SEQ = 21 ; TCP socket options
TCP_REPAIR_OPTIONS = 22 ; TCP socket options
TCP_FASTOPEN = 23 ; TCP socket options - Enable FastOpen on listeners
TCP_TIMESTAMP = 24 ; TCP socket options
TCP_NOTSENT_LOWAT = 25 ; TCP socket options - limit number of unsent bytes in write queue
TCP_CC_INFO = 26 ; TCP socket options - Get Congestion Control (optional) info
TCP_SAVE_SYN = 27 ; TCP socket options - Record SYN headers for new connections
TCP_SAVED_SYN = 28 ; TCP socket options - Get SYN headers recorded for connection
TCP_REPAIR_WINDOW = 29 ; TCP socket options - Get/set window parameters
TCP_FASTOPEN_CONNECT = 30 ; TCP socket options - Attempt FastOpen with connect
TCP_ULP = 31 ; TCP socket options - Attach a ULP to a TCP connection
TCP_MD5SIG_EXT = 32 ; TCP socket options - TCP MD5 Signature with extensions
TCP_FASTOPEN_KEY = 33 ; TCP socket options - Set the key for Fast Open (cookie)
TCP_FASTOPEN_NO_COOKIE = 34 ; TCP socket options - Enable TFO without a TFO cookie
TCP_ZEROCOPY_RECEIVE = 35 ; TCP socket options
TCP_INQ = 36 ; TCP socket options - Notify bytes available to read as a cmsg on read
TCP_CM_INQ equ TCP_INQ ; TCP socket options
TCP_TX_DELAY = 37 ; TCP socket options - delay outgoing packets by XX usec
TCP_REPAIR_ON = 1 ; TCP socket options
TCP_REPAIR_OFF = 0 ; TCP socket options
TCP_REPAIR_OFF_NO_WP = -1 ; TCP socket options - Turn off without window probes
TCP_NO_QUEUE = 0 ; (E-BLANK - !)
TCP_RECV_QUEUE = 1 ; (E-BLANK - !)
TCP_SEND_QUEUE = 2 ; (E-BLANK - !)
TCP_QUEUES_NR = 3 ; (E-BLANK - !)
TFO_STATUS_UNSPEC = 0 ; (E-BLANK - catch-all - enum tcp_fastopen_client_fail = why fastopen failed from client perspective)
TFO_COOKIE_UNAVAILABLE = 1 ; (E-BLANK - if not in TFO_CLIENT_NO_COOKIE mode - enum tcp_fastopen_client_fail = why fastopen failed from client perspective)
TFO_DATA_NOT_ACKED = 2 ; (E-BLANK - SYN-ACK did not ack SYN data - enum tcp_fastopen_client_fail = why fastopen failed from client perspective)
TFO_SYN_RETRANSMITTED = 3 ; (E-BLANK - SYN-ACK did not ack SYN data after timeout - enum tcp_fastopen_client_fail = why fastopen failed from client perspective)
TCPI_OPT_TIMESTAMPS = 1 ; for TCP_INFO socket option
TCPI_OPT_SACK = 2 ; for TCP_INFO socket option
TCPI_OPT_WSCALE = 4 ; for TCP_INFO socket option
TCPI_OPT_ECN = 8 ; for TCP_INFO socket option - ECN was negociated at TCP session init
TCPI_OPT_ECN_SEEN = 16 ; for TCP_INFO socket option - we received at least one packet with ECT
TCPI_OPT_SYN_DATA = 32 ; for TCP_INFO socket option - SYN-ACK acked data in SYN sent or rcvd
TCP_CA_Open = 0 ; ENUM - define TCPF_CA_Open (1<<TCP_CA_Open)
TCP_CA_Disorder = 1 ; ENUM - define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
TCP_CA_CWR = 2 ; ENUM - define TCPF_CA_CWR (1<<TCP_CA_CWR)
TCP_CA_Recovery = 3 ; ENUM - define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
TCP_CA_Loss = 4 ; ENUM - define TCPF_CA_Loss (1<<TCP_CA_Loss)
TCP_NLA_PAD = 0 ; (E-BLANK - )
TCP_NLA_BUSY = 1 ; (E-BLANK - Time (usec) busy sending data = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_RWND_LIMITED = 2 ; (E-BLANK - Time (usec) limited by receive window = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_SNDBUF_LIMITED = 3 ; (E-BLANK - Time (usec) limited by send buffer = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_DATA_SEGS_OUT = 4 ; (E-BLANK - Data pkts sent including retransmission = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_TOTAL_RETRANS = 5 ; (E-BLANK - Data pkts retransmitted = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_PACING_RATE = 6 ; (E-BLANK - Pacing rate in bytes per second = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_DELIVERY_RATE = 7 ; (E-BLANK - Delivery rate in bytes per second = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_SND_CWND = 8 ; (E-BLANK - Sending congestion window = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_REORDERING = 9 ; (E-BLANK - Reordering metric = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_MIN_RTT = 10 ; (E-BLANK - minimum RTT = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_RECUR_RETRANS = 11 ; (E-BLANK - Recurring retransmits for the current pkt = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_DELIVERY_RATE_APP_LMT = 12 ; (E-BLANK - delivery rate application limited ? = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_SNDQ_SIZE = 13 ; (E-BLANK - Data (bytes) pending in send queue = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_CA_STATE = 14 ; (E-BLANK - ca_state of socket = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_SND_SSTHRESH = 15 ; (E-BLANK - Slow start size threshold = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_DELIVERED = 16 ; (E-BLANK - Data pkts delivered incl. out-of-order = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_DELIVERED_CE = 17 ; (E-BLANK - Like above but only ones w/ CE marks = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_BYTES_SENT = 18 ; (E-BLANK - Data bytes sent including retransmission = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_BYTES_RETRANS = 10 ; (E-BLANK - Data bytes retransmitted = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_DSACK_DUPS = 20 ; (E-BLANK - DSACK blocks received = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_REORD_SEEN = 21 ; (E-BLANK - reordering events seen = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_SRTT = 22 ; (E-BLANK - smoothed RTT in usecs = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_TIMEOUT_REHASH = 23 ; (E-BLANK - Timeout-triggered rehash attempts = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_BYTES_NOTSENT = 24 ; (E-BLANK - Bytes in write queue not yet sent = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_EDT = 25 ; (E-BLANK - Earliest departure time (CLOCK_MONOTONIC) = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_TTL = 26 ; (E-BLANK - TTL or hop limit of a packet received = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_NLA_REHASH = 27 ; (E-BLANK - PLB and timeout triggered rehash attempts = netlink attributes types for SCM_TIMESTAMPING_OPT_STATS)
TCP_MD5SIG_MAXKEYLE = 80 ; for TCP_MD5SIG socket option
TCP_MD5SIG_FLAG_PREFIX = 0x1 ; address prefix length = tcp_md5sig extension flags for TCP_MD5SIG_EXT)
TCP_MD5SIG_FLAG_IFINDEX = 0x2 ; ifindex set = tcp_md5sig extension flags for TCP_MD5SIG_EXT)
TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT = 0x1 ; setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
define MAX_TCP_HEADER L1_CACHE_ALIGN(128 + MAX_HEADER)
MAX_TCP_OPTION_SPACE = 40
TCP_MIN_SND_MSS = 48
define TCP_MIN_GSO_SIZE (TCP_MIN_SND_MSS - MAX_TCP_OPTION_SPACE)
MAX_TCP_WINDOW = 32767 ; 32767U = Never offer a window over 32767 without using window scaling. Some poor stacks do signed 16bit maths
TCP_MIN_MSS = 88 ; 88U = Minimal accepted MSS. It is (60+60+ - (20+20)
TCP_BASE_MSS = 1024 ; The initial MTU to use for probing
TCP_PROBE_INTERVAL = 600 ; probing interval, default to 10 minutes as per RFC4821
TCP_PROBE_THRESHOLD = 8 ; Specify interval when tcp mtu probing will stop
TCP_FASTRETRANS_THRESH = 3 ; After receiving this amount of duplicate ACKs fast retransmit starts
TCP_MAX_QUICKACKS = 16 ; 16U = Maximal number of ACKs sent quickly to accelerate slow-start
TCP_MAX_WSCALE = 14 ; 14U = Maximal number of window scale according to RFC1323
TCP_URG_VALID = 0x0100 ; urg_data states
TCP_URG_NOTYET = 0x0200 ; urg_data states
TCP_URG_READ = 0x0400 ; urg_data states
TCP_RETR1 = 3 ; How many retries it does before it tries to figure out if the gateway is down. Min RFC value is 3; it corresponds to ~3sec-8min depending on RTO
TCP_RETR2 = 15 ; This should take at least 90 minutes to time out. RFC1122 limit is 100 sec. 15 is ~13-30min depending on RTO.
TCP_SYN_RETRIES = 6 ; How many retries are done when active opening a conn. RFC1122 min retry MUST be at least 180secs. This value is corresponding to 63secs of retransmission
TCP_SYNACK_RETRIES = 5 ; How may retries are done when passive opening a connection. This is corresponding to 31secs of retransmission
define TCP_TIMEWAIT_LEN (60*HZ) ; how long to wait to destroy TIME-WAIT state, about 60 seconds
TCP_FIN_TIMEOUT equ TCP_TIMEWAIT_LEN ; BSD style FIN_WAIT2 deadlock breaker. It used to be 3min, new value is 60sec, to combine FIN-WAIT-2 timeout with TIME-WAIT timer
TCP_DELACK_MIN = 4 ; 4U
TCP_ATO_MIN = 4 ; 4U
TCP_KEEPALIVE_PROBES = 9 ; Max of 9 keepalive probes
MAX_TCP_KEEPIDLE = 32767 ;
MAX_TCP_KEEPINTVL = 32767 ;
MAX_TCP_KEEPCNT = 127 ;
MAX_TCP_SYNCNT = 127 ;
define TCP_PAWS_24DAYS (60 * 60 * 24 * 24) ;
TCP_PAWS_MSL = 60 ; Per-host TS are invalidated after this time. It should be equal/greater than TCP_TIMEWAIT_LEN to prov reliability equal to one prov by timewait state
TCP_PAWS_WINDOW = 1 ; Replay window for per-host timestamps. It must be less than minimal timewait lifetime
TCPOPT_NOP = 1 ; Padding
TCPOPT_EOL = 0 ; End of options
TCPOPT_MSS = 2 ; Segment size negotiating
TCPOPT_WINDOW = 3 ; Window scaling
TCPOPT_SACK_PERM = 4 ; SACK Permitted
TCPOPT_SACK = 5 ; SACK Block
TCPOPT_TIMESTAMP = 8 ; Better RTT estimations/PAWS
TCPOPT_MD5SIG = 19 ; MD5 Signature (RFC2385)
TCPOPT_MPTCP = 30 ; Multipath TCP (RFC6824)
TCPOPT_FASTOPEN = 34 ; Fast open (RFC7413)
TCPOPT_EXP = 254 ; Magic number to be after the option value for sharing TCP experimental options.
TCPOPT_FASTOPEN_MAGIC = 0xF989
TCPOPT_SMC_MAGIC = 0xE2D4C3D9
TCPOLEN_MSS = 4 ; TCP option lengths
TCPOLEN_WINDOW = 3 ; TCP option lengths
TCPOLEN_SACK_PERM = 2 ; TCP option lengths
TCPOLEN_TIMESTAMP = 10 ; TCP option lengths
TCPOLEN_MD5SIG = 18 ; TCP option lengths
TCPOLEN_FASTOPEN_BASE = 2 ; TCP option lengths
TCPOLEN_EXP_FASTOPEN_BASE = 4 ; TCP option lengths
TCPOLEN_EXP_SMC_BASE = 6 ; TCP option lengths
TCPOLEN_TSTAMP_ALIGNED = 12 ; TCP option lengths - But this is what stacks really send out
TCPOLEN_WSCALE_ALIGNED = 4 ; TCP option lengths - But this is what stacks really send out
TCPOLEN_SACKPERM_ALIGNED = 4 ; TCP option lengths - But this is what stacks really send out
TCPOLEN_SACK_BASE = 2 ; TCP option lengths - But this is what stacks really send out
TCPOLEN_SACK_BASE_ALIGNED = 4 ; TCP option lengths - But this is what stacks really send out
TCPOLEN_SACK_PERBLOCK = 8 ; TCP option lengths - But this is what stacks really send out
TCPOLEN_MD5SIG_ALIGNED = 20 ; TCP option lengths - But this is what stacks really send out
TCPOLEN_MSS_ALIGNED = 4 ; TCP option lengths - But this is what stacks really send out
TCPOLEN_EXP_SMC_BASE_ALIGNED = 8 ; TCP option lengths - But this is what stacks really send out
TCP_NAGLE_OFF = 1 ; Flags in tp->nonagle - Nagle's algo is disabled
TCP_NAGLE_CORK = 2 ; Flags in tp->nonagle - Socket is corked
TCP_NAGLE_PUSH = 4 ; Flags in tp->nonagle - Cork is overridden for already queued data
TCP_THIN_LINEAR_RETRIES = 6 ; TCP thin-stream limits - After 6 linear retries, do exp. backoff
TCP_INIT_CWND = 10 ; TCP initial congestion window as per rfc6928
TFO_CLIENT_ENABLE = 1 ; Bit Flags for sysctl_tcp_fastopen
TFO_SERVER_ENABLE = 2 ; Bit Flags for sysctl_tcp_fastopen
TFO_CLIENT_NO_COOKIE = 4 ; Bit Flags for sysctl_tcp_fastopen - Data in SYN w/o cookie option
TFO_SERVER_COOKIE_NOT_REQD = 0x200 ; Accept SYN data w/o any cookie option
TFO_SERVER_WO_SOCKOPT1 = 0x400 ; Force enable TFO on all listeners, i.e., not requiring the TCP_FASTOPEN socket option
TCP_RACK_LOSS_DETECTION = 0x1 ; sysctl variables for tc - Use RACK to detect losses
TCP_RACK_STATIC_REO_WND = 0x2 ; sysctl variables for tc - Use static RACK reo wnd
TCP_RACK_NO_DUPTHRESH = 0x4 ; sysctl variables for tc - Do not use DUPACK threshold in RACK
TCP_ECN_OK = 1
TCP_ECN_QUEUE_CWR = 2
TCP_ECN_DEMAND_CWR = 4
TCP_ECN_SEEN = 8
TCP_TW_SUCCESS = 0 ; ENUM = enum tcp_tw_status
TCP_TW_RST = 1 ; ENUM = enum tcp_tw_status
TCP_TW_ACK = 2 ; ENUM = enum tcp_tw_status
TCP_TW_SYN = 3 ; ENUM = enum tcp_tw_status
MAX_SYNCOOKIE_AGE = 2
define TCP_SYNCOOKIE_PERIOD (60 * HZ)
define TCP_SYNCOOKIE_VALID (MAX_SYNCOOKIE_AGE * TCP_SYNCOOKIE_PERIOD)
TCP_TS_HZ = 1000 ; Deliver a 32bit value for TCP timestamp option
TCPHDR_FIN = 0x01
TCPHDR_SYN = 0x02
TCPHDR_RST = 0x04
TCPHDR_PSH = 0x08
TCPHDR_ACK = 0x10
TCPHDR_URG = 0x20
TCPHDR_ECE = 0x40
TCPHDR_CWR = 0x80
TCPHDR_SYN_ECN equ TCPHDR_SYN ; (TCPHDR_SYN | TCPHDR_ECE | TCPHDR_CWR)
TCPCB_SACKED_ACKED = 0x01 ; SKB ACK'd by a SACK block
TCPCB_SACKED_RETRANS = 0x02 ; SKB retransmitted
TCPCB_LOST = 0x04 ; SKB is lost
TCPCB_TAGBITS = 0x07 ; All tag bits
TCPCB_REPAIRED = 0x10 ; SKB repaired (no skb_mstamp_ns)
TCPCB_EVER_RETRANS = 0x80 ; Ever retransmitted frame
TCPCB_RETRANS equ TCPCB_EVER_RETRANS ; (TCPCB_SACKED_RETRANS | TCPCB_EVER_RETRANS | TCPCB_REPAIRED)
define TCPCB_DELIVERED_CE_MASK ((1U<<20) - 1)
CA_EVENT_TX_START = 1 ; E-BLANK - Events passed to congestion control interface = first transmit when no packets in flight = enum tcp_ca_event)
CA_EVENT_CWND_RESTART = 2 ; E-BLANK - Events passed to congestion control interface = congestion window restart = enum tcp_ca_event)
CA_EVENT_COMPLETE_CWR = 3 ; E-BLANK - Events passed to congestion control interface = end of congestion recovery = enum tcp_ca_event)
CA_EVENT_LOSS = 4 ; E-BLANK - Events passed to congestion control interface = loss timeout = enum tcp_ca_event)
CA_EVENT_ECN_NO_CE = 5 ; E-BLANK - Events passed to congestion control interface = ECT set, but not CE marked = enum tcp_ca_event)
CA_EVENT_ECN_IS_CE = 6 ; E-BLANK - Events passed to congestion control interface = received CE marked IP packet = enum tcp_ca_event)
CA_ACK_SLOWPATH equ 1 << 0 ; ENUM - Information about inbound ACK, passed to cong_ops->in_ack_event() = In slow path processing - enum tcp_ca_ack_event_flags)
CA_ACK_WIN_UPDATE equ 1 << 1 ; ENUM - Information about inbound ACK, passed to cong_ops->in_ack_event() = ACK updated window - enum tcp_ca_ack_event_flags)
CA_ACK_ECE equ 1 << 2 ; ENUM - Information about inbound ACK, passed to cong_ops->in_ack_event() = ECE bit is set on ack - enum tcp_ca_ack_event_flags)
TCP_CA_NAME_MAX = 16 ; Interface for adding new TCP congestion control handlers
TCP_CA_MAX = 128 ; Interface for adding new TCP congestion control handlers
define TCP_CA_BUF_MAX (TCP_CA_NAME_MAX*TCP_CA_MAX) ; Interface for adding new TCP congestion control handlers
TCP_CA_UNSPEC = 0 ; Interface for adding new TCP congestion control handlers
TCP_CONG_NON_RESTRICTED = 0x1 ; Algorithm can be set on socket without CAP_NET_ADMIN privileges
TCP_CONG_NEEDS_ECN = 0x2 ; Requires ECN/ECT set on all packets
define TCP_CONG_MASK (TCP_CONG_NON_RESTRICTED | TCP_CONG_NEEDS_ECN) ; Requires ECN/ECT set on all packets
TCP_INFINITE_SSTHRESH = 0x7fffffff
TCP_FASTOPEN_KEY_MAX = 2
define TCP_FASTOPEN_KEY_BUF_LENGTH (TCP_FASTOPEN_KEY_LENGTH * TCP_FASTOPEN_KEY_MAX)
TCP_CHRONO_UNSPEC = 1 ; E-BLANK - Latencies incurred by various limits for a sender = enum tcp_chrono)
TCP_CHRONO_BUSY = 2 ; E-BLANK - Latencies incurred by various limits for a sender - Actively sending data (non-empty write queue) = enum tcp_chrono)
TCP_CHRONO_RWND_LIMITED = 3 ; E-BLANK - Latencies incurred by various limits for a sender - Stalled by insufficient receive window = enum tcp_chrono)
TCP_CHRONO_SNDBUF_LIMITED = 4 ; E-BLANK - Latencies incurred by various limits for a sender - Stalled by insufficient send buffer = enum tcp_chrono)
TCP_SEQ_STATE_LISTENING = 1 ; E-BLANK - proc - Determines whether this is a thin stream latency-reducing mechanisms = enum tcp_seq_states)
TCP_SEQ_STATE_ESTABLISHED = 2 ; E-BLANK - proc - Determines whether this is a thin stream latency-reducing mechanisms = enum tcp_seq_states)
TCP_PLB_SCALE = 8 ; Scaling factor for fractions in PLB
TCP_ULP_NAME_MAX = 16 ; Interface for adding Upper Level Protocols over TCP
TCP_ULP_MAX = 128 ; Interface for adding Upper Level Protocols over TCP
define TCP_ULP_BUF_MAX (TCP_ULP_NAME_MAX*TCP_ULP_MAX) ; Interface for adding Upper Level Protocols over TCP
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOCKWQ_ASYNC_NOSPACE = 0 ; (net.h)
SOCKWQ_ASYNC_WAITDATA = 1
SOCK_NOSPACE = 2
SOCK_PASSCRED = 3
SOCK_PASSSEC = 4
SOCK_SUPPORT_ZC = 5
SOCK_CUSTOM_SOCKOPT = 6
SOCK_PASSPIDFD = 7
;ifndef ARCH_HAS_SOCKET_TYPES
SOCK_STREAM = 1 ; (ENUM - enum sock_type*)
SOCK_DGRAM = 2 ; (ENUM - enum sock_type*)
SOCK_RAW = 3 ; (ENUM - enum sock_type*)
SOCK_RDM = 4 ; (ENUM - enum sock_type*)
SOCK_SEQPACKET = 5 ; (ENUM - enum sock_type*)
SOCK_DCCP = 6 ; (ENUM - enum sock_type*)
SOCK_PACKET = 10 ; (ENUM - enum sock_type*)
;define SOCK_MAX (SOCK_PACKET + 1)
SOCK_TYPE_MASK = 0xf ; (Mask which covers at least up to SOCK_MASK-1. The * remaining bits are used as flags)
SOCK_CLOEXEC equ O_CLOEXEC ; (Flags for socket, socketpair, accept4)
;ifndef SOCK_NONBLOCK ; (Flags for socket, socketpair, accept4)
SOCK_NONBLOCK equ O_NONBLOCK ; (Flags for socket, socketpair, accept4)
SHUT_RD = 1 ; (E-BLANK = enum sock_shutdown_cmd - Shutdown types - @SHUT_RD: shutdown receptions)
SHUT_WR = 2 ; (E-BLANK = enum sock_shutdown_cmd - Shutdown types - @SHUT_WR: shutdown transmissions)
SHUT_RDWR =3 ; (E-BLANK = enum sock_shutdown_cmd - Shutdown types - @SHUT_RDWR: shutdown receptions/transmissions
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HWTSTAMP_SOURCE_NETDEV = 1 ; (E-BLANK = include/net_tstamp.h - enum hwtstamp_source)
HWTSTAMP_SOURCE_PHYLIB = 2 ; (E-BLANK = include/net_tstamp.h - enum hwtstamp_source)
SOF_TIMESTAMPING_TX_HARDWARE equ 1<<0 ; (E-BLANK = uapi/net_tstamp.h - SO_TIMESTAMPING flags)
SOF_TIMESTAMPING_TX_SOFTWARE equ 1<<1
SOF_TIMESTAMPING_RX_HARDWARE equ 1<<2
SOF_TIMESTAMPING_RX_SOFTWARE equ 1<<3
SOF_TIMESTAMPING_SOFTWARE equ 1<<4
SOF_TIMESTAMPING_SYS_HARDWARE equ 1<<5
SOF_TIMESTAMPING_RAW_HARDWARE equ 1<<6
SOF_TIMESTAMPING_OPT_ID equ 1<<7
SOF_TIMESTAMPING_TX_SCHED equ 1<<8
SOF_TIMESTAMPING_TX_ACK equ 1<<9
SOF_TIMESTAMPING_OPT_CMSG equ 1<<10
SOF_TIMESTAMPING_OPT_TSONLY equ 1<<11
SOF_TIMESTAMPING_OPT_STATS equ 1<<12
SOF_TIMESTAMPING_OPT_PKTINFO equ 1<<13
SOF_TIMESTAMPING_OPT_TX_SWHW equ 1<<14
SOF_TIMESTAMPING_BIND_PHC equ 1 << 15
SOF_TIMESTAMPING_OPT_ID_TCP equ 1 << 16
;SOF_TIMESTAMPING_LAST equ SOF_TIMESTAMPING_OPT_ID_TCP ;
;SOF_TIMESTAMPING_MASK equ ; (SOF_TIMESTAMPING_LAST - 1) | SOF_TIMESTAMPING_LAST
;OF_TIMESTAMPING_TX_RECORD_MASK = ; (SOF_TIMESTAMPING_TX_HARDWARE | SOF_TIMESTAMPING_TX_SOFTWARE | SOF_TIMESTAMPING_TX_SCHED | SOF_TIMESTAMPING_TX_ACK)
HWTSTAMP_FLAG_BONDED_PHC_INDEX equ 1<<0
HWTSTAMP_FLAG_BONDED_PHC_INDEX equ HWTSTAMP_FLAG_BONDED_PHC_INDEX
HWTSTAMP_FLAG_LAST equ HWTSTAMP_FLAG_BONDED_PHC_INDEX
;HWTSTAMP_FLAG_MASK = (HWTSTAMP_FLAG_LAST - 1) | HWTSTAMP_FLAG_LAST
HWTSTAMP_TX_OFF = 1 ; (E-BLANK = uapi/net_tstamp.h - No outgoing packet will need hardware time stamping - enum hwtstamp_tx_types)
HWTSTAMP_TX_ON = 2 ; (E-BLANK = uapi/net_tstamp.h - Enables hardware time stamping for outgoing packets - enum hwtstamp_tx_types)
HWTSTAMP_TX_ONESTEP_SYNC = 3 ; (E-BLANK = uapi/net_tstamp.h - Enables time stamping for outgoing packets just as * HWTSTAMP_TX_ON does - enum hwtstamp_tx_types)
HWTSTAMP_TX_ONESTEP_P2P = 4 ; (E-BLANK = uapi/net_tstamp.h - Same as HWTSTAMP_TX_ONESTEP_SYNC, but also enables time * stamp insertion directly - enum hwtstamp_tx_types)
HWTSTAMP_FILTER_NONE = 1 ; (E-BLANK = uapi/net_tstamp.h - time stamp no incoming packet at all - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_ALL = 2 ; (E-BLANK = uapi/net_tstamp.h - time stamp any incoming packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_SOME = 3 ; (E-BLANK = uapi/net_tstamp.h - return value: time stamp all packets requested plus some others - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V1_L4_EVENT = 4 ; (E-BLANK = uapi/net_tstamp.h - PTP v1, UDP, any kind of event packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V1_L4_SYNC = 5 ; (E-BLANK = uapi/net_tstamp.h - PTP v1, UDP, Sync packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ = 6 ; (E-BLANK = uapi/net_tstamp.h - TP v1, UDP, Delay_req packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_L4_EVENT = 7 ; (E-BLANK = uapi/net_tstamp.h - PTP v2, UDP, any kind of event packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_L4_SYNC = 8 ; (E-BLANK = uapi/net_tstamp.h - PTP v2, UDP, Sync packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ = 9 ; (E-BLANK = uapi/net_tstamp.h - PTP v2, UDP, Delay_req packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_L2_EVENT = 10 ; (E-BLANK = uapi/net_tstamp.h - 802.AS1, Ethernet, any kind of event packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_L2_SYNC = 11 ; (E-BLANK = uapi/net_tstamp.h - 802.AS1, Ethernet, Sync packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ = 12 ; (E-BLANK = uapi/net_tstamp.h - 802.AS1, Ethernet, Delay_req packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_EVENT = 13 ; (E-BLANK = uapi/net_tstamp.h - PTP v2/802.AS1, any layer, any kind of event packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_SYNC = 14 ; (E-BLANK = uapi/net_tstamp.h - PTP v2/802.AS1, any layer, Sync packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_PTP_V2_DELAY_REQ = 15 ; (E-BLANK = uapi/net_tstamp.h - PTP v2/802.AS1, any layer, Delay_req packet - enum hwtstamp_rx_filters)
HWTSTAMP_FILTER_NTP_ALL = 16 ; (E-BLANK = uapi/net_tstamp.h - NTP, UDP, all versions and packet modes - enum hwtstamp_rx_filters)
SOF_TXTIME_DEADLINE_MODE equ 1 << 0 ; (ENUM - SO_TXTIME gets a struct sock_txtime with flags being an integer bit field - enum txtime_flags)
SOF_TXTIME_REPORT_ERRORS equ 1 << 1 ; (ENUM - SO_TXTIME gets a struct sock_txtime with flags being an integer bit field - enum txtime_flags)
SOF_TXTIME_FLAGS_LAST equ SOF_TXTIME_REPORT_ERRORS ;
;SOF_TXTIME_FLAGS_MASK = ; (SOF_TXTIME_FLAGS_LAST - 1) | SOF_TXTIME_FLAGS_LAST
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CTL_read equ 0x00 ;
CTL_write equ 0x01 ;
CTL_open equ 0x02 ;
CTL_close equ 0x03 ;
CTL_stat equ 0x04 ;
CTL_fstat equ 0x05 ;
CTL_lstat equ 0x06 ;
CTL_poll equ 0x07 ;
CTL_lseek equ 0x08 ;
CTL_mmap equ 0x09 ;
CTL_mprotect equ 0x0a ;
CTL_munmap equ 0x0b ;
CTL_brk equ 0x0c ;
CTL_rt_sigaction equ 0x0d ;
CTL_rt_sigprocmask equ 0x0e ;
CTL_rt_sigreturn equ 0x0f ;
CTL_ioctl equ 0x10 ;
CTL_pread64 equ 0x11 ;
CTL_pwrite64 equ 0x12 ;
CTL_readv equ 0x13 ;
CTL_writev equ 0x14 ;
CTL_access equ 0x15 ;
CTL_pipe equ 0x16 ;
CTL_select equ 0x17 ;
CTL_sched_yield equ 0x18 ;
CTL_mremap equ 0x19 ;
CTL_msync equ 0x1a ;
CTL_mincore equ 0x1b ;
CTL_madvise equ 0x1c ;
CTL_shmget equ 0x1d ;
CTL_shmat equ 0x1e ;
CTL_shmctl equ 0x1f ;
CTL_dup equ 0x20 ;
CTL_dup2 equ 0x21 ;
CTL_pause equ 0x22 ;
CTL_nanosleep equ 0x23 ;
CTL_getitimer equ 0x24 ;
CTL_alarm equ 0x25 ;
CTL_setitimer equ 0x26 ;
CTL_getpid equ 0x27 ;
CTL_sendfile equ 0x28 ;
CTL_socket equ 0x29 ;
CTL_connect equ 0x2a ;
CTL_accept equ 0x2b ;
CTL_sendto equ 0x2c ;
CTL_recvfrom equ 0x2d ;
CTL_sendmsg equ 0x2e ;
CTL_recvmsg equ 0x2f ;
CTL_shutdown equ 0x30 ;
CTL_bind equ 0x31 ;
CTL_listen equ 0x32 ;
CTL_getsockname equ 0x33 ;
CTL_getpeername equ 0x34 ;
CTL_socketpair equ 0x35 ;
CTL_setsockopt equ 0x36 ;
CTL_getsockopt equ 0x37 ;
CTL_clone equ 0x38 ;
CTL_fork equ 0x39 ;
CTL_vfork equ 0x3a ;
CTL_execve equ 0x3b ;
CTL_exit equ 0x3c ;
CTL_wait4 equ 0x3d ;
CTL_kill equ 0x3e ;
CTL_uname equ 0x3f ;
CTL_semget equ 0x40 ;
CTL_semop equ 0x41 ;
CTL_semctl equ 0x42 ;
CTL_shmdt equ 0x43 ;
CTL_msgget equ 0x44 ;
CTL_msgsnd equ 0x45 ;
CTL_msgrcv equ 0x46 ;
CTL_msgctl equ 0x47 ;
CTL_fcntl equ 0x48 ;
CTL_flock equ 0x49 ;
CTL_fsync equ 0x4a ;
CTL_fdatasync equ 0x4b ;
CTL_truncate equ 0x4c ;
CTL_ftruncate equ 0x4d ;
CTL_getdents equ 0x4e ;
CTL_getcwd equ 0x4f ;
CTL_chdir equ 0x50 ;
CTL_fchdir equ 0x51 ;
CTL_rename equ 0x52 ;
CTL_mkdir equ 0x53 ;
CTL_rmdir equ 0x54 ;
CTL_creat equ 0x55 ;
CTL_link equ 0x56 ;
CTL_unlink equ 0x57 ;
CTL_symlink equ 0x58 ;
CTL_readlink equ 0x59 ;
CTL_chmod equ 0x5a ;
CTL_fchmod equ 0x5b ;
CTL_chown equ 0x5c ;
CTL_fchown equ 0x5d ;
CTL_lchown equ 0x5e ;
CTL_umask equ 0x5f ;
CTL_gettimeofday equ 0x60 ;
CTL_getrlimit equ 0x61 ;
CTL_getrusage equ 0x62 ;
CTL_sysinfo equ 0x63 ;
CTL_times equ 0x64 ;
CTL_ptrace equ 0x65 ;
CTL_getuid equ 0x66 ;
CTL_syslog equ 0x67 ;
CTL_getgid equ 0x68 ;
CTL_setuid equ 0x69 ;
CTL_setgid equ 0x6a ;
CTL_geteuid equ 0x6b ;
CTL_getegid equ 0x6c ;
CTL_setpgid equ 0x6d ;
CTL_getppid equ 0x6e ;
CTL_getpgrp equ 0x6f ;
CTL_setsid equ 0x70 ;
CTL_setreuid equ 0x71 ;
CTL_setregid equ 0x72 ;
CTL_getgroups equ 0x73 ;
CTL_setgroups equ 0x74 ;
CTL_setresuid equ 0x75 ;
CTL_getresuid equ 0x76 ;
CTL_setresgid equ 0x77 ;
CTL_getresgid equ 0x78 ;
CTL_getpgid equ 0x79 ;
CTL_setfsuid equ 0x7a ;
CTL_setfsgid equ 0x7b ;
CTL_getsid equ 0x7c ;
CTL_capget equ 0x7d ;
CTL_capset equ 0x7e ;
CTL_rt_sigpending equ 0x7f ;
CTL_rt_sigtimedwait equ 0x80 ;
CTL_rt_sigqueueinfo equ 0x81 ;
CTL_rt_sigsuspend equ 0x82 ;
CTL_sigaltstack equ 0x83 ;
CTL_utime equ 0x84 ;
CTL_mknod equ 0x85 ;
CTL_uselib equ 134 ; Not implemented
CTL_personality equ 0x87 ;
CTL_ustat equ 0x88 ;
CTL_statfs equ 0x89 ;
CTL_fstatfs equ 0x8a ;
CTL_sysfs equ 0x8b ;
CTL_getpriority equ 0x8c ;
CTL_setpriority equ 0x8d ;
CTL_sched_setparam equ 0x8e ;
CTL_sched_getparam equ 0x8f ;
CTL_sched_setscheduler equ 0x90 ;
CTL_sched_getscheduler equ 0x91 ;
CTL_sched_get_priority_max equ 0x92 ;
CTL_sched_get_priority_min equ 0x93 ;
CTL_sched_rr_get_interval equ 0x94 ;
CTL_mlock equ 0x95 ;
CTL_munlock equ 0x96 ;
CTL_mlockall equ 0x97 ;
CTL_munlockall equ 0x98 ;
CTL_vhangup equ 0x99 ;
CTL_modify_ldt equ 0x9a ;
CTL_pivot_root equ 0x9b ;
CTLV_sysctl equ 0x9c ;
CTL_prctl equ 0x9d ;
CTL_arch_prctl equ 0x9e ;
CTL_adjtimex equ 0x9f ;
CTL_setrlimit equ 0xa0 ;
CTL_chroot equ 0xa1 ;
CTL_sync equ 0xa2 ;
CTL_acct equ 0xa3 ;
CTL_settimeofday equ 0xa4 ;
CTL_mount equ 0xa5 ;
CTL_umount2 equ 0xa6 ;
CTL_swapon equ 0xa7 ;
CTL_swapoff equ 0xa8 ;
CTL_reboot equ 0xa9 ;
CTL_sethostname equ 0xaa ;
CTL_setdomainname equ 0xab ;
CTL_iopl equ 0xac ;
CTL_ioperm equ 0xad ;
CTL_create_module equ 174 ; Not implemented
CTL_init_module equ 0xaf ;
CTL_delete_module equ 0xb0 ;
CTL_get_kernel_syms equ 177 ; Not implemented
CTL_query_module equ 178 ; Not implemented
CTL_quotactl equ 0xb3 ;
CTL_nfsservctl equ 180 ; Not implemented
CTL_getpmsg equ 181 ; Not implemented
CTL_putpmsg equ 182 ; Not implemented
CTL_afs_syscall equ 183 ; Not implemented
CTL_tuxcall equ 184 ; Not implemented
CTL_security equ 185 ; Not implemented
CTL_gettid equ 0xba ;
CTL_readahead equ 0xbb ;
CTL_setxattr equ 0xbc ;
CTL_lsetxattr equ 0xbd ;
CTL_fsetxattr equ 0xbe ;
CTL_getxattr equ 0xbf ;
CTL_lgetxattr equ 0xc0 ;
CTL_fgetxattr equ 0xc1 ;
CTL_listxattr equ 0xc2 ;
CTL_llistxattr equ 0xc3 ;
CTL_flistxattr equ 0xc4 ;
CTL_removexattr equ 0xc5 ;
CTL_lremovexattr equ 0xc6 ;
CTL_fremovexattr equ 0xc7 ;
CTL_tkill equ 0xc8 ;
CTL_time equ 0xc9 ;
CTL_futex equ 0xca ;
CTL_sched_setaffinity equ 0xcb ;
CTL_sched_getaffinity equ 0xcc ;
CTL_set_thread_area equ 205 ; Not implemented
CTL_io_setup equ 0xce ;
CTL_io_destroy equ 0xcf ;
CTL_io_getevents equ 0xd0 ;
CTL_io_submit equ 0xd1 ;
CTL_io_cancel equ 0xd2 ;
CTL_get_thread_area equ 211 ; Not implemented
CTL_lookup_dcookie equ 0xd4 ;
CTL_epoll_create equ 0xd5 ;
CTL_epoll_ctl_old equ 214 ; Not implemented
CTL_epoll_wait_old equ 215 ; Not implemented
CTL_remap_file_pages equ 0xd8 ;
CTL_getdents64 equ 0xd9 ;
CTL_set_tid_address equ 0xda ;
CTL_restart_syscall equ 0xdb ;
CTL_semtimedop equ 0xdc ;
CTL_fadvise64 equ 0xdd ;
CTL_timer_create equ 0xde ;
CTL_timer_settime equ 0xdf ;
CTL_timer_gettime equ 0xe0 ;
CTL_timer_getoverrun equ 0xe1 ;
CTL_timer_delete equ 0xe2 ;
CTL_clock_settime equ 0xe3 ;
CTL_clock_gettime equ 0xe4 ;
CTL_clock_getres equ 0xe5 ;
CTL_clock_nanosleep equ 0xe6 ;
CTL_exit_group equ 0xe7 ;
CTL_epoll_wait equ 0xe8 ;
CTL_epoll_ctl equ 0xe9 ;
CTL_tgkill equ 0xea ;
CTL_utimes equ 0xeb ;
CTL_vserver equ 236 ; Not implemented
CTL_mbind equ 0xed ;
CTL_set_mempolicy equ 0xee ;
CTL_get_mempolicy equ 0xef ;
CTL_mq_open equ 0xf0 ;
CTL_mq_unlink equ 0xf1 ;
CTL_mq_timedsend equ 0xf2 ;
CTL_mq_timedreceive equ 0xf3 ;
CTL_mq_notify equ 0xf4 ;
CTL_mq_getsetattr equ 0xf5 ;
CTL_kexec_load equ 0xf6 ;
CTL_waitid equ 0xf7 ;
CTL_add_key equ 0xf8 ;
CTL_request_key equ 0xf9 ;
CTL_keyctl equ 0xfa ;
CTL_ioprio_set equ 0xfb ;
CTL_ioprio_get equ 0xfc ;
CTL_inotify_init equ 0xfd ;
CTL_inotify_add_watch equ 0xfe ;
CTL_inotify_rm_watch equ 0xff ;
CTL_migrate_pages equ 0x100 ;
CTL_openat equ 0x101 ;
CTL_mkdirat equ 0x102 ;
CTL_mknodat equ 0x103 ;
CTL_fchownat equ 0x104 ;
CTL_futimesat equ 0x105 ;
CTL_newfstatat equ 0x106 ;
CTL_unlinkat equ 0x107 ;
CTL_renameat equ 0x108 ;
CTL_linkat equ 0x109 ;
CTL_symlinkat equ 0x10a ;
CTL_readlinkat equ 0x10b ;
CTL_fchmodat equ 0x10c ;
CTL_faccessat equ 0x10d ;
CTL_pselect6 equ 0x10e ;
CTL_ppoll equ 0x10f ;
CTL_unshare equ 0x110 ;
CTL_set_robust_list equ 0x111 ;
CTL_get_robust_list equ 0x112 ;
CTL_splice equ 0x113 ;
CTL_tee equ 0x114 ;
CTL_sync_file_range equ 0x115 ;
CTL_vmsplice equ 0x116 ;
CTL_move_pages equ 0x117 ;
CTL_utimensat equ 0x118 ;
CTL_epoll_pwait equ 0x119 ;
CTL_signalfd equ 0x11a ;
CTL_timerfd_create equ 0x11b ;
CTL_eventfd equ 0x11c ;
CTL_fallocate equ 0x11d ;
CTL_timerfd_settime equ 0x11e ;
CTL_timerfd_gettime equ 0x11f ;
CTL_accept4 equ 0x120 ;
CTL_signalfd4 equ 0x121 ;
CTL_eventfd2 equ 0x122 ;
CTL_epoll_create1 equ 0x123 ;
CTL_dup3 equ 0x124 ;
CTL_pipe2 equ 0x125 ;
CTL_inotify_init1 equ 0x126 ;
CTL_preadv equ 0x127 ;
CTL_pwritev equ 0x128 ;
CTL_rt_tgsigqueueinfo equ 0x129 ;
CTL_perf_event_open equ 0x12a ;
CTL_recvmmsg equ 0x12b ;
CTL_fanotify_init equ 0x12c ;
CTL_fanotify_mark equ 0x12d ;
CTL_prlimit64 equ 0x12e ;
CTL_name_to_handle_at equ 0x12f ;
CTL_open_by_handle_at equ 0x130 ;
CTL_clock_adjtime equ 0x131 ;
CTL_syncfs equ 0x132 ;
CTL_sendmmsg equ 0x133 ;
CTL_setns equ 0x134 ;
CTL_getcpu equ 0x135 ;
CTL_process_vm_readv equ 0x136 ;
CTL_process_vm_writev equ 0x137 ;
CTL_kcmp equ 0x138 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__NR_io_uring_setup = 535
__NR_io_uring_enter = 536
__NR_io_uring_register = 537
IORING_FILE_INDEX_ALLOC equ (~0U)
IOSQE_FIXED_FILE_BIT = 0 ; (enum)
IOSQE_IO_DRAIN_BIT = 1 ; (enum)
IOSQE_IO_LINK_BIT = 2 ; (enum)
IOSQE_IO_HARDLINK_BIT = 3 ; (enum)
IOSQE_ASYNC_BIT = 4 ; (enum)
IOSQE_BUFFER_SELECT_BIT = 5 ; (enum)
IOSQE_CQE_SKIP_SUCCESS_BIT = 6 ; (enum)
IOSQE_FIXED_FILE equ (1U << IOSQE_FIXED_FILE_BIT) ; (sqe->flags = use fixed fileset)
IOSQE_IO_DRAIN equ (1U << IOSQE_IO_DRAIN_BIT) ; (sqe->flags = issue after inflight IO)
IOSQE_IO_LINK equ (1U << IOSQE_IO_LINK_BIT) ; (sqe->flags = links next sqe)
IOSQE_IO_HARDLINK equ (1U << IOSQE_IO_HARDLINK_BIT) ; (sqe->flags = like LINK, but stronger)
IOSQE_ASYNC equ (1U << IOSQE_ASYNC_BIT) ; (sqe->flags = always go async)
IOSQE_BUFFER_SELECT equ (1U << IOSQE_BUFFER_SELECT_BIT) ; (sqe->flags = select buffer from sqe->buf_group)
IOSQE_CQE_SKIP_SUCCESS equ (1U << IOSQE_CQE_SKIP_SUCCESS_BIT) ; (sqe->flags = don't post CQE if request succeeded)
IORING_SETUP_IOPOLL equ (1U << 0) ; (io_uring_setup() flags = io_context is polled)
IORING_SETUP_SQPOLL equ (1U << 1) ; (io_uring_setup() flags = SQ poll thread)
IORING_SETUP_SQ_AFF equ (1U << 2) ; (io_uring_setup() flags = sq_thread_cpu is valid)
IORING_SETUP_CQSIZE equ (1U << 3) ; (io_uring_setup() flags = app defines CQ size)
IORING_SETUP_CLAMP equ (1U << 4) ; (io_uring_setup() flags = clamp SQ/CQ ring sizes)
IORING_SETUP_ATTACH_WQ equ (1U << 5) ; (io_uring_setup() flags = attach to existing wq)
IORING_SETUP_R_DISABLED equ (1U << 6) ; (io_uring_setup() flags = start with ring disabled)
IORING_SETUP_SUBMIT_ALL equ (1U << 7) ; (io_uring_setup() flags = continue submit on error)
IORING_SETUP_COOP_TASKRUN equ (1U << 8) ; (Cooperative task running. When requests complete)
IORING_SETUP_TASKRUN_FLAG equ (1U << 9) ; (This sets IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN)
IORING_SETUP_SQE128 equ (1U << 10) ; SQEs are 128 byte)
IORING_SETUP_CQE32 equ (1U << 11) ; CQEs are 32 byte)
IORING_SETUP_SINGLE_ISSUER equ (1U << 12) ; (Only one task is allowed to submit requests)
IORING_SETUP_DEFER_TASKRUN equ (1U << 13) ; (Defer running task work to get events)
IORING_OP_NOP = 0 ; (enum io_uring_op)
IORING_OP_READV = 1 ; (enum io_uring_op)
IORING_OP_WRITEV = 2 ; (enum io_uring_op)
IORING_OP_FSYNC = 3 ; (enum io_uring_op)
IORING_OP_READ_FIXED = 4 ; (enum io_uring_op)
IORING_OP_WRITE_FIXED = 5 ; (enum io_uring_op)
IORING_OP_POLL_ADD = 6 ; (enum io_uring_op)
IORING_OP_POLL_REMOVE = 7 ; (enum io_uring_op)
IORING_OP_SYNC_FILE_RANGE = 8 ; (enum io_uring_op)
IORING_OP_SENDMSG = 9 ; (enum io_uring_op)
IORING_OP_RECVMSG = 10 ; (enum io_uring_op)
IORING_OP_TIMEOUT = 11 ; (enum io_uring_op)
IORING_OP_TIMEOUT_REMOVE = 12 ; (enum io_uring_op)
IORING_OP_ACCEPT = 13 ; (enum io_uring_op)
IORING_OP_ASYNC_CANCEL = 14 ; (enum io_uring_op)
IORING_OP_LINK_TIMEOUT = 15 ; (enum io_uring_op)
IORING_OP_CONNECT = 16 ; (enum io_uring_op)
IORING_OP_FALLOCATE = 17 ; (enum io_uring_op)
IORING_OP_OPENAT = 18 ; (enum io_uring_op)
IORING_OP_CLOSE = 19 ; (enum io_uring_op)
IORING_OP_FILES_UPDATE = 20 ; (enum io_uring_op)
IORING_OP_STATX = 21 ; (enum io_uring_op)
IORING_OP_READ = 22 ; (enum io_uring_op)
IORING_OP_WRITE = 23 ; (enum io_uring_op)
IORING_OP_FADVISE = 24 ; (enum io_uring_op)
IORING_OP_MADVISE = 25 ; (enum io_uring_op)
IORING_OP_SEND = 26 ; (enum io_uring_op)
IORING_OP_RECV = 27 ; (enum io_uring_op)
IORING_OP_OPENAT2 = 28 ; (enum io_uring_op)
IORING_OP_EPOLL_CTL = 29 ; (enum io_uring_op)
IORING_OP_SPLICE = 30 ; (enum io_uring_op)
IORING_OP_PROVIDE_BUFFERS = 31 ; (enum io_uring_op)
IORING_OP_REMOVE_BUFFERS = 32 ; (enum io_uring_op)
IORING_OP_TEE = 33 ; (enum io_uring_op)
IORING_OP_SHUTDOWN = 34 ; (enum io_uring_op)
IORING_OP_RENAMEAT = 35 ; (enum io_uring_op)
IORING_OP_UNLINKAT = 36 ; (enum io_uring_op)
IORING_OP_MKDIRAT = 37 ; (enum io_uring_op)
IORING_OP_SYMLINKAT = 38 ; (enum io_uring_op)
IORING_OP_LINKAT = 39 ; (enum io_uring_op)
IORING_OP_MSG_RING = 40 ; (enum io_uring_op)
IORING_OP_FSETXATTR = 41 ; (enum io_uring_op)
IORING_OP_SETXATTR = 42 ; (enum io_uring_op)
IORING_OP_FGETXATTR = 43 ; (enum io_uring_op)
IORING_OP_GETXATTR = 44 ; (enum io_uring_op)
IORING_OP_SOCKET = 45 ; (enum io_uring_op)
IORING_OP_URING_CMD = 46 ; (enum io_uring_op)
IORING_OP_SEND_ZC = 47 ; (enum io_uring_op)
IORING_OP_SENDMSG_ZC = 48 ; (enum io_uring_op)
IORING_OP_LAST = 49
IORING_URING_CMD_FIXED equ (1U << 0) ; (sqe->uring_cmd_flags = IORING_URING_CMD_FIXED, use registered buffer - pass this flag along with setting sqe->buf_index)
IORING_FSYNC_DATASYNC equ (1U << 0) ; (sqe->fsync_flags)
IORING_TIMEOUT_ABS equ (1U << 0) ; (sqe->timeout_flags)
IORING_TIMEOUT_UPDATE equ (1U << 1) ; (sqe->timeout_flags)
IORING_TIMEOUT_BOOTTIME equ (1U << 2) ; (sqe->timeout_flags)
IORING_TIMEOUT_REALTIME equ (1U << 3) ; (sqe->timeout_flags)
IORING_LINK_TIMEOUT_UPDATE equ (1U << 4) ; (sqe->timeout_flags)
IORING_TIMEOUT_ETIME_SUCCESS equ (1U << 5) ; (sqe->timeout_flags)
IORING_TIMEOUT_MULTISHOT equ (1U << 6) ; (sqe->timeout_flags)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IORING_TIMEOUT_CLOCK_MASK equ IORING_TIMEOUT_BOOTTIME + IORING_TIMEOUT_REALTIME ; (sqe->timeout_flags)
IORING_TIMEOUT_UPDATE_MASK equ IORING_TIMEOUT_UPDATE + IORING_LINK_TIMEOUT_UPDATE ; (sqe->timeout_flags)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SPLICE_F_FD_IN_FIXED equ (1U << 31) ; (sqe->splice_flags extends splice(2) flags= the last bit of __u32)
IORING_POLL_ADD_MULTI equ (1U << 0) ; (POLL_ADD flags. Note that since sqe->poll_events is the flag space, the * command flags for POLL_ADD are stored in sqe->len)
IORING_POLL_UPDATE_EVENTS equ (1U << 1)
IORING_POLL_UPDATE_USER_DATA equ (1U << 2)
IORING_POLL_ADD_LEVEL equ (1U << 3)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;* IORING_POLL_ADD_MULTI - Multishot poll. Sets IORING_CQE_F_MORE ifthe poll handler will continue to report CQEs on behalf of the same SQE
;* IORING_POLL_UPDATE - Update existing poll request, matching sqe->addr as the old user_data field
;* IORING_POLL_LEVEL - Level triggered poll
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IORING_ASYNC_CANCEL_ALL equ (1U << 0) ; (ASYNC_CANCEL flags)
IORING_ASYNC_CANCEL_FD equ (1U << 1)
IORING_ASYNC_CANCEL_ANY equ (1U << 2)
IORING_ASYNC_CANCEL_FD_FIXED equ (1U << 3)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;* IORING_ASYNC_CANCEL_ALL - Cancel all requests that match the given key
;* IORING_ASYNC_CANCEL_FD - Key off 'fd' for cancelation rather than the request 'user_data'
;* IORING_ASYNC_CANCEL_ANY - Match any request
;* IORING_ASYNC_CANCEL_FD_FIXED - 'fd' passed in is a fixed descriptor
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IORING_RECVSEND_POLL_FIRST equ (1U << 0) ; (send/sendmsg and recv/recvmsg flags (sqe->ioprio)
IORING_RECV_MULTISHOT equ (1U << 1)
IORING_RECVSEND_FIXED_BUF equ (1U << 2)
IORING_SEND_ZC_REPORT_USAGE equ (1U << 3)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;* IORING_RECVSEND_POLL_FIRST - If set, instead of first attempting to send or receive and arm poll if that yields an -EAGAIN result, arm poll upfront and skip the initial transfer attempt
;* IORING_RECV_MULTISHOT - Multishot recv. Sets IORING_CQE_F_MORE if the handler will continue to report CQEs on behalf of the same SQE
;* IORING_RECVSEND_FIXED_BUF - Use registered buffers, the index is stored in the buf_index field
;* IORING_SEND_ZC_REPORT_USAGE - If set, SEND[MSG]_ZC should report the zerocopy usage in cqe.res for the IORING_CQE_F_NOTIF cqe. 0 is reported if zerocopy was actually possible
;* IORING_NOTIF_USAGE_ZC_COPIED - if data was copied (at least partially)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IORING_NOTIF_USAGE_ZC_COPIED equ (1U << 31) ; (cqe.res for IORING_CQE_F_NOTIF if * IORING_SEND_ZC_REPORT_USAGE was requested)
IORING_ACCEPT_MULTISHOT equ (1U << 0) ; (accept flags stored in sqe->ioprio)
IORING_MSG_DATA = 0 ; enum = IORING_OP_MSG_RING command types, stored in sqe->addr - pass sqe->len as 'res' and off as user_data)
IORING_MSG_SEND_FD = 1 ; enum = IORING_OP_MSG_RING command types, stored in sqe->addr - send a registered fd to another ring)
IORING_MSG_RING_CQE_SKIP equ (1U << 0) ; (IORING_OP_MSG_RING flags (sqe->msg_ring_flags)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;* IORING_MSG_RING_CQE_SKIP Don't post a CQE to the target ring. Not applicable for IORING_MSG_DATA, obviously
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IORING_MSG_RING_FLAGS_PASS equ (1U << 1) ; (Pass through the flags from sqe->file_index to cqe->flags)
IORING_CQE_F_BUFFER equ (1U << 0) ; (cqe->flags)
IORING_CQE_F_MORE equ (1U << 1) ; (cqe->flags)
IORING_CQE_F_SOCK_NONEMPTY equ (1U << 2) ; (cqe->flags)
IORING_CQE_F_NOTIF equ (1U << 3) ; (cqe->flags)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;* IORING_CQE_F_BUFFER If set, the upper 16 bits are the buffer ID
;* IORING_CQE_F_MORE If set, parent SQE will generate more CQE entries
;* IORING_CQE_F_SOCK_NONEMPTY If set, more data to read after socket recv
;* IORING_CQE_F_NOTIF Set for notification CQEs. Can be used to distinct them from sends
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IORING_CQE_BUFFER_SHIFT = 16 ; (enum - (cqe->flags)
IORING_OFF_SQ_RING = 0 ; (Magic offsets for the application to mmap the data it needs) - 0ULL
IORING_OFF_CQ_RING = 0x8000000 ; (Magic offsets for the application to mmap the data it needs) - 0x8000000ULL
IORING_OFF_SQES = 0x10000000 ; (Magic offsets for the application to mmap the data it needs) - 0x10000000ULL
IORING_OFF_PBUF_RING = 0x80000000 ; (Magic offsets for the application to mmap the data it needs) - 0x80000000ULL
IORING_OFF_PBUF_SHIFT = 16 ; (Magic offsets for the application to mmap the data it needs)
IORING_OFF_MMAP_MASK = 0xf8000000 ; (Magic offsets for the application to mmap the data it needs) - 0xf8000000ULL
IORING_SQ_NEED_WAKEUP equ (1U << 0) ; ( sq_ring->flags = needs io_uring_enter wakeup)
IORING_SQ_CQ_OVERFLOW equ (1U << 1) ; ( sq_ring->flags = CQ ring is overflown)
IORING_SQ_TASKRUN equ (1U << 2) ; ( sq_ring->flags = task should enter the kernel)
IORING_CQ_EVENTFD_DISABLED equ (1U << 0) ; ( cq_ring->flags = disable eventfd notifications)
IORING_ENTER_GETEVENTS equ (1U << 0) ; (io_uring_enter flags)
IORING_ENTER_SQ_WAKEUP equ (1U << 1) ; (io_uring_enter flags)
IORING_ENTER_SQ_WAIT equ (1U << 2) ; (io_uring_enter flags)
IORING_ENTER_EXT_ARG equ (1U << 3) ; (io_uring_enter flags)
IORING_ENTER_REGISTERED_RING equ (1U << 4) ; (io_uring_enter flags)
IORING_FEAT_SINGLE_MMAP equ (1U << 0) ; (io_uring_params->features flags)
IORING_FEAT_NODROP equ (1U << 1) ; (io_uring_params->features flags)
IORING_FEAT_SUBMIT_STABLE equ (1U << 2) ; (io_uring_params->features flags)
IORING_FEAT_RW_CUR_POS equ (1U << 3) ; (io_uring_params->features flags)
IORING_FEAT_CUR_PERSONALITY equ (1U << 4) ; (io_uring_params->features flags)
IORING_FEAT_FAST_POLL equ (1U << 5) ; (io_uring_params->features flags)
IORING_FEAT_POLL_32BITS equ (1U << 6) ; (io_uring_params->features flags)
IORING_FEAT_SQPOLL_NONFIXED equ (1U << 7) ; (io_uring_params->features flags)
IORING_FEAT_EXT_ARG equ (1U << 8) ; (io_uring_params->features flags)
IORING_FEAT_NATIVE_WORKERS equ (1U << 9) ; (io_uring_params->features flags)
IORING_FEAT_RSRC_TAGS equ (1U << 10) ; (io_uring_params->features flags)
IORING_FEAT_CQE_SKIP equ (1U << 11) ; (io_uring_params->features flags)
IORING_FEAT_LINKED_FILE equ (1U << 12) ; (io_uring_params->features flags)
IORING_FEAT_REG_REG_RING equ (1U << 13) ; (io_uring_params->features flags)
IORING_REGISTER_BUFFERS = 0 ; (enum = io_uring_register opcodes and arguments)
IORING_UNREGISTER_BUFFERS = 1 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_FILES = 2 ; (enum = io_uring_register opcodes and arguments)
IORING_UNREGISTER_FILES = 3 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_EVENTFD = 4 ; (enum = io_uring_register opcodes and arguments)
IORING_UNREGISTER_EVENTFD = 5 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_FILES_UPDATE = 6 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_EVENTFD_ASYNC = 7 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_PROBE = 8 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_PERSONALITY = 9 ; (enum = io_uring_register opcodes and arguments)
IORING_UNREGISTER_PERSONALITY = 10 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_RESTRICTIONS = 11 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_ENABLE_RINGS = 12 ; (enum = io_uring_register opcodes and arguments)
IORING_REGISTER_FILES2 = 13 ; (enum = io_uring_register opcodes and arguments + extended with tagging)
IORING_REGISTER_FILES_UPDATE2 = 14 ; (enum = io_uring_register opcodes and arguments + extended with tagging)
IORING_REGISTER_BUFFERS2 = 15 ; (enum = io_uring_register opcodes and arguments + extended with tagging)
IORING_REGISTER_BUFFERS_UPDATE = 16 ; (enum = io_uring_register opcodes and arguments + extended with tagging)
IORING_REGISTER_IOWQ_AFF = 17 ; (enum = io_uring_register opcodes and arguments + set/clear io-wq thread affinities)
IORING_UNREGISTER_IOWQ_AFF = 18 ; (enum = io_uring_register opcodes and arguments + set/clear io-wq thread affinities)
IORING_REGISTER_IOWQ_MAX_WORKERS = 19 ; (enum = io_uring_register opcodes and arguments + set/get max number of io-wq workers)
IORING_REGISTER_RING_FDS = 20 ; (enum = io_uring_register opcodes and arguments + register/unregister io_uring fd with the ring)
IORING_UNREGISTER_RING_FDS = 21 ; (enum = io_uring_register opcodes and arguments + register/unregister io_uring fd with the ring)
IORING_REGISTER_PBUF_RING = 22 ; (enum = io_uring_register opcodes and arguments + register ring based provide buffer group)
IORING_UNREGISTER_PBUF_RING = 23 ; (enum = io_uring_register opcodes and arguments + register ring based provide buffer group)
IORING_REGISTER_SYNC_CANCEL = 24 ; (enum = io_uring_register opcodes and arguments + sync cancelation API)
IORING_REGISTER_FILE_ALLOC_RANGE = 25 ; (enum = io_uring_register opcodes and arguments + register a range of fixed file slots for automatic slot allocation)
;IORING_REGISTER_LAST = ; (enum = io_uring_register opcodes and arguments + this goes last)
IORING_REGISTER_USE_REGISTERED_RING equ 1U << 31 ; (enum = io_uring_register opcodes and arguments + flag added to the opcode to use a registered ring fd)
IO_WQ_BOUND = 0 ; (io-wq worker categories)
IO_WQ_UNBOUND = 1 ; (io-wq worker categories)
IORING_RSRC_REGISTER_SPARSE equ (1U << 0) ; (Register a fully sparse file space, rather than pass in an array of all * -1 file descriptors)
IORING_REGISTER_FILES_SKIP equ (-2) ; (Skip updating fd indexes set to this value in the fd table)
IO_URING_OP_SUPPORTED equ (1U << 0) ; (Skip updating fd indexes set to this value in the fd table)
IORING_RESTRICTION_REGISTER_OP = 0 ; (enum = io_uring_restriction->opcode values - Allow an io_uring_register opcode)
IORING_RESTRICTION_SQE_OP = 1 ; (enum = io_uring_restriction->opcode values - Allow an sqe opcode)
IORING_RESTRICTION_SQE_FLAGS_ALLOWED = 2 ; (enum = io_uring_restriction->opcode values - Allow sqe flags)
IORING_RESTRICTION_SQE_FLAGS_REQUIRED = 3 ; (enum = io_uring_restriction->opcode values - Require sqe flags (these flags must be set on each submission)
;IORING_RESTRICTION_LAST = ; ; (enum = io_uring_restriction->opcode values - )
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - (LIBEVENT)
define EVENT2_EVENT_CONFIG_H_INCLUDED_
EVENT__NUMERIC_VERSION = 0x02010c00
;EVENT__PACKAGE_VERSION = "2.1.12"
EVENT__VERSION_MAJOR = 2
EVENT__VERSION_MINOR = 1
EVENT__VERSION_PATCH = 12
;EVENT__VERSION = "2.1.12-stable"
EVENT__PACKAGE = "libevent"
EVENT__PACKAGE_BUGREPORT = ""
EVENT__PACKAGE_NAME = ""
EVENT__PACKAGE_STRING = ""
EVENT__PACKAGE_TARNAME = ""
EVENT__HAVE_ACCEPT4 = 1
EVENT__HAVE_ARC4RANDOM = 1
EVENT__HAVE_ARC4RANDOM_BUF = 1
EVENT__DNS_USE_CPU_CLOCK_FOR_ID = 1
EVENT__HAVE_ARPA_INET_H = 1
EVENT__HAVE_CLOCK_GETTIME = 1
EVENT__HAVE_DECL_CTL_KERN = 0
EVENT__HAVE_DECL_KERN_ARND = 0
EVENT__HAVE_GETRANDOM = 1
EVENT__HAVE_NETDB_H = 1
EVENT__HAVE_FD_MASK = 1
EVENT__HAVE_TAILQFOREACH = 1
EVENT__HAVE_DLFCN_H = 1
EVENT__HAVE_EPOLL = 1
EVENT__HAVE_EPOLL_CREATE1 = 1
EVENT__HAVE_EPOLL_CTL = 1
EVENT__HAVE_EVENTFD = 1
EVENT__HAVE_FCNTL = 1
EVENT__HAVE_FCNTL_H = 1
EVENT__HAVE_GETADDRINFO = 1
EVENT__HAVE_GETEGID = 1
EVENT__HAVE_GETEUID = 1
EVENT__HAVE_GETHOSTBYNAME_R = 1
EVENT__HAVE_GETHOSTBYNAME_R_6_ARG = 1
EVENT__HAVE_GETIFADDRS = 1
EVENT__HAVE_GETNAMEINFO = 1
EVENT__HAVE_GETPROTOBYNUMBER = 1
EVENT__HAVE_GETSERVBYNAME = 1
EVENT__HAVE_GETTIMEOFDAY = 1
EVENT__HAVE_IFADDRS_H = 1
EVENT__HAVE_INET_NTOP = 1
EVENT__HAVE_INET_PTON = 1
EVENT__HAVE_INTTYPES_H = 1
EVENT__HAVE_LIBZ = 1
EVENT__HAVE_MEMORY_H = 1
EVENT__HAVE_MMAP = 1
EVENT__HAVE_NANOSLEEP = 1
EVENT__HAVE_USLEEP = 1
EVENT__HAVE_NETINET_IN_H = 1
EVENT__HAVE_NETINET_TCP_H = 1
EVENT__HAVE_SYS_UN_H = 1
EVENT__HAVE_OPENSSL = 1
EVENT__HAVE_PIPE = 1
EVENT__HAVE_PIPE2 = 1
EVENT__HAVE_POLL = 1
EVENT__HAVE_POLL_H = 1
EVENT__HAVE_PTHREADS = 1
EVENT__HAVE_PUTENV = 1
EVENT__HAVE_SA_FAMILY_T = 1
EVENT__HAVE_SELECT = 1
EVENT__HAVE_SETENV = 1
EVENT__HAVE_SETFD = 1
EVENT__HAVE_SETRLIMIT = 1
EVENT__HAVE_SENDFILE = 1
EVENT__HAVE_SIGACTION = 1
EVENT__HAVE_SIGNAL = 1
EVENT__HAVE_SPLICE = 1
EVENT__HAVE_STDARG_H = 1
EVENT__HAVE_STDDEF_H = 1
EVENT__HAVE_STDINT_H = 1
EVENT__HAVE_STDLIB_H = 1
EVENT__HAVE_STRING_H = 1
EVENT__HAVE_STRSEP = 1
EVENT__HAVE_STRTOK_R = 1
EVENT__HAVE_STRTOLL = 1
EVENT__HAVE_STRUCT_ADDRINFO = 1
EVENT__HAVE_STRUCT_IN6_ADDR = 1
EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 = 1
EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 = 1
EVENT__HAVE_STRUCT_SOCKADDR_IN6 = 1
EVENT__HAVE_STRUCT_SOCKADDR_UN = 1
EVENT__HAVE_STRUCT_SOCKADDR_STORAGE = 1
EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 1
EVENT__HAVE_STRUCT_LINGER = 1
EVENT__HAVE_SYS_EPOLL_H = 1
EVENT__HAVE_SYS_EVENTFD_H = 1
EVENT__HAVE_SYS_IOCTL_H = 1
EVENT__HAVE_SYS_MMAN_H = 1
EVENT__HAVE_SYS_PARAM_H = 1
EVENT__HAVE_SYS_QUEUE_H = 1
EVENT__HAVE_SYS_RESOURCE_H = 1
EVENT__HAVE_SYS_SELECT_H = 1
EVENT__HAVE_SYS_SENDFILE_H = 1
EVENT__HAVE_SYS_SOCKET_H = 1
EVENT__HAVE_SYS_STAT_H = 1
EVENT__HAVE_SYS_RANDOM_H = 1
EVENT__HAVE_SYS_TIMERFD_H = 1
EVENT__HAVE_SYS_TIME_H = 1
EVENT__HAVE_SYS_TYPES_H = 1
EVENT__HAVE_SYS_UIO_H = 1
EVENT__HAVE_SYS_WAIT_H = 1
EVENT__HAVE_ERRNO_H = 1
EVENT__HAVE_TAILQFOREACH = 1
EVENT__HAVE_TIMERADD = 1
EVENT__HAVE_TIMERCLEAR = 1
EVENT__HAVE_TIMERCMP = 1
EVENT__HAVE_TIMERFD_CREATE = 1
EVENT__HAVE_TIMERISSET = 1
EVENT__HAVE_UINT8_T = 1
EVENT__HAVE_UINT16_T = 1
EVENT__HAVE_UINT32_T = 1
EVENT__HAVE_UINT64_T = 1
EVENT__HAVE_UINTPTR_T = 1
EVENT__HAVE_UMASK = 1
EVENT__HAVE_UNISTD_H = 1
EVENT__HAVE_UNSETENV = 1
EVENT__HAVE_VASPRINTF = 1
EVENT__SIZEOF_PTHREAD_T = 8
EVENT__SIZEOF_INT = 4
EVENT__SIZEOF_LONG = 8
EVENT__SIZEOF_LONG_LONG = 8
EVENT__SIZEOF_OFF_T = 8
EVENT__SIZEOF_SSIZE_T = 8
EVENT__SIZEOF_SHORT = 2
EVENT__SIZEOF_SIZE_T = 8
EVENT__SIZEOF_SOCKLEN_T = 4
EVENT__SIZEOF_VOID_P = 8
EVENT__SIZEOF_TIME_T = 8
EVLIST_TIMEOUT = 0x01
EVLIST_INSERTED = 0x02
EVLIST_SIGNAL = 0x04
EVLIST_ACTIVE = 0x08
EVLIST_INTERNAL = 0x10
EVLIST_ACTIVE_LATER = 0x20
EVLIST_FINALIZING = 0x40
EVLIST_INIT = 0x80
EVLIST_ALL = 0xff
EVENT_BASE_COUNT_ACTIVE = 1 ; U
EVENT_BASE_COUNT_VIRTUAL = 2 ; U
EVENT_BASE_COUNT_ADDED = 4 ; U
EV_FEATURE_ET = 0x01 ; ENUM
EV_FEATURE_O1 = 0x02 ; ENUM
EV_FEATURE_FDS = 0x04 ; ENUM
EV_FEATURE_EARLY_CLOSE = 0x08 ; ENUM
EVENT_BASE_FLAG_NOLOCK = 0x01 ; ENUM
EVENT_BASE_FLAG_IGNORE_ENV = 0x02 ; ENUM
EVENT_BASE_FLAG_STARTUP_IOCP = 0x04 ; ENUM
EVENT_BASE_FLAG_NO_CACHE_TIME = 0x08 ; ENUM
EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST = 0x10 ; ENUM
EVENT_BASE_FLAG_PRECISE_TIMER = 0x20 ; ENUM
EVENT_LOG_DEBUG = 0 ;
EVENT_LOG_MSG = 1 ;
EVENT_LOG_WARN = 2 ;
EVENT_LOG_ERR = 3 ;
EVENT_DBG_ALL = 0xffffffff ; 0xffffffffu
EVENT_DBG_NONE = 0 ;
EVLOOP_ONCE = 0x01 ;
EVLOOP_NONBLOCK = 0x02 ;
EVLOOP_NO_EXIT_ON_EMPTY = 0x04 ;
EV_TIMEOUT = 0x01 ;
EV_READ = 0x02 ;
EV_WRITE = 0x04 ;
EV_SIGNAL = 0x08 ;
EV_PERSIST = 0x10 ;
EV_ET = 0x20 ;
EV_FINALIZE = 0x40 ;
EV_CLOSED = 0x80 ;
EVENT_MAX_PRIORITIES = 256 ;
;EVBUFFER_READ = BEV_EVENT_READING ;
;EVBUFFER_WRITE = BEV_EVENT_WRITING ;
;EVBUFFER_EOF = BEV_EVENT_EOF ;
;EVBUFFER_ERROR = BEV_EVENT_ERROR ;
;EVBUFFER_TIMEOUT = BEV_EVENT_TIMEOUT ;
BEV_EVENT_READING = 0x01 ; error encountered while reading
BEV_EVENT_WRITING = 0x02 ; error encountered while writing
BEV_EVENT_EOF = 0x10 ; eof file reached
BEV_EVENT_ERROR = 0x20 ; unrecoverable error encountered
BEV_EVENT_TIMEOUT = 0x40 ; user-specified timeout reached
BEV_EVENT_CONNECTED = 0x80 ; connect operation finished
BEV_OPT_CLOSE_ON_FREE equ (1<<0) ;
BEV_OPT_THREADSAFE equ (1<<1) ;
BEV_OPT_DEFER_CALLBACKS equ (1<<2) ;
BEV_OPT_UNLOCK_CALLBACKS equ (1<<3) ;
BEV_NORMAL = 0 ; ENUM
BEV_FLUSH = 1 ; ENUM
BEV_FINISHED = 2 ; ENUM
BEV_TRIG_IGNORE_WATERMARKS equ (1<<16) ; ENUM
;BEV_TRIG_DEFER_CALLBACKS = BEV_OPT_DEFER_CALLBACKS ; ENUM
BEV_OK = 0 ; ENUM
BEV_NEED_MORE = 1 ; ENUM
BEV_ERROR = 2 ; ENUM
BUFFEREVENT_SSL_OPEN = 0 ; ENUM
BUFFEREVENT_SSL_CONNECTING = 1 ; ENUM
BUFFEREVENT_SSL_ACCEPTING = 2 ; ENUM
EVBUFFER_FLAG_DRAINS_TO_FD = 1
EVBUF_FS_CLOSE_ON_FREE = 0x01
EVBUF_FS_DISABLE_MMAP = 0x02
EVBUF_FS_DISABLE_SENDFILE = 0x04
EVBUF_FS_DISABLE_LOCKING = 0x08
DNS_ERR_NONE = 0
DNS_ERR_FORMAT = 1
DNS_ERR_SERVERFAILED = 2
DNS_ERR_NOTEXIST = 3
DNS_ERR_NOTIMPL = 4
DNS_ERR_REFUSED = 5
DNS_ERR_TRUNCATED = 65
DNS_ERR_UNKNOWN = 66
DNS_ERR_TIMEOUT = 67
DNS_ERR_SHUTDOWN = 68
DNS_ERR_CANCEL = 69
DNS_ERR_NODATA = 70
DNS_IPv4_A = 1
DNS_PTR = 2
DNS_IPv6_AAAA = 3
DNS_QUERY_NO_SEARCH = 1
DNS_OPTION_SEARCH = 1
DNS_OPTION_NAMESERVERS = 2
DNS_OPTION_MISC = 4
DNS_OPTION_HOSTSFILE = 8
;DNS_OPTIONS_ALL ; (DNS_OPTION_SEARCH|DNS_OPTION_NAMESERVERS|DNS_OPTION_MISC|DNS_OPTION_HOSTSFILE)
DNS_OPTION_NAMESERVERS_NO_DEFAULT = 16
DNS_NO_SEARCH = DNS_QUERY_NO_SEARCH
EVDNS_BASE_INITIALIZE_NAMESERVERS = 1
EVDNS_BASE_DISABLE_WHEN_INACTIVE = 0x8000
EVDNS_BASE_NAMESERVERS_NO_DEFAULT = 0x10000
EVDNS_ANSWER_SECTION = 0
EVDNS_AUTHORITY_SECTION = 1
EVDNS_ADDITIONAL_SECTION = 2
EVDNS_TYPE_A = 1
EVDNS_TYPE_NS = 2
EVDNS_TYPE_CNAME = 5
EVDNS_TYPE_SOA = 6
EVDNS_TYPE_PTR = 12
EVDNS_TYPE_MX = 15
EVDNS_TYPE_TXT = 16
EVDNS_TYPE_AAAA = 28
EVDNS_QTYPE_AXFR = 252
EVDNS_QTYPE_ALL = 255
EVDNS_CLASS_INET = 1
EVDNS_FLAGS_AA = 0x400
EVDNS_FLAGS_RD = 0x080
HTTP_OK = 200 ; request completed ok
HTTP_NOCONTENT = 204 ; request does not have content
HTTP_MOVEPERM = 301 ; the uri moved permanently
HTTP_MOVETEMP = 302 ; the uri moved temporarily
HTTP_NOTMODIFIED = 304 ; page was not modified from last
HTTP_BADREQUEST = 400 ; invalid http request was made
HTTP_NOTFOUND = 404 ; could not find content for uri
HTTP_BADMETHOD = 405 ; method not allowed for this uri
HTTP_ENTITYTOOLARGE = 413 ;
HTTP_EXPECTATIONFAILED = 417 ; we can't handle this expectation
HTTP_INTERNAL = 500 ; internal error
HTTP_NOTIMPLEMENTED = 501 ; not implemented
HTTP_SERVUNAVAIL = 503 ; the server is not available
EVHTTP_SERVER_LINGERING_CLOSE = 0x0001 ;
EVHTTP_REQ_GET equ 1 << 0 ;
EVHTTP_REQ_POST equ 1 << 1 ;
EVHTTP_REQ_HEAD equ 1 << 2 ;
EVHTTP_REQ_PUT equ 1 << 3 ;
EVHTTP_REQ_DELETE equ 1 << 4 ;
EVHTTP_REQ_OPTIONS equ 1 << 5 ;
EVHTTP_REQ_TRACE equ 1 << 6 ;
EVHTTP_REQ_CONNECT equ 1 << 7 ;
EVHTTP_REQ_PATCH equ 1 << 8 ;
;EVREQ_HTTP_TIMEOUT = ;
;EVREQ_HTTP_EOF = ;
;EVREQ_HTTP_INVALID_HEADER = ;
;EVREQ_HTTP_BUFFER_ERROR = ;
;EVREQ_HTTP_REQUEST_CANCEL = ;
;EVREQ_HTTP_DATA_TOO_LONG = ;
EVHTTP_CON_REUSE_CONNECTED_ADDR = 0x0008
EVHTTP_CON_READ_ON_WRITE_ERROR = 0x0010
EVHTTP_CON_LINGERING_CLOSE = 0x0020
EVHTTP_CON_PUBLIC_FLAGS_END = 0x100000
EVHTTP_URI_NONCONFORMANT = 0x01
EVHTTP_REQ_OWN_CONNECTION = 0x0001
EVHTTP_PROXY_REQUEST = 0x0002
EVHTTP_USER_OWNED = 0x0004
EVHTTP_REQ_DEFER_FREE = 0x0008
EVHTTP_REQ_NEEDS_FREE = 0x0010
LEV_OPT_LEAVE_SOCKETS_BLOCKING equ (1u<<0)
LEV_OPT_CLOSE_ON_FREE equ (1u<<1)
LEV_OPT_CLOSE_ON_EXEC equ (1u<<2)
LEV_OPT_REUSEABLE equ (1u<<3)
LEV_OPT_THREADSAFE equ (1u<<4)
LEV_OPT_DISABLED equ (1u<<5)
LEV_OPT_DEFERRED_ACCEPT equ (1u<<6)
LEV_OPT_REUSEABLE_PORT equ (1u<<7)
LEV_OPT_BIND_IPV6ONLY equ (1u<<8)
;EVRPC_INPUT = ; apply the function to an input hook
;EVRPC_OUTPUT = ; apply the function to an output hook
;
;INPUT = EVRPC_INPUT ; Deprecated alias for EVRPC_INPUT. Not available on windows
;OUTPUT = EVRPC_OUTPUT ; Deprecated alias for EVRPC_OUTPUT. Not available on windows
EVRPC_TERMINATE = -1 ; ENUM - indicates the rpc should be terminated
EVRPC_CONTINUE = 0 ; ENUM - continue processing the rpc
EVRPC_PAUSE = 1 ; ENUM - pause processing request until resumed
EVRPC_STATUS_ERR_NONE = 0
EVRPC_STATUS_ERR_TIMEOUT = 1
EVRPC_STATUS_ERR_BADPAYLOAD = 2
EVRPC_STATUS_ERR_UNSTARTED = 3
EVRPC_STATUS_ERR_HOOKABORTED = 4
EVTHREAD_WRITE = 0x04
EVTHREAD_READ = 0x08
EVTHREAD_TRY = 0x10
EVTHREAD_LOCK_API_VERSION = 1
EVTHREAD_LOCKTYPE_RECURSIVE = 1
EVTHREAD_LOCKTYPE_READWRITE = 2
EVTHREAD_CONDITION_API_VERSION = 1
EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED = 1
EVTHREAD_USE_PTHREADS_IMPLEMENTED = 1
EV_MONOT_PRECISE = 1
EV_MONOT_FALLBACK = 2
EVUTIL_INVALID_SOCKET = -1
EVUTIL_EAI_ADDRFAMILY equ EAI_ADDRFAMILY
EVUTIL_EAI_ADDRFAMILY = -901
EVUTIL_EAI_AGAIN equ EAI_AGAIN
EVUTIL_EAI_AGAIN = -902
EVUTIL_EAI_BADFLAGS equ EAI_BADFLAGS
EVUTIL_EAI_BADFLAGS = -903
EVUTIL_EAI_FAIL equ EAI_FAIL
EVUTIL_EAI_FAIL = -904
EVUTIL_EAI_FAMILY equ EAI_FAMILY
EVUTIL_EAI_FAMILY = -905
EVUTIL_EAI_MEMORY equ EAI_MEMORY
EVUTIL_EAI_MEMORY = -906
EVUTIL_EAI_NODATA equ EAI_NODATA
EVUTIL_EAI_NODATA = -907
EVUTIL_EAI_NONAME equ EAI_NONAME
EVUTIL_EAI_NONAME = -908
EVUTIL_EAI_SERVICE equ EAI_SERVICE
EVUTIL_EAI_SERVICE = -909
EVUTIL_EAI_SOCKTYPE equ EAI_SOCKTYPE
EVUTIL_EAI_SOCKTYPE = -910
EVUTIL_EAI_SYSTEM equ EAI_SYSTEM
EVUTIL_EAI_SYSTEM = -911
EVUTIL_EAI_CANCEL = -90001
EVUTIL_AI_PASSIVE equ AI_PASSIVE
EVUTIL_AI_PASSIVE = 0x1000
EVUTIL_AI_CANONNAME equ AI_CANONNAME
EVUTIL_AI_CANONNAME = 0x2000
EVUTIL_AI_NUMERICHOST equ AI_NUMERICHOST
EVUTIL_AI_NUMERICHOST = 0x4000
EVUTIL_AI_NUMERICSERV equ AI_NUMERICSERV
EVUTIL_AI_NUMERICSERV = 0x8000
EVUTIL_AI_V4MAPPED equ AI_V4MAPPED
EVUTIL_AI_V4MAPPED = 0x10000
EVUTIL_AI_ALL = 0x20000
EVUTIL_AI_ADDRCONFIG = 0x40000
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RL_READLINE_VERSION = 0x0802 ; Readline 8.2
RL_VERSION_MAJOR = 8
RL_VERSION_MINOR = 2
RL_PROMPT_START_IGNORE = '\001'
RL_PROMPT_END_IGNORE = '\002'
NO_MATCH = 0
SINGLE_MATCH = 1
MULT_MATCH = 2
RL_STATE_NONE = 0x000000 ; no state; before first call
RL_STATE_INITIALIZING = 0x0000001 ; initializing
RL_STATE_INITIALIZED = 0x0000002 ; initialization done
RL_STATE_TERMPREPPED = 0x0000004 ; terminal is prepped
RL_STATE_READCMD = 0x0000008 ; reading a command key
RL_STATE_METANEXT = 0x0000010 ; reading input after ESC
RL_STATE_DISPATCHING = 0x0000020 ; dispatching to a command
RL_STATE_MOREINPUT = 0x0000040 ; reading more input in a command function
RL_STATE_ISEARCH = 0x0000080 ; doing incremental search
RL_STATE_NSEARCH = 0x0000100 ; doing non-inc search
RL_STATE_SEARCH = 0x0000200 ; doing a history search
RL_STATE_NUMERICARG = 0x0000400 ; reading numeric argument
RL_STATE_MACROINPUT = 0x0000800 ; getting input from a macro
RL_STATE_MACRODEF = 0x0001000 ; defining keyboard macro
RL_STATE_OVERWRITE = 0x0002000 ; overwrite mode
RL_STATE_COMPLETING = 0x0004000 ; doing completion
RL_STATE_SIGHANDLER = 0x0008000 ; in readline sighandler
RL_STATE_UNDOING = 0x0010000 ; doing an undo
RL_STATE_INPUTPENDING = 0x0020000 ; rl_execute_next called
RL_STATE_TTYCSAVED = 0x0040000 ; tty special chars saved
RL_STATE_CALLBACK = 0x0080000 ; using the callback interface
RL_STATE_VIMOTION = 0x0100000 ; reading vi motion arg
RL_STATE_MULTIKEY = 0x0200000 ; reading multiple-key command
RL_STATE_VICMDONCE = 0x0400000 ; entered vi command mode at least once
RL_STATE_CHARSEARCH = 0x0800000 ; vi mode char search
RL_STATE_REDISPLAYING = 0x1000000 ; updating terminal display
RL_STATE_DONE = 0x2000000 ; done; accepted line
RL_STATE_TIMEOUT = 0x4000000 ; done; timed out
RL_STATE_EOF = 0x8000000 ; done; got eof on read
; rl_callback_read_char ; (provides a way of calling it in non-blocking way)
;define RL_SETSTATE(x) (rl_readline_state |= (x))
;define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
;define RL_ISSTATE(x) (rl_readline_state & (x))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_LINUX_CAPABILITY_VERSION_3 = 0x20080522
_LINUX_CAPABILITY_U32S_3 = 2
VFS_CAP_REVISION_MASK = 0xFF000000
VFS_CAP_REVISION_SHIFT = 24
VFS_CAP_FLAGS_MASK = VFS_CAP_REVISION_MASK
VFS_CAP_FLAGS_EFFECTIVE = 0x000001
VFS_CAP_REVISION_1 = 0x01000000
VFS_CAP_U32_1 = 1
VFS_CAP_REVISION_2 = 0x02000000
VFS_CAP_U32_2 = 2
VFS_CAP_REVISION_3 = 0x03000000
VFS_CAP_U32_3 = 2
VFS_CAP_U32 = VFS_CAP_U32_3
VFS_CAP_REVISION = VFS_CAP_REVISION_3
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CAP_CHOWN = 0
CAP_DAC_OVERRIDE = 1
CAP_DAC_READ_SEARCH = 2
CAP_FOWNER = 3
CAP_FSETID = 4
CAP_KILL = 5
CAP_SETGID = 6
CAP_SETUID = 7
CAP_SETPCAP = 8
CAP_LINUX_IMMUTABLE = 9
CAP_NET_BIND_SERVICE = 10
CAP_NET_BROADCAST = 11
CAP_NET_ADMIN = 12
CAP_NET_RAW = 13
CAP_IPC_LOCK = 14
CAP_IPC_OWNER = 15
CAP_SYS_MODULE = 16
CAP_SYS_RAWIO = 17
CAP_SYS_CHROOT = 18
CAP_SYS_PTRACE = 19
CAP_SYS_PACCT = 20
CAP_SYS_ADMIN = 21
CAP_SYS_BOOT = 22
CAP_SYS_NICE = 23
CAP_SYS_RESOURCE = 24
CAP_SYS_TIME = 25
CAP_SYS_TTY_CONFIG = 26
CAP_MKNOD = 27
CAP_LEASE = 28
CAP_AUDIT_WRITE = 29
CAP_AUDIT_CONTROL = 30
CAP_SETFCAP = 31
CAP_MAC_OVERRIDE = 32
CAP_MAC_ADMIN = 33
CAP_SYSLOG = 34
CAP_WAKE_ALARM = 35
CAP_BLOCK_SUSPEND = 36
CAP_AUDIT_READ = 37
CAP_PERFMON = 38
CAP_BPF = 39
CAP_CHECKPOINT_RESTORE = 40
CAP_LAST_CAP = CAP_CHECKPOINT_RESTORE
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CLOCK_REALTIME = 0 ;
CLOCK_MONOTONIC = 1 ;
CLOCK_PROCESS_CPUTIME_ID = 2 ;
CLOCK_THREAD_CPUTIME_ID = 3 ;
CLOCK_MONOTONIC_RAW = 4 ;
CLOCK_REALTIME_COARSE = 5 ;
CLOCK_MONOTONIC_COARSE = 6 ;
CLOCK_BOOTTIME = 7 ;
CLOCK_REALTIME_ALARM = 8 ;
CLOCK_BOOTTIME_ALARM = 9 ;
CLOCK_SGI_CYCLE = 10 ;
CLOCK_TAI = 11 ;
MAX_CLOCKS = 16 ;
CLOCKS_MASK = CLOCK_REALTIME or CLOCK_MONOTONIC ;
CLOCKS_MONO = CLOCK_MONOTONIC ;
TIMER_ABSTIME = 1 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PROT_READ = $01 ; 0x01 - pages can be read
PROT_WRITE = $02 ; 0x02 - pages can be written
PROT_EXEC = $04 ; 0x4 - pages can be executed
PROT_ALL = (PROT_READ + PROT_WRITE + PROT_EXEC) ; All
PROT_SEM = $08 ;
PROT_NONE = $00 ;
PROT_GROWSDOWN = $01000000 ;
PROT_GROWSUP = $02000000 ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;stdin = 0 ;
;stdout = 1 ;
;stderr = 2 ;
true = 1 ;
false = 0 ;
;STDIN = stdin ; just in case someone likes the uppercase version
;STDOUT = stdout ; just in case someone likes the uppercase version
;STDERR = stderr ; just in case someone likes the uppercase version
TRUE = true ;
FALSE = false ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
STDIN = 0
STDOUT = 1
STDERR = 2
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~