xref: /csrg-svn/sys/net/if.h (revision 4951)
1*4951Swnj /*	if.h	4.2	81/11/20	*/
24945Swnj 
34945Swnj /*
44945Swnj  * Structure defining a network interface.
54945Swnj  *
64945Swnj  * (Would like to call this struct ``if'', but C isn't PL/1.)
74945Swnj  */
84945Swnj struct ifnet {
94945Swnj 	short	if_unit;		/* sub-unit for lower level driver */
104945Swnj 	short	if_flags;		/* state flags */
114945Swnj 	short	if_mtu;			/* maximum transmission unit */
124945Swnj 	short	if_net;			/* network number of interface */
134945Swnj 	struct	in_addr if_addr;	/* internet address of interface */
144945Swnj 	struct ifbuf {
154945Swnj 		short	ib_mbcnt;	/* mbufs on chain */
164945Swnj 		short	ib_mbhiwat;	/* mbufs permitted on chain */
174945Swnj 		struct	mbuf *ib_hd;	/* head of chain */
184945Swnj 		struct	mbuf *ib_tl;	/* tail of chain */
194945Swnj 	} if_snd, if_rcv;
204945Swnj 	struct ifsw {
214945Swnj 		int	(*if_output)();		/* output routine */
224945Swnj 		int	(*if_ubareset)();	/* uba reset routine */
234945Swnj 	} *if_sw;
24*4951Swnj 	struct	ifnet *if_next;
254945Swnj };
264945Swnj 
274945Swnj /* bits in if_flags */
284945Swnj #define	IF_OACTIVE	1		/* output in progress */
294945Swnj 
304945Swnj #ifdef KERNEL
314945Swnj struct	ifnet *ifnet;
324945Swnj struct	ifnet *if_ifwithaddr(), *if_ifonnetof();
334945Swnj #endif
34