Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to register a octect stream?

3 views
Skip to first unread message

Manuel Cano Muñoz

unread,
Jul 13, 2006, 9:17:31 AM7/13/06
to
--===============0882155585==
Content-type: multipart/alternative;
Boundary="0__=4EBBFB39DFD46ACB8f9e8a93df938690918c4EBBFB39DFD46ACB"
Content-Disposition: inline

--0__=4EBBFB39DFD46ACB8f9e8a93df938690918c4EBBFB39DFD46ACB
Content-type: text/plain; charset=US-ASCII

Hi!

In the examples, I see the function `netsnmp_register_int_instance' to register an int, but how can I register a string?


Thank you.
--0__=4EBBFB39DFD46ACB8f9e8a93df938690918c4EBBFB39DFD46ACB
Content-type: text/html; charset=US-ASCII
Content-Disposition: inline

<html><body>
<p>Hi!<br>
<br>
In the examples, I see the function `<font face="Courier New">netsnmp_register_int_instance</font>' to register an int, but how can I register a string?<br>
<br>
<br>
Thank you.</body></html>
--0__=4EBBFB39DFD46ACB8f9e8a93df938690918c4EBBFB39DFD46ACB--

--===============0882155585==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

--===============0882155585==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============0882155585==--


Dave Shield

unread,
Jul 13, 2006, 9:24:32 AM7/13/06
to
--===============0782558184==
Content-Type: multipart/alternative;
boundary="----=_Part_20716_26698838.1152796977177"

------=_Part_20716_26698838.1152796977177
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 13/07/06, Manuel Cano Mu=F1oz <mc...@amper.es> wrote:

> In the examples, I see the function `netsnmp_register_int_instance' to
> register an int, but how can I register a string?
>

Try using 'netsnmp_register_watched_scalar()'.
This can be used for both integers and string-valued objects.
(And has the advantage over netsnmp_register_int_instance() of
handling invalid requests correctly too )

Dave

------=_Part_20716_26698838.1152796977177
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<br><br><div><span class=3D"gmail_quote">On 13/07/06, <b class=3D"gmail_sen=
dername">Manuel Cano Mu=F1oz</b> &lt;<a href=3D"mailto:mc...@amper.es">mcan=
o...@amper.es</a>&gt; wrote:</span>
<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div><p>
In the examples, I see the function `<font face=3D"Courier New">netsnmp_reg=
ister_int_instance</font>' to register an int, but how can I register a str=
ing?</p></div></div></blockquote><div><br>
Try using 'netsnmp_register_watched_scalar()'.<br>
This can be used for both integers and string-valued objects.<br>
(And has the advantage over netsnmp_register_int_instance() of<br>
&nbsp;handling invalid requests correctly too )<br>
<br>
Dave</div></div>

------=_Part_20716_26698838.1152796977177--


--===============0782558184==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

--===============0782558184==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============0782558184==--

Manuel Cano Muñoz

unread,
Jul 13, 2006, 9:31:50 AM7/13/06
to
--===============1739104594==
Content-type: multipart/related;
Boundary="0__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823"

--0__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823
Content-type: multipart/alternative;
Boundary="1__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823"

--1__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: quoted-printable


Hi=2E Thanks=2E

I've searched throug the mail archives and found one mail from you abou=
t the same thing=2E
Now i'm having a strange error because MSVC tells me that

c:\documents and settings\mcano\mis documentos\proyectos\mib\nstagentsu=
bagentobject=2Ec(78) : error C2275:
'netsnmp_handler_registration' : illegal use of this type as an express=
ion

I've readed the agent_handler=2Eh file and it is a typedef of a struct,=
but I don't see nothing strange there=2E
Any clue?


Thank you

=

"Dave Shield" =

<D=2ET=2EShield@csc=2Eliv=2Eac=2Euk> =

Enviado por: =
Para
dave=2Eshield@googlemail=2Ecom "Manuel Ca=
no Mu=F1oz" <mcano@amper=2Ees>
=
cc
net-snmp-users=
@lists=2Esourceforge=2Enet
13/07/2006 15:22 =
Asunto
Re: How to reg=
ister a octect stream?
=

=

=

=

=

=


On 13/07/06, Manuel Cano Mu=F1oz <mcano@amper=2Ees> wrote:


In the examples, I see the function `netsnmp_register_int_instanc=


e' to register an int, but how can I register a
string?

Try using 'netsnmp_register_watched_scalar()'=2E
This can be used for both integers and string-valued objects=2E


(And has the advantage over netsnmp_register_int_instance() of
handling invalid requests correctly too )

Dave

=

--1__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823
Content-type: text/html; charset=ISO-8859-1
Content-Disposition: inline
Content-transfer-encoding: quoted-printable

<html><body>
<p>Hi=2E Thanks=2E<br>
<br>
I've searched throug the mail archives and found one mail from you abou=
t the same thing=2E<br>
Now i'm having a strange error because MSVC tells me that<br>
<br>
<font size=3D"2" face=3D"Courier New">c:\documents and settings\mcano\m=
is documentos\proyectos\mib\nstagentsubagentobject=2Ec(78) : error C227=
5: 'netsnmp_handler_registration' : illegal use of this type as an expr=
ession</font><br>
<br>
I've readed the agent_handler=2Eh file and it is a typedef of a struct,=
but I don't see nothing strange there=2E<br>
Any clue?<br>
<br>
<br>
Thank you<br>
<br>
<img src=3D"cid:10__=3D4EBBFB39DFDA48238f9e8a93df93869@amper=2Ees" widt=
h=3D"16" height=3D"16" alt=3D"Inactivo - Ocultar detalles para &quot;Da=
ve Shield&quot; &lt;D=2ET=2EShield@csc=2Eliv=2Eac=2Euk&gt;">&quot;Dave =
Shield&quot; &lt;D=2ET=2EShield@csc=2Eliv=2Eac=2Euk&gt;<br>
<br>
<br>

<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">=

<tr valign=3D"top"><td style=3D"background-image:url(cid:20__=3D4EBBFB3=
9DFDA48238f9e8a93df93869@amper=2Ees); background-repeat: no-repeat; " w=
idth=3D"40%">
<ul>
<ul>
<ul>
<ul><b><font size=3D"2">&quot;Dave Shield&quot; &lt;D=2ET=2EShield@csc=2E=
liv=2Eac=2Euk&gt;</font></b><font size=3D"2"> </font><br>
<font size=3D"2">Enviado por: dave=2Eshield@googlemail=2Ecom</font>
<p><font size=3D"2">13/07/2006 15:22</font></ul>
</ul>
</ul>
</ul>
</td><td width=3D"60%">
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">=

<tr valign=3D"top"><td width=3D"1%"><img src=3D"cid:30__=3D4EBBFB39DFDA=
48238f9e8a93df93869@amper=2Ees" border=3D"0" height=3D"1" width=3D"58" =
alt=3D""><br>
<div align=3D"right"><font size=3D"2">Para</font></div></td><td width=3D=
"100%"><img src=3D"cid:30__=3D4EBBFB39DFDA48238f9e8a93df93869@amper=2Ee=
s" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
<font size=3D"2">&quot;Manuel Cano Mu=F1oz&quot; &lt;mcano@amper=2Ees&g=
t;</font></td></tr>

<tr valign=3D"top"><td width=3D"1%"><img src=3D"cid:30__=3D4EBBFB39DFDA=
48238f9e8a93df93869@amper=2Ees" border=3D"0" height=3D"1" width=3D"58" =
alt=3D""><br>
<div align=3D"right"><font size=3D"2">cc</font></div></td><td width=3D"=
100%"><img src=3D"cid:30__=3D4EBBFB39DFDA48238f9e8a93df93869@amper=2Ees=
" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
<font size=3D"2">net-snmp-users@lists=2Esourceforge=2Enet</font></td></=
tr>

<tr valign=3D"top"><td width=3D"1%"><img src=3D"cid:30__=3D4EBBFB39DFDA=
48238f9e8a93df93869@amper=2Ees" border=3D"0" height=3D"1" width=3D"58" =
alt=3D""><br>
<div align=3D"right"><font size=3D"2">Asunto</font></div></td><td width=
=3D"100%"><img src=3D"cid:30__=3D4EBBFB39DFDA48238f9e8a93df93869@amper=2E=
es" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
<font size=3D"2">Re: How to register a octect stream?</font></td></tr>
</table>

<table border=3D"0" cellspacing=3D"0" cellpadding=3D"0">
<tr valign=3D"top"><td width=3D"58"><img src=3D"cid:30__=3D4EBBFB39DFDA=
48238f9e8a93df93869@amper=2Ees" border=3D"0" height=3D"1" width=3D"1" a=
lt=3D""></td><td width=3D"336"><img src=3D"cid:30__=3D4EBBFB39DFDA48238=
f9e8a93df93869@amper=2Ees" border=3D"0" height=3D"1" width=3D"1" alt=3D=
""></td></tr>
</table>
</td></tr>
</table>
<br>
<font size=3D"4"><br>
</font><br>
<font size=3D"4">On 13/07/06, </font><b><font size=3D"4">Manuel Cano Mu=
=F1oz</font></b><font size=3D"4"> &lt;</font><a href=3D"mailto:mcano@am=
per=2Ees"><u><font size=3D"4" color=3D"#0000FF">mcano@amper=2Ees</font>=
</u></a><font size=3D"4">&gt; wrote: </font>
<ul>
<ul><font size=3D"4">In the examples, I see the function `</font><font =
size=3D"4" face=3D"Courier New">netsnmp_register_int_instance</font><fo=
nt size=3D"4">' to register an int, but how can I register a string?</f=
ont></ul>
</ul>
<font size=3D"4"><br>
Try using 'netsnmp_register_watched_scalar()'=2E<br>
This can be used for both integers and string-valued objects=2E<br>


(And has the advantage over netsnmp_register_int_instance() of<br>

handling invalid requests correctly too )<br>
<br>

Dave</font>
<p></body></html>=


--1__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823--


--0__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823
Content-type: image/gif;
name="graycol.gif"
Content-Disposition: inline; filename="graycol.gif"
Content-ID: <10__=4EBBFB39DFDA482...@amper.es>
Content-transfer-encoding: base64

R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu
ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7

--0__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823
Content-type: image/gif;
name="pic32494.gif"
Content-Disposition: inline; filename="pic32494.gif"
Content-ID: <20__=4EBBFB39DFDA482...@amper.es>
Content-transfer-encoding: base64

R0lGODlhWABDALP/AAAAAK04Qf79/o+Gm7WuwlNObwoJFCsoSMDAwGFsmIuezf///wAAAAAAAAAA
AAAAACH5BAEAAAgALAAAAABYAEMAQAT/EMlJq704682770RiFMRinqggEUNSHIchG0BCfHhOjAuh
EDeUqTASLCbBhQrhG7xis2j0lssNDopE4jfIJhDaggI8YB1sZeZgLVA9YVCpnGagVjV171aRVrYR
RghXcAGFhoUETwYxcXNyADJ3GlcSKGAwLwllVC1vjIUHBWsFilKQdI8GA5IcpApeJQt8L09lmgkH
LZikoU5wjqcyAMMFrJIDPAKvCFletKSev1HBw8KrxtjZ2tvc3d5VyKtCKW3jfz4uMKmq3xu4N0nK
BVoJQmx2LGVOmrqNjjJf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USElMzBfsj0NFXR2kwsV1A5IF1grLgLL/r1R40BZEnuBWgmQEyb
jqRwSAt6bqMCOFkvKFN2GPPkUzIm/SCF8z8pVzpbjVnMsy0vOr1hw3SaSRUhpY09v0z0J1FnwzPl
fmh+xl4WtR0zGu24I4KbMQm3lnVu2oNWxI9W/lcyzA+mCKF4DBikxb/+UWtOGRiFP8qEwAayIgIA
Ow==

--0__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823
Content-type: image/gif;
name="ecblank.gif"
Content-Disposition: inline; filename="ecblank.gif"
Content-ID: <30__=4EBBFB39DFDA482...@amper.es>
Content-transfer-encoding: base64

R0lGODlhEAABAIAAAAAAAP///yH5BAEAAAEALAAAAAAQAAEAAAIEjI8ZBQA7

--0__=4EBBFB39DFDA48238f9e8a93df938690918c4EBBFB39DFDA4823--

--===============1739104594==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

--===============1739104594==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============1739104594==--


Alon Marx

unread,
Jul 13, 2006, 9:47:41 AM7/13/06
to
bmV0c25tcF9yZWdpc3Rlcl9zY2FsYXIKCgpPbiBUaHUsIDIwMDYtMDctMTMgYXQgMTU6MTUgKzAy
MDAsIE1hbnVlbCBDYW5vIE11w7FveiB3cm90ZToKPiBIaSEKPiAKPiBJbiB0aGUgZXhhbXBsZXMs
IEkgc2VlIHRoZSBmdW5jdGl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LS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpVc2luZyBUb21jYXQg
YnV0IG5lZWQgdG8gZG8gbW9yZT8gTmVlZCB0byBzdXBwb3J0IHdlYiBzZXJ2aWNlcywgc2VjdXJp
dHk/CkdldCBzdHVmZiBkb25lIHF1aWNrbHkgd2l0aCBwcmUtaW50ZWdyYXRlZCB0ZWNobm9sb2d5
IHRvIG1ha2UgeW91ciBqb2IgZWFzaWVyCkRvd25sb2FkIElCTSBXZWJTcGhlcmUgQXBwbGljYXRp
b24gU2VydmVyIHYuMS4wLjEgYmFzZWQgb24gQXBhY2hlIEdlcm9uaW1vCmh0dHA6Ly9zZWwuYXMt
dXMuZmFsa2FnLm5ldC9zZWw/Y21kPWxuayZraWQ9MTIwNzA5JmJpZD0yNjMwNTcmZGF0PTEyMTY0
MgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpOZXQtc25t
cC11c2VycyBtYWlsaW5nIGxpc3QKTmV0LXNubXAtdXNlcnNAbGlzdHMuc291cmNlZm9yZ2UubmV0
ClBsZWFzZSBzZWUgdGhlIGZvbGxvd2luZyBwYWdlIHRvIHVuc3Vic2NyaWJlIG9yIGNoYW5nZSBv
dGhlciBvcHRpb25zOgpodHRwczovL2xpc3RzLnNvdXJjZWZvcmdlLm5ldC9saXN0cy9saXN0aW5m
by9uZXQtc25tcC11c2Vycwo=

Dave Shield

unread,
Jul 13, 2006, 9:58:07 AM7/13/06
to
--===============1132060938==
Content-Type: multipart/alternative;
boundary="----=_Part_21452_2245183.1152798998485"

------=_Part_21452_2245183.1152798998485


Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 13/07/06, Manuel Cano Mu=F1oz <mc...@amper.es> wrote:

> Now i'm having a strange error because MSVC tells me that
>
> c:\documents and settings\mcano\mis

> documentos\proyectos\mib\nstagentsubagentobject.c(78) : error C2275:
> 'netsnmp_handler_registration' : illegal use of this type as an expressio=
n
>

And what does this section code look like?

Dave

------=_Part_21452_2245183.1152798998485


Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<br><br><div><span class=3D"gmail_quote">On 13/07/06, <b class=3D"gmail_sen=
dername">Manuel Cano Mu=F1oz</b> &lt;<a href=3D"mailto:mc...@amper.es">mcan=
o...@amper.es</a>&gt; wrote:</span>
<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div><p>

Now i'm having a strange error because MSVC tells me that<br>
<br>

<font face=3D"Courier New" size=3D"2">c:\documents and settings\mcano\mis d=
ocumentos\proyectos\mib\nstagentsubagentobject.c(78) : error C2275: 'netsnm=
p_handler_registration' : illegal use of this type as an expression</font>


</p></div></div></blockquote><div><br>

And what does this section code look like?<br>
&nbsp;<br>
Dave</div></div><br>

------=_Part_21452_2245183.1152798998485--


--===============1132060938==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

--===============1132060938==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============1132060938==--

Dave Shield

unread,
Jul 13, 2006, 10:00:49 AM7/13/06
to
--===============0906750799==
Content-Type: multipart/alternative;
boundary="----=_Part_21516_2336299.1152799158983"

------=_Part_21516_2336299.1152799158983
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 13/07/06, Alon Marx <al...@iportent.com> wrote:
>
> netsnmp_register_scalar


That will register a scalar object, true.
But you still need to provide a handler to provide the actual value.

Both 'ns_register_int_instance' and 'ns_register_watched_scalar'
use a standard internal handler. The MIB module coder just has
to indicate the appropriate variable, and the helper library does the rest.

Dave

------=_Part_21516_2336299.1152799158983
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 13/07/06, <b class="gmail_sendername">Alon Marx</b> &lt;<a href="mailto:al...@iportent.com">al...@iportent.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
netsnmp_register_scalar</blockquote><div><br>
That will register a scalar object, true.<br>
But you still need to provide a handler to provide the actual value.<br>
<br>
Both 'ns_register_int_instance' and 'ns_register_watched_scalar'<br>
use a standard internal handler.&nbsp; The MIB module coder just has<br>
to indicate the appropriate variable, and the helper library does the rest.<br>
<br>
Dave</div></div>

------=_Part_21516_2336299.1152799158983--


--===============0906750799==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

--===============0906750799==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============0906750799==--

Dave Shield

unread,
Jul 13, 2006, 10:27:11 AM7/13/06
to
--===============0108210003==
Content-Type: multipart/alternative;
boundary="----=_Part_22212_25864235.1152800735228"

------=_Part_22212_25864235.1152800735228
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 13/07/06, Manuel Cano Mu=F1oz <mc...@amper.es> wrote:
>

> netsnmp_handler_registration * reg =3D netsnmp_create_handler_registrati=
on(
> "nstAgentSubagentString", NULL,
> nstAgentSubagentString_oid, OID_LENGTH(nstAgentSubagentString_oid),
> HANDLER_CAN_RONLY);
>


A little more context, please. It's impossible to reliably debug
programming
problems from individual lines of code.

The only possibility that springs to mind is if this line (a combined
declaration
and assignment) comes in the middle of various other assignments, etc.
Strictly
speaking, all the declarations should come first, before any executable
statements.
Sometimes you can get away with mix-n-matching, depending on how fussy the
compiler is feeling.


But that's a complete guess, because you've provided minimal information as
to what you're actually doind. This does make providing support
significantly
harder :-(


It gives me the same error even if I put only:
>
> netsnmp_handler_registration;
>

Well, that's a bogus statement anyway, so I'm not surprised it throws an
error!

Dave

------=_Part_22212_25864235.1152800735228


Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Content-Disposition: inline

On 13/07/06, <b class=3D"gmail_sendername">Manuel Cano Mu=F1oz</b> &lt;<a h=
ref=3D"mailto:mc...@amper.es">mc...@amper.es</a>&gt; wrote:<div><span class=
=3D"gmail_quote"></span><blockquote class=3D"gmail_quote" style=3D"border-l=
eft: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:=
1ex;">
<div><div>
<p><font face=3D"Courier New">=09netsnmp_handler_registration * reg =3D net=
snmp_create_handler_registration(</font><br>
<font face=3D"Courier New">=09=09=09=09=09=09=09=09</font><font color=3D"#8=
00000" face=3D"Courier New">&quot;nstAgentSubagentString&quot;</font><font =
face=3D"Courier New">, NULL,</font><br>
<font face=3D"Courier New">=09=09=09=09=09=09=09=09nstAgentSubagentString_o=
id, OID_LENGTH(nstAgentSubagentString_oid),</font><br>
<font face=3D"Courier New">=09=09=09=09=09=09=09=09HANDLER_CAN_RONLY);</fon=


t></p></div></div></blockquote><div><br>

<br>
A little more context, please.&nbsp;&nbsp; It's impossible to reliably debu=
g programming<br>
problems from individual lines of code.<br>
<br>
The only possibility that springs to mind is if this line (a combined decla=
ration<br>
and assignment) comes in the middle of various other assignments, etc.&nbsp=
; Strictly<br>
speaking, all the declarations should come first, before any executable sta=
tements.<br>
Sometimes you can get away with mix-n-matching, depending on how fussy the<=
br>
compiler is feeling.<br>
<br>
<br>
But that's a complete guess, because you've provided minimal information as=
<br>
to what you're actually doind.&nbsp;&nbsp; This does make providing support=
significantly<br>
harder :-(<br>
<br>
</div><br><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid=
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><d=
iv><p><font face=3D"Courier New">It gives me the same error even if I put o=
nly:
</font><br>
<br>
<font face=3D"Courier New">=09netsnmp_handler_registration;</font></p></div=
></div></blockquote><div><br>
Well, that's a bogus statement anyway, so I'm not surprised it throws an er=
ror!<br>
<br>
Dave</div></div>

------=_Part_22212_25864235.1152800735228--


--===============0108210003==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

--===============0108210003==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============0108210003==--

Alon Marx

unread,
Jul 17, 2006, 5:28:05 AM7/17/06
to
Dave,

I'm using mib2c to generate code. I started writing and ask why there's
no mib2c-configuration file that generates code using the functions you
pointed out, when I saw that version 5.3 has the int_watch :) Like many
other times someone already thought of my ideas.. It's really great.

By the way, is there another configuration file that handles strings
(ASN_OCTET_STR)?


Also, an idea 'stolen' from rpcgen:
nowadays, the scalar configuration file generates the main part of the
code (oid registration, etc.) and generates remarks where the user has
to insert his code:
snmp_set_var_typed_value(requests->requestvb, ASN_OCTET_STR,
(u_char *)/* XXX: a pointer to the scalar's data */,
/* XXX: the length of the data in bytes */ );

Would it be better to just declare a function that will return the
pointer and length. This will enable the user to put his code within the
file (as it works today), or to implement the function in another file.
That way the mib2c-update will not be needed anymore, simplifying the
build process.

If the idea seems reasonable, I guess it would be relevant to other
configuration files as well.

Alon


On Thu, 2006-07-13 at 14:59 +0100, Dave Shield wrote:
> On 13/07/06, Alon Marx <al...@iportent.com> wrote:
> netsnmp_register_scalar
>
> That will register a scalar object, true.
> But you still need to provide a handler to provide the actual value.
>
> Both 'ns_register_int_instance' and 'ns_register_watched_scalar'
> use a standard internal handler. The MIB module coder just has
> to indicate the appropriate variable, and the helper library does the
> rest.
>
> Dave

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

0 new messages