diff --git a/epan/dissectors/packet-arcnet.c b/epan/dissectors/packet-arcnet.c index c7fbfd1618..7aec361f56 100644 --- a/epan/dissectors/packet-arcnet.c +++ b/epan/dissectors/packet-arcnet.c @@ -28,7 +28,7 @@ #include "packet-arcnet.h" #include #include -#include +#include #include "packet-ip.h" void proto_register_arcnet(void); diff --git a/epan/dissectors/packet-atalk.c b/epan/dissectors/packet-atalk.c index 85300f7128..be2b53db12 100644 --- a/epan/dissectors/packet-atalk.c +++ b/epan/dissectors/packet-atalk.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include "packet-atalk.h" #include "packet-afp.h" diff --git a/epan/dissectors/packet-devicenet.c b/epan/dissectors/packet-devicenet.c index 9631e7afbe..4412654b1d 100644 --- a/epan/dissectors/packet-devicenet.c +++ b/epan/dissectors/packet-devicenet.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "packet-cip.h" void proto_register_devicenet(void); diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 75dc83fb68..2f281be87a 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -99,7 +99,7 @@ #include #include #include -#include +#include #include "packet-wps.h" #include "packet-e212.h" diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index f115d4c18c..e47b0901e7 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -70,7 +70,7 @@ #include #include #include -#include +#include #include #include diff --git a/epan/dissectors/packet-j1939.c b/epan/dissectors/packet-j1939.c index 37cd4afbaa..70b144a970 100644 --- a/epan/dissectors/packet-j1939.c +++ b/epan/dissectors/packet-j1939.c @@ -26,7 +26,7 @@ #include #include -#include +#include void proto_register_j1939(void); void proto_reg_handoff_j1939(void); diff --git a/epan/dissectors/packet-mstp.c b/epan/dissectors/packet-mstp.c index 5e9448c174..d0d63c4949 100644 --- a/epan/dissectors/packet-mstp.c +++ b/epan/dissectors/packet-mstp.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include "packet-mstp.h" void proto_register_mstp(void); diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c index 3e506aa7f0..41fadf98c0 100644 --- a/epan/dissectors/packet-sna.c +++ b/epan/dissectors/packet-sna.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include "wsutil/pint.h" /* diff --git a/epan/to_str-int.h b/epan/to_str-int.h index 29dc88f65c..0013b780b8 100644 --- a/epan/to_str-int.h +++ b/epan/to_str-int.h @@ -25,17 +25,6 @@ #include -/** - * word_to_hex() - * - * Output guint16 hex represetation to 'out', and return pointer after last character (out + 4). - * It always output full representation (padded with 0). - * - * String is not NUL terminated by this routine. - * There needs to be at least 4 bytes in the buffer. - */ -char *word_to_hex(char *out, guint16 word); - /** * word_to_hex_punct() * @@ -59,17 +48,6 @@ char *word_to_hex_punct(char *out, guint16 word, char punct); */ char *word_to_hex_npad(char *out, guint16 word); -/** - * dword_to_hex() - * - * Output guint32 hex represetation to 'out', and return pointer after last character. - * It always output full representation (padded with 0). - * - * String is not NUL terminated by this routine. - * There needs to be at least 8 bytes in the buffer. - */ -char *dword_to_hex(char *out, guint32 dword); - /** * dword_to_hex_punct() * @@ -105,17 +83,6 @@ char *qword_to_hex(char *out, guint64 qword); */ char *qword_to_hex_punct(char *out, guint64 qword, char punct); -/** - * bytes_to_hexstr() - * - * Output hex represetation of guint8 ad array, and return pointer after last character. - * It always output full representation (padded with 0). - * - * String is not NUL terminated by this routine. - * There needs to be at least len * 2 bytes in the buffer. - */ -char *bytes_to_hexstr(char *out, const guint8 *ad, guint32 len); - /** * bytes_to_hexstr_punct() * @@ -174,17 +141,6 @@ char *hex_to_str_back(char *ptr, int len, guint32 value); */ char *hex64_to_str_back(char *ptr, int len, guint64 value); -/** - * uint_to_str_back() - * - * Output guint32 decimal representation backward (last character will be written on ptr - 1), - * and return pointer to first character. - * - * String is not NUL terminated by this routine. - * There needs to be at least 10 bytes in the buffer. - */ -char *uint_to_str_back(char *ptr, guint32 value); - /** * uint64_str_back() * diff --git a/epan/to_str.h b/epan/to_str.h index b89c9059f4..7475b0c672 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -142,6 +142,28 @@ WS_DLL_PUBLIC gchar* tvb_address_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, */ WS_DLL_PUBLIC gchar* tvb_address_var_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, address_type type, const gint offset, int length); +/** + * word_to_hex() + * + * Output guint16 hex represetation to 'out', and return pointer after last character (out + 4). + * It always output full representation (padded with 0). + * + * String is not NUL terminated by this routine. + * There needs to be at least 4 bytes in the buffer. + */ +WS_DLL_PUBLIC char *word_to_hex(char *out, guint16 word); + +/** + * dword_to_hex() + * + * Output guint32 hex represetation to 'out', and return pointer after last character. + * It always output full representation (padded with 0). + * + * String is not NUL terminated by this routine. + * There needs to be at least 8 bytes in the buffer. + */ +WS_DLL_PUBLIC char *dword_to_hex(char *out, guint32 dword); + /** Turn an array of bytes into a string showing the bytes in hex. * * @param scope memory allocation scheme used @@ -164,8 +186,27 @@ WS_DLL_PUBLIC char *bytes_to_str(wmem_allocator_t *scope, const guint8 *bd, int */ WS_DLL_PUBLIC const gchar *bytestring_to_str(wmem_allocator_t *scope, const guint8 *ad, const guint32 len, const char punct); -WS_DLL_PUBLIC char * -bytes_to_hexstr(char *out, const guint8 *ad, guint32 len); +/** + * bytes_to_hexstr() + * + * Output hex represetation of guint8 ad array, and return pointer after last character. + * It always output full representation (padded with 0). + * + * String is not NUL terminated by this routine. + * There needs to be at least len * 2 bytes in the buffer. + */ +WS_DLL_PUBLIC char *bytes_to_hexstr(char *out, const guint8 *ad, guint32 len); + +/** + * uint_to_str_back() + * + * Output guint32 decimal representation backward (last character will be written on ptr - 1), + * and return pointer to first character. + * + * String is not NUL terminated by this routine. + * There needs to be at least 10 bytes in the buffer. + */ +WS_DLL_PUBLIC char *uint_to_str_back(char *ptr, guint32 value); #ifdef __cplusplus }