Re: Truncation of trap by snmptrapd with DisplayString ending in null
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 16/09/2007, Jason Baekey <[email protected]> wrote: > I'm not sure whether this is a problem with snmptrapd or with the > agent/mib declaration of the vendor. > sessionUserName OBJECT-TYPE > SYNTAX DisplayString (SIZE (0..31)) > MAX-ACCESS read-only > STATUS current > DESCRIPTION > "The user name of the user logged-in." > > [Removed for clarity] > > The sessionUserName is transmitted to the trap station as a HEX STRING with > a null character as the final character. SNMP uses a length-value approach to representing strings. It does not use the C-style trailing-NULL approach. If you are receiving a sessionUserName varbind with the value "dave\0" (including the trailing null), then this implies that the user name of the user logged in is "dave\0" (including the trailing null) Somehow, I doubt this is the case! I would suggest that this is probably a bug in the agent implementation. The sessionUserName varbind value should not include the trailing null character. Now it could be argued that snmptrapd should be able to handle embedded null characters, and display them sensibly. But in practise, NUL is not a character that you would ever expect to find in a DisplayString value. Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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