Deleted Added
full compact
if.h (83366) if.h (83624)
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 83366 2001-09-12 08:38:13Z julian $
34 * $FreeBSD: head/sys/net/if.h 83624 2001-09-18 17:41:42Z jlemon $
35 */
36
37#ifndef _NET_IF_H_
38#define _NET_IF_H_
39
40#include <sys/queue.h>
41
42/*

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

131#define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */
132#define IFF_MULTICAST 0x8000 /* supports multicast */
133
134/* flags set internally only: */
135#define IFF_CANTCHANGE \
136 (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\
137 IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART)
138
35 */
36
37#ifndef _NET_IF_H_
38#define _NET_IF_H_
39
40#include <sys/queue.h>
41
42/*

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

131#define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */
132#define IFF_MULTICAST 0x8000 /* supports multicast */
133
134/* flags set internally only: */
135#define IFF_CANTCHANGE \
136 (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\
137 IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART)
138
139/* Capabilities that interfaces can advertise. */
140#define IFCAP_HWCSUM 0x0001 /* can do hardware checksums */
141#define IFCAP_NETCONS 0x0002 /* can be a network console */
142
139#define IFQ_MAXLEN 50
140#define IFNET_SLOWHZ 1 /* granularity is 1 second */
141
142/*
143 * Message format for use in obtaining information about interfaces
144 * from getkerninfo and the routing socket
145 */
146struct if_msghdr {

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

193 struct sockaddr ifru_dstaddr;
194 struct sockaddr ifru_broadaddr;
195 short ifru_flags[2];
196 int ifru_metric;
197 int ifru_mtu;
198 int ifru_phys;
199 int ifru_media;
200 caddr_t ifru_data;
143#define IFQ_MAXLEN 50
144#define IFNET_SLOWHZ 1 /* granularity is 1 second */
145
146/*
147 * Message format for use in obtaining information about interfaces
148 * from getkerninfo and the routing socket
149 */
150struct if_msghdr {

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

197 struct sockaddr ifru_dstaddr;
198 struct sockaddr ifru_broadaddr;
199 short ifru_flags[2];
200 int ifru_metric;
201 int ifru_mtu;
202 int ifru_phys;
203 int ifru_media;
204 caddr_t ifru_data;
205 int ifru_cap[2];
201 } ifr_ifru;
202#define ifr_addr ifr_ifru.ifru_addr /* address */
203#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
204#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
205#define ifr_flags ifr_ifru.ifru_flags[0] /* flags */
206#define ifr_prevflags ifr_ifru.ifru_flags[1] /* flags */
207#define ifr_metric ifr_ifru.ifru_metric /* metric */
208#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
209#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
210#define ifr_media ifr_ifru.ifru_media /* physical media */
211#define ifr_data ifr_ifru.ifru_data /* for use by interface */
206 } ifr_ifru;
207#define ifr_addr ifr_ifru.ifru_addr /* address */
208#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
209#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
210#define ifr_flags ifr_ifru.ifru_flags[0] /* flags */
211#define ifr_prevflags ifr_ifru.ifru_flags[1] /* flags */
212#define ifr_metric ifr_ifru.ifru_metric /* metric */
213#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
214#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
215#define ifr_media ifr_ifru.ifru_media /* physical media */
216#define ifr_data ifr_ifru.ifru_data /* for use by interface */
217#define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */
218#define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */
212};
213
214#define _SIZEOF_ADDR_IFREQ(ifr) \
215 ((ifr).ifr_addr.sa_len > sizeof(struct sockaddr) ? \
216 (sizeof(struct ifreq) - sizeof(struct sockaddr) + \
217 (ifr).ifr_addr.sa_len) : sizeof(struct ifreq))
218
219struct ifaliasreq {

--- 87 unchanged lines hidden ---
219};
220
221#define _SIZEOF_ADDR_IFREQ(ifr) \
222 ((ifr).ifr_addr.sa_len > sizeof(struct sockaddr) ? \
223 (sizeof(struct ifreq) - sizeof(struct sockaddr) + \
224 (ifr).ifr_addr.sa_len) : sizeof(struct ifreq))
225
226struct ifaliasreq {

--- 87 unchanged lines hidden ---