Does the snmpd daemon has a size limit for setting strings?

Daniel Leicht <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Is there a chance that snmpd trunctuates a string that is larger than 910
chars?

I try to run this from a client:

snmpset -v3 -u user 1.1.1.17 .1.3.6.1.4.1.50000.1.10 string
"/tigerXML/ip/field[(attribute::name = \\\"ip.dst\\\") and (. =
\\\"0xff000000\\\")] | /tigerXML/ip/field[(attribute::name = \\\"ip.src\\\")
and (. = \\\"0xff000000\\\")] & /tigerXML/ip/field[(attribute::name =
\\\"ip.src\\\") and (. = \\\"0xffffff00\\\")] &
/tigerXML/ip/field[(attribute::name = \\\"ip.src\\\") and (. !=
\\\"0xffff0000\\\")] & /tigerXML/ip/field[(attribute::name = \\\"ip.dst\\\")
and (. = \\\"0xffff0000\\\")] & /tigerXML/ip/field[(attribute::name =
\\\"ip.dst\\\") and (. != \\\"0xffff0000\\\")] &
/tigerXML/tcp/field[(attribute::name = \\\"tcp.dstport\\\") and (. <
\\\"0\\\")] & /tigerXML/tcp/field[(attribute::name = \\\"tcp.dstport\\\")
and (. > \\\"0\\\")] & /tigerXML/tcp/field[(attribute::name =
\\\"tcp.dstport\\\") and (.  \\\"0\\\")] &
/tigerXML/prot/field[(attribute::name = \\\"prot.l2_from_site\\\") and (. !=
\\\"0\\\")] & /tigerXML/prot/field[(attribute::name =
\\\"prot.l2_from_site\\\") and (. > \\\"0\\\")] &
/tigerXML/prot/field[(attribute::name = \\\"prot.l3_dest_site\\\") and (. <
\\\"0\\\")] & /tigerXML/prot/field[(attribute::name =
\\\"prot.l3_dest_site\\\") and (.  \\\"0\\\")] |
/tigerXML/ip/field[(attribute::name = \\\"ip.src\\\") and (. =
\\\"0xff000000\\\")] & /tigerXML/ip/field[(attribute::name = \\\"ip.src\\\")
and (. = \\\"0xffffff00\\\")] & /tigerXML/ip/field[(attribute::name =
\\\"ip.src\\\") and (. != \\\"0xffff0000\\\")] &
/tigerXML/ip/field[(attribute::name = \\\"ip.dst\\\") and (. =
\\\"0xffff0000\\\")] & /tigerXML/ip/field[(attribute::name = \\\"ip.dst\\\")
and (. != \\\"0xffff0000\\\")] & /tigerXML/tcp/field[(attribute::name =
\\\"tcp.dstport\\\") and (. < \\\"0\\\")] &
/tigerXML/tcp/field[(attribute::name = \\\"tcp.dstport\\\") and (. >
\\\"0\\\")] & /tigerXML/tcp/field[(attribute::name = \\\"tcp.dstport\\\")
and (.  \\\"0\\\")] & /tigerXML/prot/field[(attribute::name =
\\\"prot.l2_from_site\\\") and (. != \\\"0\\\")] &
/tigerXML/prot/field[(attribute::name = \\\"prot.l2_from_site\\\") and (. >
\\\"0\\\")] & /tigerXML/prot/field[(attribute::name =
\\\"prot.l3_dest_site\\\") and (. < \\\"0\\\")] &
/tigerXML/prot/field[(attribute::name = \\\"prot.l3_dest_site\\\") and (.
 \\\"0\\\")] | /tigerXML/ip/field[(attribute::name = \\\"ip.src\\\") and (.
= \\\"0xff000000\\\")] & /tigerXML/ip/field[(attribute::name =
\\\"ip.src\\\") and (. = \\\"0xffffff00\\\")] &
/tigerXML/ip/field[(attribute::name = \\\"ip.src\\\") and (. !=
\\\"0xffff0000\\\")] & /tigerXML/ip/field[(attribute::name = \\\"ip.dst\\\")
and (. = \\\"0xffff0000\\\")] & /tigerXML/ip/field[(attribute::name =
\\\"ip.dst\\\") and (. != \\\"0xffff0000\\\")] &
/tigerXML/tcp/field[(attribute::name = \\\"tcp.dstport\\\") and (. <
\\\"0\\\")] & /tigerXML/tcp/field[(attribute::name = \\\"tcp.dstport\\\")
and (. > \\\"0\\\")] & /tigerXML/tcp/field[(attribute::name =
\\\"tcp.dstport\\\") and (.  \\\"0\\\")] &
/tigerXML/prot/field[(attribute::name = \\\"prot.l2_from_site\\\") and (. !=
\\\"0\\\")] & /tigerXML/prot/field[(attribute::name =
\\\"prot.l2_from_site\\\") and (. > \\\"0\\\")] &
/tigerXML/prot/field[(attribute::name = \\\"prot.l3_dest_site\\\") and (. <
\\\"0\\\")] & /tigerXML/prot/field[(attribute::name =
\\\"prot.l3_dest_site\\\") and (.  \\\"0\\\")]"

And in the server I have this line in snmpd.conf:

"pass  .1.3.6.1.4.1.50000.1 /opt/tiger/scripts/handler.sh"

handler.sh is just a python script that dumps all arguments vector into a
file, this is the output:

I was called with ['/opt/tiger/scripts/handler.sh', '-g',
'.1.3.6.1.4.1.50000.1.10']
I was called with ['/opt/tiger/scripts/handler.sh', '-s',
'.1.3.6.1.4.1.50000.1.10', 'string', '/tigerXML/ip/field[(attribute::name =
"ip.dst") and (. = "0xff000000")] | /tigerXML/ip/field[(attribute::name =
"ip.src") and (. = "0xff000000")] & /tigerXML/ip/field[(attribute::name =
"ip.src") and (. = "0xffffff00")] & /tigerXML/ip/field[(attribute::name =
"ip.src") and (. != "0xffff0000")] & /tigerXML/ip/field[(attribute::name =
"ip.dst") and (. = "0xffff0000")] & /tigerXML/ip/field[(attribute::name =
"ip.dst") and (. != "0xffff0000")] & /tigerXML/tcp/field[(attribute::name =
"tcp.dstport") and (. < "0")] & /tigerXML/tcp/field[(attribute::name =
"tcp.dstport") and (. > "0")] & /tigerXML/tcp/field[(attribute::name =
"tcp.dstport") and (.  "0")] & /tigerXML/prot/field[(attribute::name =
"prot.l2_from_site") and (. != "0")] & /tigerXML/prot/field[(attribute::name
= "prot.l2_from_site") and (. > "0")] &
/tigerXML/prot/field[(attribute::name = "prot.l3_dest_site") and (. < "0")]
& /tigerXML/prot/fi']


You can see that it trunctuates the string to 910 characters (and originally
it is much more).
Am I doing something wrong or this is a known limit?
Can I somehow increase this limit?


Thanks in advance,
Daniel.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.