Hi all,

      Sorry to interrupt you, but I have two questions to ask, which would cost 
you a little time. 

      It is my first to use net-snmp to develop a snmp agent with private mibs. 
And when I compiled the mibs to C codes, I found something I cannot 
understand.Here is my codes.

 

/* create a new row in the table */
struct bg9300BoardInfoTable_entry *
bg9300BoardInfoTable_createEntry(netsnmp_container *container, 
                 , long  bg9300BoardInfoSlotId   // first
                ) {
    struct bg9300BoardInfoTable_entry *entry;

    entry = SNMP_MALLOC_TYPEDEF(struct bg9300BoardInfoTable_entry);
    if (!entry)
        return NULL;

    entry->bg9300BoardInfoSlotId = bg9300BoardInfoSlotId;
    entry->oid_index.len  = XXX;   //second
    entry->oid_index.oids = YYY;
    CONTAINER_INSERT( container, entry );
    return entry;
}

 

    The first question is,  why the function have an extra ',' in the parameter 
list? How many parameters in deed at this situation? If there were some more 
parameters, why not inform us below as a remark ?

    The second question is, the entry have two variables "oid_index.len" and 
"oid_index.oids", which would be known from the mib definition. I don't know 
why we should correct them manually, or they would have some other means in the 
section of the codes.

 

    I am waitting for your answer.Thank you.

 

 

                                                  Steven
                                          
_________________________________________________________________
全新 Windows 7:简化您的日常工作。寻找最适合您的 PC。
http://www.microsoft.com/china/windows/buy/ 
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to