Print this page
13175 Add support for IP_RECVTOS
13182 CMSG_ macros should have man pages
Change-ID: I784aa36cfd3c17e3cccbf1fd329fa7e69b663ef9
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man7p/ip.7p.man.txt
+++ new/usr/src/man/man7p/ip.7p.man.txt
1 1 IP(7P) Protocols IP(7P)
2 2
3 3
4 4
5 5 NAME
6 6 ip, IP - Internet Protocol
7 7
8 8 SYNOPSIS
9 9 #include <sys/socket.h>
10 10
11 11
12 12 #include <netinet/in.h>
13 13
14 14
15 15 s = socket(AF_INET, SOCK_RAW, proto);
16 16
17 17
18 18 t = t_open ("/dev/rawip", O_RDWR);
19 19
20 20
21 21 DESCRIPTION
22 22 IP is the internetwork datagram delivery protocol that is central to
23 23 the Internet protocol family. Programs may use IP through higher-level
24 24 protocols such as the Transmission Control Protocol (TCP) or the User
25 25 Datagram Protocol (UDP), or may interface directly to IP. See tcp(7P)
26 26 and udp(7P). Direct access may be by means of the socket interface,
27 27 using a "raw socket," or by means of the Transport Level Interface
28 28 (TLI). The protocol options defined in the IP specification may be set
29 29 in outgoing datagrams.
30 30
31 31
32 32 Packets sent to or from this system may be subject to IPsec policy. See
33 33 ipsec(7P) for more information.
34 34
35 35 APPLICATION PROGRAMMING INTERFACE
36 36 The STREAMS driver /dev/rawip is the TLI transport provider that
37 37 provides raw access to IP.
38 38
39 39
40 40 Raw IP sockets are connectionless and are normally used with the
41 41 sendto() and recvfrom() calls (see send(3SOCKET) and recv(3SOCKET)),
42 42 although the connect(3SOCKET) call may also be used to fix the
43 43 destination for future datagram. In this case, the read(2) or
44 44 recv(3SOCKET) and write(2) or send(3SOCKET) calls may be used. If proto
45 45 is IPPROTO_RAW or IPPROTO_IGMP, the application is expected to include
46 46 a complete IP header when sending. Otherwise, that protocol number
47 47 will be set in outgoing datagrams and used to filter incoming datagrams
48 48 and an IP header will be generated and prepended to each outgoing
49 49 datagram. In either case, received datagrams are returned with the IP
50 50 header and options intact.
51 51
52 52
53 53 If an application uses IP_HDRINCL and provides the IP header contents,
54 54 the IP stack does not modify the following supplied fields under any
55 55 conditions: Type of Service, DF Flag, Protocol, and Destination
56 56 Address. The IP Options and IHL fields are set by use of IP_OPTIONS,
57 57 and Total Length is updated to include any options. Version is set to
58 58 the default. Identification is chosen by the normal IP ID selection
59 59 logic. The source address is updated if none was specified and the TTL
60 60 is changed if the packet has a broadcast destination address. Since an
61 61 applicaton cannot send down fragments (as IP assigns the IP ID),
62 62 Fragment Offset is always 0. The IP Checksum field is computed by IP.
63 63 None of the data beyond the IP header are changed, including the
64 64 application-provided transport header.
65 65
66 66
67 67 The socket options supported at the IP level are:
68 68
69 69 IP_OPTIONS
70 70 IP options for outgoing datagrams. This socket
71 71 option may be used to set IP options to be
72 72 included in each outgoing datagram. IP options to
73 73 be sent are set with setsockopt() (see
74 74 getsockopt(3SOCKET)). The getsockopt(3SOCKET)
75 75 call returns the IP options set in the last
76 76 setsockopt() call. IP options on received
77 77 datagrams are visible to user programs only using
78 78 raw IP sockets. The format of IP options given in
79 79 setsockopt() matches those defined in the IP
80 80 specification with one exception: the list of
81 81 addresses for the source routing options must
82 82 include the first-hop gateway at the beginning of
83 83 the list of gateways. The first-hop gateway
84 84 address will be extracted from the option list
85 85 and the size adjusted accordingly before use. IP
86 86 options may be used with any socket type in the
87 87 Internet family.
88 88
89 89
90 90 IP_SEC_OPT
91 91 Enable or obtain IPsec security settings for this
92 92 socket. For more details on the protection
93 93 services of IPsec, see ipsec(7P).
94 94
95 95
96 96 IP_ADD_MEMBERSHIP
97 97 Join a multicast group.
98 98
99 99
100 100 IP_DROP_MEMBERSHIP
↓ open down ↓ |
100 lines elided |
↑ open up ↑ |
101 101 Leave a multicast group.
102 102
103 103
104 104 IP_BOUND_IF
105 105 Limit reception and transmission of packets to
106 106 this interface. Takes an integer as an argument.
107 107 The integer is the selected interface index.
108 108
109 109
110 110
111 - The following options take in_pktinfo_t as the parameter:
111 + The following option takes in_pktinfo_t as the parameter:
112 112
113 113 IP_PKTINFO
114 114
115 115 Set the source address and/or transmit interface of the packet(s).
116 116 Note that the IP_BOUND_IF socket option takes precedence over the
117 117 interface index passed in IP_PKTINFO.
118 118
119 119 struct in_pktinfo {
120 120 unsigned int ipi_ifindex;/* send/recv interface index */
121 121 struct in_addr ipi_spec_dst;/* matched source addr. */
122 122 struct in_addr ipi_addr;/* src/dst addr. in IP hdr */
123 123 } in_pktinfo_t;
124 124
125 125 When passed in (on transmit) via ancillary data with IP_PKTINFO,
126 126 ipi_spec_dst is used as the source address and ipi_ifindex is used
127 127 as the interface index to send the packet out.
128 128
129 129
130 +
131 + The following options are boolean switches controlling the reception of
132 + ancillary data:
133 +
134 +
135 + IP_RECVDSTADDR
136 + When enabled on a SOCK_DGRAM socket, enables
137 + receipt of the destination IP address of the
138 + incoming packet. Returns inaddr_t as ancillary
139 + data.
140 +
141 +
142 + IP_RECVIF
143 + Enable/disable receipt of the inbound interface
144 + index. Returns uint_t as ancillary data.
145 +
146 +
147 + IP_RECVOPTS
148 + When enabled on a SOCK_DGRAM socket, enables
149 + receipt of the IP options from the incoming
150 + packet. Returns variable-length IP options, up to
151 + 40 bytes, as ancillary data.
152 +
153 +
130 154 IP_RECVPKTINFO
155 + Enable/disable receipt of the index of the
156 + interface the packet arrived on, the local
157 + address that was matched for reception, and the
158 + inbound packet's actual destination address.
159 + Takes boolean as the parameter. Returns
160 + in_pktinfo_t as ancillary data.
131 161
132 - Enable/disable receipt of the index of the interface the packet
133 - arrived on, the local address that was matched for reception, and
134 - the inbound packet's actual destination address. Takes boolean as
135 - the parameter. Returns struct in_pktinfo_t as ancillary data.
136 162
163 + IP_RECVSLLA
164 + When enabled on a SOCK_DGRAM socket, enables
165 + receipt of the source link-layer address for the
166 + incoming packet. Returns struct sockaddr_dl as
167 + ancillary data.
137 168
138 169
170 + IP_RECVTTL
171 + When enabled on a SOCK_DGRAM socket, the IP TTL
172 + (time to live) field for an incoming datagram is
173 + returned as uint8_t in ancillary data.
174 +
175 +
176 + IP_RECVTOS
177 + When enabled, the IP TOS (type of service) field
178 + is returned as uint8_t in ancillary data. For
179 + SOCK_DGRAM sockets, the ancillary data item is
180 + included for every call to recvmsg(). For
181 + SOCK_STREAM sockets, where there is no direct
182 + mapping between received TCP segments and receive
183 + operations, the ancillary data item will only be
184 + present when the value has changed.
185 +
186 +
187 +
139 188 The following options take a struct ip_mreq as the parameter. The
140 189 structure contains a multicast address which must be set to the CLASS-D
141 190 IP multicast address and an interface address. Normally the interface
142 191 address is set to INADDR_ANY which causes the kernel to choose the
143 192 interface on which to join.
144 193
145 194 IP_BLOCK_SOURCE
146 195 Block multicast packets whose source
147 196 address matches the given source address.
148 197 The specified group must be joined
149 198 previously using IP_ADD_MEMBERSHIP or
150 199 MCAST_JOIN_GROUP.
151 200
152 201
153 202 IP_UNBLOCK_SOURCE
154 203 Unblock (begin receiving) multicast
155 204 packets which were previously blocked
156 205 using IP_BLOCK_SOURCE.
157 206
158 207
159 208 IP_ADD_SOURCE_MEMBERSHIP
160 209 Begin receiving packets for the given
161 210 multicast group whose source address
162 211 matches the specified address.
163 212
164 213
165 214 IP_DROP_SOURCE_MEMBERSHIP
166 215 Stop receiving packets for the given
167 216 multicast group whose source address
168 217 matches the specified address.
169 218
170 219
171 220
172 221 The following options take a struct ip_mreq_source as the parameter.
173 222 The structure contains a multicast address (which must be set to the
174 223 CLASS-D IP multicast address), an interface address, and a source
175 224 address.
176 225
177 226 MCAST_JOIN_GROUP
178 227 Join a multicast group. Functionally
179 228 equivalent to IP_ADD_MEMBERSHIP.
180 229
181 230
182 231 MCAST_BLOCK_SOURCE
183 232 Block multicast packets whose source
184 233 address matches the given source address.
185 234 The specified group must be joined
186 235 previously using IP_ADD_MEMBERSHIP or
187 236 MCAST_JOIN_GROUP.
188 237
189 238
190 239 MCAST_UNBLOCK_SOURCE
191 240 Unblock (begin receiving) multicast packets
192 241 which were previously blocked using
193 242 MCAST_BLOCK_SOURCE.
194 243
195 244
196 245 MCAST_LEAVE_GROUP
197 246 Leave a multicast group. Functionally
198 247 equivalent to IP_DROP_MEMBERSHIP.
199 248
200 249
201 250 MCAST_JOIN_SOURCE_GROUP
202 251 Begin receiving packets for the given
203 252 multicast group whose source address
204 253 matches the specified address.
205 254
206 255
207 256 MCAST_LEAVE_SOURCE_GROUP
208 257 Stop receiving packets for the given
209 258 multicast group whose source address
210 259 matches the specified address.
211 260
212 261
213 262
214 263 The following options take a struct group_req or struct
215 264 group_source_req as the parameter. The `group_req structure contains an
216 265 interface index and a multicast address which must be set to the CLASS-
217 266 D multicast address. The group_source_req structure is used for those
218 267 options which include a source address. It contains an interface index,
219 268 multicast address, and source address.
220 269
221 270 IP_MULTICAST_IF
222 271 The outgoing interface for multicast packets. This
223 272 option takes a struct in_addr as an argument, and
224 273 it selects that interface for outgoing IP
225 274 multicast packets. If the address specified is
226 275 INADDR_ANY, it uses the unicast routing table to
227 276 select the outgoing interface (which is the
228 277 default behavior).
229 278
230 279
231 280 IP_MULTICAST_TTL
232 281 Time to live for multicast datagrams. This option
233 282 takes an unsigned character as an argument. Its
234 283 value is the TTL that IP uses on outgoing
235 284 multicast datagrams. The default is 1.
236 285
237 286
↓ open down ↓ |
89 lines elided |
↑ open up ↑ |
238 287 IP_MULTICAST_LOOP
239 288 Loopback for multicast datagrams. Normally
240 289 multicast datagrams are delivered to members on
241 290 the sending host (or sending zone). Setting the
242 291 unsigned character argument to 0 causes the
243 292 opposite behavior, meaning that when multiple
244 293 zones are present, the datagrams are delivered to
245 294 all zones except the sending zone.
246 295
247 296
248 - IP_RECVIF
249 - Receive the inbound interface index.
250 -
251 -
252 297 IP_TOS
253 298 This option takes an integer argument as its input
254 299 value. The least significant 8 bits of the value
255 300 are used to set the Type Of Service field in the
256 301 IP header of the outgoing packets.
257 302
258 303
259 304 IP_NEXTHOP
260 305 This option specifies the address of the onlink
261 306 nexthop for traffic originating from that socket.
262 307 It causes the routing table to be bypassed and
263 308 outgoing traffic is sent directly to the specified
264 309 nexthop. This option takes an ipaddr_t argument
265 310 representing the IPv4 address of the nexthop as
266 311 the input value. The IP_NEXTHOP option takes
267 312 precedence over IPOPT_LSRR. IP_BOUND_IF and
268 313 SO_DONTROUTE take precedence over IP_NEXTHOP. This
269 314 option has no meaning for broadcast and multicast
270 315 packets. The application must ensure that the
271 316 specified nexthop is alive. An application may
272 317 want to specify the IP_NEXTHOP option on a TCP
273 318 listener socket only for incoming requests to a
274 319 particular IP address. In this case, it must avoid
275 320 binding the socket to INADDR_ANY and instead must
276 321 bind the listener socket to the specific IP
277 322 address. In addition, typically the application
278 323 may want the incoming and outgoing interface to be
279 324 the same. In this case, the application must
280 325 select a suitable nexthop that is onlink and
281 326 reachable via the desired interface and do a
282 327 setsockopt (IP_NEXTHOP) on it. Then it must bind
283 328 to the IP address of the desired interface.
284 329 Setting the IP_NEXTHOP option requires the
285 330 PRIV_SYS_NET_CONFIG privilege.
286 331
287 332
288 333
289 334 The multicast socket options (IP_MULTICAST_IF, IP_MULTICAST_TTL,
290 335 IP_MULTICAST_LOOP and IP_RECVIF) can be used with any datagram socket
291 336 type in the Internet family.
292 337
293 338
294 339 At the socket level, the socket option SO_DONTROUTE may be applied.
295 340 This option forces datagrams being sent to bypass routing and
296 341 forwarding by forcing the IP Time To Live field to 1, meaning that the
297 342 packet will not be forwarded by routers.
298 343
299 344
300 345 Raw IP datagrams can also be sent and received using the TLI
301 346 connectionless primitives.
302 347
303 348
304 349 Datagrams flow through the IP layer in two directions: from the network
305 350 up to user processes and from user processes down to the network.
306 351 Using this orientation, IP is layered above the network interface
307 352 drivers and below the transport protocols such as UDP and TCP. The
308 353 Internet Control Message Protocol (ICMP) is logically a part of IP. See
309 354 icmp(7P).
310 355
311 356
312 357 IP provides for a checksum of the header part, but not the data part,
313 358 of the datagram. The checksum value is computed and set in the process
314 359 of sending datagrams and checked when receiving datagrams.
315 360
316 361
317 362 IP options in received datagrams are processed in the IP layer
318 363 according to the protocol specification. Currently recognized IP
319 364 options include: security, loose source and record route (LSRR), strict
320 365 source and record route (SSRR), record route, and internet timestamp.
321 366
322 367
323 368 By default, the IP layer will not forward IPv4 packets that are not
324 369 addressed to it. This behavior can be overridden by using routeadm(1M)
325 370 to enable the ipv4-forwarding option. IPv4 forwarding is configured at
326 371 boot time based on the setting of routeadm(1M)'s ipv4-forwarding
327 372 option.
328 373
329 374
330 375 For backwards compatibility, IPv4 forwarding can be enabled or disabled
331 376 using ndd(1M)'s ip_forwarding variable. It is set to 1 if IPv4
332 377 forwarding is enabled, or 0 if it is disabled.
333 378
334 379
335 380 Additionally, finer-grained forwarding can be configured in IP. Each
336 381 interface can be configured to forward IP packets by setting the
337 382 IFF_ROUTER interface flag. This flag can be set and cleared using
338 383 ifconfig(1M)'s router and router options. If an interface's IFF_ROUTER
339 384 flag is set, packets can be forwarded to or from the interface. If it
340 385 is clear, packets will neither be forwarded from this interface to
341 386 others, nor forwarded to this interface. Setting the ip_forwarding
342 387 variable sets all of the IPv4 interfaces' IFF_ROUTER flags.
343 388
344 389
345 390 For backwards compatibility, each interface creates an
346 391 <ifname>:ip_forwarding /dev/ip variable that can be modified using
347 392 ndd(1M). An interface's :ip_forwarding ndd variable is a boolean
348 393 variable that mirrors the status of its IFF_ROUTER interface flag. It
349 394 is set to 1 if the flag is set, or 0 if it is clear. This interface
350 395 specific <ifname> :ip_forwarding ndd variable is obsolete and may be
351 396 removed in a future release of Solaris. The ifconfig(1M) router and
352 397 -router interfaces are preferred.
353 398
354 399
355 400 The IP layer sends an ICMP message back to the source host in many
356 401 cases when it receives a datagram that can not be handled. A "time
357 402 exceeded" ICMP message is sent if the "time to live" field in the IP
358 403 header drops to zero in the process of forwarding a datagram. A
359 404 "destination unreachable" message is sent if a datagram can not be
360 405 forwarded because there is no route to the final destination, or if it
361 406 can not be fragmented. If the datagram is addressed to the local host
362 407 but is destined for a protocol that is not supported or a port that is
363 408 not in use, a destination unreachable message is also sent. The IP
364 409 layer may send an ICMP "source quench" message if it is receiving
365 410 datagrams too quickly. ICMP messages are only sent for the first
366 411 fragment of a fragmented datagram and are never returned in response to
367 412 errors in other ICMP messages.
368 413
369 414
370 415 The IP layer supports fragmentation and reassembly. Datagrams are
371 416 fragmented on output if the datagram is larger than the maximum
372 417 transmission unit (MTU) of the network interface. Fragments of received
373 418 datagrams are dropped from the reassembly queues if the complete
374 419 datagram is not reconstructed within a short time period.
375 420
376 421
377 422 Errors in sending discovered at the network interface driver layer are
378 423 passed by IP back up to the user process.
379 424
380 425
381 426 Multi-Data Transmit allows more than one packet to be sent from the IP
382 427 module to another in a given call, thereby reducing the per-packet
383 428 processing costs. The behavior of Multi-Data Transmit can be
384 429 overrideen by using ndd(1M) to set the /dev/ip variable,
385 430 ip_multidata_outbound to 0. Note, the IP module will only initiate
386 431 Multi-Data Transmit if the network interface driver supports it.
387 432
388 433 PACKET EVENTS
389 434 Through the netinfo framework, this driver provides the following
390 435 packet events:
391 436
392 437 Physical in
393 438 Packets received on a network interface from an
394 439 external source.
395 440
396 441
397 442 Physical out
398 443 Packets to be sent out a network interface.
399 444
400 445
401 446 Forwarding
402 447 Packets being forwarded through this host to another
403 448 network.
404 449
405 450
406 451 loopback in
407 452 Packets that have been sent by a local application to
408 453 another.
409 454
410 455
411 456 loopback out
412 457 Packets about to be received by a local application
413 458 from another.
414 459
415 460
416 461
417 462 Currently, only a single function may be registered for each event. As
418 463 a result, if the slot for an event is already occupied by someone else,
419 464 a second attempt to register a callback fails.
420 465
421 466
422 467 To receive packet events in a kernel module, it is first necessary to
423 468 obtain a handle for either IPv4 or IPv6 traffic. This is achieved by
424 469 passing NHF_INET or NHF_INET6 through to a net_protocol_lookup() call.
425 470 The value returned from this call must then be passed into a call to
426 471 net_register_hook(), along with a description of the hook to add. For a
427 472 description of the structure passed through to the callback, please
428 473 see hook_pkt_event(9S). For IP packets, this structure is filled out as
429 474 follows:
430 475
431 476 hpe_ifp
432 477 Identifier indicating the inbound interface for packets
433 478 received with the "physical in" event.
434 479
435 480
436 481 hpe_ofp
437 482 Identifier indicating the outbound interface for packets
438 483 received with the "physical out" event.
439 484
440 485
441 486 hpe_hdr
442 487 Pointer to the start of the IP header (not the ethernet
443 488 header).
444 489
445 490
446 491 hpe_mp
447 492 Pointer to the start of the mblk_t chain containing the IP
448 493 packet.
449 494
450 495
451 496 hpe_mb
452 497 Pointer to the mblk_t with the IP header in it.
453 498
454 499
455 500 NETWORK INTERFACE EVENTS
456 501 In addition to events describing packets as they move through the
457 502 system, it is also possible to receive notification of events relating
458 503 to network interfaces. These events are all reported back through the
459 504 same callback. The list of events is as follows:
460 505
461 506 plumb
462 507 A new network interface has been instantiated.
463 508
464 509
465 510 unplumb
466 511 A network interface is no longer associated with this
467 512 protocol.
468 513
469 514
470 515 up
471 516 At least one logical interface is now ready to
472 517 receive packets.
473 518
474 519
↓ open down ↓ |
213 lines elided |
↑ open up ↑ |
475 520 down
476 521 There are no logical interfaces expecting to receive
477 522 packets.
478 523
479 524
480 525 address change
481 526 An address has changed on a logical interface.
482 527
483 528
484 529 SEE ALSO
485 - ifconfig(1M), routeadm(1M), ndd(1M), read(2), write(2), bind(3SOCKET),
486 - connect(3SOCKET), getsockopt(3SOCKET), recv(3SOCKET), send(3SOCKET),
487 - defaultrouter(4), icmp(7P), if_tcp(7P), inet(7P), ip6(7P), ipsec(7P),
488 - routing(7P), tcp(7P), udp(7P), net_hook_register(9F),
489 - hook_pkt_event(9S)
530 + ifconfig(1M), routeadm(1M), ndd(1M), read(2), write(2),
531 + socket.h(3HEAD), bind(3SOCKET), connect(3SOCKET), getsockopt(3SOCKET),
532 + recv(3SOCKET), send(3SOCKET), defaultrouter(4), icmp(7P), if_tcp(7P),
533 + inet(7P), ip(7P), ip6(7P), ipsec(7P), routing(7P), tcp(7P), udp(7P),
534 + net_hook_register(9F), hook_pkt_event(9S)
490 535
491 536
492 537 Braden, R., RFC 1122, Requirements for Internet Hosts - Communication
493 538 Layers, Information Sciences Institute, University of Southern
494 539 California, October 1989.
495 540
496 541
497 542 Postel, J., RFC 791, Internet Protocol - DARPA Internet Program
498 543 Protocol Specification, Information Sciences Institute, University of
499 544 Southern California, September 1981.
500 545
501 546 DIAGNOSTICS
502 547 A socket operation may fail with one of the following errors returned:
503 548
504 549 EACCES
505 550 A bind() operation was attempted with a "reserved"
506 551 port number and the effective user ID of the process
507 552 was not the privileged user.
508 553
509 554 Setting the IP_NEXTHOP was attempted by a process
510 555 lacking the PRIV_SYS_NET_CONFIG privilege.
511 556
512 557
513 558 EADDRINUSE
514 559 A bind() operation was attempted on a socket with a
515 560 network address/port pair that has already been bound
516 561 to another socket.
517 562
518 563
519 564 EADDRNOTAVAIL
520 565 A bind() operation was attempted for an address that
521 566 is not configured on this machine.
522 567
523 568
524 569 EINVAL
525 570 A sendmsg() operation with a non-NULL msg_accrights
526 571 was attempted.
527 572
528 573
529 574 EINVAL
530 575 A getsockopt() or setsockopt() operation with an
531 576 unknown socket option name was given.
532 577
533 578
534 579 EINVAL
535 580 A getsockopt() or setsockopt() operation was attempted
536 581 with the IP option field improperly formed; an option
537 582 field was shorter than the minimum value or longer
538 583 than the option buffer provided.
539 584
540 585
541 586 EISCONN
542 587 A connect() operation was attempted on a socket on
543 588 which a connect() operation had already been
544 589 performed, and the socket could not be successfully
545 590 disconnected before making the new connection.
546 591
547 592
548 593 EISCONN
549 594 A sendto() or sendmsg() operation specifying an
550 595 address to which the message should be sent was
551 596 attempted on a socket on which a connect() operation
552 597 had already been performed.
553 598
554 599
555 600 EMSGSIZE
556 601 A send(), sendto(), or sendmsg() operation was
557 602 attempted to send a datagram that was too large for an
558 603 interface, but was not allowed to be fragmented (such
559 604 as broadcasts).
560 605
561 606
562 607 ENETUNREACH
563 608 An attempt was made to establish a connection by means
564 609 of connect(), or to send a datagram by means of
565 610 sendto() or sendmsg(), where there was no matching
566 611 entry in the routing table; or if an ICMP "destination
567 612 unreachable" message was received.
568 613
569 614
570 615 ENOTCONN
571 616 A send() or write() operation, or a sendto() or
572 617 sendmsg() operation not specifying an address to which
573 618 the message should be sent, was attempted on a socket
574 619 on which a connect() operation had not already been
575 620 performed.
576 621
577 622
578 623 ENOBUFS
579 624 The system ran out of memory for fragmentation buffers
580 625 or other internal data structures.
581 626
582 627
583 628 ENOBUFS
584 629 SO_SNDBUF or SO_RCVBUF exceeds a system limit.
585 630
586 631
587 632 EINVAL
588 633 Invalid length for IP_OPTIONS.
589 634
590 635
591 636 EHOSTUNREACH
592 637 Invalid address for IP_MULTICAST_IF.
593 638
594 639 Invalid (offlink) nexthop address for IP_NEXTHOP.
595 640
596 641
597 642 EINVAL
598 643 Not a multicast address for IP_ADD_MEMBERSHIP and
599 644 IP_DROP_MEMBERSHIP.
600 645
601 646
602 647 EADDRNOTAVAIL
603 648 Bad interface address for IP_ADD_MEMBERSHIP and
604 649 IP_DROP_MEMBERSHIP.
605 650
606 651
607 652 EADDRINUSE
608 653 Address already joined for IP_ADD_MEMBERSHIP.
609 654
610 655
611 656 ENOENT
612 657 Address not joined for IP_DROP_MEMBERSHIP.
613 658
614 659
615 660 ENOPROTOOPT
616 661 Invalid socket type.
617 662
618 663
619 664 EPERM
620 665 No permissions.
621 666
622 667
↓ open down ↓ |
123 lines elided |
↑ open up ↑ |
623 668 NOTES
624 669 Raw sockets should receive ICMP error packets relating to the protocol;
625 670 currently such packets are simply discarded.
626 671
627 672
628 673 Users of higher-level protocols such as TCP and UDP should be able to
629 674 see received IP options.
630 675
631 676
632 677
633 - December 3, 2008 IP(7P)
678 + September 18, 2020 IP(7P)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX