tvb_get_letohs() or tvb_get_bits16() is not working properly on ubuntu(little endian machine)
Hi,
we are migrating one of the existing plugin code from wireshark 1x to wireshark 2x. we have used tvb_get_ntohs() in existing code but it looks like it is invalid in 2x so tried to replace it with tvb_get_bits16/tvb_get_letohs() but it is not able to read 2 bytes of data properly.
ex:
dissect()
case NRACH_INDICATION:
{
//length = tvb_get_ntohs(tvb, offset ); // this is 1x code
length = tvb_get_bits16(tvb, offset, 16, ENC_LITTLE_ENDIAN); or length = tvb_get_letohs(tvb, offset );
}
}
please let me know the issue of the above api calls.