diff options
author | Volker Stolz <vs@FreeBSD.org> | 2004-05-24 07:31:57 +0000 |
---|---|---|
committer | Volker Stolz <vs@FreeBSD.org> | 2004-05-24 07:31:57 +0000 |
commit | 1ddd0e6a933bfb0f3956ec0d33a01866c6d3d9c9 (patch) | |
tree | 2b4caa2ce419b9a3365baf6785ece0507be85dc8 /net-mgmt/sdig | |
parent | 6b21ed93c4aee1b5251daeb9d1514d03dcf36d97 (diff) | |
download | ports-1ddd0e6a933bfb0f3956ec0d33a01866c6d3d9c9.tar.gz ports-1ddd0e6a933bfb0f3956ec0d33a01866c6d3d9c9.zip |
Notes
Diffstat (limited to 'net-mgmt/sdig')
-rw-r--r-- | net-mgmt/sdig/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/sdig/files/patch-sdig.c | 42 |
2 files changed, 43 insertions, 0 deletions
diff --git a/net-mgmt/sdig/Makefile b/net-mgmt/sdig/Makefile index f3a05678c7e0..6791546cdfdd 100644 --- a/net-mgmt/sdig/Makefile +++ b/net-mgmt/sdig/Makefile @@ -7,6 +7,7 @@ PORTNAME= sdig PORTVERSION= 0.40 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= http://www.exploits.org/sdig/ diff --git a/net-mgmt/sdig/files/patch-sdig.c b/net-mgmt/sdig/files/patch-sdig.c new file mode 100644 index 000000000000..3559519dd440 --- /dev/null +++ b/net-mgmt/sdig/files/patch-sdig.c @@ -0,0 +1,42 @@ +--- sdig.c.orig Mon Mar 24 13:08:00 2003 ++++ sdig.c Wed May 19 13:17:43 2004 +@@ -426,7 +426,7 @@ + + static void do_ifdescr(stype *sw, long port) + { +- char query[256], *ifdescr; ++ char query[256], *ifdescr, *ifname; + long ifnum; + + /* first get the switch's ifnum for the port */ +@@ -437,13 +437,28 @@ + if (ifnum == -1) + return; + +- snprintf(query, sizeof(query), "interfaces.ifTable.ifEntry.ifDescr.%ld", ++ snprintf(query, sizeof(query), "IF-MIB::ifName.%ld", ++ ifnum); ++ ++ ifname = snmpget_str(sw->ip, sw->pw, query); ++ ++ if (!ifname) { ++ snprintf(query, sizeof(query), "IF-MIB::ifAlias.%ld", ifnum); ++ snmpget_str(sw->ip, sw->pw, query); ++ } ++ ++ snprintf(query, sizeof(query), "IF-MIB::ifDescr.%ld", + ifnum); + + ifdescr = snmpget_str(sw->ip, sw->pw, query); + ++ if (ifname) { ++ printf(" (%s)", ifname); ++ free(ifname); ++ } ++ + if (ifdescr) { +- printf(" (%s)", ifdescr); ++ printf(" [%s]", ifdescr); + free(ifdescr); + } + } |