summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2005-05-08 06:40:09 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2005-05-08 06:40:09 +0000
commitcf29bcb9796ba299e015eeea256ca6de3407587b (patch)
tree78af16cb10104409ba606703b2c1408c6280c1ac /cpukit
parentCosmetics from FreeBSD. (diff)
downloadrtems-cf29bcb9796ba299e015eeea256ca6de3407587b.tar.bz2
Cosmetics from FreeBSD.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libnetworking/libc/inet_addr.c10
-rw-r--r--cpukit/libnetworking/netinet/in.h2
-rw-r--r--cpukit/libnetworking/sys/socket.h15
3 files changed, 19 insertions, 8 deletions
diff --git a/cpukit/libnetworking/libc/inet_addr.c b/cpukit/libnetworking/libc/inet_addr.c
index 225ccc1269..2bea8a5242 100644
--- a/cpukit/libnetworking/libc/inet_addr.c
+++ b/cpukit/libnetworking/libc/inet_addr.c
@@ -64,12 +64,12 @@ static char rcsid[] = "$Id$";
#include <ctype.h>
/*
- * Ascii internet address interpretation routine.
+ * ASCII internet address interpretation routine.
* The value returned is in network order.
*/
u_long
inet_addr(cp)
- register const char *cp;
+ const char *cp;
{
struct in_addr val;
@@ -79,7 +79,7 @@ inet_addr(cp)
}
/*
- * Check whether "cp" is a valid ascii representation
+ * Check whether "cp" is a valid ASCII representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
* This replaces inet_addr, the return value from which
@@ -87,7 +87,7 @@ inet_addr(cp)
*/
int
inet_aton(cp, addr)
- register const char *cp;
+ const char *cp;
struct in_addr *addr;
{
register u_long val;
@@ -174,7 +174,7 @@ inet_aton(cp, addr)
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
break;
}
- if (addr)
+ if (addr != NULL)
addr->s_addr = htonl(val);
return (1);
}
diff --git a/cpukit/libnetworking/netinet/in.h b/cpukit/libnetworking/netinet/in.h
index 4adfee689a..18d3852ef6 100644
--- a/cpukit/libnetworking/netinet/in.h
+++ b/cpukit/libnetworking/netinet/in.h
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)in.h 8.3 (Berkeley) 1/3/94
- * $FreeBSD: src/sys/netinet/in.h,v 1.89 2005/01/07 01:45:44 imp Exp $
+ * $FreeBSD: src/sys/netinet/in.h,v 1.90 2005/02/22 13:04:03 glebius Exp $
*/
/*
diff --git a/cpukit/libnetworking/sys/socket.h b/cpukit/libnetworking/sys/socket.h
index db66e95624..e52f975577 100644
--- a/cpukit/libnetworking/sys/socket.h
+++ b/cpukit/libnetworking/sys/socket.h
@@ -55,7 +55,9 @@ typedef unsigned char sa_family_t;
#define SOCK_STREAM 1 /* stream socket */
#define SOCK_DGRAM 2 /* datagram socket */
#define SOCK_RAW 3 /* raw-protocol interface */
+#if __BSD_VISIBLE
#define SOCK_RDM 4 /* reliably-delivered message */
+#endif
#define SOCK_SEQPACKET 5 /* sequenced packet stream */
/*
@@ -67,11 +69,18 @@ typedef unsigned char sa_family_t;
#define SO_KEEPALIVE 0x0008 /* keep connections alive */
#define SO_DONTROUTE 0x0010 /* just use interface addresses */
#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
+#if __BSD_VISIBLE
#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
+#endif
#define SO_LINGER 0x0080 /* linger on close if data present */
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
+#if __BSD_VISIBLE
#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */
#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */
+#define SO_NOSIGPIPE 0x0800 /* no SIGPIPE from EPIPE */
+#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */
+#define SO_BINTIME 0x2000 /* timestamp received dgram traffic */
+#endif
/*
* Additional options, not kept in so_options.
@@ -118,8 +127,10 @@ struct sockwakeup {
* Address families.
*/
#define AF_UNSPEC 0 /* unspecified */
-#define AF_LOCAL 1 /* local to host (pipes, portals) */
-#define AF_UNIX AF_LOCAL /* backward compatibility */
+#if __BSD_VISIBLE
+#define AF_LOCAL AF_UNIX /* local to host (pipes, portals) */
+#endif
+#define AF_UNIX 1 /* standardized name for AF_LOCAL */
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
#define AF_IMPLINK 3 /* arpanet imp addresses */
#define AF_PUP 4 /* pup protocols: e.g. BSP */