Related to developing a SNMP extension agent DLL??
I am following the tutorial below to create an extension agent DLL. I am following the tutorial below:
     http://www.codeproject.com/KB/IP/SNMP_Agent_DLL__Part1_.aspx

  According to the tutorial, I am required to use these 1 of  method signatures at a minimum among others:


    BOOL SNMP_FUNC_TYPE SnmpExtensionQuery(BYTE bPduType, 
                    SnmpVarBindList *pVarBindList, 
                    AsnInteger32 *pErrorStatus, 
                    AsnInteger32 *pErrorIndex)


The issue is with **SnmpVarBindList *pVarBindList** parameter. I am suppossed to insert the following data e.g ("About", "Name", "Age") into the SnmpVarBindList datatype and than pass it into the method above...

 **but I am not sure how to create the list of SnmpVarBindList datatype and insert the following data e.g ("About", "Name", "Age") into the list??** 

    MIB_ENTRY g_MyMibTable[] = {
	{	
		{OID_SIZEOF(g_unAboutOid),g_unAboutOid},
		&g_szAbout,
		"About",
		ASN_OCTETSTRING,
		SNMP_ACCESS_READ_ONLY,
		&g_MyMibTable[1]
	},
	{
		{OID_SIZEOF(g_unNameOid),g_unNameOid},
		&g_szName,
		"Name",
		ASN_OCTETSTRING,
		SNMP_ACCESS_READ_WRITE,
		&g_MyMibTable[2]
	},
	{
		{OID_SIZEOF(g_unAgeOid),g_unAgeOid},
		&g_asnIntAge,
		"Age",
		ASN_INTEGER,
		SNMP_ACCESS_READ_WRITE,
		NULL
	}
};

==========================================================================================
// struct definations for your reference:

    typedef struct {
    AsnObjectName    name;
    AsnObjectSyntax  value;
} SnmpVarBind;

    typedef struct {
    SnmpVarBind * list;
    UINT          len;
} SnmpVarBindList;


**Any guidance or code example provided will be much appreciated, I am new to C++**

Sincerely,


 

Related to developing a SNMP extension agent DLL??
===

I am following the tutorial below to create an extension agent DLL. I am following the tutorial below:
     http://www.codeproject.com/KB/IP/SNMP_Agent_DLL__Part1_.aspx

  According to the tutorial, I am required to use these 1 of  method signatures at a minimum among others:


    BOOL SNMP_FUNC_TYPE SnmpExtensionQuery(BYTE bPduType, 
                    SnmpVarBindList *pVarBindList, 
                    AsnInteger32 *pErrorStatus, 
                    AsnInteger32 *pErrorIndex)


The issue is with **SnmpVarBindList *pVarBindList** parameter. I am suppossed to insert the following data e.g ("About", "Name", "Age") into the SnmpVarBindList datatype and than pass it into the method above...

 **but I am not sure how to create the list of SnmpVarBindList datatype and insert the following data e.g ("About", "Name", "Age") into the list??** 

    MIB_ENTRY g_MyMibTable[] = {
	{	
		{OID_SIZEOF(g_unAboutOid),g_unAboutOid},
		&g_szAbout,
		"About",
		ASN_OCTETSTRING,
		SNMP_ACCESS_READ_ONLY,
		&g_MyMibTable[1]
	},
	{
		{OID_SIZEOF(g_unNameOid),g_unNameOid},
		&g_szName,
		"Name",
		ASN_OCTETSTRING,
		SNMP_ACCESS_READ_WRITE,
		&g_MyMibTable[2]
	},
	{
		{OID_SIZEOF(g_unAgeOid),g_unAgeOid},
		&g_asnIntAge,
		"Age",
		ASN_INTEGER,
		SNMP_ACCESS_READ_WRITE,
		NULL
	}
};

==========================================================================================
// struct definations for your reference:

    typedef struct {
    AsnObjectName    name;
    AsnObjectSyntax  value;
} SnmpVarBind;

    typedef struct {
    SnmpVarBind * list;
    UINT          len;
} SnmpVarBindList;


**Any guidance or code example provided will be much appreciated, I am new to C++**

Sincerely,


 
