Re: a problem of setting string in oid

2010-06-22 Thread Yi ZHOU
great, it works proprely.[?] On Mon, Jun 21, 2010 at 11:45 PM, Yi ZHOU wrote: > oh, yes, you're right magnus, i'll try this in the machine tomorrow morning > to see if it works, tks a lot. > > > On Mon, Jun 21, 2010 at 10:42 PM, Magnus Fromreide > wrote: > >> On Mon, Jun 21, 2010 at 09:50:54PM

Re: a problem of setting string in oid

2010-06-21 Thread Yi ZHOU
oh, yes, you're right magnus, i'll try this in the machine tomorrow morning to see if it works, tks a lot. On Mon, Jun 21, 2010 at 10:42 PM, Magnus Fromreide wrote: > On Mon, Jun 21, 2010 at 09:50:54PM +0200, Yi ZHOU wrote: > > thanks magnus, but i did set my xxxNetInterfaceName_len, > > Where? >

Re: a problem of setting string in oid

2010-06-21 Thread Magnus Fromreide
On Mon, Jun 21, 2010 at 09:50:54PM +0200, Yi ZHOU wrote: > thanks magnus, but i did set my xxxNetInterfaceName_len, Where? I do not see any location where entry->xxxNetInterfaceName_len get set in neither your original code nor in the code fragment you have pasted in below. > char* strName =

Re: a problem of setting string in oid

2010-06-21 Thread Yi ZHOU
thanks magnus, but i did set my xxxNetInterfaceName_len, char* strName = "Ethernet"; size_t len = strlen("Ethernet"); entry = xxxNetInterfaceTable_createEntry(0); memcpy(entry->xxxNetInterfaceName, strName, len); entry->xxxNetInterfaceStatus = 0; please ignore the second part

Re: a problem of setting string in oid

2010-06-21 Thread Magnus Fromreide
You never set xxxNetInterfaceName_len. /MF -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: ht

a problem of setting string in oid

2010-06-21 Thread Yi ZHOU
hello, everyone, i tried to accomplish my c file which is generated by mib2c with the mib2c.iterate.conf template. see the following code, the red part is what i added. i tried to intialize the table with 2 rows, each of them has Index, Name and Status, 3 elements. Everything seems ok, i compiled i