This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Where is tvb_length() defined?

1

I've been grepping through the entire code base to find for the definition of tvb_length() but it is too widely used. The only definition I found is the variable ##define tvb_length tvb_captured_length in epan/tvbuff.h. The reason for asking is because I see many instances of tvb_length(tvb) but I don't know which file was included that has it.

asked 12 May '14, 18:52

drum's gravatar image

drum
21114
accept rate: 0%

edited 12 May '14, 18:55


One Answer:

3

tvb_length() has been renamed to be tvb_captured_length() [which is defined in epan/tvbuff.c]

tvbuff.h has the declaration for tvb_captured_length()

The #define tvb_length tvb_captured_length in tvbuff.h is so that existing (unchanged) code will still compile.

answered 12 May '14, 20:01

Bill%20Meier's gravatar image

Bill Meier ♦♦
3.2k1850
accept rate: 17%

edited 12 May '14, 20:04