Re: snmp_set_var_value code
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 7 April 2011 16:19, Leo Cacciari <[email protected]> wrote: > Thus my question is... How does it work (and work it does) when largeval as > been set to 0, len being less than 40? In other words, where does it points > vars->val.objid? to vars->buf? At the start of the routine: /* * use built-in storage for smaller values */ if (len <= sizeof(vars->buf)) { vars->val.string = (u_char *) vars->buf; largeval = 0; } Remember that vars->val is a *union* structure. Pointing 'val.string' to 'vars->buf' has exactly the same effect as pointing 'val.objid' there. Dave ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ 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