Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-users: Re: [Wireshark-users] OSX packaging lacks SNMP MIBs - was Need installation help

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Sun, 13 Sep 2009 13:43:24 +0200
On Sun, 13 Sep 2009 00:58:47 -0700, Guy Harris <guy@xxxxxxxxxxxx> wrote:
> On Sep 12, 2009, at 3:47 PM, Martin Visser wrote:
> 
>> This seems to be a well-known bug -
>> http://www.wireshark.org/lists/wireshark-users/200903/msg00061.html
> 
> It's even in the bug database:
> 
> 	https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3163
> 
> The underlying problem appears to be that, to quote my first comment  
> in that bug, "The OS X package for Wireshark comes with its own copy  
> of libsmi (all the libraries it requires that don't come with OS X are  
> supplied in the Resources directory of the app bundle), but doesn't  
> appear to come with libsmi's MIBs or PIBs."  If we bundle them with  
> the OS X package for Wireshark, we should then set up Wireshark and  
> its copy of libsmi so that libsmi searches the directory containing  
> the MIBs and PIBs in the app bundle (which means the directory has to  
> be determined at run time, given that you can drag and drop the app  
> bundle anywhere you have permission to do so).
> 
> Yes, OS X has its own collection of MIBs, but those are for the Net- 
> SNMP bundled with OS X and, to quote my second comment, "However, if  
> libsmi has more MIBs than Net-SNMP, we still might want to include  
> libsmi's MIBs."

I don't know if it helps, but I've solved a similar problem in a custom
Debian Installer I build. Here some extra MIBs needed to be installed. It's
done by means of adding an smi_paths file to the installer, containing
"/usr/share/wireshark/mibs" (which matches the applicable directories used
in the build of the .deb). I guess the dynamic location of the installed
package would make it impossible to prepare an smi_paths this way. I don't
know if the library can handle expansion though.

diff -ur --strip-trailing-cr wireshark-1.2.1/Makefile.am
wireshark-1.2.1-X/Makefile.am
--- wireshark-1.2.1/Makefile.am	2009-08-12 16:11:25.781250000 +0200
+++ wireshark-1.2.1-X/Makefile.am	2009-08-12 16:13:39.218750000 +0200
@@ -106,7 +106,8 @@
 pkgdata_DATA = AUTHORS-SHORT COPYING manuf services wireshark.html \
 	tshark.html wireshark-filter.html capinfos.html editcap.html \
 	idl2wrs.html mergecap.html text2pcap.html dumpcap.html \
-	rawshark.html ws.css cfilters colorfilters dfilters smi_modules
ipmap.html
+	rawshark.html ws.css cfilters colorfilters dfilters ipmap.html \
+	smi_modules smi_paths
 
 #
 # Install the Diameter DTD and XML files in the "diameter" subdirectory
@@ -238,22 +239,44 @@
 	wimaxasncp/dictionary.xml \
 	wimaxasncp/dictionary.dtd
 
+#
+# Install the extra mibs in the "mibs" subdirectory
+# of that directory
+#
+mibsdir = $(pkgdatadir)/mibs
+mibs_DATA = \
+	mibs/XA-MIB \
+	mibs/XB-MIB
+

Thanx,
Jaap