NetBSD/sbin/ifconfig/util.h
dyoung a2e4fb3562 Use prop_dictionary_util(3) some more.
When we read interface flags and capabilities from the kernel, take
care not to record them in our current environment (env), but record
them in the output environment (oenv), instead.  This helps us get
interface capabilities and flags right.
2008-05-06 17:29:04 +00:00

28 lines
773 B
C

#ifndef _IFCONFIG_UTIL_H
#define _IFCONFIG_UTIL_H
#include "parse.h"
struct afswtch {
const char *af_name;
short af_af;
void (*af_status)(prop_dictionary_t, prop_dictionary_t, bool);
void (*af_getaddr)(const struct paddr_prefix *, int);
void (*af_getprefix)(int, int);
void (*af_addr_commit)(prop_dictionary_t, prop_dictionary_t);
unsigned long af_difaddr;
unsigned long af_aifaddr;
unsigned long af_gifaddr;
void *af_ridreq;
void *af_addreq;
};
const char *get_string(const char *, const char *, u_int8_t *, int *);
const struct afswtch *lookup_af_byname(const char *);
const struct afswtch *lookup_af_bynum(int);
void print_string(const u_int8_t *, int);
int getsock(int);
struct paddr_prefix *prefixlen_to_mask(int, int);
#endif /* _IFCONFIG_UTIL_H */