diff options
author | vs <vs@FreeBSD.org> | 2004-05-24 15:31:57 +0800 |
---|---|---|
committer | vs <vs@FreeBSD.org> | 2004-05-24 15:31:57 +0800 |
commit | 63da667f37f1e4f7db1d7283435d446b9233a0a7 (patch) | |
tree | 5a648e5c4c52a346b13189f392caaa598c4a6136 /net-mgmt | |
parent | 1f9a060e6a3e407f54b39c730413883a3393bf42 (diff) | |
download | freebsd-ports-gnome-63da667f37f1e4f7db1d7283435d446b9233a0a7.tar.gz freebsd-ports-gnome-63da667f37f1e4f7db1d7283435d446b9233a0a7.tar.zst freebsd-ports-gnome-63da667f37f1e4f7db1d7283435d446b9233a0a7.zip |
Also report MIB::ifName/MIB::ifAlias; bump PORTREVISION.
PR: ports/66905
Submitted by: Russell Jackson (maintainer)
Diffstat (limited to 'net-mgmt')
-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); + } + } |