diff options
-rw-r--r-- | wiretap/buffer.c | 10 | ||||
-rw-r--r-- | wiretap/buffer.h | 10 | ||||
-rw-r--r-- | wiretap/i4btrace.c | 6 | ||||
-rw-r--r-- | wiretap/nettl.c | 10 | ||||
-rw-r--r-- | wiretap/ngsniffer.c | 6 | ||||
-rw-r--r-- | wiretap/radcom.c | 6 | ||||
-rw-r--r-- | wiretap/snoop.c | 6 |
7 files changed, 28 insertions, 26 deletions
diff --git a/wiretap/buffer.c b/wiretap/buffer.c index dc7ee39735..20b970b59b 100644 --- a/wiretap/buffer.c +++ b/wiretap/buffer.c @@ -1,6 +1,6 @@ /* buffer.c * - * $Id: buffer.c,v 1.7 2000/01/22 06:22:36 guy Exp $ + * $Id: buffer.c,v 1.8 2000/07/26 00:20:08 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -27,6 +27,8 @@ #include <string.h> #include <glib.h> +#include <sys/types.h> + #include "buffer.h" /* Initializes a buffer with a certain amount of allocated space */ @@ -85,7 +87,7 @@ void buffer_assure_space(Buffer* buffer, unsigned int space) buffer->data = (char*)g_realloc(buffer->data, buffer->allocated); } -void buffer_append(Buffer* buffer, char *from, unsigned int bytes) +void buffer_append(Buffer* buffer, u_char *from, unsigned int bytes) { buffer_assure_space(buffer, bytes); memcpy(buffer->data + buffer->first_free, from, bytes); @@ -123,14 +125,14 @@ unsigned int buffer_length(Buffer* buffer) #endif #ifndef SOME_FUNCTIONS_ARE_DEFINES -char* buffer_start_ptr(Buffer* buffer) +u_char* buffer_start_ptr(Buffer* buffer) { return buffer->data + buffer->start; } #endif #ifndef SOME_FUNCTIONS_ARE_DEFINES -char* buffer_end_ptr(Buffer* buffer) +u_char* buffer_end_ptr(Buffer* buffer) { return buffer->data + buffer->first_free; } diff --git a/wiretap/buffer.h b/wiretap/buffer.h index cbf25179ee..9daf2caab8 100644 --- a/wiretap/buffer.h +++ b/wiretap/buffer.h @@ -1,6 +1,6 @@ /* buffer.h * - * $Id: buffer.h,v 1.4 2000/01/22 06:22:36 guy Exp $ + * $Id: buffer.h,v 1.5 2000/07/26 00:20:09 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -25,7 +25,7 @@ typedef struct Buffer { - char *data; + u_char *data; unsigned int allocated; unsigned int start; unsigned int first_free; @@ -35,7 +35,7 @@ typedef struct Buffer { void buffer_init(Buffer* buffer, unsigned int space); void buffer_free(Buffer* buffer); void buffer_assure_space(Buffer* buffer, unsigned int space); -void buffer_append(Buffer* buffer, char *from, unsigned int bytes); +void buffer_append(Buffer* buffer, u_char *from, unsigned int bytes); void buffer_remove_start(Buffer* buffer, unsigned int bytes); #ifdef SOME_FUNCTIONS_ARE_DEFINES @@ -46,6 +46,6 @@ void buffer_remove_start(Buffer* buffer, unsigned int bytes); #else void buffer_increase_length(Buffer* buffer, unsigned int bytes); unsigned int buffer_length(Buffer* buffer); - char* buffer_start_ptr(Buffer* buffer); - char* buffer_end_ptr(Buffer* buffer); + u_char* buffer_start_ptr(Buffer* buffer); + u_char* buffer_end_ptr(Buffer* buffer); #endif diff --git a/wiretap/i4btrace.c b/wiretap/i4btrace.c index 115fc76017..e15d9f5cf7 100644 --- a/wiretap/i4btrace.c +++ b/wiretap/i4btrace.c @@ -1,6 +1,6 @@ /* i4btrace.c * - * $Id: i4btrace.c,v 1.7 2000/05/19 23:06:50 gram Exp $ + * $Id: i4btrace.c,v 1.8 2000/07/26 00:20:08 guy Exp $ * * Wiretap Library * Copyright (c) 1999 by Bert Driehuis <driehuis@playbeing.org> @@ -37,7 +37,7 @@ static int i4btrace_seek_read(wtap *wth, int seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length); static int i4b_read_rec_header(FILE_T fh, i4b_trace_hdr_t *hdr, int *err); static void i4b_byte_swap_header(wtap *wth, i4b_trace_hdr_t *hdr); -static int i4b_read_rec_data(FILE_T fh, char *pd, int length, int *err); +static int i4b_read_rec_data(FILE_T fh, u_char *pd, int length, int *err); /* * Test some fields in the header to see if they make sense. @@ -262,7 +262,7 @@ i4b_byte_swap_header(wtap *wth, i4b_trace_hdr_t *hdr) } static int -i4b_read_rec_data(FILE_T fh, char *pd, int length, int *err) +i4b_read_rec_data(FILE_T fh, u_char *pd, int length, int *err) { int bytes_read; diff --git a/wiretap/nettl.c b/wiretap/nettl.c index 6597a97260..cd57ef2889 100644 --- a/wiretap/nettl.c +++ b/wiretap/nettl.c @@ -1,6 +1,6 @@ /* nettl.c * - * $Id: nettl.c,v 1.13 2000/05/19 23:06:57 gram Exp $ + * $Id: nettl.c,v 1.14 2000/07/26 00:20:08 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -32,10 +32,10 @@ #include "buffer.h" #include "nettl.h" -static char nettl_magic_hpux9[12] = { +static u_char nettl_magic_hpux9[12] = { 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD0, 0x00 }; -static char nettl_magic_hpux10[12] = { +static u_char nettl_magic_hpux10[12] = { 0x54, 0x52, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }; @@ -70,7 +70,7 @@ static int nettl_seek_read(wtap *wth, int seek_off, static int nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, union wtap_pseudo_header *pseudo_header, int *err); -static int nettl_read_rec_data(FILE_T fh, char *pd, int length, int *err); +static int nettl_read_rec_data(FILE_T fh, u_char *pd, int length, int *err); static void nettl_close(wtap *wth); int nettl_open(wtap *wth, int *err) @@ -289,7 +289,7 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, } static int -nettl_read_rec_data(FILE_T fh, char *pd, int length, int *err) +nettl_read_rec_data(FILE_T fh, u_char *pd, int length, int *err) { int bytes_read; diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 14bb13da29..8f941b18bf 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1,6 +1,6 @@ /* ngsniffer.c * - * $Id: ngsniffer.c,v 1.46 2000/06/28 03:58:52 guy Exp $ + * $Id: ngsniffer.c,v 1.47 2000/07/26 00:20:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -266,7 +266,7 @@ static int ngsniffer_read_frame4(wtap *wth, FILE_T fh, static void set_pseudo_header_frame4(union wtap_pseudo_header *pseudo_header, struct frame4_rec *frame4); static int ngsniffer_read_rec_data(wtap *wth, FILE_T fh, - ngsniffer_comp_stream_t *comp_stream, char *pd, int length, int *err); + ngsniffer_comp_stream_t *comp_stream, u_char *pd, int length, int *err); static void ngsniffer_sequential_close(wtap *wth); static void ngsniffer_close(wtap *wth); static gboolean ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, @@ -853,7 +853,7 @@ static void set_pseudo_header_frame4(union wtap_pseudo_header *pseudo_header, } static int ngsniffer_read_rec_data(wtap *wth, FILE_T fh, - ngsniffer_comp_stream_t *comp_stream, char *pd, int length, int *err) + ngsniffer_comp_stream_t *comp_stream, u_char *pd, int length, int *err) { int bytes_read; diff --git a/wiretap/radcom.c b/wiretap/radcom.c index dfeb0ea5be..8dacf53650 100644 --- a/wiretap/radcom.c +++ b/wiretap/radcom.c @@ -1,6 +1,6 @@ /* radcom.c * - * $Id: radcom.c,v 1.23 2000/05/19 23:07:01 gram Exp $ + * $Id: radcom.c,v 1.24 2000/07/26 00:20:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -72,7 +72,7 @@ static int radcom_seek_read(wtap *wth, int seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length); static int radcom_read_rec_header(FILE_T fh, struct radcomrec_hdr *hdr, int *err); -static int radcom_read_rec_data(FILE_T fh, char *pd, int length, int *err); +static int radcom_read_rec_data(FILE_T fh, u_char *pd, int length, int *err); int radcom_open(wtap *wth, int *err) { @@ -336,7 +336,7 @@ radcom_read_rec_header(FILE_T fh, struct radcomrec_hdr *hdr, int *err) } static int -radcom_read_rec_data(FILE_T fh, char *pd, int length, int *err) +radcom_read_rec_data(FILE_T fh, u_char *pd, int length, int *err) { int bytes_read; diff --git a/wiretap/snoop.c b/wiretap/snoop.c index 5f2b6ce868..3d247bce21 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -1,6 +1,6 @@ /* snoop.c * - * $Id: snoop.c,v 1.28 2000/05/19 23:07:02 gram Exp $ + * $Id: snoop.c,v 1.29 2000/07/26 00:20:06 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -60,7 +60,7 @@ static int snoop_seek_read(wtap *wth, int seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length); static int snoop_read_atm_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header, int *err); -static int snoop_read_rec_data(FILE_T fh, char *pd, int length, int *err); +static int snoop_read_rec_data(FILE_T fh, u_char *pd, int length, int *err); static gboolean snoop_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, const union wtap_pseudo_header *pseudo_header, const u_char *pd, int *err); @@ -384,7 +384,7 @@ snoop_read_atm_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header, } static int -snoop_read_rec_data(FILE_T fh, char *pd, int length, int *err) +snoop_read_rec_data(FILE_T fh, u_char *pd, int length, int *err) { int bytes_read; |