xref: /csrg-svn/sys/net/if.c (revision 4944)
1 /*	if.c	4.1	81/11/18	*/
2 
3 #include "../h/param.h"
4 #include "../h/systm.h"
5 #include "../net/inet.h"
6 #include "../net/inet_systm.h"
7 #include "../net/if.h"
8 
9 if_ifwithaddr(in)
10 	struct in_addr in;
11 {
12 	register struct ifnet *ifp;
13 
14 #if 0
15 	for (ifp = ifnet; ifp; ifp = ifp->if_next)
16 		if (ifp->if_addr.s_addr == in.s_addr)
17 			break;
18 #else
19 	ifp = ifnet;
20 #endif
21 	return (ifp);
22 }
23 
24 if_ifonnetof(in)
25 	struct in_addr in;
26 {
27 	register struct ifnet *ifp;
28 #if 0
29 	int net;
30 
31 	net = 0;			/* XXX */
32 	for (ifp = ifnet; ifp; ifp = ifp->if_next)
33 		if (ifp->if_net == net)
34 			break;
35 #else
36 	ifp = ifnet;
37 #endif
38 	return (ifp);
39 }
40 
41 struct	ifnet ifen = { 0, 0, 1024, 0, 0 };
42 struct	ifnet *ifnet = &ifen;
43