Mercurial > hg > freeDiameter
comparison include/freeDiameter/libfreeDiameter.h @ 135:bbb8ddba4c85
Filter out more invalid addresses
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Wed, 16 Dec 2009 14:44:56 +0900 |
parents | 6b2989c066a6 |
children | 5510f73e1737 |
comparison
equal
deleted
inserted
replaced
134:6b2989c066a6 | 135:bbb8ddba4c85 |
---|---|
398 #ifndef IN_IS_ADDR_LOOPBACK | 398 #ifndef IN_IS_ADDR_LOOPBACK |
399 #define IN_IS_ADDR_LOOPBACK(a) \ | 399 #define IN_IS_ADDR_LOOPBACK(a) \ |
400 ((((long int) (a)->s_addr) & ntohl(0xff000000)) == ntohl(0x7f000000)) | 400 ((((long int) (a)->s_addr) & ntohl(0xff000000)) == ntohl(0x7f000000)) |
401 #endif /* IN_IS_ADDR_LOOPBACK */ | 401 #endif /* IN_IS_ADDR_LOOPBACK */ |
402 | 402 |
403 /* An IP equivalent to IN6_IS_ADDR_UNSPECIFIED */ | |
404 #ifndef IN_IS_ADDR_UNSPECIFIED | |
405 #define IN_IS_ADDR_UNSPECIFIED(a) \ | |
406 (((long int) (a)->s_addr) == 0x00000000) | |
407 #endif /* IN_IS_ADDR_UNSPECIFIED */ | |
408 | |
403 | 409 |
404 /* create a V4MAPPED address */ | 410 /* create a V4MAPPED address */ |
405 #define IN6_ADDR_V4MAP( a6, a4 ) { \ | 411 #define IN6_ADDR_V4MAP( a6, a4 ) { \ |
406 ((uint32_t *)(a6))[0] = 0; \ | 412 ((uint32_t *)(a6))[0] = 0; \ |
407 ((uint32_t *)(a6))[1] = 0; \ | 413 ((uint32_t *)(a6))[1] = 0; \ |