Getting following error while make :

error: implicit declaration of function 'tvb_get_guint16'

error: implicit declaration of function 'tvb_get_guint24'

What library i will have to include to fix this ?

asked 10 Jun '12, 09:10

yogeshg's gravatar image

yogeshg
41192126
accept rate: 0%


You are calling a function that does not exist, hence the error message. In tvbuff.c only tvb_get_guint8() is defined.

What are you trying to do? Please post the part of your code, where you call those functions.

Regards
Kurt

link

answered 10 Jun '12, 10:32

Kurt%20Knochner's gravatar image

Kurt Knochner
8.3k51875
accept rate: 15%

actually i was trying to read 16 bits or 24 bits , and i googled and found these functions used in some dissector by someone. Anyways i have fixed it now , i am using "tvb_get_ntohs" and "tvb_get_ntoh24". Anyways thanks for reply.

(10 Jun '12, 10:42) yogeshg

Yes. For an 8-bit quantity, "big-endian" ("host byte order") and "little-endian" are the same, but for any integral quantity bigger than 8 bits, the byte order matters. If there were tvb_get_guint16() or tvb_get_guint24() or... routines, they would have to take an argument specifying the byte order; Wireshark, instead, has separate routines to fetch big-endian (tvb_getntoh...) and little-endian (tvb_getletoh...) values.

(10 Jun '12, 15:02) Guy Harris ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×469
×214

Asked: 10 Jun '12, 09:10

Seen: 940 times

Last updated: 10 Jun '12, 15:02

powered by OSQA