--===============1135095994117475074==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C9A8D1.EDB91D73"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C9A8D1.EDB91D73
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello All,
if the snmpset command line has multiple varbinds (variables) to modify =
for the same table
and the same row (index), how can one ensures that all vars are =
processed in one request
struct?
Here is simple case of what I do and have:
I use snmpset command to set a variable but I also have to pass =
RowStatus value on the same line
with same request.=20
here is an example of the snmpset command:
snmpset -v 2c -c private localhost myvariable.1 s "hello" myRowStatus.1 =
i 2
this command is passed to the sub-agent in two netsnmp_request_info =
structs.
The 1st has the two varbinds the last request has only the last varbind.
In my sub-agent registered handler I have the following code:
int aSubagent_OID_handler( netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
int ret =3D SNMP_ERR_NOERROR;
netsnmp_request_info *request;
netsnmp_variable_list *vars;
for (request =3D requests; request; request =3D request->next)
{
vars =3D request->requestvb;
for (var =3D vars; var; var =3D var->next_variable)=20
{
/* check the mode and process */
}
}
}
The spliting of the varbinds in the above fashion
confuses the sub-agent code since it is already processed the 1st =
request
with both varbinds and then it has
to process the last request, only the last one is incomplete and it is a =
subset of the first.
Is there any way that one can flag the varbind (perhaps in =
netsnmp_variable_list struct )
as processed, once it has been dealt with?
I'm using 5.4.2 release on linux.
Alternatively, and more robustly, is there any way or option to instruct =
snmpset/netsnmp master agent to intelligently
group the varbinds that belong to the same table same index=20
in one netsnmp_request_info struct? =20
I am doing something wrong here or looking at things in wrong way?
your replies and feedback are always appreciated
Bernadette
------_=_NextPart_001_01C9A8D1.EDB91D73
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7651.59">
<TITLE>processing of the multi varbinds in one snmpset command</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=3D2>Hello All,<BR>
<BR>
if the snmpset command line has multiple varbinds (variables) to modify =
for the same table<BR>
and the same row (index), how can one ensures that all vars are =
processed in one request<BR>
struct?<BR>
<BR>
Here is simple case of what I do and have:<BR>
I use snmpset command to set a variable but I also have to pass =
RowStatus value on the same line<BR>
with same request.<BR>
<BR>
here is an example of the snmpset command:<BR>
snmpset -v 2c -c private localhost myvariable.1 s "hello" =
myRowStatus.1 i 2<BR>
<BR>
this command is passed to the sub-agent in two netsnmp_request_info =
structs.<BR>
The 1st has the two varbinds the last request has only the last =
varbind.<BR>
<BR>
In my sub-agent registered handler I have the following code:<BR>
<BR>
int aSubagent_OID_handler( netsnmp_mib_handler *handler,<BR>
&=
nbsp; &n=
bsp; netsnmp_handler_registration *reginfo,<BR>
&=
nbsp; &n=
bsp; netsnmp_agent_request_info *reqinfo,<BR>
&=
nbsp; &n=
bsp; netsnmp_request_info *requests)<BR>
{<BR>
<BR>
int ret =3D SNMP_ERR_NOERROR;<BR>
netsnmp_request_info *request;<BR>
netsnmp_variable_list *vars;<BR>
<BR>
for (request =3D requests; request; request =3D =
request->next)<BR>
{<BR>
vars =3D request->requestvb;<BR>
for (var =3D vars; var; var =3D =
var->next_variable)<BR>
{<BR>
/* check the mode =
and process */<BR>
<BR>
}<BR>
}<BR>
<BR>
}<BR>
<BR>
The spliting of the varbinds in the above fashion<BR>
confuses the sub-agent code since it is already processed the 1st =
request<BR>
with both varbinds and then it has<BR>
to process the last request, only the last one is incomplete and it is a =
subset of the first.<BR>
<BR>
Is there any way that one can flag the varbind (perhaps in =
netsnmp_variable_list struct )<BR>
as processed, once it has been dealt with?<BR>
<BR>
<BR>
I'm using 5.4.2 release on linux.<BR>
<BR>
Alternatively, and more robustly, is there any way or option to instruct =
snmpset/netsnmp master agent to intelligently<BR>
group the varbinds that belong to the same table same index<BR>
in one netsnmp_request_info struct? <BR>
<BR>
I am doing something wrong here or looking at things in wrong way?<BR>
<BR>
your replies and feedback are always appreciated<BR>
<BR>
Bernadette</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C9A8D1.EDB91D73--
--===============1135095994117475074==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
--===============1135095994117475074==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Net-snmp-coders mailing list
Net-snm...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
--===============1135095994117475074==--
That's the reason that SET requests are processed in multiple passes.
Have a look at the file AGENT.txt, for a description of one possible
approach.
It might also be worth searching the mailing list archives - I'm pretty sure
that I've explained this sort of thing before.
(a quick search throws up a thread on the -users list from 10th Feb,
entitled"Parsing Get/Set Requests in Table_Handler". That looks relevant)
Dave
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
--===============1033519352097169968==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C9A94F.4E203F60"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C9A94F.4E203F60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I actually submitted code for multi-varbind processing using the table =
iterator approach last year too.
Adam
-----Original Message-----
From: Dave Shield [mailto:D.T.S...@liverpool.ac.uk]
Sent: Fri 3/20/2009 6:44 AM
To: EYRE Bernadette
Cc: net-snm...@lists.sourceforge.net
Subject: Re: processing of the multi varbinds in one snmpset command
=20
2009/3/19 EYRE Bernadette <Bernade...@alcatel-lucent.com>:
> if the snmpset command line has multiple varbinds (variables) to =
modify for
> the same table
> and the same row (index), how can one ensures that all vars are =
processed in
> one request struct?
That's the reason that SET requests are processed in multiple passes.
Have a look at the file AGENT.txt, for a description of one possible
approach.
It might also be worth searching the mailing list archives - I'm pretty =
sure
that I've explained this sort of thing before.
(a quick search throws up a thread on the -users list from 10th Feb,
entitled"Parsing Get/Set Requests in Table_Handler". That looks =
relevant)
Dave
-------------------------------------------------------------------------=
-----
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based =
development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Net-snmp-coders mailing list
Net-snm...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
The information contained in this electronic mail transmission =
may be privileged and confidential, and therefore, protected =
from disclosure. If you have received this communication in =
error, please notify us immediately by replying to this =
message and deleting it from your computer without copying =
or disclosing it.
=0D
------_=_NextPart_001_01C9A94F.4E203F60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7653.38">
<TITLE>RE: processing of the multi varbinds in one snmpset =
command</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=3D2>I actually submitted code for multi-varbind processing =
using the table iterator approach last year too.<BR>
<BR>
Adam<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Dave Shield [<A =
HREF=3D"mailto:D.T.S...@liverpool.ac.uk">mailto:D.T.S...@liverpool.ac=
.uk</A>]<BR>
Sent: Fri 3/20/2009 6:44 AM<BR>
To: EYRE Bernadette<BR>
Cc: net-snm...@lists.sourceforge.net<BR>
Subject: Re: processing of the multi varbinds in one snmpset command<BR>
<BR>
2009/3/19 EYRE Bernadette =
<Bernade...@alcatel-lucent.com>:<BR>
> if the snmpset command line has multiple varbinds (variables) to =
modify for<BR>
> the same table<BR>
> and the same row (index), how can one ensures that all vars are =
processed in<BR>
> one request struct?<BR>
<BR>
That's the reason that SET requests are processed in multiple =
passes.<BR>
Have a look at the file AGENT.txt, for a description of one possible<BR>
approach.<BR>
<BR>
It might also be worth searching the mailing list archives - I'm pretty =
sure<BR>
that I've explained this sort of thing before.<BR>
(a quick search throws up a thread on the -users list from =
10th Feb,<BR>
entitled"Parsing Get/Set Requests in Table_Handler". =
That looks relevant)<BR>
<BR>
<BR>
Dave<BR>
<BR>
-------------------------------------------------------------------------=
-----<BR>
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) =
are<BR>
powering Web 2.0 with engaging, cross-platform capabilities. Quickly =
and<BR>
easily build your RIAs with Flex Builder, the Eclipse(TM)based =
development<BR>
software that enables intelligent coding and step-through debugging.<BR>
Download the free 60 day trial. <A =
HREF=3D"http://p.sf.net/sfu/www-adobe-com">http://p.sf.net/sfu/www-adobe-=
com</A><BR>
_______________________________________________<BR>
Net-snmp-coders mailing list<BR>
Net-snm...@lists.sourceforge.net<BR>
<A =
HREF=3D"https://lists.sourceforge.net/lists/listinfo/net-snmp-coders">htt=
ps://lists.sourceforge.net/lists/listinfo/net-snmp-coders</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>
<pre>The information contained in this electronic mail transmission =
may be privileged and confidential, and therefore, protected =
from disclosure. If you have received this communication in =
error, please notify us immediately by replying to this =
message and deleting it from your computer without copying =
or disclosing it.
=0D
------_=_NextPart_001_01C9A94F.4E203F60--
--===============1033519352097169968==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
--===============1033519352097169968==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Net-snmp-coders mailing list
Net-snm...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
--===============1033519352097169968==--
--===============8153382366565397807==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C9ADB3.09E8DBBA"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C9ADB3.09E8DBBA
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
As always your feedback and replies are appreciated.
I read AGENT.txt as well as the mail list thread you mentioned
Both materials helped enforce what I was already thinking ( or fearing )
My question was not so much to do with multi-pass nature of the set =
operation
and the need to structure the design to process it in multi pass,
but rather to do with what was the best way to service the set operation =
in each
pass, request-by-request struct or var-by-var struct. It was this last
choice that was confusing but after reading the document and the thread =
and with few
subtle hints here and there I realized that I have to make the choice =
how to process
the operation.
this email is sent as a courtesy and in the interest of=20
being of some value to others like me and no reply is expected.
Bernadette Eyre
-----Original Message-----
From: dave....@googlemail.com on behalf of Dave Shield
Sent: Fri 3/20/2009 5:44 AM
To: EYRE Bernadette
Cc: net-snm...@lists.sourceforge.net
Subject: Re: processing of the multi varbinds in one snmpset command
=20
2009/3/19 EYRE Bernadette <Bernade...@alcatel-lucent.com>:
> if the snmpset command line has multiple varbinds (variables) to =
modify for
> the same table
> and the same row (index), how can one ensures that all vars are =
processed in
> one request struct?
That's the reason that SET requests are processed in multiple passes.
Have a look at the file AGENT.txt, for a description of one possible
approach.
It might also be worth searching the mailing list archives - I'm pretty =
sure
that I've explained this sort of thing before.
(a quick search throws up a thread on the -users list from 10th Feb,
entitled"Parsing Get/Set Requests in Table_Handler". That looks =
relevant)
Dave
------_=_NextPart_001_01C9ADB3.09E8DBBA
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7651.59">
<TITLE>RE: processing of the multi varbinds in one snmpset =
command</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=3D2>As always your feedback and replies are =
appreciated.<BR>
<BR>
I read AGENT.txt as well as the mail list thread you mentioned<BR>
Both materials helped enforce what I was already thinking ( or fearing =
)<BR>
<BR>
My question was not so much to do with multi-pass nature of the set =
operation<BR>
and the need to structure the design to process it in multi pass,<BR>
but rather to do with what was the best way to service the set operation =
in each<BR>
pass, request-by-request struct or var-by-var struct. It was this =
last<BR>
choice that was confusing but after reading the document and the thread =
and with few<BR>
subtle hints here and there I realized that I have to make the choice =
how to process<BR>
the operation.<BR>
<BR>
this email is sent as a courtesy and in the interest of<BR>
being of some value to others like me and no reply is expected.<BR>
<BR>
Bernadette Eyre<BR>
<BR>
-----Original Message-----<BR>
From: dave....@googlemail.com on behalf of Dave Shield<BR>
Sent: Fri 3/20/2009 5:44 AM<BR>
</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C9ADB3.09E8DBBA--
--===============8153382366565397807==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
--===============8153382366565397807==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Net-snmp-coders mailing list
Net-snm...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
--===============8153382366565397807==--