snmp message length

This is a discussion on snmp message length within the SNMP Coders forums, part of the Networking and Network Related category; Hi, I'm new here. First of all - I'm snmp beginner (than sorry for my -maybe- simple question). I'...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-13-2007
Mike
 
Posts: n/a
Default snmp message length

Hi,
I'm new here. First of all - I'm snmp beginner (than sorry for my
-maybe- simple question). I'm coding a snmp tool, but I have a problem
with describe a length of snmp message. SNMP message begins as follows:

// this is snmpv1 trap pdu
30 82 01 17 02 01
00 04 06 70 75 62 6c 69 63 a4 82 01 08 06 0d 2b ... etc.

whole frame is 280bytes long:
first four bytes:
30 - sequence
82 -> (0x82 & 0x7f)*0x80 => 2 * 0x80 = 0x100 (8th bit is set)
01 -> 0x100 + 0x01 = 0x101 (257d) // 8th bit is not set - so - we
should finish calculating length here .. but
17 -> 0x101 + 0x17 = 0x118 (280d) - this is our proper length
WHY length 280d is coded in three bytes? And why in that way?
Normally - I think - this should be coded as follows:
0x82
0x18

This situation (length coded in 3 bytes) is only on the beginning of
snmp frame. In PDU (eg. trap pdu) - length is coded in 2 bytes (if 8th
bit is set - value > 127d). Maybe this is normal, but I can't find
information about it.

ehh, sorry for my english :)

Thanks in advance,
--
..:Mike:.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:31 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0