mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-31 18:31:52 +08:00
Cosmetics from FreeBSD.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user