[AGENT++] patch to construct and assigne uint64_t to Counter64 class

Claus Klein claus.klein at arcormail.de
Sun Dec 2 17:37:48 CET 2012


Hi Frank,

second I have change the template to create code like that:

void ifXEntry::set_row(MibTableRow* r, const NS_SNMP OctetStr& p1,  
unsigned long p2, unsigned long p3
		, unsigned long p4, unsigned long p5, unsigned long long p6
		, unsigned long long p7, unsigned long long p8, unsigned long long p9
		, unsigned long long p10, unsigned long long p11, unsigned long long  
p12
		, unsigned long long p13, long p14, unsigned long p15
		, long p16, long p17, const NS_SNMP OctetStr& p18
		, unsigned long p19)
{
	r->get_nth(nIfName)->replace_value(new NS_SNMP OctetStr(p1));
	r->get_nth(nIfInMulticastPkts)->replace_value(new NS_SNMP  
Counter32(p2));
	r->get_nth(nIfInBroadcastPkts)->replace_value(new NS_SNMP  
Counter32(p3));
	r->get_nth(nIfOutMulticastPkts)->replace_value(new NS_SNMP  
Counter32(p4));
	r->get_nth(nIfOutBroadcastPkts)->replace_value(new NS_SNMP  
Counter32(p5));
	r->get_nth(nIfHCInOctets)->replace_value(new NS_SNMP Counter64(p6));
	r->get_nth(nIfHCInUcastPkts)->replace_value(new NS_SNMP Counter64(p7));
	r->get_nth(nIfHCInMulticastPkts)->replace_value(new NS_SNMP  
Counter64(p8));
	r->get_nth(nIfHCInBroadcastPkts)->replace_value(new NS_SNMP  
Counter64(p9));
	r->get_nth(nIfHCOutOctets)->replace_value(new NS_SNMP Counter64(p10));
	r->get_nth(nIfHCOutUcastPkts)->replace_value(new NS_SNMP  
Counter64(p11));
	r->get_nth(nIfHCOutMulticastPkts)->replace_value(new NS_SNMP  
Counter64(p12));
	r->get_nth(nIfHCOutBroadcastPkts)->replace_value(new NS_SNMP  
Counter64(p13));
	r->get_nth(nIfLinkUpDownTrapEnable)->replace_value(new NS_SNMP  
SnmpInt32(p14));
	r->get_nth(nIfHighSpeed)->replace_value(new NS_SNMP Gauge32(p15));
	r->get_nth(nIfPromiscuousMode)->replace_value(new NS_SNMP  
SnmpInt32(p16));
	r->get_nth(nIfConnectorPresent)->replace_value(new NS_SNMP  
SnmpInt32(p17));
	r->get_nth(nIfAlias)->replace_value(new NS_SNMP OctetStr(p18));
	r->get_nth(nIfCounterDiscontinuityTime)->replace_value(new NS_SNMP  
TimeTicks(p19));
}





Best Regards
Claus

On 01.12.2012, at 16:01, Claus Klein wrote:

> That seems to complicated with all this low, high values ...
>
> So first I extended the Counter64 class.
>



More information about the AGENTPP mailing list