diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2009-07-27 14:22:09 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2009-07-27 14:22:09 +0000 |
commit | 243b95729ca5c07a39bdb7e327868460a6884474 (patch) | |
tree | cb443c30550ddfac3a0cbff2cf9dc6f1efaf229d /sbin/ifconfig | |
parent | 9b50a8b4b6400d84ba399ce6d5c5d9ff9a6ddb2c (diff) | |
download | FreeBSD-src-243b95729ca5c07a39bdb7e327868460a6884474.zip FreeBSD-src-243b95729ca5c07a39bdb7e327868460a6884474.tar.gz |
Mesh fixes, namely:
* don't clobber proxy entries
* HWMP seq number processing, including discard of old frames
* flush routing table entries based on nexthop
* print route flags in ifconfig
* more debugging messages and comments
Proxy changes submitted by sam.
Approved by: re (kib)
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index be929fc..10fb83d 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -3952,9 +3952,9 @@ list_regdomain(int s, int channelsalso) static void list_mesh(int s) { - int i; struct ieee80211req ireq; struct ieee80211req_mesh_route routes[128]; + struct ieee80211req_mesh_route *rt; (void) memset(&ireq, 0, sizeof(ireq)); (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); @@ -3965,23 +3965,26 @@ list_mesh(int s) if (ioctl(s, SIOCG80211, &ireq) < 0) err(1, "unable to get the Mesh routing table"); - printf("%-17.17s %-17.17s %4s %4s %4s %6s\n" + printf("%-17.17s %-17.17s %4s %4s %4s %6s %s\n" , "DEST" , "NEXT HOP" , "HOPS" , "METRIC" , "LIFETIME" - , "MSEQ"); + , "MSEQ" + , "FLAGS"); - for (i = 0; i < ireq.i_len / sizeof(*routes); i++) { + for (rt = &routes[0]; rt - &routes[0] < ireq.i_len / sizeof(*rt); rt++){ printf("%s ", - ether_ntoa((const struct ether_addr *)routes[i].imr_dest)); - printf("%s %4u %4u %6u %6u\n", - ether_ntoa((const struct ether_addr *) - routes[i].imr_nexthop), - routes[i].imr_nhops, routes[i].imr_metric, - routes[i].imr_lifetime, - routes[i].imr_lastmseq); + ether_ntoa((const struct ether_addr *)rt->imr_dest)); + printf("%s %4u %4u %6u %6u %c%c\n", + ether_ntoa((const struct ether_addr *)rt->imr_nexthop), + rt->imr_nhops, rt->imr_metric, rt->imr_lifetime, + rt->imr_lastmseq, + (rt->imr_flags & IEEE80211_MESHRT_FLAGS_VALID) ? + 'V' : '!', + (rt->imr_flags & IEEE80211_MESHRT_FLAGS_PROXY) ? + 'P' : ' '); } } |