Pull in darkstat-3.0.718
[darkstat-debian] / localip.h
1 /* darkstat 3
2 * copyright (c) 2001-2014 Emil Mikulic.
3 *
4 * localip.h: determine the local IPs of an interface
5 *
6 * You may use, modify and redistribute this file under the terms of the
7 * GNU General Public License version 2. (see COPYING.GPL)
8 */
9 #ifndef __DARKSTAT_LOCALIP_H
10 #define __DARKSTAT_LOCALIP_H
11
12 #include <time.h>
13
14 struct local_ips {
15 int is_valid;
16 time_t last_update_mono;
17 int num_addrs;
18 struct addr *addrs;
19 };
20
21 void localip_init(struct local_ips *ips);
22 void localip_free(struct local_ips *ips);
23
24 void localip_update(const char *iface, struct local_ips *ips);
25 int is_localip(const struct addr * const a,
26 const struct local_ips * const ips);
27
28 #endif
29 /* vim:set ts=3 sw=3 tw=80 et: */