Unsolved
This post is more than 5 years old
9 Posts
0
2259
May 18th, 2011 07:00
SNMP GetNext for MAC address
I have many different versions of an SNMP tool that can getNext values.
My problem is on MAC addresses. Below is an example of the MAC address result. It parses fine but the translation .... not sure how to get it to get it to work. And, I need to use ASL not perl for this.
apMAC-->\X-00-\X-16-
If I do a hexToString the result is still -->
The code segment I am using to getNext is below with the hexToString in there.
result = tm->snmpActGetNext(snmp, agent, oid)?IGNORE;
result = tm->snmpActGetNext(agent, oid, snmpTimeout, snmpRetry, snmpPolicy, snmpFormat)?IGNORE;
curOID = result[0];
tempVal = string(getOID[0]);
if (tempVal == "MacAddrTable")
{
getResult = hexToString(result[2]);
FIX_MAC(getResult);
}
FIX_MAC(getResult) {
input=getResult;
MAC:{
Kili1
9 Posts
0
January 26th, 2012 01:00
I guess I should have given the full return info for the MAC - It does some of the hex values correct for the first part then changes to ASCII then back to hex format. So is there a way to convert ASCII character back to a number so I can turn it into hex?
MAC-->\X00\X0F$f\X8BP
MAC-->\X00\X0F$f\X8B`
MAC-->\X00\X0F$f\X8Bp
MAC-->\X00\X0F$f\X8B\X90
MAC-->\X00\X0F$f\X8CÐ
MAC-->\X00\X0F$f\X8Cà
MAC-->\X00\X0F$f\X8Cð
bkuhhirte
52 Posts
0
June 29th, 2012 09:00
If you wanted it originally as a hex value, why run the "hexToString()" to begin with?
Regards,
Bill