diff options
author | sam <sam@FreeBSD.org> | 2004-12-31 19:46:27 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2004-12-31 19:46:27 +0000 |
commit | 65cf57f523204a7d6cd5d3c0982549ff4e7a3c01 (patch) | |
tree | 8074773f4ec0bc591d617a3e62e72b59e4fadd5d /sbin/ifconfig/ifmedia.c | |
parent | 53f032a130f0a58cb1612d7aa7df15b94e0fc5d8 (diff) | |
download | FreeBSD-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/ifmedia.c')
-rw-r--r-- | sbin/ifconfig/ifmedia.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifmedia.c b/sbin/ifconfig/ifmedia.c index 7deddd8..13773ce 100644 --- a/sbin/ifconfig/ifmedia.c +++ b/sbin/ifconfig/ifmedia.c @@ -103,7 +103,7 @@ static struct ifmedia_description *get_subtype_desc(int, struct ifmedia_type_to_subtype *ttos); static void -media_status(int s, const struct rt_addrinfo *info __unused) +media_status(int s) { struct ifmediareq ifmr; int *media_list, i; @@ -787,7 +787,7 @@ static struct cmd media_cmds[] = { static struct afswtch af_media = { .af_name = "af_media", .af_af = AF_UNSPEC, - .af_status = media_status, + .af_other_status = media_status, }; static __constructor void |