[unisog] SNMP question : The data type returned by querying a CISCO switch for MacAddress.

Coby_Cai@DELL.com Coby_Cai at DELL.com
Sat Oct 22 13:22:54 GMT 2005


Hi, greetings,

Can anyone tell me which data type is returned when querying a CISCO
switch for the MacAddress of the system connected to it?

The OID is .1.3.6.1.2.1.17.4.3.1.2. And use getnext query type. I use
below command to get result in C#.
Result = SnmpInterface.SnmpGetVb(vbl, 1, ref rgetOid, ref rgetValue);

Here rgetOid is a point to structure 
public struct smiOID
		{
			public int len; // object identifier length in
bytes
			public int ptr; // object identifier address
		}

and rgetValue is a point to structure
public struct smiVALUEOCTET
		{
			// Also BITS, OPAQUE, IPADDR & NSAPADDR
			public int syntax;// syntax type
			public smiOCTET octetv;// value of type
		}

		// Also: BITS, IPADDR, OPAQUE & NSAPADDR
		public struct smiOCTET
		{
			public int len; // octet value length in bytes
			public int ptr; // octet value address
		}

Please help me to get the MacAddress by this. Thanks for your attension.

Thanks.
coby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dshield.org/pipermail/unisog/attachments/20051022/883c48fd/attachment.htm


More information about the unisog mailing list