aboutsummaryrefslogtreecommitdiffstats
path: root/sys/netinet/in.h
diff options
context:
space:
mode:
authorsvn2git <svn2git@FreeBSD.org>1994-05-01 00:00:00 -0800
committersvn2git <svn2git@FreeBSD.org>1994-05-01 00:00:00 -0800
commita16f65c7d117419bd266c28a1901ef129a337569 (patch)
tree2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /sys/netinet/in.h
parent8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff)
downloadsrc-a16f65c7d117419bd266c28a1901ef129a337569.tar.gz
src-a16f65c7d117419bd266c28a1901ef129a337569.zip
Release FreeBSD 1.1release/1.1.0_cvs
This commit was manufactured to restore the state of the 1.1-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
Diffstat (limited to 'sys/netinet/in.h')
-rw-r--r--sys/netinet/in.h48
1 files changed, 29 insertions, 19 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 89a9da45a500..48f24b39ede4 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in.h 7.11 (Berkeley) 4/20/91
- * $Id: in.h,v 1.3 1993/10/16 18:25:58 rgrimes Exp $
+ * $Id: in.h,v 1.4 1993/12/19 00:52:35 wollman Exp $
*/
#ifndef _NETINET_IN_H_
@@ -82,33 +82,33 @@ struct in_addr {
* On subnets, the decomposition of addresses to host and net parts
* is done according to subnet mask, not the masks here.
*/
-#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
+#define IN_CLASSA(i) (((u_long)(i) & 0x80000000UL) == 0)
+#define IN_CLASSA_NET 0xff000000UL
#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST 0x00ffffff
+#define IN_CLASSA_HOST 0x00ffffffUL
#define IN_CLASSA_MAX 128
-#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_NET 0xffff0000
+#define IN_CLASSB(i) (((u_long)(i) & 0xc0000000UL) == 0x80000000UL)
+#define IN_CLASSB_NET 0xffff0000UL
#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST 0x0000ffff
+#define IN_CLASSB_HOST 0x0000ffffUL
#define IN_CLASSB_MAX 65536
-#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
+#define IN_CLASSC(i) (((u_long)(i) & 0xe0000000UL) == 0xc0000000UL)
+#define IN_CLASSC_NET 0xffffff00UL
#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST 0x000000ff
+#define IN_CLASSC_HOST 0x000000ffUL
-#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
+#define IN_CLASSD(i) (((u_long)(i) & 0xf0000000UL) == 0xe0000000UL)
#define IN_MULTICAST(i) IN_CLASSD(i)
-#define IN_EXPERIMENTAL(i) (((long)(i) & 0xe0000000) == 0xe0000000)
-#define IN_BADCLASS(i) (((long)(i) & 0xf0000000) == 0xf0000000)
+#define IN_EXPERIMENTAL(i) (((u_long)(i) & 0xe0000000UL) == 0xe0000000UL)
+#define IN_BADCLASS(i) (((u_long)(i) & 0xf0000000UL) == 0xf0000000UL)
-#define INADDR_ANY (u_long)0x00000000
-#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */
+#define INADDR_ANY 0x00000000UL
+#define INADDR_BROADCAST 0xffffffffUL /* must be masked */
#ifndef KERNEL
-#define INADDR_NONE 0xffffffff /* -1 return */
+#define INADDR_NONE 0xffffffffUL /* -1 return */
#endif
#define IN_LOOPBACKNET 127 /* official! */
@@ -150,8 +150,18 @@ struct ip_opts {
#define IP_RETOPTS 8 /* ip_opts; set/get IP per-packet options */
#ifdef KERNEL
-struct in_addr in_makeaddr();
-u_long in_netof(), in_lnaof();
-#endif
+/* From in.c: */
+extern struct in_addr in_makeaddr(u_long, u_long);
+extern u_long in_netof(struct in_addr);
+extern void in_sockmaskof(struct in_addr, struct sockaddr_in *);
+extern u_long in_lnaof(struct in_addr);
+extern int in_localaddr(struct in_addr);
+extern int in_canforward(struct in_addr);
+struct socket; struct ifnet;
+extern int in_control(struct socket *, int, caddr_t, struct ifnet *);
+struct in_ifaddr;
+extern int in_broadcast(struct in_addr);
+
+#endif /* KERNEL */
#endif /* _NETINET_IN_H_ */