util.h revision 1.7 1 1.1 dyoung #ifndef _IFCONFIG_UTIL_H
2 1.1 dyoung #define _IFCONFIG_UTIL_H
3 1.1 dyoung
4 1.6 dyoung #include <netinet/in.h>
5 1.6 dyoung
6 1.1 dyoung #include "parse.h"
7 1.1 dyoung
8 1.1 dyoung struct afswtch {
9 1.1 dyoung const char *af_name;
10 1.1 dyoung short af_af;
11 1.2 dyoung void (*af_status)(prop_dictionary_t, prop_dictionary_t, bool);
12 1.3 dyoung void (*af_addr_commit)(prop_dictionary_t, prop_dictionary_t);
13 1.6 dyoung SIMPLEQ_ENTRY(afswtch) af_next;
14 1.1 dyoung };
15 1.1 dyoung
16 1.7 dyoung void print_link_addresses(prop_dictionary_t, bool);
17 1.1 dyoung const char *get_string(const char *, const char *, u_int8_t *, int *);
18 1.1 dyoung const struct afswtch *lookup_af_byname(const char *);
19 1.1 dyoung const struct afswtch *lookup_af_bynum(int);
20 1.1 dyoung void print_string(const u_int8_t *, int);
21 1.1 dyoung int getsock(int);
22 1.1 dyoung struct paddr_prefix *prefixlen_to_mask(int, int);
23 1.4 dyoung int direct_ioctl(prop_dictionary_t, unsigned long, void *);
24 1.4 dyoung int indirect_ioctl(prop_dictionary_t, unsigned long, void *);
25 1.6 dyoung #ifdef INET6
26 1.6 dyoung void in6_fillscopeid(struct sockaddr_in6 *sin6);
27 1.6 dyoung #endif /* INET6 */
28 1.1 dyoung
29 1.1 dyoung #endif /* _IFCONFIG_UTIL_H */
30