diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
commit | 9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch) | |
tree | 2784370cda9bbf2da9114d70f05399c0b229d28c /epan/osi-utils.c | |
parent | Adding debian version 4.2.6-1. (diff) | |
download | wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/osi-utils.c')
-rw-r--r-- | epan/osi-utils.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/epan/osi-utils.c b/epan/osi-utils.c index a03b4567..7e551e04 100644 --- a/epan/osi-utils.c +++ b/epan/osi-utils.c @@ -23,29 +23,29 @@ #include "address.h" #include "address_types.h" -static void print_nsap_net_buf( const guint8 *, int, gchar *, int); -static void print_area_buf ( const guint8 *, int, gchar *, int); -static void print_address_prefix_buf ( const guint8 *, int, gchar *, int); +static void print_nsap_net_buf( const uint8_t *, int, char *, int); +static void print_area_buf ( const uint8_t *, int, char *, int); +static void print_address_prefix_buf ( const uint8_t *, int, char *, int); /* * XXX - shouldn't there be a centralized routine for dissecting NSAPs? * See also "dissect_atm_nsap()" in epan/dissectors/packet-arp.c and * "dissect_nsap()" in epan/dissectors/packet-isup.c. */ -gchar * -print_nsap_net( wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, int length ) +char * +print_nsap_net( wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, int length ) { - gchar *cur; + char *cur; - cur = (gchar *)wmem_alloc(scope, MAX_NSAP_LEN * 3 + 50); + cur = (char *)wmem_alloc(scope, MAX_NSAP_LEN * 3 + 50); print_nsap_net_buf( tvb_get_ptr(tvb, offset, length), length, cur, MAX_NSAP_LEN * 3 + 50); return( cur ); } static void -print_nsap_net_buf( const guint8 *ad, int length, gchar *buf, int buf_len) +print_nsap_net_buf( const uint8_t *ad, int length, char *buf, int buf_len) { - gchar *cur; + char *cur; /* to do : NSAP / NET decoding */ @@ -71,26 +71,26 @@ print_nsap_net_buf( const guint8 *ad, int length, gchar *buf, int buf_len) } } /* print_nsap */ -gchar * -print_system_id(wmem_allocator_t* scope, const guint8 *ad, int length ) +char * +print_system_id(wmem_allocator_t* scope, const uint8_t *ad, int length ) { - gchar *cur; + char *cur; - cur = (gchar *)wmem_alloc(scope, MAX_SYSTEMID_LEN * 3 + 5); + cur = (char *)wmem_alloc(scope, MAX_SYSTEMID_LEN * 3 + 5); print_system_id_buf(ad, length, cur, MAX_SYSTEMID_LEN * 3 + 5); return( cur ); } -gchar * -tvb_print_system_id( wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, int length ) +char * +tvb_print_system_id( wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, int length ) { return( print_system_id(scope, tvb_get_ptr(tvb, offset, length), length) ); } void -print_system_id_buf( const guint8 *ad, int length, gchar *buf, int buf_len) +print_system_id_buf( const uint8_t *ad, int length, char *buf, int buf_len) { - gchar *cur; + char *cur; int tmp; if ( ( length <= 0 ) || ( length > MAX_SYSTEMID_LEN ) ) { @@ -132,12 +132,12 @@ print_system_id_buf( const guint8 *ad, int length, gchar *buf, int buf_len) } } -gchar * -print_area(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, int length) +char * +print_area(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, int length) { - gchar *cur; + char *cur; - cur = (gchar *)wmem_alloc(scope, MAX_AREA_LEN * 3 + 20); + cur = (char *)wmem_alloc(scope, MAX_AREA_LEN * 3 + 20); print_area_buf(tvb_get_ptr(tvb, offset, length), length, cur, MAX_AREA_LEN * 3 + 20); return cur; } @@ -145,12 +145,12 @@ print_area(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, int length /* * Note: length is in units of half-octets. */ -gchar * -print_address_prefix(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, int length) +char * +print_address_prefix(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, int length) { - gchar *cur; + char *cur; - cur = (gchar *)wmem_alloc(scope, MAX_AREA_LEN * 3 + 20); + cur = (char *)wmem_alloc(scope, MAX_AREA_LEN * 3 + 20); print_address_prefix_buf(tvb_get_ptr(tvb, offset, (length+1)/2), length, cur, MAX_AREA_LEN * 3 + 20); return cur; } @@ -159,7 +159,7 @@ print_address_prefix(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, * Note: length is in units of octets. */ static void -print_area_buf(const guint8 *ad, int length, gchar *buf, int buf_len) +print_area_buf(const uint8_t *ad, int length, char *buf, int buf_len) { print_address_prefix_buf(ad, length*2, buf, buf_len); } @@ -168,9 +168,9 @@ print_area_buf(const guint8 *ad, int length, gchar *buf, int buf_len) * Note: length is in units of half-octets. */ static void -print_address_prefix_buf(const guint8 *ad, int length, gchar *buf, int buf_len) +print_address_prefix_buf(const uint8_t *ad, int length, char *buf, int buf_len) { - gchar *cur; + char *cur; int tmp = 0; /* to do : all real area decoding now: NET is assumed if id len is 1 more byte @@ -266,9 +266,9 @@ print_address_prefix_buf(const guint8 *ad, int length, gchar *buf, int buf_len) ******************************************************************************/ static int osi_address_type = -1; -static int osi_address_to_str(const address* addr, gchar *buf, int buf_len) +static int osi_address_to_str(const address* addr, char *buf, int buf_len) { - print_nsap_net_buf((const guint8 *)addr->data, addr->len, buf, buf_len); + print_nsap_net_buf((const uint8_t *)addr->data, addr->len, buf, buf_len); return (int)strlen(buf)+1; } |