Subject: | OCTET String.. Includes " |
############### PERL -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=linux, osvers=2.6.20-arch, archname=i686-linux-thread-multi
uname='linux wohnung 2.6.20-arch #1 smp preempt sat mar 10 10:12:25
cet 2007 i686 amd athlon(tm) xp 2200+ authenticamd gnulinux '
config_args='-des -Dprefix=/usr -Dinstallprefix=/usr
-Dman1dir=/usr/man/man1 -Dman3dir=/usr/man/man3 -Doptimize=-march=i686
-O2 -pipe -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -Wdeclaration-after-statement
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-march=i686 -O2 -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -Wdeclaration-after-statement
-I/usr/local/include'
ccversion='', gccversion='4.1.2', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
Built under linux
Compiled at Mar 12 2007 19:08:43
@INC:
/usr/lib/perl5/5.8.8/i686-linux-thread-multi
/usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.5/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl/5.8.3/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.3
/usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.1
/usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
############### EO PERL -V
############### UNAME -A
Linux ent-ux-3 2.6.20 #5 SMP Wed Apr 25 08:33:33 EDT 2007 i686 Intel(R)
Xeon(TM) CPU 3.20GHz GenuineIntel GNU/Linux
############### EO UNAME -A
ARCH LINUX .8
############### SNMP VERSION
Tue Apr 10 16:33:12 2007: "Module" Net::SNMP
· "installed into: /usr/lib/perl5/site_perl/5.8.8"
· "LINKTYPE: dynamic"
· "VERSION: 5.2.0"
· "EXE_FILES: snmpkey"
############### EO SNMP VERSION
Problem:
-- when the snmp packet is sent using "net:snmp"
a " is added to the beginning and ending of a "octet string"
variable.. the "snmpset" command from cli does -not- include the
extra "..
####### SNMP DUMP FROM TCPDUMP VIA CLI
09:57:21.009883 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
UDP (17), length 88) ##########.46587 > ##########.snmp: [bad udp cksum
2300!] { SNMPv1 C=########## { SetRequest(40) R=396982680
E:388.1.8.4.4.1.2.1=00_00_00_00_00_00 } }
####### EO SNMP DUMP FROM TCPDUMP VIA CLI
####### SNMP DUMP FROM TCPDUMP VIA PERL SCRIPT
09:58:45.985995 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
UDP (17), length 97) ##########.46587 > ###########.snmp: [bad udp cksum
aa4f!] { SNMPv1 C=######### { SetRequest(49) R=654
E:388.1.8.4.4.1.2.1="00_00_00_00_00_00" } }
####### EO SNMP DUMP FROM TCPDUMP VIA PERL SCRIPT
NOTE: the "" in the send variable on the perl script
the symbol device rejects this as "invalid snmp".. Why does
the module insert a " in the variable..
########### PERL SCRIPT SNIPPET
$res = undef;
$val = "00_00_00_00_00_00";
$res = $sess->set_request($smacacloid, OCTET_STRING, $val);
if(!($res) || ($res eq "")) { $res = "res_no_res"; if($debug
== 1) { print "BROKE\n"; } }
else { if($debug == 1) { print "GO\n"; } }
########### EO PERL SCRIPT SNIPPET
I have tried it a scalar and a direct input
$res = $sess->set_request($smacacloid, OCTET_STRING,
00_00_00_00_00_00);
the code above will dump out as this
########
10:02:06.130382 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
UDP (17), length 81) #############.46616 > ###########.snmp: [bad udp
cksum c630!] { SNMPv1 C=######### { SetRequest(33) R=12469
E:388.1.8.4.4.1.2.1="0" } }
########
HELP!
thanks joe