diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-16 22:12:04 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-16 22:12:04 +0000 |
commit | 9e15c4be04516ac9957f33ea179a188cc2a081a0 (patch) | |
tree | 77fe706483352a68b683ecde64215d54cbc89f4f /nuttx/include/arpa | |
parent | 4077a70fc256a7dd65febe986f176b8ac62091fc (diff) | |
download | nuttx-9e15c4be04516ac9957f33ea179a188cc2a081a0.tar.gz nuttx-9e15c4be04516ac9957f33ea179a188cc2a081a0.tar.bz2 nuttx-9e15c4be04516ac9957f33ea179a188cc2a081a0.zip |
Associate address with network driver; implement ioctl calls to set addresses
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@345 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/arpa')
-rw-r--r-- | nuttx/include/arpa/inet.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/include/arpa/inet.h b/nuttx/include/arpa/inet.h index d97ee9ff5..d24567dde 100644 --- a/nuttx/include/arpa/inet.h +++ b/nuttx/include/arpa/inet.h @@ -63,8 +63,9 @@ #else # define HTONS(ns) \ (uint16)((((uint16) (ns)) << 8) | (((uint16) (ns)) >> 8)) -# define HTONL(nl) htonl(nl) \ - (((uint32)HTONS((uint16)((hs) & 0xffff)) << 16) | (uint32)HTONS((uint16)((uint16)((hs) >> 16)))) +# define HTONL(nl) \ + ((((nl) & 0xff) << 24) | (((nl) & 0xff00) << 8) | \ + (((nl) & 0xff0000) >> 8) | (((nl) & 0xff000000) >> 24)) #endif #define NTOHS(hs) HTONS(hs) |