if_var.h (126900) | if_var.h (127828) |
---|---|
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 * From: @(#)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 * From: @(#)if.h 8.1 (Berkeley) 6/10/93 |
34 * $FreeBSD: head/sys/net/if_var.h 126900 2004-03-13 02:31:40Z brooks $ | 34 * $FreeBSD: head/sys/net/if_var.h 127828 2004-04-04 06:14:55Z luigi $ |
35 */ 36 37#ifndef _NET_IF_VAR_H_ 38#define _NET_IF_VAR_H_ 39 40/* 41 * Structures defining a network interface, providing a packet 42 * transport mechanism (ala level 0 of the PUP protocols). --- 110 unchanged lines hidden (view full) --- 153/* procedure handles */ 154 int (*if_output) /* output routine (enqueue) */ 155 (struct ifnet *, struct mbuf *, struct sockaddr *, 156 struct rtentry *); 157 void (*if_input) /* input routine (from h/w driver) */ 158 (struct ifnet *, struct mbuf *); 159 void (*if_start) /* initiate output routine */ 160 (struct ifnet *); | 35 */ 36 37#ifndef _NET_IF_VAR_H_ 38#define _NET_IF_VAR_H_ 39 40/* 41 * Structures defining a network interface, providing a packet 42 * transport mechanism (ala level 0 of the PUP protocols). --- 110 unchanged lines hidden (view full) --- 153/* procedure handles */ 154 int (*if_output) /* output routine (enqueue) */ 155 (struct ifnet *, struct mbuf *, struct sockaddr *, 156 struct rtentry *); 157 void (*if_input) /* input routine (from h/w driver) */ 158 (struct ifnet *, struct mbuf *); 159 void (*if_start) /* initiate output routine */ 160 (struct ifnet *); |
161 int (*if_done) /* output complete routine */ 162 (struct ifnet *); /* (XXX not used; fake prototype) */ | |
163 int (*if_ioctl) /* ioctl routine */ 164 (struct ifnet *, u_long, caddr_t); 165 void (*if_watchdog) /* timer routine */ 166 (struct ifnet *); | 161 int (*if_ioctl) /* ioctl routine */ 162 (struct ifnet *, u_long, caddr_t); 163 void (*if_watchdog) /* timer routine */ 164 (struct ifnet *); |
167 int (*if_poll_recv) /* polled receive routine */ 168 (struct ifnet *, int *); 169 int (*if_poll_xmit) /* polled transmit routine */ 170 (struct ifnet *, int *); 171 void (*if_poll_intren) /* polled interrupt reenable routine */ 172 (struct ifnet *); 173 void (*if_poll_slowinput) /* input routine for slow devices */ 174 (struct ifnet *, struct mbuf *); | |
175 void (*if_init) /* Init routine */ 176 (void *); 177 int (*if_resolvemulti) /* validate/resolve multicast */ 178 (struct ifnet *, struct sockaddr **, struct sockaddr *); 179 struct ifqueue if_snd; /* output queue */ | 165 void (*if_init) /* Init routine */ 166 (void *); 167 int (*if_resolvemulti) /* validate/resolve multicast */ 168 (struct ifnet *, struct sockaddr **, struct sockaddr *); 169 struct ifqueue if_snd; /* output queue */ |
180 struct ifqueue *if_poll_slowq; /* input queue for slow devices */ 181 struct ifprefixhead if_prefixhead; /* list of prefixes per if */ | |
182 const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ | 170 const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ |
171 172 struct lltable *lltables; /* list of L3-L2 resolution tables */ 173 |
|
183 struct label *if_label; /* interface MAC label */ 184 | 174 struct label *if_label; /* interface MAC label */ 175 |
176 /* these are only used by IPv6 */ 177 struct ifprefixhead if_prefixhead; /* list of prefixes per if */ |
|
185 void *if_afdata[AF_MAX]; 186 int if_afdata_initialized; 187 struct mtx if_afdata_mtx; 188}; 189 190typedef void if_init_f_t(void *); 191 192#define if_mtu if_data.ifi_mtu --- 280 unchanged lines hidden (view full) --- 473int if_setlladdr(struct ifnet *, const u_char *, int); 474void if_unroute(struct ifnet *, int flag, int fam); 475void if_up(struct ifnet *); 476/*void ifinit(void);*/ /* declared in systm.h for main() */ 477int ifioctl(struct socket *, u_long, caddr_t, struct thread *); 478int ifpromisc(struct ifnet *, int); 479struct ifnet *ifunit(const char *); 480 | 178 void *if_afdata[AF_MAX]; 179 int if_afdata_initialized; 180 struct mtx if_afdata_mtx; 181}; 182 183typedef void if_init_f_t(void *); 184 185#define if_mtu if_data.ifi_mtu --- 280 unchanged lines hidden (view full) --- 466int if_setlladdr(struct ifnet *, const u_char *, int); 467void if_unroute(struct ifnet *, int flag, int fam); 468void if_up(struct ifnet *); 469/*void ifinit(void);*/ /* declared in systm.h for main() */ 470int ifioctl(struct socket *, u_long, caddr_t, struct thread *); 471int ifpromisc(struct ifnet *, int); 472struct ifnet *ifunit(const char *); 473 |
481int if_poll_recv_slow(struct ifnet *ifp, int *quotap); 482void if_poll_xmit_slow(struct ifnet *ifp, int *quotap); 483void if_poll_throttle(void); 484void if_poll_unthrottle(void *); 485void if_poll_init(void); 486void if_poll(void); 487 | |
488struct ifaddr *ifa_ifwithaddr(struct sockaddr *); 489struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *); 490struct ifaddr *ifa_ifwithnet(struct sockaddr *); 491struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *); 492struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *); 493 494struct ifmultiaddr *ifmaof_ifpforaddr(struct sockaddr *, struct ifnet *); 495int if_simloop(struct ifnet *ifp, struct mbuf *m, int af, int hlen); --- 21 unchanged lines hidden --- | 474struct ifaddr *ifa_ifwithaddr(struct sockaddr *); 475struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *); 476struct ifaddr *ifa_ifwithnet(struct sockaddr *); 477struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *); 478struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *); 479 480struct ifmultiaddr *ifmaof_ifpforaddr(struct sockaddr *, struct ifnet *); 481int if_simloop(struct ifnet *ifp, struct mbuf *m, int af, int hlen); --- 21 unchanged lines hidden --- |