Re: enum registration

2009-01-02 Thread Wes Hardaker
> On Wed, 31 Dec 2008 20:35:04 +0200, "Nikos Balkanas" > said: NB> I presume then that there is no register_enum. Correct? No, nothing like that. There are functions to help you check ranges, etc. enums are really just a range of legal values most of the time. EG, the legal values are

Re: enum registration

2008-12-31 Thread Nikos Balkanas
I presume then that there is no register_enum. Correct? BR, Nikos - Original Message - From: "Wes Hardaker" To: "Nikos Balkanas" Cc: "Wes Hardaker" ; Sent: Wednesday, December 31, 2008 8:28 PM Subject: Re: enum registration >>>>>> On

Re: enum registration

2008-12-31 Thread Wes Hardaker
> On Wed, 31 Dec 2008 20:26:52 +0200, "Nikos Balkanas" > said: NB> net-snmp automatically does type checking according to the NB> MIB. I.e. it will reject strings if the mib says integer. The manager code in net-snmp automatically dose type checking (unless you turn it off). The agent

Re: enum registration

2008-12-31 Thread Nikos Balkanas
s Hardaker" To: "Nikos Balkanas" Cc: Sent: Wednesday, December 31, 2008 7:11 PM Subject: Re: enum registration >>>>>> On Sun, 28 Dec 2008 13:47:47 +0200, "Nikos Balkanas" >>>>>> said: > > NB> I am registering an enu

Re: enum registration

2008-12-31 Thread Wes Hardaker
> On Sun, 28 Dec 2008 13:47:47 +0200, "Nikos Balkanas" > said: NB> I am registering an enum scalar, but I don't know how to restrict NB> snmpset just to the enum values: You'll need to implement a subhandler and pass that into your registration function instead of the NULL. And then in

enum registration

2008-12-28 Thread Nikos Balkanas
Hi, I am a newbie in snmp coding, vetarn in C. I am struggling through my own code since mib2c doesn't work (Solaris 10.5, snmpd 5.4.1). I am registering an enum scalar, but I don't know how to restrict snmpset just to the enum values: static enum { notConnected, run, suspend,