14
15 APPLICATION PROGRAMMING INTERFACE
16 An interface becomes available to IP when it is opened and
17 the IP module is pushed onto the stream with the I_PUSH
18 ioctl(2) command. (See streamio(7I)). The SIOCSLIFNAME
19 ioctl(2) is issued to specify the name of the interface and
20 to indicate whether it is IPv4 or IPv6. This may be ini-
21 tiated by the kernel at boot time or by a user program after
22 the system is running. Each interface must be assigned an IP
23 address with the SIOCSLIFADDR ioctl() before it can be used.
24 On interfaces where the network-to-link layer address map-
25 ping is static, only the network number is taken from the
26 ioctl() request; the remainder is found in a hardware
27 specific manner. On interfaces which provide dynamic
28 network-to-link layer address mapping facilities (for exam-
29 ple, 10Mb/s Ethernets using arp(7P)), the entire address
30 specified in the ioctl() is used. A routing table entry for
31 destinations on the network of the interface is installed
32 automatically when an interface's address is set.
33
34 IOCTLS
35 The following ioctl() calls may be used to manipulate IP
36 network interfaces. Unless specified otherwise, the request
37 takes an lifreq structure as its parameter. This structure
38 has the form:
39
40 struct lifreq {
41 #define LIFNAMSIZ 32
42 char lifr_name[LIFNAMSIZ]; /* if name, e.g. "le1" */
43 union {
44 int lifru_addrlen; /* for subnet/token etc */
45 uint_t lifru_ppa; /* SIOCSLIFNAME */
46 } lifr_lifru1;
47 union {
48 struct sockaddr_storage lifru_addr;
49 struct sockaddr_storage lifru_dstaddr;
50 struct sockaddr_storage lifru_broadaddr;
51 struct sockaddr_storage lifru_token; /* With lifr_addrlen */
52 struct sockaddr_storage lifru_subnet; /* With lifr_addrlen */
53 int lifru_index; /* interface index */
84 };
85
86 SIOCSLIFADDR Set interface address.
87
88 SIOCGLIFADDR Get interface address.
89
90 SIOCSLIFDSTADDR Set point to point address for inter-
91 face.
92
93 SIOCGLIFDSTADDR Get point to point address for inter-
94 face.
95
96 SIOCSLIFFLAGS Set interface flags field. If the inter-
97 face is marked down, any processes
98 currently routing packets through the
99 interface are notified.
100
101 SIOCGLIFFLAGS Get interface flags.
102
103 SIOCGLIFCONF Get interface configuration list. This
104 request takes an lifconf structure (see
105
106 SunOS 5.10 Last change: 14 Nov 2008 2
107
108 Protocols if_tcp(7P)
109
110 below) as a value-result parameter. The
111 lifc_family field can be set to
112 AF_UNSPEC to retrieve both AF_INET and
113 AF_INET6 interfaces. The lifc_flags
114 field should be set to zero. The
115 lifc_len field should be set to the size
116 of the buffer pointed to by lifc_buf.
117 Upon success, lifc_len will contain the
118 length, in bytes, of the array of lifreq
119 structures pointed to by lifc_req. For
120 each lifreq structure, the lifr_name and
121 lifr_addr fields will be valid.
122
123 SIOCGLIFNUM Get number of interfaces. This request
124 returns an integer which is the number
125 of interface descriptions (struct
126 lifreq) that will be returned by the
127 SIOCGLIFCONF ioctl; that is, it gives an
128 indication of how large lifc_len has to
129 be. This request takes an lifnum struc-
130 ture (see below) as a value-result
131 parameter. The lifn_family field should
132 be set to AF_UNSPEC to count both
133 AF_INET and AF_INET6 interfaces. The
134 lifn_flags field should be initially set
135 to zero.
136
137 SIOCSLIFMTU Set the maximum transmission unit (MTU)
138 size for interface. Place the request in
139 the lifru_mtu field. The MTU can not
140 exceed the physical MTU limitation
141 (which is reported in the DLPI
142 DL_INFO_ACK message).
143
144 SIOCGLIFMTU Get the maximum transmission unit size
145 for interface.
146
147 SIOCSLIFMETRIC Set the metric associated with the
148 interface. The metric is used by rout-
149 ing daemons such as in.routed(1M).
150
151 SIOCGLIFMETRIC Get the metric associated with the
152 interface.
153
154 SIOCGLIFMUXID Get the ip and arp muxid associated with
155 the interface.
156
159 Protocols if_tcp(7P)
160
161 SIOCSLIFMUXID Set the ip and arp muxid associated with
162 the interface.
163
164 SIOCGLIFINDEX Get the interface index associated with
165 the interface.
166
167 SIOCSLIFINDEX Set the interface index associated with
168 the interface.
169
170 SIOCGLIFZONE Get the zone associated with the inter-
171 face.
172
173 SIOCSLIFZONE Set the zone associated with the inter-
174 face. Only applies for zones that use
175 the shared-IP instance.
176
177 SIOCLIFADDIF Add a new logical interface on a physi-
178 cal interface using an unused logical
179 unit number. If the physical interface
180 is part of an IP multipathing group, the
181 logical interface may be added to a dif-
182 ferent physical interface in the same
183 group. Upon return, the lifr_name field
184 contains the name of the actual logical
185 interface created.
186
187 SIOCLIFREMOVEIF Remove a logical interface by specifying
188 its IP address or logical interface
189 name. When the IP address is specified
190 and the interface is part of an IP mul-
191 tipathing group, the logical interface
192 is removed from the physical interface
193 in the group which holds the IP address.
194
195 SIOCSLIFTOKEN Set the address token used to form IPv6
196 link-local addresses and for stateless
197 address autoconfiguration.
198
199 SIOCGLIFTOKEN Get the address token used to form IPv6
200 link-local addresses and for stateless
201 address autoconfiguration.
202
203 SunOS 5.10 Last change: 14 Nov 2008 4
204
205 Protocols if_tcp(7P)
206
207 SIOCSLIFSUBNET Set the subnet prefix associated with
208 the interface.
209
210 SIOCGLIFSUBNET Get the subnet prefix associated with
211 the interface.
212
213 SIOCSLIFLNKINFO Set link specific parameters for the
301 struct lifconf {
302 sa_family_t lifc_family;
303
304 SunOS 5.10 Last change: 14 Nov 2008 6
305
306 Protocols if_tcp(7P)
307
308 int lifc_flags; /* request specific
309 /* interfaces */
310 int lifc_len; /* size of assoc. buffer */
311 union {
312 caddr_t lifcu_buf;
313 struct lifreq *lifcu_req;
314 } lifc_lifcu;
315
316 #define lifc_buf lifc_lifcu.lifcu_buf /* buffer address */
317 #define lifc_req lifc_lifcu.lifcu_req /* array of structs returned */
318 };
319
320 The structure used by SIOCGLIFNUM has the form:
321 struct lifnum {
322 sa_family_t lifn_family;
323 int lifn_flags; /* req. specf. interfaces */
324 int lifn_count; /* Result */
325 };
326
327 The structure used by SIOCTONLINK, SIOCTMYADDR and SIOCTMYSITE has the form:
328
329 struct sioc_addrreq {
330 struct sockaddr_storage sa_addr; /* Address to test */
331 int sa_res; /* Result - 0/1 */
332 };
333
334 The structure used by SIOCGLIFSRCOF has the form:
335
336 struct lifsrcof {
337 uint_t lifs_ifindex; /* addr on this interface */
338 /* used as the src addr */
339 size_t lifs_maxlen; /* size of buffer: input */
340 size_t lifs_len; /* size of buffer: output */
385 SIOCSIFDSTADDR Set point to point address for interface.
386
387 SIOCGIFDSTADDR Get point to point address for interface.
388
389 SIOCSIFFLAGS Set interface flags field. If the inter-
390 face is marked down, any processes
391 currently routing packets through the
392 interface are notified.
393
394 SIOCGIFFLAGS Get interface flags.
395
396 SIOCGIFCONF Get interface configuration list. This
397 request takes an ifconf structure (see
398 below) as a value-result parameter. The
399 ifc_len field should be set to the size
400 of the buffer pointed to by ifc_buf. Upon
401 success, ifc_len will contain the length,
402 in bytes, of the array of ifreq struc-
403 tures pointed to by ifc_req. For each
404 ifreq structure, the ifr_name and
405 ifr_addr fields will be valid.
406
407 SunOS 5.10 Last change: 14 Nov 2008 8
408
409 Protocols if_tcp(7P)
410
411 SIOCGIFNUM Get number of interfaces. This request
412 returns an integer which is the number of
413 interface descriptions (struct ifreq)
414 that will be returned by the SIOCGIFCONF
415 ioctl; that is, it gives an indication of
416 how large ifc_len has to be.
417
418 SIOCSIFMTU Set the maximum transmission unit (MTU)
419 size for interface. Place the request in
420 the ifr_metric field. The MTU has to be
421 smaller than physical MTU limitation
422 (which is reported in the DLPI
423 DL_INFO_ACK message).
424
425 SIOCGIFMTU Get the maximum transmission unit size
426 for interface. Upon success, the request
427 is placed in the ifr_metric field.
428
429 SIOCSIFMETRIC Set the metric associated with the inter-
430 face. The metric is used by routine dae-
431 mons such as in.routed(1M).
432
433 SIOCGIFMETRIC Get the metric associated with the inter-
434 face.
435
436 SIOCGIFMUXID Get the ip and arp muxid associated with
451 int ifc_len; /* size of assoc. buffer */
452 union {
453
454 SunOS 5.10 Last change: 14 Nov 2008 9
455
456 Protocols if_tcp(7P)
457
458 caddr_t ifcu_buf;
459 struct ifreq *ifcu_req;
460 } ifc_ifcu;
461
462 #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
463 #define ifc_req ifc_ifcu.ifcu_req /* array of structs returned */
464 };
465
466 IFF_ Flags
467 You can use the ifconfig(1M) command to display the IFF_
468 flags listed below (with the leading IFF_ prefix removed).
469 See the ifconfig(1M) manpage for a definition of each flag.
470
471 #define IFF_UP 0x0000000001 /* Interface is up */
472 #define IFF_BROADCAST 0x0000000002 /* Broadcast address valid */
473 #define IFF_DEBUG 0x0000000004 /* Turn on debugging */
474 #define IFF_LOOPBACK 0x0000000008 /* Loopback net */
475
476 #define IFF_POINTOPOINT 0x0000000010 /* Interface is p-to-p */
477 #define IFF_NOTRAILERS 0x0000000020 /* Avoid use of trailers */
478 #define IFF_RUNNING 0x0000000040 /* Resources allocated */
479 #define IFF_NOARP 0x0000000080 /* No address res. protocol */
480
481 #define IFF_PROMISC 0x0000000100 /* Receive all packets */
482 #define IFF_ALLMULTI 0x0000000200 /* Receive all multicast pkts */
483 #define IFF_INTELLIGENT 0x0000000400 /* Protocol code on board */
484 #define IFF_MULTICAST 0x0000000800 /* Supports multicast */
485
486 #define IFF_MULTI_BCAST 0x0000001000 /* Multicast using broadcst. add. */
487 #define IFF_UNNUMBERED 0x0000002000 /* Non-unique address */
488 #define IFF_DHCPRUNNING 0x0000004000 /* DHCP controls interface */
489 #define IFF_PRIVATE 0x0000008000 /* Do not advertise */
490
491 #define IFF_NOXMIT 0x0000010000 /* Do not transmit pkts */
492 #define IFF_NOLOCAL 0x0000020000 /* No address - just on-link subnet */
493 #define IFF_DEPRECATED 0x0000040000 /* Interface addr. deprecated */
494 #define IFF_ADDRCONF 0x0000080000 /* Addr. from stateless addrconf */
495
496 #define IFF_ROUTER 0x0000100000 /* Router on interface */
497 #define IFF_NONUD 0x0000200000 /* No NUD on interface */
498 #define IFF_ANYCAST 0x0000400000 /* Anycast address */
499 #define IFF_NORTEXCH 0x0000800000 /* Don't xchange rout. info */
500
501 #define IFF_IPV4 0x0001000000 /* IPv4 interface */
502 #define IFF_IPV6 0x0002000000 /* IPv6 interface */
503 #define IFF_NOFAILOVER 0x0008000000 /* No failover on NIC fail. */
504 #define IFF_FAILED 0x0010000000 /* NIC has failed */
505
506 #define IFF_STANDBY 0x0020000000 /* Standby NIC-use on fail. */
507 #define IFF_INACTIVE 0x0040000000 /* Stndby active or not? */
508 #define IFF_OFFLINE 0x0080000000 /* NIC offlined */
509
510 SunOS 5.10 Last change: 14 Nov 2008 10
511
512 Protocols if_tcp(7P)
513
514 #define IFF_XRESOLV 0x0100000000 /* IPv6 external resolver */
515
516 #define IFF_COS_ENABLED 0x0200000000 /* If CoS marking is supported */
517 #define IFF_PREFERRED 0x0400000000 /* Prefer as source address */
518 #define IFF_TEMPORARY 0x0800000000 /* RFC3041 */
519 #define IFF_FIXEDMTU 0x1000000000 /* MTU set with SIOCSLIFMTU */
520
521 #define IFF_VIRTUAL 0x2000000000 /* Cannot send/receive pkts */
522 #define IFF_DUPLICATE 0x4000000000 /* Local address in use */
523
524 ERRORS
525 EPERM Calling process has insufficient privileges.
526
527 ENXIO The lifr_name member of the lifreq structure
528 contains an invalid value.
529
530 For SIOCGLIFSRCOF, the lifs_ifindex member of
531 the lifsrcof structure contains an invalid
532 value.
533
534 For SIOCSLIFUSESRC, this error is returned if
535 the lifr_index is set to an invalid value.
536
537 EBADADDR Wrong address family or malformed address.
538
539 EBUSY For SIOCSLIFFLAGS, this error is returned when
540 the order of bringing the physical interface
541 (for example, eri0) and a logical interface
542 associated with the same physical interface
|
14
15 APPLICATION PROGRAMMING INTERFACE
16 An interface becomes available to IP when it is opened and
17 the IP module is pushed onto the stream with the I_PUSH
18 ioctl(2) command. (See streamio(7I)). The SIOCSLIFNAME
19 ioctl(2) is issued to specify the name of the interface and
20 to indicate whether it is IPv4 or IPv6. This may be ini-
21 tiated by the kernel at boot time or by a user program after
22 the system is running. Each interface must be assigned an IP
23 address with the SIOCSLIFADDR ioctl() before it can be used.
24 On interfaces where the network-to-link layer address map-
25 ping is static, only the network number is taken from the
26 ioctl() request; the remainder is found in a hardware
27 specific manner. On interfaces which provide dynamic
28 network-to-link layer address mapping facilities (for exam-
29 ple, 10Mb/s Ethernets using arp(7P)), the entire address
30 specified in the ioctl() is used. A routing table entry for
31 destinations on the network of the interface is installed
32 automatically when an interface's address is set.
33
34 Note IPMP IP interfaces cannot be created using the
35 procedure described above. Instead, ifconfig(1M) must be
36 used to create IPMP IP interfaces.
37
38 IOCTLS
39 The following ioctl() calls may be used to manipulate IP
40 network interfaces. Unless specified otherwise, the request
41 takes an lifreq structure as its parameter. This structure
42 has the form:
43
44 struct lifreq {
45 #define LIFNAMSIZ 32
46 char lifr_name[LIFNAMSIZ]; /* if name, e.g. "le1" */
47 union {
48 int lifru_addrlen; /* for subnet/token etc */
49 uint_t lifru_ppa; /* SIOCSLIFNAME */
50 } lifr_lifru1;
51 union {
52 struct sockaddr_storage lifru_addr;
53 struct sockaddr_storage lifru_dstaddr;
54 struct sockaddr_storage lifru_broadaddr;
55 struct sockaddr_storage lifru_token; /* With lifr_addrlen */
56 struct sockaddr_storage lifru_subnet; /* With lifr_addrlen */
57 int lifru_index; /* interface index */
88 };
89
90 SIOCSLIFADDR Set interface address.
91
92 SIOCGLIFADDR Get interface address.
93
94 SIOCSLIFDSTADDR Set point to point address for inter-
95 face.
96
97 SIOCGLIFDSTADDR Get point to point address for inter-
98 face.
99
100 SIOCSLIFFLAGS Set interface flags field. If the inter-
101 face is marked down, any processes
102 currently routing packets through the
103 interface are notified.
104
105 SIOCGLIFFLAGS Get interface flags.
106
107 SIOCGLIFCONF Get interface configuration list. This
108 request takes a *lifconf* structure (see
109 below) as a value-result parameter. The
110 *lifc_family* field can be set to
111 *AF_UNSPEC* to retrieve both *AF_INET*
112 and *AF_INET6* interfaces. The
113 *lifc_len* field should be set to the
114 size of the buffer pointed to by
115 *lifc_buf*.
116
117 The *lifc_flags* field should usually be
118 set to zero, but callers that need low-
119 level knowledge of the underlying IP
120 interfaces that comprise an IPMP group
121 can set it to *LIFC_UNDER_IPMP* to
122 request that those interfaces be
123 included in the result.
124
125 Upon success, *lifc_len* will contain
126 the length, in bytes, of the array of
127 *lifreq* structures pointed to by
128 *lifc_req*. For each *lifreq* structure,
129 the *lifr_name* and *lifr_addr* fields
130 will be valid.
131
132
133 SIOCGLIFNUM Get number of interfaces. This request
134 returns an integer which is the number
135 of interface descriptions (struct
136 lifreq) that will be returned by the
137 SIOCGLIFCONF ioctl; that is, it gives an
138 indication of how large lifc_len has
139 to be.
140
141 This request takes a *struct lifnum*
142 (see below) as a value-result parameter.
143 The *lifn_family* field can be set to
144 *AF_UNSPEC* to count both *AF_INET* and
145 *AF_INET6* interfaces. The *lifn_flags*
146 field should usually be set to zero, but
147 callers that need low-level knowledge of
148 the underlying IP interfaces that
149 comprise an IPMP group can set it to
150 *LIFC_UNDER_IPMP* to request that those
151 interfaces be included in the count.
152
153
154 SIOCSLIFMTU Set the maximum transmission unit (MTU)
155 size for interface. Place the request in
156 the lifru_mtu field. The MTU can not
157 exceed the physical MTU limitation
158 (which is reported in the DLPI
159 DL_INFO_ACK message).
160
161 SIOCGLIFMTU Get the maximum transmission unit size
162 for interface.
163
164 SIOCSLIFMETRIC Set the metric associated with the
165 interface. The metric is used by rout-
166 ing daemons such as in.routed(1M).
167
168 SIOCGLIFMETRIC Get the metric associated with the
169 interface.
170
171 SIOCGLIFMUXID Get the ip and arp muxid associated with
172 the interface.
173
176 Protocols if_tcp(7P)
177
178 SIOCSLIFMUXID Set the ip and arp muxid associated with
179 the interface.
180
181 SIOCGLIFINDEX Get the interface index associated with
182 the interface.
183
184 SIOCSLIFINDEX Set the interface index associated with
185 the interface.
186
187 SIOCGLIFZONE Get the zone associated with the inter-
188 face.
189
190 SIOCSLIFZONE Set the zone associated with the inter-
191 face. Only applies for zones that use
192 the shared-IP instance.
193
194 SIOCLIFADDIF Add a new logical interface on a physi-
195 cal interface using an unused logical
196 interface number.
197
198 SIOCLIFREMOVEIF Remove a logical interface by specifying
199 its IP address or logical interface
200 name.
201
202 SIOCSLIFTOKEN Set the address token used to form IPv6
203 link-local addresses and for stateless
204 address autoconfiguration.
205
206 SIOCGLIFTOKEN Get the address token used to form IPv6
207 link-local addresses and for stateless
208 address autoconfiguration.
209
210 SunOS 5.10 Last change: 14 Nov 2008 4
211
212 Protocols if_tcp(7P)
213
214 SIOCSLIFSUBNET Set the subnet prefix associated with
215 the interface.
216
217 SIOCGLIFSUBNET Get the subnet prefix associated with
218 the interface.
219
220 SIOCSLIFLNKINFO Set link specific parameters for the
308 struct lifconf {
309 sa_family_t lifc_family;
310
311 SunOS 5.10 Last change: 14 Nov 2008 6
312
313 Protocols if_tcp(7P)
314
315 int lifc_flags; /* request specific
316 /* interfaces */
317 int lifc_len; /* size of assoc. buffer */
318 union {
319 caddr_t lifcu_buf;
320 struct lifreq *lifcu_req;
321 } lifc_lifcu;
322
323 #define lifc_buf lifc_lifcu.lifcu_buf /* buffer address */
324 #define lifc_req lifc_lifcu.lifcu_req /* array of structs returned */
325 };
326
327 The structure used by SIOCGLIFNUM has the form:
328
329 struct lifnum {
330 sa_family_t lifn_family;
331 int lifn_flags; /* req. specf. interfaces */
332 int lifn_count; /* Result */
333 };
334
335 The structure used by SIOCTONLINK, SIOCTMYADDR and SIOCTMYSITE has the form:
336
337 struct sioc_addrreq {
338 struct sockaddr_storage sa_addr; /* Address to test */
339 int sa_res; /* Result - 0/1 */
340 };
341
342 The structure used by SIOCGLIFSRCOF has the form:
343
344 struct lifsrcof {
345 uint_t lifs_ifindex; /* addr on this interface */
346 /* used as the src addr */
347 size_t lifs_maxlen; /* size of buffer: input */
348 size_t lifs_len; /* size of buffer: output */
393 SIOCSIFDSTADDR Set point to point address for interface.
394
395 SIOCGIFDSTADDR Get point to point address for interface.
396
397 SIOCSIFFLAGS Set interface flags field. If the inter-
398 face is marked down, any processes
399 currently routing packets through the
400 interface are notified.
401
402 SIOCGIFFLAGS Get interface flags.
403
404 SIOCGIFCONF Get interface configuration list. This
405 request takes an ifconf structure (see
406 below) as a value-result parameter. The
407 ifc_len field should be set to the size
408 of the buffer pointed to by ifc_buf. Upon
409 success, ifc_len will contain the length,
410 in bytes, of the array of ifreq struc-
411 tures pointed to by ifc_req. For each
412 ifreq structure, the ifr_name and
413 *ifr_addr* fields will be valid. While
414 any IPMP IP interfaces will be included
415 in the array, the underlying IP
416 interfaces that comprise those IPMP
417 groups will not be.
418
419 SunOS 5.10 Last change: 14 Nov 2008 8
420
421 Protocols if_tcp(7P)
422
423 SIOCGIFNUM Get number of interfaces. This request
424 returns an integer which is the number of
425 interface descriptions (struct ifreq)
426 that will be returned by the SIOCGIFCONF
427 ioctl; that is, it gives an indication of
428 how large *ifc_len* has to be. While any
429 IPMP IP interfaces will be included in
430 the array, the underlying IP interfaces
431 that comprise those IPMP groups will not
432 be.
433
434 SIOCSIFMTU Set the maximum transmission unit (MTU)
435 size for interface. Place the request in
436 the ifr_metric field. The MTU has to be
437 smaller than physical MTU limitation
438 (which is reported in the DLPI
439 DL_INFO_ACK message).
440
441 SIOCGIFMTU Get the maximum transmission unit size
442 for interface. Upon success, the request
443 is placed in the ifr_metric field.
444
445 SIOCSIFMETRIC Set the metric associated with the inter-
446 face. The metric is used by routine dae-
447 mons such as in.routed(1M).
448
449 SIOCGIFMETRIC Get the metric associated with the inter-
450 face.
451
452 SIOCGIFMUXID Get the ip and arp muxid associated with
467 int ifc_len; /* size of assoc. buffer */
468 union {
469
470 SunOS 5.10 Last change: 14 Nov 2008 9
471
472 Protocols if_tcp(7P)
473
474 caddr_t ifcu_buf;
475 struct ifreq *ifcu_req;
476 } ifc_ifcu;
477
478 #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
479 #define ifc_req ifc_ifcu.ifcu_req /* array of structs returned */
480 };
481
482 IFF_ Flags
483 You can use the ifconfig(1M) command to display the IFF_
484 flags listed below (with the leading IFF_ prefix removed).
485 See the ifconfig(1M) manpage for a definition of each flag.
486
487 #define IFF_UP 0x0000000001 /* Address is up */
488 #define IFF_BROADCAST 0x0000000002 /* Broadcast address valid */
489 #define IFF_DEBUG 0x0000000004 /* Turn on debugging */
490 #define IFF_LOOPBACK 0x0000000008 /* Loopback net */
491
492 #define IFF_POINTOPOINT 0x0000000010 /* Interface is p-to-p */
493 #define IFF_NOTRAILERS 0x0000000020 /* Avoid use of trailers */
494 #define IFF_RUNNING 0x0000000040 /* Resources allocated */
495 #define IFF_NOARP 0x0000000080 /* No address res. protocol */
496
497 #define IFF_PROMISC 0x0000000100 /* Receive all packets */
498 #define IFF_ALLMULTI 0x0000000200 /* Receive all multicast pkts */
499 #define IFF_INTELLIGENT 0x0000000400 /* Protocol code on board */
500 #define IFF_MULTICAST 0x0000000800 /* Supports multicast */
501
502 #define IFF_MULTI_BCAST 0x0000001000 /* Multicast using broadcst. add. */
503 #define IFF_UNNUMBERED 0x0000002000 /* Non-unique address */
504 #define IFF_DHCPRUNNING 0x0000004000 /* DHCP controls interface */
505 #define IFF_PRIVATE 0x0000008000 /* Do not advertise */
506
507 #define IFF_NOXMIT 0x0000010000 /* Do not transmit pkts */
508 #define IFF_NOLOCAL 0x0000020000 /* No address - just on-link subnet */
509 #define IFF_DEPRECATED 0x0000040000 /* Address is deprecated */
510 #define IFF_ADDRCONF 0x0000080000 /* Addr. from stateless addrconf */
511
512 #define IFF_ROUTER 0x0000100000 /* Router on interface */
513 #define IFF_NONUD 0x0000200000 /* No NUD on interface */
514 #define IFF_ANYCAST 0x0000400000 /* Anycast address */
515 #define IFF_NORTEXCH 0x0000800000 /* Don't xchange rout. info */
516
517 #define IFF_IPV4 0x0001000000 /* IPv4 interface */
518 #define IFF_IPV6 0x0002000000 /* IPv6 interface */
519 #define IFF_NOFAILOVER 0x0008000000 /* in.mpathd test address */
520 #define IFF_FAILED 0x0010000000 /* Interface has failed */
521
522 #define IFF_STANDBY 0x0020000000 /* Interface is a hot-spare */
523 #define IFF_INACTIVE 0x0040000000 /* Functioning but not used */
524 #define IFF_OFFLINE 0x0080000000 /* Interface is offline */
525 #define IFF_XRESOLV 0x0100000000 /* IPv6 external resolver */
526
527 #define IFF_COS_ENABLED 0x0200000000 /* If CoS marking is supported */
528 #define IFF_PREFERRED 0x0400000000 /* Prefer as source address */
529 #define IFF_TEMPORARY 0x0800000000 /* RFC3041 */
530 #define IFF_FIXEDMTU 0x1000000000 /* MTU set with SIOCSLIFMTU */
531
532 #define IFF_VIRTUAL 0x2000000000 /* Cannot send/receive pkts */
533 #define IFF_DUPLICATE 0x4000000000 /* Local address in use */
534 #define IFF_IPMP 0x8000000000 /* IPMP IP interface */
535
536 ERRORS
537 EPERM Calling process has insufficient privileges.
538
539 ENXIO The lifr_name member of the lifreq structure
540 contains an invalid value.
541
542 For SIOCGLIFSRCOF, the lifs_ifindex member of
543 the lifsrcof structure contains an invalid
544 value.
545
546 For SIOCSLIFUSESRC, this error is returned if
547 the lifr_index is set to an invalid value.
548
549 EBADADDR Wrong address family or malformed address.
550
551 EBUSY For SIOCSLIFFLAGS, this error is returned when
552 the order of bringing the physical interface
553 (for example, eri0) and a logical interface
554 associated with the same physical interface
|