locked
MIB Structure (SNMP) RRS feed

  • Question

  • hello,

    I am developing a sample snmp extension agent. I have gone through the toaster example.

    I guess the MIB structure should be prepared from the "xxxx.mib" file within SnmpExtensionInit function. In the Toaster example they have made the MIB structre like this :

    MIB_ENTRY Mib[] = {

          { { OID_SIZEOF(MIB_toasterManufacturer), MIB_toasterManufacturer },

            &MIB_toasterManStor, ASN_RFC1213_DISPSTRING,

            MIB_ACCESS_READ, MIB_leaf_func, &Mib[1] },

     

          { { OID_SIZEOF(MIB_toasterModelNumber), MIB_toasterModelNumber },

            &MIB_toasterModelStor, ASN_RFC1213_DISPSTRING,

            MIB_ACCESS_READ, MIB_leaf_func, &Mib[2] },

     

          { { OID_SIZEOF(MIB_toasterControl), MIB_toasterControl },

            &MIB_toasterControlStor, ASN_INTEGER,

            MIB_ACCESS_READWRITE, MIB_control_func, &Mib[3] },

     

          { { OID_SIZEOF(MIB_toasterDoneness), MIB_toasterDoneness },

            &MIB_toasterDonenessStor, ASN_INTEGER,

            MIB_ACCESS_READWRITE, MIB_doneness_func, &Mib[4] },

     

          { { OID_SIZEOF(MIB_toasterToastType), MIB_toasterToastType },

            &MIB_toasterToastTypeStor, ASN_INTEGER,

            MIB_ACCESS_READWRITE, MIB_toasttype_func, NULL }

          };

     

    I want to know if this the right way to make the structure or there should be a module which reads the "xxx.mib" file and prepares the structure.

    If it is to be read from file then please help provide an example.

    thanks.

    • Moved by Jesse Jiang Monday, January 24, 2011 2:41 AM (From:Visual C++ General)
    • Moved by Jesse Jiang Monday, January 24, 2011 6:16 AM (From:Windows Mobile Development)
    Thursday, January 20, 2011 1:38 PM

All replies

  •  

    Hi Utsav Agarwal

     

    I think your issue is about the development of Windows Networking. So I will move this one to Winsock Kernel (WSK) Forum. I think that forum will know more information about this topic than us.

     

    Thanks for your understanding,

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 24, 2011 6:17 AM