summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig/ifconfig.h
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2004-12-31 19:46:27 +0000
committersam <sam@FreeBSD.org>2004-12-31 19:46:27 +0000
commit65cf57f523204a7d6cd5d3c0982549ff4e7a3c01 (patch)
tree8074773f4ec0bc591d617a3e62e72b59e4fadd5d /sbin/ifconfig/ifconfig.h
parent53f032a130f0a58cb1612d7aa7df15b94e0fc5d8 (diff)
downloadFreeBSD-src-65cf57f523204a7d6cd5d3c0982549ff4e7a3c01.zip
FreeBSD-src-65cf57f523204a7d6cd5d3c0982549ff4e7a3c01.tar.gz
Fix special status reporting. Prior to the reorg there was
special-purpose code to display status for an interface for state that was not address-oriented. This status reporting was merged in to the address-oriented status reporting but did not work for link address reporting (as discovered with fwip interfaces). Correct this mis-merge and eliminate the bogus kludge that was used for link-level address reporting. o add an af_other_status method for an address family for reporting status of things like media, vlan, etc. o call the af_other_status methods after reporting address status for an interface o special-case link address status; when reporting all status for an interface invoke it specially prior to reporting af_other_status methods (since it requires the sockaddr_dl that is passed in to status separately from the rtmsg address state) o correct the calling convention for link address status; don't cast types, construct the proper parameter This fixes ifconfig on fwip interfaces.
Diffstat (limited to 'sbin/ifconfig/ifconfig.h')
-rw-r--r--sbin/ifconfig/ifconfig.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h
index 3de635c..d57517c 100644
--- a/sbin/ifconfig/ifconfig.h
+++ b/sbin/ifconfig/ifconfig.h
@@ -85,8 +85,17 @@ enum {
struct afswtch {
const char *af_name; /* as given on cmd line, e.g. "inet" */
short af_af; /* AF_* */
- /* print status method */
+ /*
+ * Status is handled one of two ways; if there is an
+ * address associated with the interface then the
+ * associated address family af_status method is invoked
+ * with the appropriate addressin info. Otherwise, if
+ * all possible info is to be displayed and af_other_status
+ * is defined then it is invoked after all address status
+ * is presented.
+ */
void (*af_status)(int, const struct rt_addrinfo *);
+ void (*af_other_status)(int);
/* parse address method */
void (*af_getaddr)(const char *, int);
/* parse prefix method (IPv6) */
OpenPOWER on IntegriCloud