I have been interested in more info on multi-threading (with encryption) for a while and think it is still a work in progress. Wes, any updates on this front?
Doug, I have had success multi-threading in C with the Single API and SNMPv3 using SHA1/AES, both the synchronous and asynchronous methods. I compile Net-SNMP with support for OpenSSL and disable the internal MD5 implementation: #!/usr/bin/env sh set PREFIX set DEBUG # use install prefix to avoid installing to live system #"--with-install-prefix=$PREFIX" does not produce the same result # need to update system library paths with ldconfig # comment out line below to install directly to live system PREFIX="$HOME/lib/net-snmp" # debugging enabled for development _CFLAGS='-march=nocona -pipe -g -ggdb' DEBUG='--enable-debugging --enable-mib-config-checking' # debugging disabled for production #_CFLAGS='-march=nocona -O2 -pipe' #LDFLAGS='-Wl,-O1' _CXXFLAGS="$CFLAGS" # choose 32-bit or 64-bit #_CHOST='i386-pc-linux-gnu' _CHOST='x86_64-pc-linux-gnu' ./configure "--prefix=$PREFIX" "--build=$_CHOST" "--host=$_CHOST" "--target=$_CHOST" "build_alias=$_CHOST" "host_alias=$_CHOST" "CFLAGS=$_CFLAGS" "CXXFLAGS=$_CXXFLAGS" "--mandir=$PREFIX/usr/share/man" "--infodir=$PREFIX/usr/share/info" "--datadir=$PREFIX/usr/share" "--sysconfdir=$PREFIX/etc" "--localstatedir=$PREFIX/var/lib" "--libdir=$PREFIX/usr/lib64" "--with-logfile=$PREFIX/var/log/net-snmpd.log" "--with-persistent-directory=$PREFIX/var/lib/net-snmp" '--with-sys-location=unknown' '--with-sys-contact=r...@unknown' '--with-default-snmp-version=3' '--with-mib-modules=host ucd-snmp/dlmod' '--enable-ucd-snmp-compatibility' '--enable-shared' '--enable-as-needed' '--disable-mfd-rewrites' '--enable-ipv6' '--disable-internal-md5' '--with-openssl' '--with-libwrap' '--without-rpm' '--without-bzip2' '--without-zlib' '--without-elf' '--disable-embedded-perl' '--without-perl-modules' '--without-python-modules' $DEBUG On Mon, Oct 25, 2010 at 09:05, Doug Manley <[email protected]> wrote: > BT> 3. How should I use the authentication and privacy protocol OIDs? > > WH> The SNMPv3 support in Net-SNMP isn't, unfortunately, thread-safe. We > WH> think/hope that the replacement DTLS/TLS support coming out in a future > WH> release will make it thread-safe when used over DTLS though. > > Is there an accepted method of using SNMPv3 in a thread-safe manner? > We have adopted a strategy of locking a mutex whenever a v3 call is > made so that all v3 calls are synchronous (while v1 and v2 may happen > simultaneously still). We're not sure if this is actually doing > anything, but we have had some problems "disappear" (so far) after > doing this. > > Thanks, > Douglas Manley > ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
