Fwd: netsnmp_tdata * table_data structure

"Richard Horton" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Sending this back to the list as it got lost due to a bad click on reply ;)

---------- Forwarded message ----------
From: Richard Horton <[email protected]>
Date: 2008/7/17
Subject: Re: netsnmp_tdata * table_data structure
To: Dave Shield <[email protected]>


2008/7/17 Dave Shield <[email protected]>:
> Having created and registered the table, you can then invoke
> the 'createEntry' routine as many times as is required, giving
> the index of each of the initial rows.
>
>  This call will pass back an empty row structure, which you
> can then populate with the name/ifName/state/etc
>
> I.e.
>
>     netsnmp_tdata_row *row;
>     struct myTable_row *entry;
>
>     row = myTable_createEntry( table_data,  1 );
>     entry = (struct myTable_row *)row->data;
>     entry->name = "row 1"
>     entry->ifName = "eth0";
>     entry->status = UNKNOWN;
>
>     row = myTable_createEntry( table_data,  2 );
>     entry = (struct myTable_row *)row->data;
>     entry->name = "row 2"
>     entry->ifName = "eth1";
>     entry->status = IMAGINARY;

Thanks Dave,

Still having an issue though, my test code is as follows (well the
init bit for rows)
    for(i =0; i<ROWS_ON_STARTUP; i++) {
       row = gdukHornetRadioTable_createEntry(table_data,i);
       entry = row->data;
        DEBUGMSGTL(("GDUK-HORNET-MIB","\tModifying row
%d/%d\n",entry->gdukHornetRadioIndex,i));
       entry->gdukHornetRadioState = 1;
       strcpy(entry->gdukHornetRadioName,"test");
    }

After running the code the state field correctly is returning 1 in
response to a get on any given row (typically 32 of them), where as
the name is returning a null string...


--
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the
host finally dies.
http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
http://www.pbase.com/arimus - My online photogallery



-- 
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the
host finally dies.
http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
http://www.pbase.com/arimus - My online photogallery

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.