aboutsummaryrefslogtreecommitdiff
path: root/sbin/routed/if.c
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2002-02-18 20:35:27 +0000
committerMike Barcroft <mike@FreeBSD.org>2002-02-18 20:35:27 +0000
commitfd8e4ebc8c18caec3eefac6527831f9ee6a92959 (patch)
tree970c36894ee638248ec810bd7570ac8aabb5eaf5 /sbin/routed/if.c
parent3e1ce344baebe1f56863d29d656549c93a464ded (diff)
downloadsrc-fd8e4ebc8c18caec3eefac6527831f9ee6a92959.tar.gz
src-fd8e4ebc8c18caec3eefac6527831f9ee6a92959.zip
o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
Notes
Notes: svn path=/head/; revision=90868
Diffstat (limited to 'sbin/routed/if.c')
-rw-r--r--sbin/routed/if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/routed/if.c b/sbin/routed/if.c
index b439767cc506..55da15fd03fb 100644
--- a/sbin/routed/if.c
+++ b/sbin/routed/if.c
@@ -284,7 +284,7 @@ iflookup(naddr addr)
naddr /* host byte order */
std_mask(naddr addr) /* network byte order */
{
- NTOHL(addr); /* was a host, not a network */
+ addr = ntohl(addr); /* was a host, not a network */
if (addr == 0) /* default route has mask 0 */
return 0;
@@ -372,7 +372,7 @@ ripv1_mask_host(naddr addr, /* in network byte order */
int /* 0=bad */
check_dst(naddr addr)
{
- NTOHL(addr);
+ addr = ntohl(addr);
if (IN_CLASSA(addr)) {
if (addr == 0)