util.h revision 1.4 1 #ifndef _IFCONFIG_UTIL_H
2 #define _IFCONFIG_UTIL_H
3
4 #include "parse.h"
5
6 struct afswtch {
7 const char *af_name;
8 short af_af;
9 void (*af_status)(prop_dictionary_t, prop_dictionary_t, bool);
10 void (*af_getaddr)(const struct paddr_prefix *, int);
11 void (*af_getprefix)(int, int);
12 void (*af_addr_commit)(prop_dictionary_t, prop_dictionary_t);
13 unsigned long af_difaddr;
14 unsigned long af_aifaddr;
15 unsigned long af_gifaddr;
16 void *af_ridreq;
17 void *af_addreq;
18 };
19
20 const char *get_string(const char *, const char *, u_int8_t *, int *);
21 const struct afswtch *lookup_af_byname(const char *);
22 const struct afswtch *lookup_af_bynum(int);
23 void print_string(const u_int8_t *, int);
24 int getsock(int);
25 struct paddr_prefix *prefixlen_to_mask(int, int);
26 int direct_ioctl(prop_dictionary_t, unsigned long, void *);
27 int indirect_ioctl(prop_dictionary_t, unsigned long, void *);
28
29 #endif /* _IFCONFIG_UTIL_H */
30