--- Dave Shield <[EMAIL PROTECTED]> wrote:
> Scalar SNMP object values *MUST* include the final
> .0
> subidentifier.  That's how SNMP is defined as
> working.
> You can't simply throw away international standards,
> and
> do your own thing.

all ritht!
i think i should follow the standards, as i am not
born to 
cope with the opposition :-)  

> The scalar helper is built
> on
> top of the instance helper.  *Everything* that the
> instance
> helper provides for you, is available with the
> scalar helper
> as well.
>   The handling of SET requests is exactly the same
> for the two helpers.

maybe have to explain:
take scalar mplsTunnelNotificationMaxRate for example.

   mplsTunnelNotificationMaxRate OBJECT-TYPE
      SYNTAX       Unsigned32
      MAX-ACCESS   read-write
......
i will first use mib2c.scalar.conf to generate a code
template containing two functions.

but i will also define a static unsigned variable in
front of 
all the functions(here maybe 
      static unsigned mplsTunnelNotificationMaxRate
i guess it's the way of thinking of the
mib2c.int_watch.conf ?).

when registering it as a scalar, i have to do the
coding
with SET_RESERVE1 SET_RESERVE2 ......
while registering it as an instance,i have got
everything
done after the initial function. i can just comment
out all
the 'MODE_GET' or 'MODE_SET_......'.
and it works well.
   
> > passing arg 4 of `netsnmp_register_ulong_instance'
> > from incompatible pointer type
> > 
> > what's the matter?
> 
> What are you passing to this routine, and how have
> you
> declared the relevant variable?
> 
just the same example
i defined an unsigned mplsTunnelNotificationMaxRate.
when i went with
netsnmp_register_int_instance("mplsTunnelN...",
                               mplsTunnelN..._oid,
                               OID_LENGTH
                               (mplsTunnelN..._oid),
                               &mplsTunnelN..., 
                               NULL);
nothing went wrong;
but when i used
netsnmp_register_ulong_instance()
leaving all the args unchanged,it warned me about the
fourth arg.

_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to