~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to rtl/freebsd/unxsockh.inc

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{
2
 
   $Id: unxsockh.inc,v 1.3 2005/02/14 17:13:22 peter Exp $
3
2
   This file is part of the Free Pascal run time library.
4
3
   (c) 2000-2003 by Marco van de Voort
5
4
   member of the Free Pascal development team.
38
37
 
39
38
  PF_MAX          = AF_MAX;
40
39
 
41
 
        SOL_SOCKET = $FFFF;
42
 
        SO_DEBUG         =$0001;        { turn on debugging info recording }
43
 
        SO_ACCEPTCONN    =$0002;        { socket has had listen() }
44
 
        SO_REUSEADDR     =$0004;        { allow local address reuse }
45
 
        SO_KEEPALIVE     =$0008;        { keep connections alive }
46
 
        SO_DONTROUTE     =$0010;        { just use interface addresses }
47
 
        SO_BROADCAST     =$0020;        { permit sending of broadcast msgs }
48
 
        SO_USELOOPBACK   =$0040;        { bypass hardware when possible }
49
 
        SO_LINGER        =$0080;        { linger on close if data present }
50
 
        SO_OOBINLINE     =$0100;        { leave received OOB data in line }
51
 
        SO_REUSEPORT     =$0200;        { allow local address & port reuse }
52
 
        SO_TIMESTAMP     =$0400;        { timestamp received dgram traffic }
 
40
        SOL_SOCKET       = $FFFF;
 
41
        SO_DEBUG         = $0001;        { turn on debugging info recording }
 
42
        SO_ACCEPTCONN    = $0002;        { socket has had listen() }
 
43
        SO_REUSEADDR     = $0004;        { allow local address reuse }
 
44
        SO_KEEPALIVE     = $0008;        { keep connections alive }
 
45
        SO_DONTROUTE     = $0010;        { just use interface addresses }
 
46
        SO_BROADCAST     = $0020;        { permit sending of broadcast msgs }
 
47
        SO_USELOOPBACK   = $0040;        { bypass hardware when possible }
 
48
        SO_LINGER        = $0080;        { linger on close if data present }
 
49
        SO_OOBINLINE     = $0100;        { leave received OOB data in line }
 
50
        SO_REUSEPORT     = $0200;        { allow local address & port reuse }
 
51
        SO_TIMESTAMP     = $0400;        { timestamp received dgram traffic }
53
52
 
54
53
{
55
54
 * Additional options, not kept in so_options.
68
67
        SHUT_WR         =1;             { shut down the writing side }
69
68
        SHUT_RDWR       =2;             { shut down both sides }
70
69
 
 
70
        IPPROTO_IP              = 0;               { dummy for IP }
 
71
        IPPROTO_ICMP            = 1;               { control message protocol }
 
72
        IPPROTO_TCP             = 6;               { tcp }
 
73
        IPPROTO_UDP             = 17;              { user datagram protocol }
 
74
 
 
75
 
 
76
        IPPROTO_HOPOPTS         = 0 ;           { IP6 hop-by-hop options }
 
77
        IPPROTO_IGMP            = 2 ;           { group mgmt protocol }
 
78
        IPPROTO_GGP             = 3 ;           { gateway^2 (deprecated) }
 
79
        IPPROTO_IPV4            = 4 ;           { IPv4 encapsulation }
 
80
        IPPROTO_IPIP            = IPPROTO_IPV4; { for compatibility }
 
81
        IPPROTO_ST              = 7 ;           { Stream protocol II }
 
82
        IPPROTO_EGP             = 8 ;           { exterior gateway protocol }
 
83
        IPPROTO_PIGP            = 9 ;           { private interior gateway }
 
84
        IPPROTO_RCCMON          = 10;           { BBN RCC Monitoring }
 
85
        IPPROTO_NVPII           = 11;           { network voice protocol}
 
86
        IPPROTO_PUP             = 12;           { pup }
 
87
        IPPROTO_ARGUS           = 13;           { Argus }
 
88
        IPPROTO_EMCON           = 14;           { EMCON }
 
89
        IPPROTO_XNET            = 15;           { Cross Net Debugger }
 
90
        IPPROTO_CHAOS           = 16;           { Chaos}
 
91
        IPPROTO_MUX             = 18;           { Multiplexing }
 
92
        IPPROTO_MEAS            = 19;           { DCN Measurement Subsystems }
 
93
        IPPROTO_HMP             = 20;           { Host Monitoring }
 
94
        IPPROTO_PRM             = 21;           { Packet Radio Measurement }
 
95
        IPPROTO_IDP             = 22;           { xns idp }
 
96
        IPPROTO_TRUNK1          = 23;           { Trunk-1 }
 
97
        IPPROTO_TRUNK2          = 24;           { Trunk-2 }
 
98
        IPPROTO_LEAF1           = 25;           { Leaf-1 }
 
99
        IPPROTO_LEAF2           = 26;           { Leaf-2 }
 
100
        IPPROTO_RDP             = 27;           { Reliable Data }
 
101
        IPPROTO_IRTP            = 28;           { Reliable Transaction }
 
102
        IPPROTO_TP              = 29;           { tp-4 w/ class negotiation }
 
103
        IPPROTO_BLT             = 30;           { Bulk Data Transfer }
 
104
        IPPROTO_NSP             = 31;           { Network Services }
 
105
        IPPROTO_INP             = 32;           { Merit Internodal }
 
106
        IPPROTO_SEP             = 33;           { Sequential Exchange }
 
107
        IPPROTO_3PC             = 34;           { Third Party Connect }
 
108
        IPPROTO_IDPR            = 35;           { InterDomain Policy Routing }
 
109
        IPPROTO_XTP             = 36;           { XTP }
 
110
        IPPROTO_DDP             = 37;           { Datagram Delivery }
 
111
        IPPROTO_CMTP            = 38;           { Control Message Transport }
 
112
        IPPROTO_TPXX            = 39;           { TP++ Transport }
 
113
        IPPROTO_IL              = 40;           { IL transport protocol }
 
114
        IPPROTO_IPV6            = 41;           { IP6 header }
 
115
        IPPROTO_SDRP            = 42;           { Source Demand Routing }
 
116
        IPPROTO_ROUTING         = 43;           { IP6 routing header }
 
117
        IPPROTO_FRAGMENT        = 44;           { IP6 fragmentation header }
 
118
        IPPROTO_IDRP            = 45;           { InterDomain Routing}
 
119
        IPPROTO_RSVP            = 46;           { resource reservation }
 
120
        IPPROTO_GRE             = 47;           { General Routing Encap. }
 
121
        IPPROTO_MHRP            = 48;           { Mobile Host Routing }
 
122
        IPPROTO_BHA             = 49;           { BHA }
 
123
        IPPROTO_ESP             = 50;           { IP6 Encap Sec. Payload }
 
124
        IPPROTO_AH              = 51;           { IP6 Auth Header }
 
125
        IPPROTO_INLSP           = 52;           { Integ. Net Layer Security }
 
126
        IPPROTO_SWIPE           = 53;           { IP with encryption }
 
127
        IPPROTO_NHRP            = 54;           { Next Hop Resolution }
 
128
        IPPROTO_MOBILE          = 55;           { IP Mobility }
 
129
        IPPROTO_TLSP            = 56;           { Transport Layer Security }
 
130
        IPPROTO_SKIP            = 57;           { SKIP }
 
131
        IPPROTO_ICMPV6          = 58;           { ICMP6 }
 
132
        IPPROTO_NONE            = 59;           { IP6 no next header }
 
133
        IPPROTO_DSTOPTS         = 60;           { IP6 destination option }
 
134
        IPPROTO_AHIP            = 61;           { any host internal protocol }
 
135
        IPPROTO_CFTP            = 62;           { CFTP }
 
136
        IPPROTO_HELLO           = 63;           { "hello" routing protocol }
 
137
        IPPROTO_SATEXPAK        = 64;           { SATNET/Backroom EXPAK }
 
138
        IPPROTO_KRYPTOLAN       = 65;           { Kryptolan }
 
139
        IPPROTO_RVD             = 66;           { Remote Virtual Disk }
 
140
        IPPROTO_IPPC            = 67;           { Pluribus Packet Core }
 
141
        IPPROTO_ADFS            = 68;           { Any distributed FS }
 
142
        IPPROTO_SATMON          = 69;           { Satnet Monitoring }
 
143
        IPPROTO_VISA            = 70;           { VISA Protocol }
 
144
        IPPROTO_IPCV            = 71;           { Packet Core Utility }
 
145
        IPPROTO_CPNX            = 72;           { Comp. Prot. Net. Executive }
 
146
        IPPROTO_CPHB            = 73;           { Comp. Prot. HeartBeat }
 
147
        IPPROTO_WSN             = 74;           { Wang Span Network }
 
148
        IPPROTO_PVP             = 75;           { Packet Video Protocol }
 
149
        IPPROTO_BRSATMON        = 76;           { BackRoom SATNET Monitoring }
 
150
        IPPROTO_ND              = 77;           { Sun net disk proto (temp.) }
 
151
        IPPROTO_WBMON           = 78;           { WIDEBAND Monitoring }
 
152
        IPPROTO_WBEXPAK         = 79;           { WIDEBAND EXPAK }
 
153
        IPPROTO_EON             = 80;           { ISO cnlp }
 
154
        IPPROTO_VMTP            = 81;           { VMTP }
 
155
        IPPROTO_SVMTP           = 82;           { Secure VMTP }
 
156
        IPPROTO_VINES           = 83;           { Banyon VINES }
 
157
        IPPROTO_TTP             = 84;           { TTP }
 
158
        IPPROTO_IGP             = 85;           { NSFNET-IGP }
 
159
        IPPROTO_DGP             = 86;           { dissimilar gateway prot. }
 
160
        IPPROTO_TCF             = 87;           { TCF }
 
161
        IPPROTO_IGRP            = 88;           { Cisco/GXS IGRP }
 
162
        IPPROTO_OSPFIGP         = 89;           { OSPFIGP }
 
163
        IPPROTO_SRPC            = 90;           { Strite RPC protocol }
 
164
        IPPROTO_LARP            = 91;           { Locus Address Resoloution }
 
165
        IPPROTO_MTP             = 92;           { Multicast Transport }
 
166
        IPPROTO_AX25            = 93;           { AX.25 Frames }
 
167
        IPPROTO_IPEIP           = 94;           { IP encapsulated in IP }
 
168
        IPPROTO_MICP            = 95;           { Mobile Int.ing control }
 
169
        IPPROTO_SCCSP           = 96;           { Semaphore Comm. security }
 
170
        IPPROTO_ETHERIP         = 97;           { Ethernet IP encapsulation }
 
171
        IPPROTO_ENCAP           = 98;           { encapsulation header }
 
172
        IPPROTO_APES            = 99;           { any private encr. scheme }
 
173
        IPPROTO_GMTP            = 100;          { GMTP}
 
174
        IPPROTO_IPCOMP          = 108;          { payload compression (IPComp) }
 
175
{ 101-254: Partly Unassigned }
 
176
        IPPROTO_PIM             = 103;          { Protocol Independent Mcast }
 
177
        IPPROTO_CARP            = 112;          { CARP }
 
178
        IPPROTO_PGM             = 113;          { PGM }
 
179
        IPPROTO_PFSYNC          = 240;          { PFSYNC }
 
180
 
 
181
{ last return value of *_input(), meaning "all job for this pkt is done".  }
 
182
        IPPROTO_RAW             = 255;
 
183
        IPPROTO_MAX             = 256;
 
184
        IPPROTO_DONE            = 257;
71
185
 
72
186
{
73
 
   $Log: unxsockh.inc,v $
74
 
   Revision 1.3  2005/02/14 17:13:22  peter
75
 
     * truncate log
76
 
 
77
 
}
78
 
 
79
 
 
 
187
 * Options for use with [gs]etsockopt at the IP level.
 
188
 * First word of comment is data type; bool is stored in int.
 
189
 }
 
190
        IP_OPTIONS              = 1 ;   { buf/ip_opts; set/get IP options }
 
191
        IP_HDRINCL              = 2 ;   { int; header is included with data }
 
192
        IP_TOS                  = 3 ;   { int; IP type of service and preced. }
 
193
        IP_TTL                  = 4 ;   { int; IP time to live }
 
194
        IP_RECVOPTS             = 5 ;   { bool; receive all IP opts w/dgram }
 
195
        IP_RECVRETOPTS          = 6 ;   { bool; receive IP opts for response }
 
196
        IP_RECVDSTADDR          = 7 ;   { bool; receive IP dst addr w/dgram }
 
197
        IP_SENDSRCADDR          = IP_RECVDSTADDR; { cmsg_type to set src addr }
 
198
        IP_RETOPTS              = 8 ;   { ip_opts; set/get IP options }
 
199
        IP_MULTICAST_IF         = 9 ;   { u_char; set/get IP multicast i/f  }
 
200
        IP_MULTICAST_TTL        = 10;   { u_char; set/get IP multicast ttl }
 
201
        IP_MULTICAST_LOOP       = 11;   { u_char; set/get IP multicast loopback }
 
202
        IP_ADD_MEMBERSHIP       = 12;   { ip_mreq; add an IP group membership }
 
203
        IP_DROP_MEMBERSHIP      = 13;   { ip_mreq; drop an IP group membership }
 
204
        IP_MULTICAST_VIF        = 14;   { set/get IP mcast virt. iface }
 
205
        IP_RSVP_ON              = 15;   { enable RSVP in kernel }
 
206
        IP_RSVP_OFF             = 16;   { disable RSVP in kernel }
 
207
        IP_RSVP_VIF_ON          = 17;   { set RSVP per-vif socket }
 
208
        IP_RSVP_VIF_OFF         = 18;   { unset RSVP per-vif socket }
 
209
        IP_PORTRANGE            = 19;   { int; range to choose for unspec port }
 
210
        IP_RECVIF               = 20;   { bool; receive reception if w/dgram }
 
211
 
 
212
{ for IPSEC }
 
213
        IP_IPSEC_POLICY         = 21;   { int; set/get security policy }
 
214
        IP_FAITH                = 22;   { bool; accept FAITH'ed connections }
 
215
 
 
216
        IP_ONESBCAST            = 23;   { bool: send all-ones broadcast }
 
217
                                
 
218
        IP_FW_TABLE_ADD         = 40;   { add entry }
 
219
        IP_FW_TABLE_DEL         = 41;   { delete entry }
 
220
        IP_FW_TABLE_FLUSH       = 42;   { flush table }
 
221
        IP_FW_TABLE_GETSIZE     = 43;   { get table size }
 
222
        IP_FW_TABLE_LIST        = 44;   { list table contents }
 
223
 
 
224
        IP_FW_ADD               = 50;   { add a firewall rule to chain }
 
225
        IP_FW_DEL               = 51;   { delete a firewall rule from chain }
 
226
        IP_FW_FLUSH             = 52;   { flush firewall rule chain }
 
227
        IP_FW_ZERO              = 53;   { clear single/all firewall counter(s) }
 
228
        IP_FW_GET               = 54;   { get entire firewall rule chain }
 
229
        IP_FW_RESETLOG          = 55;   { reset logging counters }
 
230
 
 
231
        IP_DUMMYNET_CONFIGURE   = 60;   { add/configure a dummynet pipe }
 
232
        IP_DUMMYNET_DEL         = 61;   { delete a dummynet pipe from chain }
 
233
        IP_DUMMYNET_FLUSH       = 62;   { flush dummynet }
 
234
        IP_DUMMYNET_GET         = 64;   { get entire dummynet pipes }
 
235
 
 
236
        IP_RECVTTL              = 65;   { bool; receive IP TTL w/dgram }
 
237
 
 
238
        IPV6_SOCKOPT_RESERVED1  = 3 ; { reserved for future use }
 
239
        IPV6_UNICAST_HOPS       = 4 ; { int; IP6 hops }
 
240
        IPV6_MULTICAST_IF       = 9 ; { u_int; setget IP6 multicast if  }
 
241
        IPV6_MULTICAST_HOPS     = 10; { int; setget IP6 multicast hops }
 
242
        IPV6_MULTICAST_LOOP     = 11; { u_int; setget IP6 multicast loopback }
 
243
        IPV6_JOIN_GROUP         = 12; { ip6_mreq; join a group membership }
 
244
        IPV6_LEAVE_GROUP        = 13; { ip6_mreq; leave a group membership }
 
245
        IPV6_PORTRANGE          = 14; { int; range to choose for unspec port }
 
246
 
 
247
        IPV6_PKTINFO            = 46; { in6_pktinfo; send if, src addr }        
 
248
        IPV6_HOPLIMIT           = 47; { int; send hop limit }
 
249
        IPV6_NEXTHOP            = 48; { sockaddr; next hop addr }
 
250
        IPV6_HOPOPTS            = 49; { ip6_hbh; send hop-by-hop option }
 
251
        IPV6_DSTOPTS            = 50; { ip6_dest; send dst option befor rthdr }
 
252
        IPV6_RTHDR              = 51; { ip6_rthdr; send routing header }
 
253
        IPV6_PKTOPTIONS         = 52; { buf/cmsghdr; set/get IPv6 options }