| 1 | #ifndef ipaddr_h |
| 2 | #define ipaddr_h |
| 3 | |
| 4 | /* Match an address (in HOST byte order) with a subnet list. |
| 5 | Returns True if matched. */ |
| 6 | extern bool_t subnet_match(struct subnet *s, uint32_t address); |
| 7 | extern bool_t subnet_matches_list(struct subnet_list *list, uint32_t address); |
| 8 | extern bool_t subnets_intersect(struct subnet a, struct subnet b); |
| 9 | extern bool_t subnet_intersects_with_list(struct subnet a, |
| 10 | struct subnet_list *b); |
| 11 | extern bool_t subnet_lists_intersect(struct subnet_list *a, |
| 12 | struct subnet_list *b); |
| 13 | |
| 14 | |
| 15 | extern string_t ipaddr_to_string(uint32_t addr); |
| 16 | extern string_t subnet_to_string(struct subnet *sn); |
| 17 | |
| 18 | #endif /* ipaddr_h */ |