6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man7p / if_tcp.7p
blobacba34c8aeec90088e3b86dca8d3bc3176353f9c
1 '\" te
2 .\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
5 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
6 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH IF_TCP 7P "Sep 02, 2015"
8 .SH NAME
9 if_tcp, if \- general properties of Internet Protocol network interfaces
10 .SH DESCRIPTION
11 .LP
12 A network interface is a device for sending and receiving packets on a network.
13 It is usually a hardware device, although it can be implemented in software.
14 Network interfaces used by the Internet Protocol (IPv4 or IPv6) must be STREAMS
15 devices conforming to the Data Link Provider Interface (\fBDLPI\fR). See
16 \fBdlpi\fR(7P).
17 .SH APPLICATION PROGRAMMING INTERFACE
18 .LP
19 An interface becomes available to \fBIP\fR when it is opened and the \fBIP\fR
20 module is pushed onto the stream with the \fBI_PUSH\fR \fBioctl\fR(2) command.
21 (See \fBstreamio\fR(7I)). The \fBSIOCSLIFNAME\fR \fBioctl\fR(2) is issued to
22 specify the name of the interface and to indicate whether it is IPv4 or IPv6.
23 This may be initiated by the kernel at boot time or by a user program after the
24 system is running. Each interface must be assigned an \fBIP\fR address with the
25 \fBSIOCSLIFADDR\fR \fBioctl()\fR before it can be used. On interfaces where the
26 network-to-link layer address mapping is static, only the network number is
27 taken from the \fBioctl()\fR request; the remainder is found in a hardware
28 specific manner. On interfaces which provide dynamic network-to-link layer
29 address mapping facilities (for example, Ethernets using \fBarp\fR(7P)), the
30 entire address specified in the \fBioctl()\fR is used. A routing table entry
31 for destinations on the network of the interface is installed automatically
32 when an interface's address is set.
33 .sp
34 .LP
35 You cannot create IPMP IP  interfaces using  the procedure described above.
36 Instead, use \fBifconfig\fR(1M).
37 .SH IOCTLS
38 .LP
39 The following \fBioctl()\fR calls may be used to manipulate \fBIP\fR network
40 interfaces. Unless specified otherwise, the request takes an \fBlifreq\fR
41 structure as its parameter. This structure has the form:
42 .sp
43 .in +2
44 .nf
45 struct lifreq {
46 #define LIFNAMSIZ       32
47    char    lifr_name[LIFNAMSIZ];       /* if name, e.g. "le1" */
48    union {
49       int    lifru_addrlen;            /* for subnet/token etc */
50       uint_t lifru_ppa;                /* SIOCSLIFNAME */
51    } lifr_lifru1;
52    union {
53       struct sockaddr_storage lifru_addr;
54       struct sockaddr_storage lifru_dstaddr;
55       struct sockaddr_storage lifru_broadaddr;
56       struct sockaddr_storage lifru_token;    /* With lifr_addrlen */
57       struct sockaddr_storage lifru_subnet;   /* With lifr_addrlen */
58       int                     lifru_index;    /* interface index */
59       uint64_t                lifru_flags;    /* SIOC?LIFFLAGS */
60       int                     lifru_metric;
61       uint_t                  lifru_mtu;
62       int                     lif_muxid[2];   /* mux id's for arp & ip */
63       struct lif_nd_req       lifru_nd_req;   /* SIOCLIF*ND */
64       struct lif_ifinfo_req   lifru_ifinfo_req;
65       zoneid_t                lifru_zone;     /* SIOC[GS]LIFZONE */
66    } lifr_lifru;
68 #define lifr_addrlen   lifr_lifru1.lifru_addrlen
69 #define lifr_ppa       lifr_lifru1.lifru_ppa       /* Driver's ppa */
70 #define lifr_addr      lifr_lifru.lifru_addr       /* address */
71 #define lifr_dstaddr   lifr_lifru.lifru_dstaddr
72 #define lifr_broadaddr lifr_lifru.lifru_broadaddr  /* broadcast addr. */
73 #define lifr_token     lifr_lifru.lifru_token      /* address token */
74 #define lifr_subnet    lifr_lifru.lifru_subnet     /* subnet prefix */
75 #define lifr_index     lifr_lifru.lifru_index      /* interface index */
76 #define lifr_flags     lifr_lifru.lifru_flags      /* flags */
77 #define lifr_metric    lifr_lifru.lifru_metric     /* metric */
78 #define lifr_mtu       lifr_lifru.lifru_mtu        /* mtu */
79 #define lifr_ip_muxid  lifr_lifru.lif_muxid[0]
80 #define lifr_arp_muxid lifr_lifru.lif_muxid[1]
81 #define lifr_nd        lifr_lifru.lifru_nd_req     /* SIOCLIF*ND */
82 #define lifr_ifinfo    lifr_lifru.lifru_ifinfo_req /* SIOC[GS]LIFLNKINFO */
83 #define lifr_zone      lifr_lifru.lifru_zone       /* SIOC[GS]LIFZONE */
85 .fi
86 .in -2
88 .sp
89 .ne 2
90 .na
91 \fB\fBSIOCSLIFADDR\fR\fR
92 .ad
93 .RS 19n
94 Set interface address.
95 .RE
97 .sp
98 .ne 2
99 .na
100 \fB\fBSIOCGLIFADDR\fR\fR
102 .RS 19n
103 Get interface address.
107 .ne 2
109 \fB\fBSIOCSLIFDSTADDR\fR\fR
111 .RS 19n
112 Set point to point address for interface.
116 .ne 2
118 \fB\fBSIOCGLIFDSTADDR\fR\fR
120 .RS 19n
121 Get point to point address for interface.
125 .ne 2
127 \fB\fBSIOCSLIFFLAGS\fR\fR
129 .RS 19n
130 Set interface flags field. If the interface is marked down, any processes
131 currently routing packets through the interface are notified.
135 .ne 2
137 \fB\fBSIOCGLIFFLAGS\fR\fR
139 .RS 19n
140 Get interface flags.
144 .ne 2
146 \fB\fBSIOCGLIFCONF\fR\fR
148 .RS 19n
149 Get interface configuration list. This request takes a \fBlifconf\fR structure
150 (see below) as a value-result parameter. The \fBlifc_family\fR field can  be
151 set to \fBAF_UNSPEC\fR to retrieve both \fBAF_INET\fR and \fBAF_INET6\fR
152 interfaces. The \fBlifc_len\fR field should be set to the size of the buffer
153 pointed to by \fBlifc_buf\fR.
155 The \fBlifc_flags\fR field should usually be set to zero, but callers that need
156 low-level knowledge of the  underlying IP interfaces that comprise an IPMP
157 group can set  it  to \fBLIFC_UNDER_IPMP\fR to request that those interfaces be
158 included in the result. Upon success, \fBlifc_len\fR contains the length, in
159 bytes, of the array  of \fBlifreq\fR structures pointed to  by \fBlifc_req\fR.
160 For each \fBlifreq\fR structure, the \fBlifr_name\fR and \fBlifr_addr\fR fields
161 are valid.
165 .ne 2
167 \fB\fBSIOCGLIFNUM\fR\fR
169 .RS 19n
170 Get number of interfaces. This request returns an integer which is the number
171 of interface descriptions (\fBstruct lifreq\fR) returned by the
172 \fBSIOCGLIFCONF\fR ioctl (in other words, indicates how large \fBlifc_len\fR
173 must be).
175 This  request  takes a \fBstruct  lifnum\fR (see below) as a value-result
176 parameter. The \fBlifn_family\fR field can  be set to \fBAF_UNSPEC\fR to count
177 both \fBAF_INET\fR and \fBAF_INET6\fR interfaces. The \fBlifn_flags\fR field
178 should usually be set to zero, but callers that need low-level knowledge of the
179 underlying IP interfaces that comprise an  IPMP group can set it to
180 \fBLIFC_UNDER_IPMP\fR to request that those interfaces be included in the
181 count.
185 .ne 2
187 \fB\fBSIOCSLIFMTU\fR\fR
189 .RS 19n
190 Set the maximum transmission unit (MTU) size for interface. Place the request
191 in the \fBlifru_mtu\fR field. The \fBMTU\fR can not exceed the physical
192 \fBMTU\fR limitation  (which is reported in the  \fBDLPI\fR \fBDL_INFO_ACK\fR
193 message).
197 .ne 2
199 \fB\fBSIOCGLIFMTU\fR\fR
201 .RS 19n
202 Get the maximum transmission unit size for interface.
206 .ne 2
208 \fB\fBSIOCSLIFMETRIC\fR\fR
210 .RS 19n
211 Set the metric associated with the interface.  The metric is used by routing
212 daemons such as \fBin.routed\fR(1M).
216 .ne 2
218 \fB\fBSIOCGLIFMETRIC\fR\fR
220 .RS 19n
221 Get the metric associated with the interface.
225 .ne 2
227 \fB\fBSIOCGLIFMUXID\fR\fR
229 .RS 19n
230 Get the \fBip\fR and \fBarp\fR \fBmuxid\fR associated with the interface.
234 .ne 2
236 \fB\fBSIOCSLIFMUXID\fR\fR
238 .RS 19n
239 Set the \fBip\fR and \fBarp\fR \fBmuxid\fR associated with the interface.
243 .ne 2
245 \fB\fBSIOCGLIFINDEX\fR\fR
247 .RS 19n
248 Get the interface index associated with the interface.
252 .ne 2
254 \fB\fBSIOCSLIFINDEX\fR\fR
256 .RS 19n
257 Set the interface index associated with the interface.
261 .ne 2
263 \fB\fBSIOCGLIFZONE\fR\fR
265 .RS 19n
266 Get the zone associated with the interface.
270 .ne 2
272 \fB\fBSIOCSLIFZONE\fR\fR
274 .RS 19n
275 Set the zone associated with the interface. Only applies for zones that use the
276 shared-IP instance.
280 .ne 2
282 \fB\fBSIOCLIFADDIF\fR\fR
284 .RS 19n
285 Add a new logical interface on a physical interface using an unused logical
286 interface number.
290 .ne 2
292 \fB\fBSIOCLIFREMOVEIF\fR\fR
294 .RS 19n
295 Remove a logical interface by specifying its \fBIP\fR address or logical
296 interface name.
300 .ne 2
302 \fB\fBSIOCSLIFTOKEN\fR\fR
304 .RS 19n
305 Set the address token used to form IPv6 link-local addresses and for stateless
306 address autoconfiguration.
310 .ne 2
312 \fB\fBSIOCGLIFTOKEN\fR\fR
314 .RS 19n
315 Get the address token used to form IPv6 link-local addresses and for stateless
316 address autoconfiguration.
320 .ne 2
322 \fB\fBSIOCSLIFSUBNET\fR\fR
324 .RS 19n
325 Set the subnet prefix associated with the interface.
329 .ne 2
331 \fB\fBSIOCGLIFSUBNET\fR\fR
333 .RS 19n
334 Get the subnet prefix associated with the interface.
338 .ne 2
340 \fB\fBSIOCSLIFLNKINFO\fR\fR
342 .RS 19n
343 Set link specific parameters for the interface.
347 .ne 2
349 \fB\fBSIOCGLIFLNKINFO\fR\fR
351 .RS 19n
352 Get link specific parameters for the interface.
356 .ne 2
358 \fB\fBSIOCLIFDELND\fR\fR
360 .RS 19n
361 Delete a neighbor cache entry for  IPv6.
365 .ne 2
367 \fB\fBSIOCLIFGETND\fR\fR
369 .RS 19n
370 Get a neighbor cache entry for  IPv6.
374 .ne 2
376 \fB\fBSIOCLIFSETND\fR\fR
378 .RS 19n
379 Set a neighbor cache entry for  IPv6.
383 .ne 2
385 \fB\fBSIOCSLIFUSESRC\fR\fR
387 .RS 19n
388 Set the interface from which to choose a source address. The \fBlifr_index\fR
389 field has the interface index corresponding to the interface whose address is
390 to be used as the source address for packets going out on the interface whose
391 name is provided by \fBlifr_name\fR. If the \fBlifr_index\fR field is set to
392 zero, the previous setting is cleared.  See \fBifconfig\fR(1M) for examples of
393 the \fBusesrc\fR option.
397 .ne 2
399 \fB\fBSIOCGLIFUSESRC\fR\fR
401 .RS 19n
402 Get the interface index of the interface whose address is used as the source
403 address for packets going out on the interface provided by \fBlifr_name\fR
404 field. The value is retrieved in the \fBlifr_index\fR field. See
405 \fBifconfig\fR(1M) for examples of the \fBusesrc\fR option.
409 .ne 2
411 \fB\fBSIOCGLIFSRCOF\fR\fR
413 .RS 19n
414 Get the interface configuration list for interfaces that use an address hosted
415 on the interface provided by the \fBlifs_ifindex\fR field in the \fBlifsrcof\fR
416 struct (see below), as a source address. The application sets \fBlifs_maxlen\fR
417 to the size (in bytes) of the buffer it has allocated for the data. On return,
418 the kernel sets \fBlifs_len\fR to the actual size required. Note, the
419 application could set \fBlifs_maxlen\fR to zero to query the kernel of the
420 required buffer size instead of estimating a buffer size. The application tests
421 \fBlifs_len\fR <= \fBlifs_maxlen\fR -- if that's true,  the buffer was big
422 enough and the application has an accurate list.  If it is false, it needs to
423 allocate a bigger buffer and try again, and \fBlifs_len\fR provides a hint of
424 how big to make the next trial. See \fBifconfig\fR(1M) for examples of the
425 \fBusesrc\fR option.
429 .ne 2
431 \fB\fBSIOCTONLINK\fR\fR
433 .RS 19n
434 Test if the address is directly reachable, for example, that it can be reached
435 without going through a router. This request takes an \fBsioc_addrreq\fR
436 structure (see below) as a value-result parameter. The \fBsa_addr\fR field
437 should be set to the address to test. The \fBsa_res\fR field will contain a
438 non-zero value if the address is onlink.
442 .ne 2
444 \fB\fBSIOCTMYADDR\fR\fR
446 .RS 19n
447 Test if the address is assigned to this node. This request takes an
448 \fBsioc_addrreq\fR structure (see below) as a value-result parameter. The
449 \fBsa_addr\fR field should be set to the address to test. The \fBsa_res\fR
450 field will contain a non-zero value if the address is assigned to this node.
454 .ne 2
456 \fB\fBSIOCTMYSITE\fR\fR
458 .RS 19n
459 Test if the address is part of the same site as this node. This request takes
460 an \fBsioc_addrreq\fR structure (see below) as a value-result parameter. The
461 \fBsa_addr\fR field should be set to the address to test. The \fBsa_res\fR
462 field will contain a non-zero value if the address is in the same site.
467 The structure used by \fBSIOCGLIFCONF\fR has the form:
469 .in +2
471 struct lifconf {
472    sa_family_t     lifc_family;
473    int             lifc_flags;       /* request specific
474                                      /* interfaces */
475    int             lifc_len;         /* size of assoc. buffer */
476    union {
477       caddr_t      lifcu_buf;
478       struct lifreq *lifcu_req;
479    } lifc_lifcu;
481 #define lifc_buf lifc_lifcu.lifcu_buf   /* buffer address */
482 #define lifc_req lifc_lifcu.lifcu_req   /* array of structs returned */
485 .in -2
489 The structure used by \fBSIOCGLIFNUM\fR has the form:
491 .in +2
493 struct lifnum {
494    sa_family_t     lifn_family;
495    int             lifn_flags;   /* req. specf. interfaces */
496    int             lifn_count;   /* Result */
499 .in -2
503 The structure used by \fBSIOCTONLINK\fR, \fBSIOCTMYADDR\fR and
504 \fBSIOCTMYSITE\fR has the form:
506 .in +2
508 struct sioc_addrreq {
509    struct sockaddr_storage sa_addr; /* Address to test */
510    int                     sa_res;  /* Result - 0/1 */
513 .in -2
517 The structure used by \fBSIOCGLIFSRCOF\fR has the form:
519 .in +2
521  struct lifsrcof {
522      uint_t  lifs_ifindex;   /* addr on this interface */
523                              /* used as the src addr */
524      size_t  lifs_maxlen;    /* size of buffer: input */
525      size_t  lifs_len;       /* size of buffer: output */
526      union {
527             caddr_t lifsu_buf;
528             struct  lifreq *lifsu_req;
529    } lifs_lifsu;
530 #define lifs_buf lifs_lifsu.lifsu_buf /* buffer addr. */
531 #define lifs_req lifs_lifsu.lifsu_req /* array returned */
534 .in -2
538 The following \fBioctl()\fR calls are maintained for compatibility but only
539 apply to IPv4 network interfaces, since the data structures are too small to
540 hold an IPv6 address. Unless specified otherwise, the request takes an
541 \fBifreq\fR structure as its parameter. This structure has the form:
543 .in +2
545 struct ifreq {
546 #define IFNAMSIZ        16
547  char   ifr_name[IFNAMSIZ];              /* interface name - e.g. "hme0" */
548  union {
549            struct sockaddr      ifru_addr;
550            struct sockaddr      ifru_dstaddr;
551            struct sockaddr      ifru_broadaddr;
552            short ifru_flags;
553            int   ifru_metric;
554            int   if_muxid[2];                   /* mux id's for arp and ip */
555            int   ifru_index;                     /* interface index */
556         } ifr_ifru;
558 #define ifr_addr      ifr_ifru.ifru_addr       /* address */
559 #define ifr_dstaddr   ifr_ifru.ifru_dstaddr    /* other end of p-to-p link */
560 #define ifr_broadaddr ifr_ifru.ifru_broadaddr  /* broadcast address */
561 #define ifr_flags     ifr_ifru.ifru_flags      /* flags */
562 #define ifr_index     ifr_ifru.ifru_index      /* interface index  */
563 #define ifr_metric    ifr_ifru.ifru_metric     /* metric */
566 .in -2
569 .ne 2
571 \fB\fBSIOCSIFADDR\fR\fR
573 .RS 18n
574 Set interface address.
578 .ne 2
580 \fB\fBSIOCGIFADDR\fR\fR
582 .RS 18n
583 Get interface address.
587 .ne 2
589 \fB\fBSIOCSIFDSTADDR\fR\fR
591 .RS 18n
592 Set point to point address for interface.
596 .ne 2
598 \fB\fBSIOCGIFDSTADDR\fR\fR
600 .RS 18n
601 Get point to point address for interface.
605 .ne 2
607 \fB\fBSIOCSIFFLAGS\fR\fR
609 .RS 18n
610 Set interface flags field. If the interface is marked down, any processes
611 currently routing packets through the interface are notified.
615 .ne 2
617 \fB\fBSIOCGIFFLAGS\fR\fR
619 .RS 18n
620 Get interface flags.
624 .ne 2
626 \fB\fBSIOCGIFCONF\fR\fR
628 .RS 18n
629 Get interface configuration list. This request takes an \fBifconf\fR structure
630 (see below) as a value-result parameter. The \fBifc_len\fR field should be set
631 to the size of the buffer pointed to by \fBifc_buf\fR. Upon success,
632 \fBifc_len\fR will contain the length, in bytes, of the array of \fBifreq\fR
633 structures pointed to by \fBifc_req\fR. For each \fBifreq\fR structure, the
634 \fBifr_name\fR and \fBifr_addr\fR fields are valid.  Though IPMP IP interfaces
635 are included in the array, underlying IP interfaces that comprise those IPMP
636 groups are not.
640 .ne 2
642 \fB\fBSIOCGIFNUM\fR\fR
644 .RS 18n
645 Get number of interfaces. This request returns an integer which is the number
646 of interface descriptions (\fBstruct ifreq\fR) returned by the
647 \fBSIOCGIFCONF\fR ioctl (in other words, indicates how large \fBifc_len\fR must
648 be).  Though IPMP IP interfaces are included  in the array, underlying IP
649 interfaces that comprise those IPMP groups are not.
653 .ne 2
655 \fB\fBSIOCSIFMTU\fR\fR
657 .RS 18n
658 Set the maximum transmission unit (\fBMTU\fR) size for interface. Place the
659 request in the \fBifr_metric\fR field. The \fBMTU\fR has to be smaller than
660 physical \fBMTU\fR limitation (which is reported in the \fBDLPI\fR
661 \fBDL_INFO_ACK\fR message).
665 .ne 2
667 \fB\fBSIOCGIFMTU\fR\fR
669 .RS 18n
670 Get the maximum transmission unit size for interface. Upon success, the request
671 is placed in the \fBifr_metric\fR field.
675 .ne 2
677 \fB\fBSIOCSIFMETRIC\fR\fR
679 .RS 18n
680 Set the metric associated with the interface.  The metric is used by routine
681 daemons such as \fBin.routed\fR(1M).
685 .ne 2
687 \fB\fBSIOCGIFMETRIC\fR\fR
689 .RS 18n
690 Get the metric associated with the interface.
694 .ne 2
696 \fB\fBSIOCGIFMUXID\fR\fR
698 .RS 18n
699 Get the \fBip\fR and \fBarp\fR \fBmuxid\fR associated with the interface.
703 .ne 2
705 \fB\fBSIOCSIFMUXID\fR\fR
707 .RS 18n
708 Set the \fBip\fR and \fBarp\fR \fBmuxid\fR associated with the interface.
712 .ne 2
714 \fB\fBSIOCGIFINDEX\fR\fR
716 .RS 18n
717 Get the interface index associated with the interface.
721 .ne 2
723 \fB\fBSIOCSIFINDEX\fR\fR
725 .RS 18n
726 Set the interface index associated with the interface.
731 The \fBifconf\fR structure has the form:
733 .in +2
735 struct ifconf {
736  int    ifc_len;                        /* size of assoc. buffer */
737  union {
738            caddr_t        ifcu_buf;
739            struct ifreq  *ifcu_req;
740         } ifc_ifcu;
742 #define ifc_buf   ifc_ifcu.ifcu_buf   /* buffer address */
743 #define ifc_req   ifc_ifcu.ifcu_req   /* array of structs returned */
746 .in -2
748 .SS "IFF_ Flags"
750 You can use the \fBifconfig\fR(1M) command to display the \fBIFF\fR_ flags
751 listed below (with the leading \fBIFF\fR_ prefix removed). See the
752 \fBifconfig\fR(1M) manpage for a definition of each flag.
754 .in +2
756 #define IFF_UP          0x0000000001    /* Address is up */
757 #define IFF_BROADCAST   0x0000000002    /* Broadcast address valid */
758 #define IFF_DEBUG       0x0000000004    /* Turn on debugging */
759 #define IFF_LOOPBACK    0x0000000008    /* Loopback net */
761 #define IFF_POINTOPOINT 0x0000000010    /* Interface is p-to-p */
762 #define IFF_NOTRAILERS  0x0000000020    /* Avoid use of trailers */
763 #define IFF_RUNNING     0x0000000040    /* Resources allocated */
764 #define IFF_NOARP       0x0000000080    /* No address res. protocol */
766 #define IFF_PROMISC     0x0000000100    /* Receive all packets */
767 #define IFF_ALLMULTI    0x0000000200    /* Receive all multicast pkts */
768 #define IFF_INTELLIGENT 0x0000000400    /* Protocol code on board */
769 #define IFF_MULTICAST   0x0000000800    /* Supports multicast */
771 #define IFF_MULTI_BCAST 0x0000001000    /* Multicast using broadcst. add. */
772 #define IFF_UNNUMBERED  0x0000002000    /* Non-unique address */
773 #define IFF_DHCPRUNNING 0x0000004000    /* DHCP controls interface */
774 #define IFF_PRIVATE     0x0000008000    /* Do not advertise */
776 #define IFF_NOXMIT      0x0000010000    /* Do not transmit pkts */
777 #define IFF_NOLOCAL     0x0000020000    /* No address - just on-link subnet */
778 #define IFF_DEPRECATED  0x0000040000    /* Address is deprecated */
779 #define IFF_ADDRCONF    0x0000080000    /* Addr. from stateless addrconf */
781 #define IFF_ROUTER      0x0000100000    /* Router on interface */
782 #define IFF_NONUD       0x0000200000    /* No NUD on interface */
783 #define IFF_ANYCAST     0x0000400000    /* Anycast address */
784 #define IFF_NORTEXCH    0x0000800000    /* Don't xchange rout. info */
786 #define IFF_IPV4        0x0001000000    /* IPv4 interface */
787 #define IFF_IPV6        0x0002000000    /* IPv6 interface */
788 #define IFF_NOFAILOVER  0x0008000000    /* in.mpathd test address */
789 #define IFF_FAILED      0x0010000000    /* Interface has failed */
791 #define IFF_STANDBY     0x0020000000    /* Interface is a hot-spare */
792 #define IFF_INACTIVE    0x0040000000    /* Functioning but not used */
793 #define IFF_OFFLINE     0x0080000000    /* Interface is offline */
794 #define IFF_XRESOLV     0x0100000000    /* IPv6 external resolver */
796 #define IFF_COS_ENABLED 0x0200000000    /* If CoS marking is supported */
797 #define IFF_PREFERRED   0x0400000000    /* Prefer as source address */
798 #define IFF_TEMPORARY   0x0800000000    /* RFC3041 */
799 #define IFF_FIXEDMTU    0x1000000000    /* MTU set with SIOCSLIFMTU */
801 #define IFF_VIRTUAL     0x2000000000    /* Cannot send/receive pkts */
802 #define IFF_DUPLICATE   0x4000000000    /* Local address in use */
803 #define IFF_IPMP        0x8000000000    /* IPMP IP interface */
805 .in -2
807 .SH ERRORS
808 .ne 2
810 \fB\fBEPERM\fR\fR
812 .RS 12n
813 Calling process has insufficient privileges.
817 .ne 2
819 \fB\fBENXIO\fR\fR
821 .RS 12n
822 The  \fBlifr_name\fR member of the  \fBlifreq\fR structure contains an invalid
823 value.
825 For \fBSIOCGLIFSRCOF\fR, the \fBlifs_ifindex\fR member of the \fBlifsrcof\fR
826 structure contains an invalid value.
828 For \fBSIOCSLIFUSESRC\fR, this error is returned if the \fBlifr_index\fR is set
829 to an invalid value.
833 .ne 2
835 \fB\fBEBADADDR\fR\fR
837 .RS 12n
838 Wrong address family or malformed address.
842 .ne 2
844 \fB\fBEINVAL\fR\fR
846 .RS 12n
847 For \fBSIOCSLIFMTU\fR, this error is returned when the requested \fBMTU\fR size
848 is invalid. This error indicates the \fBMTU\fR size is greater than the
849 \fBMTU\fR size supported by the \fBDLPI\fR provider or less than \fB68\fR (for
850 IPv4) or less than \fB1280\fR (for IPv6).
852 For \fBSIOCSLIFUSESRC\fR, this error is returned if either the \fBlifr_index\fR
853 or \fBlifr_name\fR identify interfaces that are already part of an existing
854 IPMP group.
858 .ne 2
860 \fB\fBEEXIST\fR\fR
862 .RS 12n
863 For \fBSIOCLIFADDIF\fR, this error is returned if the \fBlifr_name\fR member in
864 the \fBlifreq\fR structure corresponds to an interface that already has the PPA
865 specified by \fBlifr_ppa\fR plumbed.
868 .SH SEE ALSO
870 \fBifconfig\fR(1M), \fBin.routed\fR(1M), \fBioctl\fR(2),
871 \fBsockaddr\fR(3SOCKET), \fBstreamio\fR(7I), \fBarp\fR(7P), \fBdlpi\fR(7P),
872 \fBip\fR(7P), \fBip6\fR(7P), \fBndp\fR(7P)