Import release 0.1.6
[secnet] / ipaddr.h
CommitLineData
7138d0c5
SE
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. */
6extern bool_t subnet_match(struct subnet *s, uint32_t address);
7extern bool_t subnet_matches_list(struct subnet_list *list, uint32_t address);
8extern bool_t subnets_intersect(struct subnet a, struct subnet b);
9extern bool_t subnet_intersects_with_list(struct subnet a,
10 struct subnet_list *b);
11extern bool_t subnet_lists_intersect(struct subnet_list *a,
12 struct subnet_list *b);
13
14
15extern string_t ipaddr_to_string(uint32_t addr);
16extern string_t subnet_to_string(struct subnet *sn);
17
18#endif /* ipaddr_h */