[AGENT++] IPv4/IPv6 support for Agent++

Neil Gendzwill gendzwil at sedsystems.ca
Mon Aug 11 17:48:58 CEST 2014


Thanks for the reply, Frank.  I'm a little confused though - there seems 
to already be quite a bit of support for dual-stack in Snmpx.  You can 
see the code in the receive method where there are flags for 
can_receive_ipv4 and can_receive_ipv6.  I'm guessing from your reply 
that it's not just a matter of exposing the dual-stack constructor in 
Snmp to complete the job?

Do you have any examples where people have done this?  Our code 
currently uses the Mib class where an instance of Mib holds a 
RequestList which in turn holds an Snmpx.  Would we have two instances 
of Mib?  The comments indicate it is supposed to be a singleton.

Neil

On 08/08/2014 04:50 PM, Frank Fock wrote:
> Hello Neil,
>
> That is indeed a shortcoming of AGENT++. We will try to add dual stack 
> support ASAP.
> However, I expect that there are some architectural changes necessary.
> A positive side effect should be, that AGENT++ then will support 
> multiple addresses
> and ports like SNMP4J-Agent already does. (Which is also a requirement 
> to support
> TCP based transport protocols in the future.)
> I do not expect that these changes will be ready to be released before 
> end of October.
>
> Meanwhile one option would be to use two Snmpx instances, but that 
> would not
> work well for many reasons (sending back the response, synchronization 
> of the
> SNMP counters/USM/VACM).
>
> So at the moment, using two agents seems to be the safest approach.
>
> Best regards,
> Frank Fock
>
> Am 08.08.2014 00:58, schrieb Neil Gendzwill:
>> We would like to support requests from both IPv4 and IPv6 clients in 
>> a dual-stack Linux environment (SL 6, if it matters).
>>
>> Our current code uses the Agent++ class Snmpx, which inherits from 
>> the Snmp++ class Snmp.
>>
>> The Snmp class allows support for IPv6 by either setting a flag in 
>> one of the constructors or using a constructor with two UDP 
>> addresses. From uxsnmp.h:
>>
>> Snmp(int &status, const unsigned short port = 0, const bool bind_ipv6 
>> = false);  // Source code shows this support is either/or depending 
>> on bind_ipv6
>> Snmp(int &status, const UdpAddress& 
>> addr);                                                        // 
>> Again, either/or depending on contents of addr
>> Snmp(int &status, const UdpAddress& addr_v4, const UdpAddress& 
>> addr_v6);   // This constructor supports both
>>
>> However, Snmpx  only supports the first two constructors and does not 
>> support the dual address constructor.  It also defaults bind_ipv6 in 
>> the first constructor to false.  On the surface of it, seems like it 
>> supports only one protocol or the other.  From snmp_pp_ext.h:
>>
>> Snmpx(int &status, u_short port): Snmp(status, port) {}
>> Snmpx(int &status, const NS_SNMP UdpAddress& addr): Snmp( status, 
>> addr) {}
>> // 3rd Snmp constructor unsupported
>>
>> How do I set up an agent that listens to requests in either 
>> protocol?  Or do I need two agents?
>>
>> Regards,
>>
>> Neil Gendzwill
>> SED Systems
>> Saskatoon, Canada
>>
>> _______________________________________________
>> AGENTPP mailing list
>> AGENTPP at agentpp.org
>> https://oosnmp.net/mailman/listinfo/agentpp
>



More information about the AGENTPP mailing list