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

what data type i should use in the SNMP SET.

472 views
Skip to first unread message

venkatgiri

unread,
Aug 12, 2009, 7:08:23 AM8/12/09
to
Hi all,

Can i know what will be the data type given for the below objects in
SNMP SET.

xyz::= SEQUENCE {
a InetAddressType, MAX-ACCESS read-create
b InetAddress, MAX-ACCESS read-create
d RowStatus, MAX-ACCESS read-create
}
If SNMP SET command given for the object "b", then what data type i
should use.
1. snmpset ..... localhost b.1 s "192.16.10.14 "
or
2. snmpset ......localhost b.1 x oxco100a16
or
3. snmpset ......localhost b.1 a 192.16.10.14

which one of these are correct?

--
Regards,
Venkat


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
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

Dave Shield

unread,
Aug 12, 2009, 7:22:11 AM8/12/09
to
2009/8/12 venkatgiri <venkat...@globaledgesoft.com>:
> xyz::=3D SEQUENCE {
> =A0a =A0 =A0 InetAddressType, =A0MAX-ACCESS read-create
> =A0b =A0 =A0 InetAddress, =A0MAX-ACCESS read-create
> =A0d =A0 =A0 RowStatus, MAX-ACCESS read-create
> =A0}

> If SNMP SET command given for the object "b", then what data type i
> should use.

> 2. =A0snmpset ......localhost =A0 b.1 x oxco100a16

That looks like the most appropriate syntax,
since InetAddress is a binary string type.

Dave

---------------------------------------------------------------------------=
---
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day =

trial. Simplify your report design, integration and deployment - and focus =
on =

what you do best, core application coding. Discover what's new with =

venkatgiri

unread,
Aug 12, 2009, 7:33:25 AM8/12/09
to
This is a multi-part message in MIME format.
--===============0205509466086691470==
Content-Type: multipart/alternative;
boundary="------------040401090802030409090908"

This is a multi-part message in MIME format.
--------------040401090802030409090908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,
thanks for the reply, but i have a question on this,

This looks like i am giving extra work to the user who is giving the
SNMP SET command, is this right? If he wants to set an IP address, he
has convert it to network byte order and then give it in binary string.

the data type InetAddress is [octet string of 0 to 255 length], the
agent can covert this to network byte order and store it in the binary
string, is this correct behavior or not?
when the user is given like


snmpset ..... localhost b.1 s "192.16.10.14 "

I don;t the things.

--
Regards,
Venkat


Dave Shield wrote:
> 2009/8/12 venkatgiri <venkat...@globaledgesoft.com>:


>
>> xyz::= SEQUENCE {
>> a InetAddressType, MAX-ACCESS read-create
>> b InetAddress, MAX-ACCESS read-create
>> d RowStatus, MAX-ACCESS read-create
>> }

>> If SNMP SET command given for the object "b", then what data type i
>> should use.
>>
>
>

>> 2. snmpset ......localhost b.1 x oxco100a16


>>
>
> That looks like the most appropriate syntax,
> since InetAddress is a binary string type.
>
> Dave
>
>


--------------040401090802030409090908
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
thanks for the reply, but i have a question on this,<br>
<br>
This looks like i am giving extra work to the user who is giving the
SNMP SET command, is this right? If he wants to set an IP address, he
has convert it to network byte order and then give it in binary string.<br>
<br>
the data type InetAddress is [octet string of 0 to 255 length], the
agent can covert this to network byte order and store it in the binary
string, is this correct behavior or not? <br>
when the user is given like<br>
snmpset&nbsp; ..... localhost&nbsp;&nbsp; b.1 s "192.16.10.14 "
<br>
<br>
I don;t the things.<br>
<pre class="moz-signature" cols="72">--
Regards,
Venkat</pre>
<br>
Dave Shield wrote:
<blockquote
cite="mid:c64ae3380908120417s3e0...@mail.gmail.com"
type="cite">
<pre wrap="">2009/8/12 venkatgiri <a class="moz-txt-link-rfc2396E" href="mailto:venkat...@globaledgesoft.com">&lt;venkat...@globaledgesoft.com&gt;</a>:
</pre>
<blockquote type="cite">
<pre wrap="">xyz::= SEQUENCE {
&nbsp;a &nbsp; &nbsp; InetAddressType, &nbsp;MAX-ACCESS read-create
&nbsp;b &nbsp; &nbsp; InetAddress, &nbsp;MAX-ACCESS read-create
&nbsp;d &nbsp; &nbsp; RowStatus, MAX-ACCESS read-create
&nbsp;}


If SNMP SET command given for the object "b", then what data type i
should use.

</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">2. &nbsp;snmpset ......localhost &nbsp; b.1 x oxco100a16
</pre>
</blockquote>
<pre wrap=""><!---->


That looks like the most appropriate syntax,
since InetAddress is a binary string type.

Dave

</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>

--------------040401090802030409090908--


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

------------------------------------------------------------------------------


Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day

trial. Simplify your report design, integration and deployment - and focus on

what you do best, core application coding. Discover what's new with

Crystal Reports now. http://p.sf.net/sfu/bobj-july

--===============0205509466086691470==
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

--===============0205509466086691470==--

Dave Shield

unread,
Aug 12, 2009, 10:29:16 AM8/12/09
to
2009/8/12 venkatgiri <venkat...@globaledgesoft.com>:

> This looks like i am giving extra work to the user who is giving the SNMP
> SET command, is this right? If he wants to set an IP address, he has convert
> it to network byte order and then give it in binary string.

Not quite.
That's the format which the agent is expecting, so the management
application needs to provide the address in this form, yes.
But that doesn't necessarily mean that the *user* needs to worry
about this level of detail. If you are providing a suitable management
interface, then that can accept the address in whatever form is most
convenient, and convert it into the binary format internally.

Remember that the Net-SNMP suite is primarily a programming toolkit
(plus an SNMP agent). We do not claim to provide advanced client
tools - the command line applications are mostly simple low-level
interfaces to the basic protocol operations. If you need anything more,
then you'll need to develop these yourself.

> the data type InetAddress is [octet string of 0 to 255 length], the agent
> can covert this to network byte order and store it in the binary string, is
> this correct behavior or not?

No.
The agent is expecting to *receive* the request in the appropriate format.
That's the responsibility of the client application. You can't push this
responsibility onto the agent.
Remember, this is the *SIMPLE* Network Management Protocol.
This means that what you can ask for is limited, and what you can
expect the agent to do is limited. Anything complicated is the responsibility
of the management applications.

Dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july

0 new messages