Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


in.h
001: /* Copyright (C) 1991-2000,2004,2008,2010,2011 Free Software Foundation, Inc.
002:    This file is part of the GNU C Library.
003: 
004:    The GNU C Library is free software; you can redistribute it and/or
005:    modify it under the terms of the GNU Lesser General Public
006:    License as published by the Free Software Foundation; either
007:    version 2.1 of the License, or (at your option) any later version.
008: 
009:    The GNU C Library is distributed in the hope that it will be useful,
010:    but WITHOUT ANY WARRANTY; without even the implied warranty of
011:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:    Lesser General Public License for more details.
013: 
014:    You should have received a copy of the GNU Lesser General Public
015:    License along with the GNU C Library; if not, write to the Free
016:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
017:    02111-1307 USA.  */
018: 
019: /* Linux version.  */
020: 
021: #ifndef _NETINET_IN_H
022: # error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
023: #endif
024: 
025: /* Options for use with `getsockopt' and `setsockopt' at the IP level.
026:    The first word in the comment at the right is the data type used;
027:    "bool" means a boolean value stored in an `int'.  */
028: #define        IP_OPTIONS      4       /* ip_opts; IP per-packet options.  */
029: #define        IP_HDRINCL      3       /* int; Header is included with data.  */
030: #define        IP_TOS          1       /* int; IP type of service and precedence.  */
031: #define        IP_TTL          2       /* int; IP time to live.  */
032: #define        IP_RECVOPTS     6       /* bool; Receive all IP options w/datagram.  */
033: /* For BSD compatibility.  */
034: #define        IP_RECVRETOPTS  IP_RETOPTS       /* bool; Receive IP options for response.  */
035: #define        IP_RETOPTS      7       /* ip_opts; Set/get IP per-packet options.  */
036: #define IP_MULTICAST_IF 32      /* in_addr; set/get IP multicast i/f */
037: #define IP_MULTICAST_TTL 33     /* u_char; set/get IP multicast ttl */
038: #define IP_MULTICAST_LOOP 34    /* i_char; set/get IP multicast loopback */
039: #define IP_ADD_MEMBERSHIP 35    /* ip_mreq; add an IP group membership */
040: #define IP_DROP_MEMBERSHIP 36   /* ip_mreq; drop an IP group membership */
041: #define IP_UNBLOCK_SOURCE 37    /* ip_mreq_source: unblock data from source */
042: #define IP_BLOCK_SOURCE 38      /* ip_mreq_source: block data from source */
043: #define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */
044: #define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */
045: #define IP_MSFILTER 41
046: #if defined __USE_MISC || defined __USE_GNU
047: # define MCAST_JOIN_GROUP 42    /* group_req: join any-source group */
048: # define MCAST_BLOCK_SOURCE 43  /* group_source_req: block from given group */
049: # define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
050: # define MCAST_LEAVE_GROUP 45   /* group_req: leave any-source group */
051: # define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
052: # define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
053: # define MCAST_MSFILTER 48
054: 
055: # define MCAST_EXCLUDE   0
056: # define MCAST_INCLUDE   1
057: #endif
058: 
059: #define IP_ROUTER_ALERT 5       /* bool */
060: #define IP_PKTINFO      8       /* bool */
061: #define IP_PKTOPTIONS   9
062: #define IP_PMTUDISC     10      /* obsolete name? */
063: #define IP_MTU_DISCOVER 10      /* int; see below */
064: #define IP_RECVERR      11      /* bool */
065: #define IP_RECVTTL      12      /* bool */
066: #define IP_RECVTOS      13      /* bool */
067: #define IP_MTU          14      /* int */
068: #define IP_FREEBIND     15
069: #define IP_IPSEC_POLICY 16
070: #define IP_XFRM_POLICY  17
071: #define IP_PASSSEC      18
072: #define IP_TRANSPARENT  19
073: #define IP_MULTICAST_ALL 49     /* bool */
074: 
075: /* TProxy original addresses */
076: #define IP_ORIGDSTADDR       20
077: #define IP_RECVORIGDSTADDR   IP_ORIGDSTADDR
078: 
079: #define IP_MINTTL       21
080: 
081: 
082: /* IP_MTU_DISCOVER arguments.  */
083: #define IP_PMTUDISC_DONT   0    /* Never send DF frames.  */
084: #define IP_PMTUDISC_WANT   1    /* Use per route hints.  */
085: #define IP_PMTUDISC_DO     2    /* Always DF.  */
086: #define IP_PMTUDISC_PROBE  3    /* Ignore dst pmtu.  */
087: 
088: /* To select the IP level.  */
089: #define SOL_IP  0
090: 
091: #define IP_DEFAULT_MULTICAST_TTL        1
092: #define IP_DEFAULT_MULTICAST_LOOP       1
093: #define IP_MAX_MEMBERSHIPS              20
094: 
095: #if defined __USE_MISC || defined __USE_GNU
096: /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
097:    The `ip_dst' field is used for the first-hop gateway when using a
098:    source route (this gets put into the header proper).  */
099: struct ip_opts
100:   {
101:     struct in_addr ip_dst;      /* First hop; zero without source route.  */
102:     char ip_opts[40];           /* Actually variable in size.  */
103:   };
104: 
105: /* Like `struct ip_mreq' but including interface specification by index.  */
106: struct ip_mreqn
107:   {
108:     struct in_addr imr_multiaddr;       /* IP multicast address of group */
109:     struct in_addr imr_address;         /* local IP address of interface */
110:     int imr_ifindex;                    /* Interface index */
111:   };
112: 
113: /* Structure used for IP_PKTINFO.  */
114: struct in_pktinfo
115:   {
116:     int ipi_ifindex;                    /* Interface index  */
117:     struct in_addr ipi_spec_dst;        /* Routing destination address  */
118:     struct in_addr ipi_addr;            /* Header destination address  */
119:   };
120: #endif
121: 
122: /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
123:    The first word in the comment at the right is the data type used;
124:    "bool" means a boolean value stored in an `int'.  */
125: #define IPV6_ADDRFORM           1
126: #define IPV6_2292PKTINFO        2
127: #define IPV6_2292HOPOPTS        3
128: #define IPV6_2292DSTOPTS        4
129: #define IPV6_2292RTHDR          5
130: #define IPV6_2292PKTOPTIONS     6
131: #define IPV6_CHECKSUM           7
132: #define IPV6_2292HOPLIMIT       8
133: 
134: #define SCM_SRCRT               IPV6_RXSRCRT
135: 
136: #define IPV6_NEXTHOP            9
137: #define IPV6_AUTHHDR            10
138: #define IPV6_UNICAST_HOPS       16
139: #define IPV6_MULTICAST_IF       17
140: #define IPV6_MULTICAST_HOPS     18
141: #define IPV6_MULTICAST_LOOP     19
142: #define IPV6_JOIN_GROUP         20
143: #define IPV6_LEAVE_GROUP        21
144: #define IPV6_ROUTER_ALERT       22
145: #define IPV6_MTU_DISCOVER       23
146: #define IPV6_MTU                24
147: #define IPV6_RECVERR            25
148: #define IPV6_V6ONLY             26
149: #define IPV6_JOIN_ANYCAST       27
150: #define IPV6_LEAVE_ANYCAST      28
151: #define IPV6_IPSEC_POLICY       34
152: #define IPV6_XFRM_POLICY        35
153: 
154: #define IPV6_RECVPKTINFO        49
155: #define IPV6_PKTINFO            50
156: #define IPV6_RECVHOPLIMIT       51
157: #define IPV6_HOPLIMIT           52
158: #define IPV6_RECVHOPOPTS        53
159: #define IPV6_HOPOPTS            54
160: #define IPV6_RTHDRDSTOPTS       55
161: #define IPV6_RECVRTHDR          56
162: #define IPV6_RTHDR              57
163: #define IPV6_RECVDSTOPTS        58
164: #define IPV6_DSTOPTS            59
165: 
166: #define IPV6_RECVTCLASS         66
167: #define IPV6_TCLASS             67
168: 
169: /* Obsolete synonyms for the above.  */
170: #define IPV6_ADD_MEMBERSHIP     IPV6_JOIN_GROUP
171: #define IPV6_DROP_MEMBERSHIP    IPV6_LEAVE_GROUP
172: #define IPV6_RXHOPOPTS          IPV6_HOPOPTS
173: #define IPV6_RXDSTOPTS          IPV6_DSTOPTS
174: 
175: /* IPV6_MTU_DISCOVER values.  */
176: #define IPV6_PMTUDISC_DONT      0       /* Never send DF frames.  */
177: #define IPV6_PMTUDISC_WANT      1       /* Use per route hints.  */
178: #define IPV6_PMTUDISC_DO        2       /* Always DF.  */
179: #define IPV6_PMTUDISC_PROBE     3       /* Ignore dst pmtu.  */
180: 
181: /* Socket level values for IPv6.  */
182: #define SOL_IPV6        41
183: #define SOL_ICMPV6      58
184: 
185: /* Routing header options for IPv6.  */
186: #define IPV6_RTHDR_LOOSE        0       /* Hop doesn't need to be neighbour. */
187: #define IPV6_RTHDR_STRICT       1       /* Hop must be a neighbour.  */
188: 
189: #define IPV6_RTHDR_TYPE_0       0       /* IPv6 Routing header type 0.  */
190: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/