Deleted Added
full compact
if.h (83636) if.h (85079)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)if.h 8.1 (Berkeley) 6/10/93
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)if.h 8.1 (Berkeley) 6/10/93
34 * $FreeBSD: head/sys/net/if.h 83636 2001-09-18 20:13:03Z jlemon $
34 * $FreeBSD: head/sys/net/if.h 85079 2001-10-17 19:40:44Z jlemon $
35 */
36
37#ifndef _NET_IF_H_
38#define _NET_IF_H_
39
40#include <sys/queue.h>
41
42/*

--- 152 unchanged lines hidden (view full) ---

195 */
196struct ifreq {
197 char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
198 union {
199 struct sockaddr ifru_addr;
200 struct sockaddr ifru_dstaddr;
201 struct sockaddr ifru_broadaddr;
202 short ifru_flags[2];
35 */
36
37#ifndef _NET_IF_H_
38#define _NET_IF_H_
39
40#include <sys/queue.h>
41
42/*

--- 152 unchanged lines hidden (view full) ---

195 */
196struct ifreq {
197 char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
198 union {
199 struct sockaddr ifru_addr;
200 struct sockaddr ifru_dstaddr;
201 struct sockaddr ifru_broadaddr;
202 short ifru_flags[2];
203 short ifru_index;
203 int ifru_metric;
204 int ifru_mtu;
205 int ifru_phys;
206 int ifru_media;
207 caddr_t ifru_data;
208 int ifru_cap[2];
209 } ifr_ifru;
210#define ifr_addr ifr_ifru.ifru_addr /* address */
211#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
212#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
213#define ifr_flags ifr_ifru.ifru_flags[0] /* flags */
214#define ifr_prevflags ifr_ifru.ifru_flags[1] /* flags */
215#define ifr_metric ifr_ifru.ifru_metric /* metric */
216#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
217#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
218#define ifr_media ifr_ifru.ifru_media /* physical media */
219#define ifr_data ifr_ifru.ifru_data /* for use by interface */
220#define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */
221#define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */
204 int ifru_metric;
205 int ifru_mtu;
206 int ifru_phys;
207 int ifru_media;
208 caddr_t ifru_data;
209 int ifru_cap[2];
210 } ifr_ifru;
211#define ifr_addr ifr_ifru.ifru_addr /* address */
212#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
213#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
214#define ifr_flags ifr_ifru.ifru_flags[0] /* flags */
215#define ifr_prevflags ifr_ifru.ifru_flags[1] /* flags */
216#define ifr_metric ifr_ifru.ifru_metric /* metric */
217#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
218#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
219#define ifr_media ifr_ifru.ifru_media /* physical media */
220#define ifr_data ifr_ifru.ifru_data /* for use by interface */
221#define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */
222#define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */
223#define ifr_index ifr_ifru.ifru_index /* interface index */
222};
223
224#define _SIZEOF_ADDR_IFREQ(ifr) \
225 ((ifr).ifr_addr.sa_len > sizeof(struct sockaddr) ? \
226 (sizeof(struct ifreq) - sizeof(struct sockaddr) + \
227 (ifr).ifr_addr.sa_len) : sizeof(struct ifreq))
228
229struct ifaliasreq {

--- 87 unchanged lines hidden ---
224};
225
226#define _SIZEOF_ADDR_IFREQ(ifr) \
227 ((ifr).ifr_addr.sa_len > sizeof(struct sockaddr) ? \
228 (sizeof(struct ifreq) - sizeof(struct sockaddr) + \
229 (ifr).ifr_addr.sa_len) : sizeof(struct ifreq))
230
231struct ifaliasreq {

--- 87 unchanged lines hidden ---