diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-04-03 11:56:50 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-04-03 18:57:26 +0000 |
commit | c750846e815ff4dededd9e9cce4a0a9be43c7878 (patch) | |
tree | ec8214d6be195c19493745316f783b9c04ab5075 /doc/README.dissector | |
parent | 23b3ea14693f68b3cf7b5363feb1e2fe654c4381 (diff) |
Document all the signed-integer tvbuff accessors.
Reorganize the lists of accessors, with a top-level heading for the byte
order and subheadings for each size.
Also document ENC_HOST_ENDIAN.
Change-Id: I10131e399f6c90624a387c89340f77ea769ab33f
Reviewed-on: https://code.wireshark.org/review/32701
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'doc/README.dissector')
-rw-r--r-- | doc/README.dissector | 111 |
1 files changed, 90 insertions, 21 deletions
diff --git a/doc/README.dissector b/doc/README.dissector index f012d281eb..2dd67304b3 100644 --- a/doc/README.dissector +++ b/doc/README.dissector @@ -223,72 +223,141 @@ guint16 tvb_get_bits16(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, c guint32 tvb_get_bits32(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, const guint encoding); guint64 tvb_get_bits64(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, const guint encoding); -Single-byte accessor: +Single-byte accessors for 8-bit unsigned integers (guint8) and 8-bit +signed integers (gint8): guint8 tvb_get_guint8(tvbuff_t *tvb, const gint offset); +gint8 tvb_get_gint8(tvbuff_t *tvb, const gint offset); -Network-to-host-order accessors for 16-bit integers (guint16), 24-bit -integers, 32-bit integers (guint32), 40-bit integers, 48-bit integers, -56-bit integers and 64-bit integers (guint64): +Network-to-host-order accessors: + +16-bit unsigned (guint16) and signed (gint16) integers: guint16 tvb_get_ntohs(tvbuff_t *tvb, const gint offset); +gint16 tvb_get_ntohis(tvbuff_t *tvb, const gint offset); + +24-bit unsigned and signed integers: + guint32 tvb_get_ntoh24(tvbuff_t *tvb, const gint offset); +gint32 tvb_get_ntohi24(tvbuff_t *tvb, const gint offset); + +32-bit unsgined (guint32) and signed (gint32) integers: + guint32 tvb_get_ntohl(tvbuff_t *tvb, const gint offset); +gint32 tvb_get_ntohil(tvbuff_t *tvb, const gint offset); + +40-bit unsigned and signed integers: + guint64 tvb_get_ntoh40(tvbuff_t *tvb, const gint offset); +gint64 tvb_get_ntohi40(tvbuff_t *tvb, const gint offset); + +48-bit unsigned and signed integers: + guint64 tvb_get_ntoh48(tvbuff_t *tvb, const gint offset); +gint64 tvb_get_ntohi48(tvbuff_t *tvb, const gint offset); + +56-bit unsigned and signed integers: + guint64 tvb_get_ntoh56(tvbuff_t *tvb, const gint offset); +gint64 tvb_get_ntohi56(tvbuff_t *tvb, const gint offset); + +64-bit unsigned (guint64) and signed (gint64) integers: + guint64 tvb_get_ntoh64(tvbuff_t *tvb, const gint offset); +gint64 tvb_get_ntohi64(tvbuff_t *tvb, const gint offset); -Network-to-host-order accessors for single-precision and -double-precision IEEE floating-point numbers: +Single-precision and double-precision IEEE floating-point numbers: gfloat tvb_get_ntohieee_float(tvbuff_t *tvb, const gint offset); gdouble tvb_get_ntohieee_double(tvbuff_t *tvb, const gint offset); -Little-Endian-to-host-order accessors for 16-bit integers (guint16), -24-bit integers, 32-bit integers (guint32), 40-bit integers, 48-bit -integers, 56-bit integers, and 64-bit integers (guint64): +Little-Endian-to-host-order accessors: + +16-bit unsigned (guint16) and signed (gint16) integers: guint16 tvb_get_letohs(tvbuff_t *tvb, const gint offset); +gint16 tvb_get_letohis(tvbuff_t *tvb, const gint offset); + +24-bit unsigned and signed integers: + guint32 tvb_get_letoh24(tvbuff_t *tvb, const gint offset); +gint32 tvb_get_letohi24(tvbuff_t *tvb, const gint offset); + +32-bit unsigned (guint32) and signed (gint32) integers: + guint32 tvb_get_letohl(tvbuff_t *tvb, const gint offset); +gint32 tvb_get_letohil(tvbuff_t *tvb, const gint offset); + +40-bit unsigned and signed integers: + guint64 tvb_get_letoh40(tvbuff_t *tvb, const gint offset); +gint64 tvb_get_letohi40(tvbuff_t *tvb, const gint offset); + +48-bit unsigned and signed integers: + guint64 tvb_get_letoh48(tvbuff_t *tvb, const gint offset); +gint64 tvb_get_letohi48(tvbuff_t *tvb, const gint offset); + +56-bit unsigned and signed integers: + guint64 tvb_get_letoh56(tvbuff_t *tvb, const gint offset); +gint64 tvb_get_letohi56(tvbuff_t *tvb, const gint offset); + +64-bit unsigned (guint64) and signed (gint64) integers: + guint64 tvb_get_letoh64(tvbuff_t *tvb, const gint offset); +gint64 tvb_get_letohi64(tvbuff_t *tvb, const gint offset); -Little-Endian-to-host-order accessors for single-precision and -double-precision IEEE floating-point numbers: +Single-precision and double-precision IEEE floating-point numbers: gfloat tvb_get_letohieee_float(tvbuff_t *tvb, const gint offset); gdouble tvb_get_letohieee_double(tvbuff_t *tvb, const gint offset); -Encoding-to_host-order accessors for 16-bit integers (guint16), -24-bit integers, 32-bit integers (guint32), 40-bit integers, 48-bit -integers, 56-bit integers, and 64-bit integers (guint64): +Encoding-to_host-order accessors: + +16-bit unsigned (guint16) and signed (gint16) integers: guint16 tvb_get_guint16(tvbuff_t *tvb, const gint offset, const guint encoding); +gint16 tvb_get_gint16(tvbuff_t *tvb, const gint offset, const guint encoding); + +24-bit unsigned and signed integers: + guint32 tvb_get_guint24(tvbuff_t *tvb, const gint offset, const guint encoding); +gint32 tvb_get_gint24(tvbuff_t *tvb, const gint offset, const guint encoding); + +32-bit unsigned (guint32) and signed (gint32) integers: + guint32 tvb_get_guint32(tvbuff_t *tvb, const gint offset, const guint encoding); +gint32 tvb_get_gint32(tvbuff_t *tvb, const gint offset, const guint encoding); + +40-bit unsigned and signed integers: + guint64 tvb_get_guint40(tvbuff_t *tvb, const gint offset, const guint encoding); gint64 tvb_get_gint40(tvbuff_t *tvb, const gint offset, const guint encoding); + +48-bit unsigned and signed integers: + guint64 tvb_get_guint48(tvbuff_t *tvb, const gint offset, const guint encoding); gint64 tvb_get_gint48(tvbuff_t *tvb, const gint offset, const guint encoding); + +56-bit unsigned and signed integers: + guint64 tvb_get_guint56(tvbuff_t *tvb, const gint offset, const guint encoding); gint64 tvb_get_gint56(tvbuff_t *tvb, const gint offset, const guint encoding); -guint64 tvb_get_guint64(tvbuff_t *tvb, const gint offset, const guint encoding); -"encoding" should be ENC_BIG_ENDIAN for Network-to-host-order and ENC_LITTLE_ENDIAN -for Little-Endian-to-host-order. +64-bit unsigned (guint64) and signed (gint64) integers: + +guint64 tvb_get_guint64(tvbuff_t *tvb, const gint offset, const guint encoding); +gint64 tvb_get_gint64(tvbuff_t *tvb, const gint offset, const guint encoding); -Endian-to-host-order accessors for single-precision and -double-precision IEEE floating-point numbers: +Single-precision and double-precision IEEE floating-point numbers: gfloat tvb_get_ieee_float(tvbuff_t *tvb, const gint offset, const guint encoding); gdouble tvb_get_ieee_double(tvbuff_t *tvb, const gint offset, const guint encoding); -Just as above, "encoding" should be ENC_BIG_ENDIAN for Network-to-host-order and -ENC_LITTLE_ENDIAN for Little-Endian-to-host-order. +"encoding" should be ENC_BIG_ENDIAN for Network-to-host-order, +ENC_LITTLE_ENDIAN for Little-Endian-to-host-order, or ENC_HOST_ENDIAN +for host order. Accessors for IPv4 and IPv6 addresses: |