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