[AGENT++] [SNMP++] How to set VLAN Portlists?
Jochen Katz
katz at agentpp.com
Wed Sep 1 21:30:32 CEST 2010
Hello,
> I successfully build the console_Example/testApp.cpp
> The TestApp tells me
>
> test_app.exe 192.168.23.66 1.3.6.1.2.1.17.7.1.4.3.1.2.100
> SNMP++ Set to 192.168.23.66 SNMPV Retries=1 Timeout=1000ms
> SET-community=public GET-community=public
> Oid = 1.3.6.1.2.1.17.7.1.4.3.1.2.100
> Current Value = FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ................
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 00 00 00 00 ....
>
> Value Type is Octet String
> Please enter new value: <- ??
is it the snmpSet.cpp that you have compiled to test_app.exe?
You have to change the source, if you want to enter hex strings.
> Please help me to find out, what is the right syntax for the Octet String
> to set the dot1qVlanStaticEgressPorts? Is OctetString right? Or do i need
> another type?
The example just uses the entered string as an octet string.
Instead of
OctetStr octetstr( buffer);
you would need
OctetStr octetstr = OctetStr::from_hex_string(buffer);
Regards,
Jochen
/**
* Build an OctetStr from a hex string.
* Called with "5465 737469 6e672074686973206D657468 6f 64 21"
* the returned value will be "Testing this method!"
*
* @param hex_string - The hex string (may contain spaces)
* @return created string
*/
static OctetStr from_hex_string(const OctetStr &hex_string);
More information about the AGENTPP
mailing list