Update the description of struct ifreq, and document SIOC[SG]IFCAP.

This commit is contained in:
Dag-Erling Smørgrav 2004-06-18 13:07:18 +00:00
parent 4f450ff9a5
commit b385a6c9b7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130686

View file

@ -205,10 +205,13 @@ struct ifreq {
struct sockaddr ifru_dstaddr;
struct sockaddr ifru_broadaddr;
short ifru_flags[2];
short ifru_index;
int ifru_metric;
int ifru_mtu;
int ifru_phys;
int ifru_media;
caddr_t ifru_data;
int ifru_cap[2];
} ifr_ifru;
#define ifr_addr ifr_ifru.ifru_addr /* address */
#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
@ -218,7 +221,11 @@ struct ifreq {
#define ifr_metric ifr_ifru.ifru_metric /* metric */
#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
#define ifr_media ifr_ifru.ifru_media /* physical media */
#define ifr_data ifr_ifru.ifru_data /* for use by interface */
#define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */
#define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */
#define ifr_index ifr_ifru.ifru_index /* interface index */
};
.Ed
.Pp
@ -248,6 +255,19 @@ Get interface address for protocol family.
Get point to point address for protocol family and interface.
.It Dv SIOCGIFBRDADDR
Get broadcast address for protocol family and interface.
.It Dv SIOCSIFCAP
Set interface capabilities field to the value of the
.Va ifr_reqcap
field of the
.Vt ifreq
structure.
.It Dv SIOCGIFCAP
Get interface capabilities field.
Its value will be returned in the
.Va ifr_curcap
field of the
.Vt ifreq
structure.
.It Dv SIOCSIFFLAGS
Set interface flags field.
If the interface is marked down,