This is a multi-part message in MIME format.

--===============1504052842==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C6898B.CD2FF083"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C6898B.CD2FF083
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I've been working with Net-SNMP 5.3.0.1 for the past 6 months. I
started using mib2c.mfd.conf to generate the default template codes and
modified them along the way to meet my project. My snmp agent is
functional and working well. However, I've a questions for the
net-snmp-codes community:

1. The index in one of my tables is a mac address, and the
framework generates the following structure:

typedef struct myTable_mib_index_s {
char macAddress[6];
size_t macAddress_len;
} myTable_mib_index;

This in turn produces an oid with
..1.3.6.1.4.1.x.x.x.x.6.0.71.76.16.84.46 where (0.71.76.16.84.46 is my
mac address). I must include the 6 in front of the mac address for
snmpget and snmpset commands, and here is an example:

snmpget -v 1 -c demo localhost myTableRowStatus.6.0.71.76.16.84.46
snmpset -v 1 -c demo localhost myTableRowStatus.6.0.71.76.16.84.46 =3D 2

My question is how can I get rid of the 6 (mac address len) so my index
is simply the mac address itself?

Thank you.

Hao Phan
Network Administration System
Wireless Systems Business Unit
M/A-COM Lowell, MA
www.macom.com

P: 978-442-4049
F: 978-442-5353



------_=_NextPart_001_01C6898B.CD2FF083
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable




charset=3Dus-ascii">
6.5.7638.1">
NetSNMP 5.0.3.1 Questions




FACE=3D"Arial">I LANG=3D"en-us"> LANG=3D"en-us"> FACE=3D"Arial">ve been LANG=3D"en-us"> working with =
N
SIZE=3D2 FACE=3D"Arial">et LANG=3D"en-us"> FACE=3D"Arial">- LANG=3D"en-us">SNMP 5. LANG=3D"en-us"> FACE=3D"Arial">3. LANG=3D"en-us">0.1 for the past 6 =
month
LANG=3D"en-us">s.  I started using =
mib2c.mfd.conf to generate the default template codes and modified them =
along the way to meet my project.  My snmp agent =
is
SIZE=3D2 FACE=3D"Arial"> LANG=3D"en-us"> functional =
and
SIZE=3D2 FACE=3D"Arial">working LANG=3D"en-us"> FACE=3D"Arial"> well.  LANG=3D"en-us"> FACE=3D"Arial">However, I LANG=3D"en-us"> LANG=3D"en-us"> FACE=3D"Arial">ve LANG=3D"en-us"> a LANG=3D"en-us"> FACE=3D"Arial"> question LANG=3D"en-us">s LANG=3D"en-us"> FACE=3D"Arial">for the net-snmp-codes community:



FACE=3D"Arial">1.      LANG=3D"en-us"> =
The index
LANG=3D"en-us"> FACE=3D"Arial">in LANG=3D"en-us"> one of my =
tabl
SIZE=3D2 FACE=3D"Arial">es is a mac address, and the framework generates =
the following structure
LANG=3D"en-us">:



FACE=3D"Arial">t LANG=3D"en-us">ypedef struct =
myTable_mib_index_s {



FACE=3D"Arial">   LANG=3D"en-us"> FACE=3D"Arial">c LANG=3D"en-us">har LANG=3D"en-us"> FACE=3D"Arial">      =
macAddress[6];



FACE=3D"Arial">   size_t    =
macAddress_len;



} =
myTable_mib_index;
LANG=3D"en-us">



This =
in turn produces
LANG=3D"en-us"> an oid =
with
=
.1.3.6.1.4.1.x.x.x.x.
LANG=3D"en-us"> COLOR=3D"#FF0000" SIZE=3D2 FACE=3D"Arial">6 LANG=3D"en-us"> FACE=3D"Arial">.0.71.76.16.84.46 LANG=3D"en-us"> FACE=3D"Arial"> where (0.71.76.16.84.46 is my mac =
address)
LANG=3D"en-us"> LANG=3D"en-us"> FACE=3D"Arial">I must include the 6 in front of the mac address for =
s
SIZE=3D2 FACE=3D"Arial">nmpget and snmp LANG=3D"en-us"> FACE=3D"Arial">set commands, and here is an example:



FACE=3D"Arial">s LANG=3D"en-us">nmpget LANG=3D"en-us"> FACE=3D"Arial"> LANG=3D"en-us"> LANG=3D"en-us"> FACE=3D"Arial">v 1 LANG=3D"en-us"> LANG=3D"en-us"> FACE=3D"Arial">c LANG=3D"en-us"> demo localhost =
myTableRowStatus.6.0.71.76.16.84.46



FACE=3D"Arial">s LANG=3D"en-us">nmpset LANG=3D"en-us"> FACE=3D"Arial">– LANG=3D"en-us">v 1 LANG=3D"en-us"> FACE=3D"Arial">– LANG=3D"en-us">c demo localhost =
myTableRowStatus.6.0.71.76.16.84.46 =3D 2
LANG=3D"en-us">



My =
question is how can I get rid of the 6 (mac address =
len)
SIZE=3D2 FACE=3D"Arial"> so my index is simply the mac address =
itself?



Thank =
you.



LANG=3D"en-us">Hao =
Phan



FACE=3D"Arial">Network Administration System



FACE=3D"Arial">Wireless Systems Business Unit



FACE=3D"Arial">M/A-COM Lowell, MA



FACE=3D"Arial">www.macom.com



P: =
978-442-4049



F: =
978-442-5353







------_=_NextPart_001_01C6898B.CD2FF083--


--===============1504052842==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1504052842==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============1504052842==--