Link to home
Start Free TrialLog in
Avatar of Carrie Miles
Carrie Miles

asked on

How to convert UDP header to Decimal

I'm studying for my GSEC exam and one practice question has me stumped!  It should be easy but I'm just not grasping it.

The questions is What is the length in bytes of the UDP datagram in this UDP header?

04 1a 00 a1 00 55 db 51

I know 00 55 is the datagram.  And I know the answer is 85.  However, I have no idea why the answer is 85.

This should be a hex to decimal conversion correct?

Thank you!!
Avatar of Dave Howe
Dave Howe
Flag of United Kingdom of Great Britain and Northern Ireland image

if you look here you will see that the 5th and sixth byte are the length. this is 0x0055 which in decimal is 85

the double byte pairs are, in order:
0x041A (source port) = 1050
0x00A1 (dest port) = 161 (SNMP)
0x0055 (length) 85
oxDB51 (checksum) = 56145 (although this doesn't matter, and should be left in hex)
Avatar of Carrie Miles
Carrie Miles

ASKER

Thank you, but how does it convert to 85 please?
ASKER CERTIFIED SOLUTION
Avatar of Dave Howe
Dave Howe
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you so much!!