Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: in.h
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* INET An implementation of the TCP/IP protocol suite for the LINUX
[2] Fix | Delete
* operating system. INET is implemented using the BSD Socket
[3] Fix | Delete
* interface as the means of communication with the user level.
[4] Fix | Delete
*
[5] Fix | Delete
* Definitions of the Internet Protocol.
[6] Fix | Delete
*
[7] Fix | Delete
* Version: @(#)in.h 1.0.1 04/21/93
[8] Fix | Delete
*
[9] Fix | Delete
* Authors: Original taken from the GNU Project <netinet/in.h> file.
[10] Fix | Delete
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
[11] Fix | Delete
*
[12] Fix | Delete
* This program is free software; you can redistribute it and/or
[13] Fix | Delete
* modify it under the terms of the GNU General Public License
[14] Fix | Delete
* as published by the Free Software Foundation; either version
[15] Fix | Delete
* 2 of the License, or (at your option) any later version.
[16] Fix | Delete
*/
[17] Fix | Delete
#ifndef _LINUX_IN_H
[18] Fix | Delete
#define _LINUX_IN_H
[19] Fix | Delete
[20] Fix | Delete
#include <linux/types.h>
[21] Fix | Delete
#include <linux/libc-compat.h>
[22] Fix | Delete
#include <linux/socket.h>
[23] Fix | Delete
[24] Fix | Delete
#if __UAPI_DEF_IN_IPPROTO
[25] Fix | Delete
/* Standard well-defined IP protocols. */
[26] Fix | Delete
enum {
[27] Fix | Delete
IPPROTO_IP = 0, /* Dummy protocol for TCP */
[28] Fix | Delete
#define IPPROTO_IP IPPROTO_IP
[29] Fix | Delete
IPPROTO_ICMP = 1, /* Internet Control Message Protocol */
[30] Fix | Delete
#define IPPROTO_ICMP IPPROTO_ICMP
[31] Fix | Delete
IPPROTO_IGMP = 2, /* Internet Group Management Protocol */
[32] Fix | Delete
#define IPPROTO_IGMP IPPROTO_IGMP
[33] Fix | Delete
IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */
[34] Fix | Delete
#define IPPROTO_IPIP IPPROTO_IPIP
[35] Fix | Delete
IPPROTO_TCP = 6, /* Transmission Control Protocol */
[36] Fix | Delete
#define IPPROTO_TCP IPPROTO_TCP
[37] Fix | Delete
IPPROTO_EGP = 8, /* Exterior Gateway Protocol */
[38] Fix | Delete
#define IPPROTO_EGP IPPROTO_EGP
[39] Fix | Delete
IPPROTO_PUP = 12, /* PUP protocol */
[40] Fix | Delete
#define IPPROTO_PUP IPPROTO_PUP
[41] Fix | Delete
IPPROTO_UDP = 17, /* User Datagram Protocol */
[42] Fix | Delete
#define IPPROTO_UDP IPPROTO_UDP
[43] Fix | Delete
IPPROTO_IDP = 22, /* XNS IDP protocol */
[44] Fix | Delete
#define IPPROTO_IDP IPPROTO_IDP
[45] Fix | Delete
IPPROTO_TP = 29, /* SO Transport Protocol Class 4 */
[46] Fix | Delete
#define IPPROTO_TP IPPROTO_TP
[47] Fix | Delete
IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol */
[48] Fix | Delete
#define IPPROTO_DCCP IPPROTO_DCCP
[49] Fix | Delete
IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */
[50] Fix | Delete
#define IPPROTO_IPV6 IPPROTO_IPV6
[51] Fix | Delete
IPPROTO_RSVP = 46, /* RSVP Protocol */
[52] Fix | Delete
#define IPPROTO_RSVP IPPROTO_RSVP
[53] Fix | Delete
IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */
[54] Fix | Delete
#define IPPROTO_GRE IPPROTO_GRE
[55] Fix | Delete
IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */
[56] Fix | Delete
#define IPPROTO_ESP IPPROTO_ESP
[57] Fix | Delete
IPPROTO_AH = 51, /* Authentication Header protocol */
[58] Fix | Delete
#define IPPROTO_AH IPPROTO_AH
[59] Fix | Delete
IPPROTO_MTP = 92, /* Multicast Transport Protocol */
[60] Fix | Delete
#define IPPROTO_MTP IPPROTO_MTP
[61] Fix | Delete
IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET */
[62] Fix | Delete
#define IPPROTO_BEETPH IPPROTO_BEETPH
[63] Fix | Delete
IPPROTO_ENCAP = 98, /* Encapsulation Header */
[64] Fix | Delete
#define IPPROTO_ENCAP IPPROTO_ENCAP
[65] Fix | Delete
IPPROTO_PIM = 103, /* Protocol Independent Multicast */
[66] Fix | Delete
#define IPPROTO_PIM IPPROTO_PIM
[67] Fix | Delete
IPPROTO_COMP = 108, /* Compression Header Protocol */
[68] Fix | Delete
#define IPPROTO_COMP IPPROTO_COMP
[69] Fix | Delete
IPPROTO_L2TP = 115, /* Layer 2 Tunnelling Protocol */
[70] Fix | Delete
#define IPPROTO_L2TP IPPROTO_L2TP
[71] Fix | Delete
IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */
[72] Fix | Delete
#define IPPROTO_SCTP IPPROTO_SCTP
[73] Fix | Delete
IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828) */
[74] Fix | Delete
#define IPPROTO_UDPLITE IPPROTO_UDPLITE
[75] Fix | Delete
IPPROTO_MPLS = 137, /* MPLS in IP (RFC 4023) */
[76] Fix | Delete
#define IPPROTO_MPLS IPPROTO_MPLS
[77] Fix | Delete
IPPROTO_RAW = 255, /* Raw IP packets */
[78] Fix | Delete
#define IPPROTO_RAW IPPROTO_RAW
[79] Fix | Delete
IPPROTO_MAX
[80] Fix | Delete
#define IPPROTO_MPTCP 262
[81] Fix | Delete
};
[82] Fix | Delete
#endif
[83] Fix | Delete
[84] Fix | Delete
#if __UAPI_DEF_IN_ADDR
[85] Fix | Delete
/* Internet address. */
[86] Fix | Delete
struct in_addr {
[87] Fix | Delete
__be32 s_addr;
[88] Fix | Delete
};
[89] Fix | Delete
#endif
[90] Fix | Delete
[91] Fix | Delete
#define IP_TOS 1
[92] Fix | Delete
#define IP_TTL 2
[93] Fix | Delete
#define IP_HDRINCL 3
[94] Fix | Delete
#define IP_OPTIONS 4
[95] Fix | Delete
#define IP_ROUTER_ALERT 5
[96] Fix | Delete
#define IP_RECVOPTS 6
[97] Fix | Delete
#define IP_RETOPTS 7
[98] Fix | Delete
#define IP_PKTINFO 8
[99] Fix | Delete
#define IP_PKTOPTIONS 9
[100] Fix | Delete
#define IP_MTU_DISCOVER 10
[101] Fix | Delete
#define IP_RECVERR 11
[102] Fix | Delete
#define IP_RECVTTL 12
[103] Fix | Delete
#define IP_RECVTOS 13
[104] Fix | Delete
#define IP_MTU 14
[105] Fix | Delete
#define IP_FREEBIND 15
[106] Fix | Delete
#define IP_IPSEC_POLICY 16
[107] Fix | Delete
#define IP_XFRM_POLICY 17
[108] Fix | Delete
#define IP_PASSSEC 18
[109] Fix | Delete
#define IP_TRANSPARENT 19
[110] Fix | Delete
[111] Fix | Delete
/* BSD compatibility */
[112] Fix | Delete
#define IP_RECVRETOPTS IP_RETOPTS
[113] Fix | Delete
[114] Fix | Delete
/* TProxy original addresses */
[115] Fix | Delete
#define IP_ORIGDSTADDR 20
[116] Fix | Delete
#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
[117] Fix | Delete
[118] Fix | Delete
#define IP_MINTTL 21
[119] Fix | Delete
#define IP_NODEFRAG 22
[120] Fix | Delete
#define IP_CHECKSUM 23
[121] Fix | Delete
#define IP_BIND_ADDRESS_NO_PORT 24
[122] Fix | Delete
#define IP_RECVFRAGSIZE 25
[123] Fix | Delete
[124] Fix | Delete
/* IP_MTU_DISCOVER values */
[125] Fix | Delete
#define IP_PMTUDISC_DONT 0 /* Never send DF frames */
[126] Fix | Delete
#define IP_PMTUDISC_WANT 1 /* Use per route hints */
[127] Fix | Delete
#define IP_PMTUDISC_DO 2 /* Always DF */
[128] Fix | Delete
#define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu */
[129] Fix | Delete
/* Always use interface mtu (ignores dst pmtu) but don't set DF flag.
[130] Fix | Delete
* Also incoming ICMP frag_needed notifications will be ignored on
[131] Fix | Delete
* this socket to prevent accepting spoofed ones.
[132] Fix | Delete
*/
[133] Fix | Delete
#define IP_PMTUDISC_INTERFACE 4
[134] Fix | Delete
/* weaker version of IP_PMTUDISC_INTERFACE, which allos packets to get
[135] Fix | Delete
* fragmented if they exeed the interface mtu
[136] Fix | Delete
*/
[137] Fix | Delete
#define IP_PMTUDISC_OMIT 5
[138] Fix | Delete
[139] Fix | Delete
#define IP_MULTICAST_IF 32
[140] Fix | Delete
#define IP_MULTICAST_TTL 33
[141] Fix | Delete
#define IP_MULTICAST_LOOP 34
[142] Fix | Delete
#define IP_ADD_MEMBERSHIP 35
[143] Fix | Delete
#define IP_DROP_MEMBERSHIP 36
[144] Fix | Delete
#define IP_UNBLOCK_SOURCE 37
[145] Fix | Delete
#define IP_BLOCK_SOURCE 38
[146] Fix | Delete
#define IP_ADD_SOURCE_MEMBERSHIP 39
[147] Fix | Delete
#define IP_DROP_SOURCE_MEMBERSHIP 40
[148] Fix | Delete
#define IP_MSFILTER 41
[149] Fix | Delete
#define MCAST_JOIN_GROUP 42
[150] Fix | Delete
#define MCAST_BLOCK_SOURCE 43
[151] Fix | Delete
#define MCAST_UNBLOCK_SOURCE 44
[152] Fix | Delete
#define MCAST_LEAVE_GROUP 45
[153] Fix | Delete
#define MCAST_JOIN_SOURCE_GROUP 46
[154] Fix | Delete
#define MCAST_LEAVE_SOURCE_GROUP 47
[155] Fix | Delete
#define MCAST_MSFILTER 48
[156] Fix | Delete
#define IP_MULTICAST_ALL 49
[157] Fix | Delete
#define IP_UNICAST_IF 50
[158] Fix | Delete
[159] Fix | Delete
#define MCAST_EXCLUDE 0
[160] Fix | Delete
#define MCAST_INCLUDE 1
[161] Fix | Delete
[162] Fix | Delete
/* These need to appear somewhere around here */
[163] Fix | Delete
#define IP_DEFAULT_MULTICAST_TTL 1
[164] Fix | Delete
#define IP_DEFAULT_MULTICAST_LOOP 1
[165] Fix | Delete
[166] Fix | Delete
/* Request struct for multicast socket ops */
[167] Fix | Delete
[168] Fix | Delete
#if __UAPI_DEF_IP_MREQ
[169] Fix | Delete
struct ip_mreq {
[170] Fix | Delete
struct in_addr imr_multiaddr; /* IP multicast address of group */
[171] Fix | Delete
struct in_addr imr_interface; /* local IP address of interface */
[172] Fix | Delete
};
[173] Fix | Delete
[174] Fix | Delete
struct ip_mreqn {
[175] Fix | Delete
struct in_addr imr_multiaddr; /* IP multicast address of group */
[176] Fix | Delete
struct in_addr imr_address; /* local IP address of interface */
[177] Fix | Delete
int imr_ifindex; /* Interface index */
[178] Fix | Delete
};
[179] Fix | Delete
[180] Fix | Delete
struct ip_mreq_source {
[181] Fix | Delete
__be32 imr_multiaddr;
[182] Fix | Delete
__be32 imr_interface;
[183] Fix | Delete
__be32 imr_sourceaddr;
[184] Fix | Delete
};
[185] Fix | Delete
[186] Fix | Delete
struct ip_msfilter {
[187] Fix | Delete
__be32 imsf_multiaddr;
[188] Fix | Delete
__be32 imsf_interface;
[189] Fix | Delete
__u32 imsf_fmode;
[190] Fix | Delete
__u32 imsf_numsrc;
[191] Fix | Delete
__be32 imsf_slist[1];
[192] Fix | Delete
};
[193] Fix | Delete
[194] Fix | Delete
#define IP_MSFILTER_SIZE(numsrc) \
[195] Fix | Delete
(sizeof(struct ip_msfilter) - sizeof(__u32) \
[196] Fix | Delete
+ (numsrc) * sizeof(__u32))
[197] Fix | Delete
[198] Fix | Delete
struct group_req {
[199] Fix | Delete
__u32 gr_interface; /* interface index */
[200] Fix | Delete
struct __kernel_sockaddr_storage gr_group; /* group address */
[201] Fix | Delete
};
[202] Fix | Delete
[203] Fix | Delete
struct group_source_req {
[204] Fix | Delete
__u32 gsr_interface; /* interface index */
[205] Fix | Delete
struct __kernel_sockaddr_storage gsr_group; /* group address */
[206] Fix | Delete
struct __kernel_sockaddr_storage gsr_source; /* source address */
[207] Fix | Delete
};
[208] Fix | Delete
[209] Fix | Delete
struct group_filter {
[210] Fix | Delete
__u32 gf_interface; /* interface index */
[211] Fix | Delete
struct __kernel_sockaddr_storage gf_group; /* multicast address */
[212] Fix | Delete
__u32 gf_fmode; /* filter mode */
[213] Fix | Delete
__u32 gf_numsrc; /* number of sources */
[214] Fix | Delete
struct __kernel_sockaddr_storage gf_slist[1]; /* interface index */
[215] Fix | Delete
};
[216] Fix | Delete
[217] Fix | Delete
#define GROUP_FILTER_SIZE(numsrc) \
[218] Fix | Delete
(sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \
[219] Fix | Delete
+ (numsrc) * sizeof(struct __kernel_sockaddr_storage))
[220] Fix | Delete
#endif
[221] Fix | Delete
[222] Fix | Delete
#if __UAPI_DEF_IN_PKTINFO
[223] Fix | Delete
struct in_pktinfo {
[224] Fix | Delete
int ipi_ifindex;
[225] Fix | Delete
struct in_addr ipi_spec_dst;
[226] Fix | Delete
struct in_addr ipi_addr;
[227] Fix | Delete
};
[228] Fix | Delete
#endif
[229] Fix | Delete
[230] Fix | Delete
/* Structure describing an Internet (IP) socket address. */
[231] Fix | Delete
#if __UAPI_DEF_SOCKADDR_IN
[232] Fix | Delete
#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
[233] Fix | Delete
struct sockaddr_in {
[234] Fix | Delete
__kernel_sa_family_t sin_family; /* Address family */
[235] Fix | Delete
__be16 sin_port; /* Port number */
[236] Fix | Delete
struct in_addr sin_addr; /* Internet address */
[237] Fix | Delete
[238] Fix | Delete
/* Pad to size of `struct sockaddr'. */
[239] Fix | Delete
unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) -
[240] Fix | Delete
sizeof(unsigned short int) - sizeof(struct in_addr)];
[241] Fix | Delete
};
[242] Fix | Delete
#define sin_zero __pad /* for BSD UNIX comp. -FvK */
[243] Fix | Delete
#endif
[244] Fix | Delete
[245] Fix | Delete
#if __UAPI_DEF_IN_CLASS
[246] Fix | Delete
/*
[247] Fix | Delete
* Definitions of the bits in an Internet address integer.
[248] Fix | Delete
* On subnets, host and network parts are found according
[249] Fix | Delete
* to the subnet mask, not these masks.
[250] Fix | Delete
*/
[251] Fix | Delete
#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0)
[252] Fix | Delete
#define IN_CLASSA_NET 0xff000000
[253] Fix | Delete
#define IN_CLASSA_NSHIFT 24
[254] Fix | Delete
#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
[255] Fix | Delete
#define IN_CLASSA_MAX 128
[256] Fix | Delete
[257] Fix | Delete
#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000)
[258] Fix | Delete
#define IN_CLASSB_NET 0xffff0000
[259] Fix | Delete
#define IN_CLASSB_NSHIFT 16
[260] Fix | Delete
#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
[261] Fix | Delete
#define IN_CLASSB_MAX 65536
[262] Fix | Delete
[263] Fix | Delete
#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000)
[264] Fix | Delete
#define IN_CLASSC_NET 0xffffff00
[265] Fix | Delete
#define IN_CLASSC_NSHIFT 8
[266] Fix | Delete
#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
[267] Fix | Delete
[268] Fix | Delete
#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000)
[269] Fix | Delete
#define IN_MULTICAST(a) IN_CLASSD(a)
[270] Fix | Delete
#define IN_MULTICAST_NET 0xF0000000
[271] Fix | Delete
[272] Fix | Delete
#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
[273] Fix | Delete
#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
[274] Fix | Delete
[275] Fix | Delete
/* Address to accept any incoming messages. */
[276] Fix | Delete
#define INADDR_ANY ((unsigned long int) 0x00000000)
[277] Fix | Delete
[278] Fix | Delete
/* Address to send to all hosts. */
[279] Fix | Delete
#define INADDR_BROADCAST ((unsigned long int) 0xffffffff)
[280] Fix | Delete
[281] Fix | Delete
/* Address indicating an error return. */
[282] Fix | Delete
#define INADDR_NONE ((unsigned long int) 0xffffffff)
[283] Fix | Delete
[284] Fix | Delete
/* Dummy address for src of ICMP replies if no real address is set (RFC7600). */
[285] Fix | Delete
#define INADDR_DUMMY ((unsigned long int) 0xc0000008)
[286] Fix | Delete
[287] Fix | Delete
/* Network number for local host loopback. */
[288] Fix | Delete
#define IN_LOOPBACKNET 127
[289] Fix | Delete
[290] Fix | Delete
/* Address to loopback in software to local host. */
[291] Fix | Delete
#define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */
[292] Fix | Delete
#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
[293] Fix | Delete
[294] Fix | Delete
/* Defines for Multicast INADDR */
[295] Fix | Delete
#define INADDR_UNSPEC_GROUP 0xe0000000U /* 224.0.0.0 */
[296] Fix | Delete
#define INADDR_ALLHOSTS_GROUP 0xe0000001U /* 224.0.0.1 */
[297] Fix | Delete
#define INADDR_ALLRTRS_GROUP 0xe0000002U /* 224.0.0.2 */
[298] Fix | Delete
#define INADDR_ALLSNOOPERS_GROUP 0xe000006aU /* 224.0.0.106 */
[299] Fix | Delete
#define INADDR_MAX_LOCAL_GROUP 0xe00000ffU /* 224.0.0.255 */
[300] Fix | Delete
#endif
[301] Fix | Delete
[302] Fix | Delete
/* <asm/byteorder.h> contains the htonl type stuff.. */
[303] Fix | Delete
#include <asm/byteorder.h>
[304] Fix | Delete
[305] Fix | Delete
[306] Fix | Delete
#endif /* _LINUX_IN_H */
[307] Fix | Delete
[308] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function