if.h revision 16287
11541Srgrimes/* 21541Srgrimes * Copyright (c) 1982, 1986, 1989, 1993 31541Srgrimes * The Regents of the University of California. All rights reserved. 41541Srgrimes * 51541Srgrimes * Redistribution and use in source and binary forms, with or without 61541Srgrimes * modification, are permitted provided that the following conditions 71541Srgrimes * are met: 81541Srgrimes * 1. Redistributions of source code must retain the above copyright 91541Srgrimes * notice, this list of conditions and the following disclaimer. 101541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111541Srgrimes * notice, this list of conditions and the following disclaimer in the 121541Srgrimes * documentation and/or other materials provided with the distribution. 131541Srgrimes * 3. All advertising materials mentioning features or use of this software 141541Srgrimes * must display the following acknowledgement: 151541Srgrimes * This product includes software developed by the University of 161541Srgrimes * California, Berkeley and its contributors. 171541Srgrimes * 4. Neither the name of the University nor the names of its contributors 181541Srgrimes * may be used to endorse or promote products derived from this software 191541Srgrimes * without specific prior written permission. 201541Srgrimes * 211541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311541Srgrimes * SUCH DAMAGE. 321541Srgrimes * 331541Srgrimes * @(#)if.h 8.1 (Berkeley) 6/10/93 3416287Sgpalmer * $Id: if.h,v 1.28 1996/02/06 18:51:10 wollman Exp $ 351541Srgrimes */ 361541Srgrimes 372168Spaul#ifndef _NET_IF_H_ 384507Sbde#define _NET_IF_H_ 392168Spaul 401541Srgrimes/* 411541Srgrimes * Structures defining a network interface, providing a packet 421541Srgrimes * transport mechanism (ala level 0 of the PUP protocols). 431541Srgrimes * 441541Srgrimes * Each interface accepts output datagrams of a specified maximum 451541Srgrimes * length, and provides higher level routines with input datagrams 461541Srgrimes * received from its medium. 471541Srgrimes * 481541Srgrimes * Output occurs when the routine if_output is called, with three parameters: 491541Srgrimes * (*ifp->if_output)(ifp, m, dst, rt) 501541Srgrimes * Here m is the mbuf chain to be sent and dst is the destination address. 511541Srgrimes * The output routine encapsulates the supplied datagram if necessary, 521541Srgrimes * and then transmits it on its medium. 531541Srgrimes * 541541Srgrimes * On input, each interface unwraps the data received by it, and either 551541Srgrimes * places it on the input queue of a internetwork datagram routine 561541Srgrimes * and posts the associated software interrupt, or passes the datagram to a raw 571541Srgrimes * packet input routine. 581541Srgrimes * 591541Srgrimes * Routines exist for locating interfaces by their addresses 601541Srgrimes * or for locating a interface on a certain network, as well as more general 611541Srgrimes * routing and gateway routines maintaining information used to locate 621541Srgrimes * interfaces. These routines live in the files if.c and route.c 631541Srgrimes */ 644507Sbde 654518Sphk#include <sys/socket.h> /* for struct sockaddr */ 664507Sbde 671541Srgrimes#ifndef _TIME_ /* XXX fast fix for SNMP, going away soon */ 681541Srgrimes#include <sys/time.h> 691541Srgrimes#endif 701541Srgrimes 711541Srgrimes#ifdef __STDC__ 721541Srgrimes/* 731541Srgrimes * Forward structure declarations for function prototypes [sic]. 741541Srgrimes */ 751541Srgrimesstruct mbuf; 761541Srgrimesstruct proc; 778876Srgrimesstruct rtentry; 781541Srgrimesstruct socket; 791541Srgrimesstruct ether_header; 801541Srgrimes#endif 819457Sjoerg 829457Sjoergstruct if_data { 839457Sjoerg /* generic interface information */ 849457Sjoerg u_char ifi_type; /* ethernet, tokenring, etc */ 859457Sjoerg u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */ 869457Sjoerg u_char ifi_addrlen; /* media address length */ 879457Sjoerg u_char ifi_hdrlen; /* media header length */ 889457Sjoerg u_long ifi_mtu; /* maximum transmission unit */ 899457Sjoerg u_long ifi_metric; /* routing metric (external only) */ 909457Sjoerg u_long ifi_baudrate; /* linespeed */ 919457Sjoerg /* volatile statistics */ 929457Sjoerg u_long ifi_ipackets; /* packets received on interface */ 939457Sjoerg u_long ifi_ierrors; /* input errors on interface */ 949457Sjoerg u_long ifi_opackets; /* packets sent on interface */ 959457Sjoerg u_long ifi_oerrors; /* output errors on interface */ 969457Sjoerg u_long ifi_collisions; /* collisions on csma interfaces */ 979457Sjoerg u_long ifi_ibytes; /* total number of octets received */ 989457Sjoerg u_long ifi_obytes; /* total number of octets sent */ 999457Sjoerg u_long ifi_imcasts; /* packets received via multicast */ 1009457Sjoerg u_long ifi_omcasts; /* packets sent via multicast */ 1019457Sjoerg u_long ifi_iqdrops; /* dropped on input, this interface */ 1029457Sjoerg u_long ifi_noproto; /* destined for unsupported protocol */ 10316287Sgpalmer struct timeval ifi_lastchange; /* time of last administrative change */ 1049457Sjoerg}; 1059457Sjoerg 1061541Srgrimes/* 1071541Srgrimes * Structure defining a queue for a network interface. 1081541Srgrimes * 1091541Srgrimes * (Would like to call this struct ``if'', but C isn't PL/1.) 1101541Srgrimes */ 1111541Srgrimes 1129457Sjoergstruct ifqueue { 1139457Sjoerg struct mbuf *ifq_head; 1149457Sjoerg struct mbuf *ifq_tail; 1159457Sjoerg int ifq_len; 1169457Sjoerg int ifq_maxlen; 1179457Sjoerg int ifq_drops; 1189457Sjoerg}; 1199457Sjoerg 1209457Sjoerg/* 1219457Sjoerg * Structure describing information about an interface 1229457Sjoerg * which may be of interest to management entities. 1239457Sjoerg */ 1241541Srgrimesstruct ifnet { 12513641Swollman void *if_softc; /* pointer to driver state */ 1261541Srgrimes char *if_name; /* name, e.g. ``en'' or ``lo'' */ 1271541Srgrimes struct ifnet *if_next; /* all struct ifnets are chained */ 1281541Srgrimes struct ifaddr *if_addrlist; /* linked list of addresses per if */ 1291541Srgrimes int if_pcount; /* number of promiscuous listeners */ 13013937Swollman struct bpf_if *if_bpf; /* packet filter structure */ 1311541Srgrimes u_short if_index; /* numeric abbreviation for this if */ 1321541Srgrimes short if_unit; /* sub-unit for lower level driver */ 1331541Srgrimes short if_timer; /* time 'til if_watchdog called */ 1341541Srgrimes short if_flags; /* up/down, broadcast, etc. */ 13513641Swollman u_char if_recvquota, if_sendquota; /* quotas for send, receive */ 13613641Swollman u_char if_ipending; /* interrupts pending */ 1379457Sjoerg struct if_data if_data; 1381541Srgrimes/* procedure handles */ 1391541Srgrimes int (*if_output) /* output routine (enqueue) */ 1401541Srgrimes __P((struct ifnet *, struct mbuf *, struct sockaddr *, 1411541Srgrimes struct rtentry *)); 1421549Srgrimes void (*if_start) /* initiate output routine */ 1431541Srgrimes __P((struct ifnet *)); 1441541Srgrimes int (*if_done) /* output complete routine */ 1451541Srgrimes __P((struct ifnet *)); /* (XXX not used; fake prototype) */ 1461541Srgrimes int (*if_ioctl) /* ioctl routine */ 1471541Srgrimes __P((struct ifnet *, int, caddr_t)); 1481549Srgrimes void (*if_watchdog) /* timer routine */ 14912628Sdg __P((struct ifnet *)); 15013641Swollman void (*if_poll_recv) /* polled receive routine */ 15113641Swollman __P((struct ifnet *, int *)); 15213641Swollman void (*if_poll_xmit) /* polled transmit routine */ 15313641Swollman __P((struct ifnet *, int *)); 15413641Swollman void (*if_poll_intren) /* polled interrupt reenable routine */ 15513641Swollman __P((struct ifnet *)); 15613641Swollman void (*if_poll_slowinput) /* input routine for slow devices */ 15713641Swollman __P((struct ifnet *, struct mbuf *)); 1589457Sjoerg struct ifqueue if_snd; /* output queue */ 15913641Swollman struct ifqueue *if_poll_slowq; /* input queue for slow devices */ 1601541Srgrimes}; 1611541Srgrimes#define if_mtu if_data.ifi_mtu 1621541Srgrimes#define if_type if_data.ifi_type 1635099Swollman#define if_physical if_data.ifi_physical 1641541Srgrimes#define if_addrlen if_data.ifi_addrlen 1651541Srgrimes#define if_hdrlen if_data.ifi_hdrlen 1661541Srgrimes#define if_metric if_data.ifi_metric 1671541Srgrimes#define if_baudrate if_data.ifi_baudrate 1681541Srgrimes#define if_ipackets if_data.ifi_ipackets 1691541Srgrimes#define if_ierrors if_data.ifi_ierrors 1701541Srgrimes#define if_opackets if_data.ifi_opackets 1711541Srgrimes#define if_oerrors if_data.ifi_oerrors 1721541Srgrimes#define if_collisions if_data.ifi_collisions 1731541Srgrimes#define if_ibytes if_data.ifi_ibytes 1741541Srgrimes#define if_obytes if_data.ifi_obytes 1751541Srgrimes#define if_imcasts if_data.ifi_imcasts 1761541Srgrimes#define if_omcasts if_data.ifi_omcasts 1771541Srgrimes#define if_iqdrops if_data.ifi_iqdrops 1781541Srgrimes#define if_noproto if_data.ifi_noproto 1791541Srgrimes#define if_lastchange if_data.ifi_lastchange 1805181Swollman#define if_rawoutput(if, m, sa) if_output(if, m, sa, (struct rtentry *)0) 1811541Srgrimes 1821541Srgrimes#define IFF_UP 0x1 /* interface is up */ 1831541Srgrimes#define IFF_BROADCAST 0x2 /* broadcast address valid */ 1841541Srgrimes#define IFF_DEBUG 0x4 /* turn on debugging */ 1851541Srgrimes#define IFF_LOOPBACK 0x8 /* is a loopback net */ 1861541Srgrimes#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ 18711460Swollman/*#define IFF_NOTRAILERS 0x20 * obsolete: avoid use of trailers */ 1881541Srgrimes#define IFF_RUNNING 0x40 /* resources allocated */ 1891541Srgrimes#define IFF_NOARP 0x80 /* no address resolution protocol */ 1901541Srgrimes#define IFF_PROMISC 0x100 /* receive all packets */ 1911541Srgrimes#define IFF_ALLMULTI 0x200 /* receive all multicast packets */ 1921541Srgrimes#define IFF_OACTIVE 0x400 /* transmission in progress */ 1931541Srgrimes#define IFF_SIMPLEX 0x800 /* can't hear own transmissions */ 1941541Srgrimes#define IFF_LINK0 0x1000 /* per link layer defined bit */ 1951541Srgrimes#define IFF_LINK1 0x2000 /* per link layer defined bit */ 1961541Srgrimes#define IFF_LINK2 0x4000 /* per link layer defined bit */ 1973274Swollman#define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */ 1981541Srgrimes#define IFF_MULTICAST 0x8000 /* supports multicast */ 1991541Srgrimes 2001541Srgrimes/* flags set internally only: */ 2011541Srgrimes#define IFF_CANTCHANGE \ 2021541Srgrimes (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ 2031541Srgrimes IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI) 2041541Srgrimes 2055099Swollman 2061541Srgrimes/* 2075099Swollman * These really don't belong here, but there's no other obviously appropriate 2085099Swollman * location. 2095099Swollman */ 2105099Swollman#define IFP_AUI 0 2115099Swollman#define IFP_10BASE2 1 2125099Swollman#define IFP_10BASET 2 2135099Swollman/* etc. */ 2145099Swollman 2155099Swollman/* 21613641Swollman * Bit values in if_ipending 21713641Swollman */ 21813641Swollman#define IFI_RECV 1 /* I want to receive */ 21913641Swollman#define IFI_XMIT 2 /* I want to transmit */ 22013641Swollman 22113641Swollman/* 2221541Srgrimes * Output queues (ifp->if_snd) and internetwork datagram level (pup level 1) 2231541Srgrimes * input routines have queues of messages stored on ifqueue structures 2241541Srgrimes * (defined above). Entries are added to and deleted from these structures 2251541Srgrimes * by these macros, which should be called with ipl raised to splimp(). 2261541Srgrimes */ 2271541Srgrimes#define IF_QFULL(ifq) ((ifq)->ifq_len >= (ifq)->ifq_maxlen) 2281541Srgrimes#define IF_DROP(ifq) ((ifq)->ifq_drops++) 2291541Srgrimes#define IF_ENQUEUE(ifq, m) { \ 2301541Srgrimes (m)->m_nextpkt = 0; \ 2311541Srgrimes if ((ifq)->ifq_tail == 0) \ 2321541Srgrimes (ifq)->ifq_head = m; \ 2331541Srgrimes else \ 2341541Srgrimes (ifq)->ifq_tail->m_nextpkt = m; \ 2351541Srgrimes (ifq)->ifq_tail = m; \ 2361541Srgrimes (ifq)->ifq_len++; \ 2371541Srgrimes} 2381541Srgrimes#define IF_PREPEND(ifq, m) { \ 2391541Srgrimes (m)->m_nextpkt = (ifq)->ifq_head; \ 2401541Srgrimes if ((ifq)->ifq_tail == 0) \ 2411541Srgrimes (ifq)->ifq_tail = (m); \ 2421541Srgrimes (ifq)->ifq_head = (m); \ 2431541Srgrimes (ifq)->ifq_len++; \ 2441541Srgrimes} 2451541Srgrimes#define IF_DEQUEUE(ifq, m) { \ 2461541Srgrimes (m) = (ifq)->ifq_head; \ 2471541Srgrimes if (m) { \ 2481541Srgrimes if (((ifq)->ifq_head = (m)->m_nextpkt) == 0) \ 2491541Srgrimes (ifq)->ifq_tail = 0; \ 2501541Srgrimes (m)->m_nextpkt = 0; \ 2511541Srgrimes (ifq)->ifq_len--; \ 2521541Srgrimes } \ 2531541Srgrimes} 2541541Srgrimes 2551541Srgrimes#define IFQ_MAXLEN 50 2561541Srgrimes#define IFNET_SLOWHZ 1 /* granularity is 1 second */ 2571541Srgrimes 2581541Srgrimes/* 2591541Srgrimes * The ifaddr structure contains information about one address 2601541Srgrimes * of an interface. They are maintained by the different address families, 2611541Srgrimes * are allocated and attached when an address is set, and are linked 2621541Srgrimes * together so all addresses for an interface can be located. 2631541Srgrimes */ 2641541Srgrimesstruct ifaddr { 2651541Srgrimes struct sockaddr *ifa_addr; /* address of interface */ 2661541Srgrimes struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */ 2671541Srgrimes#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ 2681541Srgrimes struct sockaddr *ifa_netmask; /* used to determine subnet */ 2691541Srgrimes struct ifnet *ifa_ifp; /* back-pointer to interface */ 2701541Srgrimes struct ifaddr *ifa_next; /* next address for interface */ 2714469Sbde void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */ 2724469Sbde __P((int, struct rtentry *, struct sockaddr *)); 2731541Srgrimes u_short ifa_flags; /* mostly rt_flags for cloning */ 2741541Srgrimes short ifa_refcnt; /* extra to malloc for link info */ 2751541Srgrimes int ifa_metric; /* cost of going out this interface */ 2761541Srgrimes#ifdef notdef 2771541Srgrimes struct rtentry *ifa_rt; /* XXXX for ROUTETOIF ????? */ 2781541Srgrimes#endif 2791541Srgrimes}; 2801541Srgrimes#define IFA_ROUTE RTF_UP /* route installed */ 2811541Srgrimes 2821541Srgrimes/* 2831541Srgrimes * Message format for use in obtaining information about interfaces 2841541Srgrimes * from getkerninfo and the routing socket 2851541Srgrimes */ 2861541Srgrimesstruct if_msghdr { 2871541Srgrimes u_short ifm_msglen; /* to skip over non-understood messages */ 2881541Srgrimes u_char ifm_version; /* future binary compatability */ 2891541Srgrimes u_char ifm_type; /* message type */ 2901541Srgrimes int ifm_addrs; /* like rtm_addrs */ 2911541Srgrimes int ifm_flags; /* value of if_flags */ 2921541Srgrimes u_short ifm_index; /* index for associated ifp */ 2931541Srgrimes struct if_data ifm_data;/* statistics and other data about if */ 2941541Srgrimes}; 2951541Srgrimes 2961541Srgrimes/* 2971541Srgrimes * Message format for use in obtaining information about interface addresses 2981541Srgrimes * from getkerninfo and the routing socket 2991541Srgrimes */ 3001541Srgrimesstruct ifa_msghdr { 3011541Srgrimes u_short ifam_msglen; /* to skip over non-understood messages */ 3021541Srgrimes u_char ifam_version; /* future binary compatability */ 3031541Srgrimes u_char ifam_type; /* message type */ 3041541Srgrimes int ifam_addrs; /* like rtm_addrs */ 3051541Srgrimes int ifam_flags; /* value of ifa_flags */ 3061541Srgrimes u_short ifam_index; /* index for associated ifp */ 3071541Srgrimes int ifam_metric; /* value of ifa_metric */ 3081541Srgrimes}; 3091541Srgrimes 3101541Srgrimes/* 3111541Srgrimes * Interface request structure used for socket 3121541Srgrimes * ioctl's. All interface ioctl's must have parameter 3131541Srgrimes * definitions which begin with ifr_name. The 3141541Srgrimes * remainder may be interface specific. 3151541Srgrimes */ 3161541Srgrimesstruct ifreq { 3171541Srgrimes#define IFNAMSIZ 16 3181541Srgrimes char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 3191541Srgrimes union { 3201541Srgrimes struct sockaddr ifru_addr; 3211541Srgrimes struct sockaddr ifru_dstaddr; 3221541Srgrimes struct sockaddr ifru_broadaddr; 3231541Srgrimes short ifru_flags; 3241541Srgrimes int ifru_metric; 3251941Sdg int ifru_mtu; 3265184Swollman int ifru_phys; 3271541Srgrimes caddr_t ifru_data; 3281541Srgrimes } ifr_ifru; 3291541Srgrimes#define ifr_addr ifr_ifru.ifru_addr /* address */ 3301541Srgrimes#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ 3311541Srgrimes#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ 3321541Srgrimes#define ifr_flags ifr_ifru.ifru_flags /* flags */ 3331541Srgrimes#define ifr_metric ifr_ifru.ifru_metric /* metric */ 3341941Sdg#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ 3355187Sdg#define ifr_phys ifr_ifru.ifru_phys /* physical wire */ 3361541Srgrimes#define ifr_data ifr_ifru.ifru_data /* for use by interface */ 3371541Srgrimes}; 3381541Srgrimes 3391541Srgrimesstruct ifaliasreq { 3401541Srgrimes char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 3411541Srgrimes struct sockaddr ifra_addr; 3421541Srgrimes struct sockaddr ifra_broadaddr; 3431541Srgrimes struct sockaddr ifra_mask; 3441541Srgrimes}; 3451541Srgrimes 3461541Srgrimes/* 3471541Srgrimes * Structure used in SIOCGIFCONF request. 3481541Srgrimes * Used to retrieve interface configuration 3491541Srgrimes * for machine (useful for programs which 3501541Srgrimes * must know all networks accessible). 3511541Srgrimes */ 3521541Srgrimesstruct ifconf { 3531541Srgrimes int ifc_len; /* size of associated buffer */ 3541541Srgrimes union { 3551541Srgrimes caddr_t ifcu_buf; 3561541Srgrimes struct ifreq *ifcu_req; 3571541Srgrimes } ifc_ifcu; 3581541Srgrimes#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ 3591541Srgrimes#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */ 3601541Srgrimes}; 3611541Srgrimes 3621541Srgrimes#include <net/if_arp.h> 3631541Srgrimes 3641541Srgrimes#ifdef KERNEL 3651541Srgrimes#define IFAFREE(ifa) \ 3661541Srgrimes if ((ifa)->ifa_refcnt <= 0) \ 3671541Srgrimes ifafree(ifa); \ 3681541Srgrimes else \ 3691541Srgrimes (ifa)->ifa_refcnt--; 3701541Srgrimes 3715280Sdgextern struct ifnet *ifnet; 37210080Sbdeextern int ifqmaxlen; 3738090Spstextern struct ifnet loif[]; 3741541Srgrimes 3751541Srgrimesvoid ether_ifattach __P((struct ifnet *)); 3761541Srgrimesvoid ether_input __P((struct ifnet *, struct ether_header *, struct mbuf *)); 3771541Srgrimesint ether_output __P((struct ifnet *, 3781541Srgrimes struct mbuf *, struct sockaddr *, struct rtentry *)); 3791541Srgrimes 3801541Srgrimesvoid if_attach __P((struct ifnet *)); 3811541Srgrimesvoid if_down __P((struct ifnet *)); 3821541Srgrimesvoid if_up __P((struct ifnet *)); 3831541Srgrimes#ifdef vax 3841541Srgrimesvoid ifubareset __P((int)); 3851541Srgrimes#endif 3862112Swollman/*void ifinit __P((void));*/ /* declared in systm.h for main() */ 3871541Srgrimesint ifioctl __P((struct socket *, int, caddr_t, struct proc *)); 3881541Srgrimesint ifpromisc __P((struct ifnet *, int)); 3891541Srgrimesstruct ifnet *ifunit __P((char *)); 3901541Srgrimes 3911541Srgrimesstruct ifaddr *ifa_ifwithaddr __P((struct sockaddr *)); 3921541Srgrimesstruct ifaddr *ifa_ifwithdstaddr __P((struct sockaddr *)); 3931541Srgrimesstruct ifaddr *ifa_ifwithnet __P((struct sockaddr *)); 3941541Srgrimesstruct ifaddr *ifa_ifwithroute __P((int, struct sockaddr *, 3951541Srgrimes struct sockaddr *)); 3961541Srgrimesstruct ifaddr *ifaof_ifpforaddr __P((struct sockaddr *, struct ifnet *)); 3971541Srgrimesvoid ifafree __P((struct ifaddr *)); 3981541Srgrimes 3991541Srgrimesint looutput __P((struct ifnet *, 4001541Srgrimes struct mbuf *, struct sockaddr *, struct rtentry *)); 4014507Sbde#endif /* KERNEL */ 4022168Spaul 4034507Sbde#endif /* !_NET_IF_H_ */ 404