add an ifru_mtu member to the union in 'struct ifreq', and add a
#define so that ifr_mtu accesses that. MTU shouldn't be overloaded with ifr_metric, if only for clarity. Adding an MTU field to the union hurts nothing (in fact, does not actually _change_ generated code), and does improve clarity.
This commit is contained in:
parent
69db9501d4
commit
2e3d795708
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
|
||||
/* $NetBSD: if.h,v 1.24 1996/06/13 21:48:34 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@ -282,6 +282,7 @@ struct ifreq {
|
||||
struct sockaddr ifru_broadaddr;
|
||||
short ifru_flags;
|
||||
int ifru_metric;
|
||||
int ifru_mtu;
|
||||
caddr_t ifru_data;
|
||||
} ifr_ifru;
|
||||
#define ifr_addr ifr_ifru.ifru_addr /* address */
|
||||
@ -289,6 +290,7 @@ struct ifreq {
|
||||
#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
|
||||
#define ifr_flags ifr_ifru.ifru_flags /* flags */
|
||||
#define ifr_metric ifr_ifru.ifru_metric /* metric */
|
||||
#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
|
||||
#define ifr_data ifr_ifru.ifru_data /* for use by interface */
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user