diff options
author | Damien Miller <djm@mindrot.org> | 2000-03-14 10:16:34 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-03-14 10:16:34 +1100 |
commit | 1c67c9969c80dbc1fcbbc381f1554e45745622eb (patch) | |
tree | 9d7f1fd24cb5c82fd00797e038b7a31726840bae | |
parent | 736540875bf0b818ac19c49d79ba1ee192320e6a (diff) |
- Include macro for IN6_IS_ADDR_V4MAPPED. Report from
peter@frontierflying.com
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | defines.h | 11 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20000314 | ||
2 | - Include macro for IN6_IS_ADDR_V4MAPPED. Report from | ||
3 | peter@frontierflying.com | ||
4 | |||
1 | 20000311 | 5 | 20000311 |
2 | - Detect RSAref | 6 | - Detect RSAref |
3 | - OpenBSD CVS change | 7 | - OpenBSD CVS change |
@@ -3,9 +3,12 @@ | |||
3 | 3 | ||
4 | /* Necessary headers */ | 4 | /* Necessary headers */ |
5 | 5 | ||
6 | #include <sys/types.h> | 6 | #include <sys/types.h> /* For [u]intxx_t */ |
7 | |||
7 | #include <sys/socket.h> /* For SHUT_XXXX */ | 8 | #include <sys/socket.h> /* For SHUT_XXXX */ |
8 | 9 | ||
10 | #include <netinet/in.h> /* For IPv6 macros */ | ||
11 | |||
9 | #ifdef HAVE_SYS_BITYPES_H | 12 | #ifdef HAVE_SYS_BITYPES_H |
10 | # include <sys/bitypes.h> /* For u_intXX_t */ | 13 | # include <sys/bitypes.h> /* For u_intXX_t */ |
11 | #endif | 14 | #endif |
@@ -234,6 +237,12 @@ typedef unsigned int size_t; | |||
234 | # define __P(x) x | 237 | # define __P(x) x |
235 | #endif | 238 | #endif |
236 | 239 | ||
240 | #if !defined(IN6_IS_ADDR_V4MAPPED) | ||
241 | # define IN6_IS_ADDR_V4MAPPED(a) \ | ||
242 | ((((uint32_t *) (a))[0] == 0) && (((uint32_t *) (a))[1] == 0) && \ | ||
243 | (((uint32_t *) (a))[2] == htonl (0xffff))) | ||
244 | #endif /* !defined(IN6_IS_ADDR_V4MAPPED) */ | ||
245 | |||
237 | #if !defined(__GNUC__) || (__GNUC__ < 2) | 246 | #if !defined(__GNUC__) || (__GNUC__ < 2) |
238 | # define __attribute__(x) | 247 | # define __attribute__(x) |
239 | #endif /* !defined(__GNUC__) || (__GNUC__ < 2) */ | 248 | #endif /* !defined(__GNUC__) || (__GNUC__ < 2) */ |