Is someone able to answer my question?

We use net-snmp as agentx master agent and I need to know what is the max 
length of a single octet-string?


//Regards
Claus



On 01.08.2013, at 21:52, Claus Klein wrote:

> Hi,
> 
> I found 2 defines and one 1 mib value which are not clear to me:
> 
> snmp_agent.h
> #define SNMP_MAX_PDU_SIZE 64000 /* local constraint on PDU size sent by agent
>                                 * (see also SNMP_MAX_MSG_SIZE in snmp_api.h) 
> */
> 
> snmp_api.h
> #define SNMP_MAX_MSG_SIZE          1472 /* ethernet MTU minus IP/UDP header */
> 
> used only at protocol.c
> int
> agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data,
>             size_t len)
> {
>    register u_char *bufp = data;
>    u_char          buffer[SNMP_MAX_MSG_SIZE];
> ...
> }
> 
> and there is the mib var:
> SNMP-FRAMEWORK-MIB::snmpEngineMaxMessageSize.0 = INTEGER: 1500
> 
> 
> Why is the SNMP_MAX_PDU_SIZE is not used?
> Can the max PUD size grater than the max message size?
> Why is  snmpEngineMaxMessageSize not 1472?
> 
> 
> P.S.: there is this caclulation at snmpusm.c:
>    /*
>     * Calculate the biggest sPDU for the response (i.e., whole - ovrhd).
>     *
>     * FIX  Correct? 
>     */
>    *maxSizeResponse = maxMsgSize - (end_of_overhead - wholeMsg);
> 
> and at snmptsm.c I found this:
>    /* Section 5.2, Step 7:
>       The maxSizeResponseScopedPDU is calculated.  This is the maximum
>       size allowed for a scopedPDU for a possible Response message.
>     */
>    *parms->maxSizeResponse = parms->maxMsgSize; /* XXX */
> 
> A short test with snmpget -V3 -Ddump ... got this: 
> dumph_send:   msgMaxSize
> dumpx_send:    02 03 00 FF E3 
> dumpv_send:      Integer:     65507 (0xFFE3)
> 
> 
> Can anyone please help?
> 
> Thanks in advance
> Best Regards
> Claus
> 
> 
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent 
> caught up. So what steps can you take to put your SQL databases under 
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
> _______________________________________________
> Net-snmp-coders mailing list
> Net-snmp-coders@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to