diff options
author | phk <phk@FreeBSD.org> | 1995-11-20 12:28:21 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-11-20 12:28:21 +0000 |
commit | ea269de61cb143af4820908dfbc321889475a002 (patch) | |
tree | 25fb5256cebf4664e208ff21cae7a4c81cbf613e /sys | |
parent | 2a549c97849b6c922601826e601b4e7da7b231ae (diff) | |
download | FreeBSD-src-ea269de61cb143af4820908dfbc321889475a002.zip FreeBSD-src-ea269de61cb143af4820908dfbc321889475a002.tar.gz |
fix #includes & warnings.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/in.c | 34 | ||||
-rw-r--r-- | sys/netinet/in_proto.c | 5 |
2 files changed, 4 insertions, 35 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 9e4778d..db5f97c 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in.c 8.4 (Berkeley) 1/9/95 - * $Id: in.c,v 1.17 1995/10/29 15:32:21 phk Exp $ + * $Id: in.c,v 1.18 1995/11/14 20:33:56 phk Exp $ */ #include <sys/param.h> @@ -65,42 +65,10 @@ struct multi_kludge { struct in_multihead mk_head; }; -static u_long in_netof __P((struct in_addr)); static void in_socktrim __P((struct sockaddr_in *)); static int in_ifinit __P((struct ifnet *, struct in_ifaddr *, struct sockaddr_in *, int)); static void in_ifscrub __P((struct ifnet *, struct in_ifaddr *)); -/* - * Return the network number from an internet address. - */ -static u_long -in_netof(in) - struct in_addr in; -{ - register u_long i = ntohl(in.s_addr); - register u_long net; - register struct in_ifaddr *ia; - - if (IN_CLASSA(i)) - net = i & IN_CLASSA_NET; - else if (IN_CLASSB(i)) - net = i & IN_CLASSB_NET; - else if (IN_CLASSC(i)) - net = i & IN_CLASSC_NET; - else if (IN_CLASSD(i)) - net = i & IN_CLASSD_NET; - else - return (0); - - /* - * Check whether network is a subnet; - * if so, return subnet number. - */ - for (ia = in_ifaddr; ia; ia = ia->ia_next) - if (net == ia->ia_net) - return (i & ia->ia_subnetmask); - return (net); -} #ifndef SUBNETSARELOCAL #define SUBNETSARELOCAL 1 diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index f181d78..e83d3c0 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -31,15 +31,16 @@ * SUCH DAMAGE. * * @(#)in_proto.c 8.2 (Berkeley) 2/9/95 - * $Id: in_proto.c,v 1.20 1995/11/09 20:22:55 phk Exp $ + * $Id: in_proto.c,v 1.21 1995/11/14 20:34:05 phk Exp $ */ #include <sys/param.h> #include <sys/kernel.h> #include <sys/socket.h> -#include <sys/protosw.h> +#include <sys/socketvar.h> #include <sys/domain.h> #include <sys/mbuf.h> +#include <sys/protosw.h> #include <sys/queue.h> #include <sys/sysctl.h> |