Replace the types from sys/types.h and netinet/in.h by their glib.h

equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
This commit is contained in:
Jörg Mayer 2002-08-02 23:36:07 +00:00
parent ff72b97ee0
commit 173fe5aef4
266 changed files with 712 additions and 2113 deletions

10
asn1.c
View File

@ -1,7 +1,7 @@
/* asn1.c
* Routines for ASN.1 BER dissection
*
* $Id: asn1.c,v 1.15 2002/06/23 10:32:07 guy Exp $
* $Id: asn1.c,v 1.16 2002/08/02 23:35:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -62,14 +62,6 @@
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <limits.h>
#include <glib.h>

6
asn1.h
View File

@ -1,7 +1,7 @@
/* asn1.h
* Definitions for ASN.1 BER dissection
*
* $Id: asn1.h,v 1.8 2002/06/16 00:53:17 guy Exp $
* $Id: asn1.h,v 1.9 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -91,9 +91,9 @@
* typedef "subid_t".
*/
#if defined(HAVE_UCD_SNMP)
typedef u_long subid_t; /* UCD SNMP */
typedef gulong subid_t; /* UCD SNMP */
#else
typedef u_int subid_t; /* CMU SNMP, libsmi, or nothing */
typedef guint subid_t; /* CMU SNMP, libsmi, or nothing */
#endif
#define ASN1_ERR_NOERROR 0 /* no error */

View File

@ -1,7 +1,7 @@
/* capture-wpcap.c
* Try to load WinPcap DLL at run-time.
*
* $Id: capture-wpcap.c,v 1.1 2001/04/03 05:26:26 gram Exp $
* $Id: capture-wpcap.c,v 1.2 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -45,7 +45,7 @@ gboolean has_wpcap = FALSE;
static char* (*p_pcap_lookupdev) (char *);
static void (*p_pcap_close) (pcap_t *);
static int (*p_pcap_stats) (pcap_t *, struct pcap_stat *);
static int (*p_pcap_dispatch) (pcap_t *, int, pcap_handler, u_char *);
static int (*p_pcap_dispatch) (pcap_t *, int, pcap_handler, guchar *);
static int (*p_pcap_snapshot) (pcap_t *);
static int (*p_pcap_datalink) (pcap_t *);
static int (*p_pcap_setfilter) (pcap_t *, struct bpf_program *);
@ -55,7 +55,7 @@ static int (*p_pcap_compile) (pcap_t *, struct bpf_program *, char *, int,
static int (*p_pcap_lookupnet) (char *, bpf_u_int32 *, bpf_u_int32 *,
char *);
static pcap_t* (*p_pcap_open_live) (char *, int, int, int, char *);
static int (*p_pcap_loop) (pcap_t *, int, pcap_handler, u_char *);
static int (*p_pcap_loop) (pcap_t *, int, pcap_handler, guchar *);
typedef struct {
const char *name;
@ -128,7 +128,7 @@ pcap_stats(pcap_t *a, struct pcap_stat *b)
}
int
pcap_dispatch(pcap_t *a, int b, pcap_handler c, u_char *d)
pcap_dispatch(pcap_t *a, int b, pcap_handler c, guchar *d)
{
g_assert(has_wpcap);
return p_pcap_dispatch(a, b, c, d);
@ -187,7 +187,7 @@ pcap_open_live(char *a, int b, int c, int d, char *e)
}
int
pcap_loop(pcap_t *a, int b, pcap_handler c, u_char *d)
pcap_loop(pcap_t *a, int b, pcap_handler c, guchar *d)
{
g_assert(has_wpcap);
return p_pcap_loop(a, b, c, d);

View File

@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
* $Id: capture.c,v 1.186 2002/07/16 07:15:04 guy Exp $
* $Id: capture.c,v 1.187 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
#ifdef HAVE_LIBPCAP
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
@ -203,8 +199,8 @@ static char *signame(int);
#endif
static void capture_delete_cb(GtkWidget *, GdkEvent *, gpointer);
static void capture_stop_cb(GtkWidget *, gpointer);
static void capture_pcap_cb(u_char *, const struct pcap_pkthdr *,
const u_char *);
static void capture_pcap_cb(guchar *, const struct pcap_pkthdr *,
const guchar *);
static void get_capture_file_io_error(char *, int, const char *, int, gboolean);
static void popup_errmsg(const char *);
static void send_errmsg_to_parent(const char *);
@ -238,7 +234,7 @@ typedef struct _loop_data {
static void adjust_header(loop_data *, struct pcap_hdr *, struct pcaprec_hdr *);
static int pipe_open_live(char *, struct pcap_hdr *, loop_data *, char *, int);
static int pipe_dispatch(int, loop_data *, struct pcap_hdr *, \
struct pcaprec_modified_hdr *, u_char *, char *, int);
struct pcaprec_modified_hdr *, guchar *, char *, int);
#endif
/* Win32 needs the O_BINARY flag for open() */
@ -297,7 +293,7 @@ do_capture(char *capfile_name)
{
char tmpname[128+1];
gboolean is_tempfile;
u_char c;
guchar c;
int i;
guint byte_count;
char *msg;
@ -1231,7 +1227,7 @@ error:
static int
pipe_dispatch(int fd, loop_data *ld, struct pcap_hdr *hdr,
struct pcaprec_modified_hdr *rechdr, u_char *data,
struct pcaprec_modified_hdr *rechdr, guchar *data,
char *errmsg, int errmsgl)
{
struct pcap_pkthdr phdr;
@ -1311,7 +1307,7 @@ pipe_dispatch(int fd, loop_data *ld, struct pcap_hdr *hdr,
phdr.caplen = rechdr->hdr.incl_len;
phdr.len = rechdr->hdr.orig_len;
capture_pcap_cb((u_char *)ld, &phdr, data);
capture_pcap_cb((guchar *)ld, &phdr, data);
ld->pipe_state = STATE_EXPECT_REC_HDR;
return 1;
@ -1394,7 +1390,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
int pipe_fd = -1;
struct pcap_hdr hdr;
struct pcaprec_modified_hdr rechdr;
u_char pcap_data[WTAP_MAX_PACKET_SIZE];
guchar pcap_data[WTAP_MAX_PACKET_SIZE];
#endif
#ifdef MUST_DO_SELECT
int pcap_fd = 0;
@ -1789,7 +1785,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
* "select()" says we can read from it without blocking; go for
* it.
*/
inpkts = pcap_dispatch(pch, 1, capture_pcap_cb, (u_char *) &ld);
inpkts = pcap_dispatch(pch, 1, capture_pcap_cb, (guchar *) &ld);
if (inpkts < 0) {
ld.pcap_err = TRUE;
ld.go = FALSE;
@ -1804,7 +1800,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
}
}
#else
inpkts = pcap_dispatch(pch, 1, capture_pcap_cb, (u_char *) &ld);
inpkts = pcap_dispatch(pch, 1, capture_pcap_cb, (guchar *) &ld);
if (inpkts < 0) {
ld.pcap_err = TRUE;
ld.go = FALSE;
@ -2129,8 +2125,8 @@ kill_capture_child(void)
}
static void
capture_pcap_cb(u_char *user, const struct pcap_pkthdr *phdr,
const u_char *pd)
capture_pcap_cb(guchar *user, const struct pcap_pkthdr *phdr,
const guchar *pd)
{
struct wtap_pkthdr whdr;
union wtap_pseudo_header pseudo_header;

View File

@ -1,7 +1,7 @@
/* column.c
* Routines for handling column preferences
*
* $Id: column.c,v 1.35 2002/01/21 07:36:31 guy Exp $
* $Id: column.c,v 1.36 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,10 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <stdio.h>
#include <string.h>
#include <ctype.h>

View File

@ -1,7 +1,7 @@
/* Edit capture files. We can delete records, adjust timestamps, or
* simply convert from one format to another format.
*
* $Id: editcap.c,v 1.24 2002/06/30 20:28:54 guy Exp $
* $Id: editcap.c,v 1.25 2002/08/02 23:35:46 jmayer Exp $
*
* Originally written by Richard Sharpe.
* Improved by Guy Harris.
@ -24,10 +24,6 @@
#include <sys/time.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <string.h>
#include "wtap.h"
@ -137,8 +133,8 @@ typedef struct {
*/
static void
edit_callback(u_char *user, const struct wtap_pkthdr *phdr, long offset _U_,
union wtap_pseudo_header *pseudo_header, const u_char *buf)
edit_callback(guchar *user, const struct wtap_pkthdr *phdr, long offset _U_,
union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
callback_arg *argp = (callback_arg *)user;
int err;

View File

@ -1,6 +1,6 @@
# -*- python -*-
#
# $Id: ethereal_gen.py,v 1.27 2002/07/17 00:42:40 guy Exp $
# $Id: ethereal_gen.py,v 1.28 2002/08/02 23:35:46 jmayer Exp $
#
# ethereal_gen.py (part of idl2eth)
#
@ -2179,14 +2179,6 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) {
#include <stdlib.h>
#include <gmodule.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif

14
file.c
View File

@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
* $Id: file.c,v 1.284 2002/07/30 10:13:14 guy Exp $
* $Id: file.c,v 1.285 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -60,14 +60,6 @@
#include "strerror.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <epan/epan.h>
#include <epan/filesystem.h>
@ -647,7 +639,7 @@ apply_color_filter(gpointer filter_arg, gpointer argp)
static int
add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
union wtap_pseudo_header *pseudo_header, const u_char *buf,
union wtap_pseudo_header *pseudo_header, const guchar *buf,
gboolean refilter)
{
apply_color_filter_args args;
@ -797,7 +789,7 @@ read_packet(capture_file *cf, long offset)
{
const struct wtap_pkthdr *phdr = wtap_phdr(cf->wth);
union wtap_pseudo_header *pseudo_header = wtap_pseudoheader(cf->wth);
const u_char *buf = wtap_buf_ptr(cf->wth);
const guchar *buf = wtap_buf_ptr(cf->wth);
frame_data *fdata;
int passed;
frame_data *plist_end;

6
file.h
View File

@ -1,7 +1,7 @@
/* file.h
* Definitions for file structures and routines
*
* $Id: file.h,v 1.95 2002/07/16 07:15:04 guy Exp $
* $Id: file.h,v 1.96 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -25,10 +25,6 @@
#ifndef __FILE_H__
#define __FILE_H__
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include "wiretap/wtap.h"
#include <epan/dfilter/dfilter.h>
#include "print.h"

View File

@ -1,6 +1,6 @@
/* follow.c
*
* $Id: follow.c,v 1.29 2002/02/28 19:35:08 gram Exp $
* $Id: follow.c,v 1.30 2002/08/02 23:35:46 jmayer Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
@ -35,10 +35,6 @@
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "follow.h"
@ -48,8 +44,8 @@ FILE* data_out_file = NULL;
gboolean incomplete_tcp_stream = FALSE;
static guint8 ip_address[2][MAX_IPADDR_LEN];
static u_int tcp_port[2];
static u_int bytes_written[2];
static guint tcp_port[2];
static guint bytes_written[2];
static gboolean is_ipv6 = FALSE;
static int check_fragments( int, tcp_stream_chunk * );
@ -114,17 +110,17 @@ build_follow_filter( packet_info *pi ) {
of order packets in a smart way. */
static tcp_frag *frags[2] = { 0, 0 };
static u_long seq[2];
static gulong seq[2];
static guint8 src_addr[2][MAX_IPADDR_LEN];
static u_int src_port[2] = { 0, 0 };
static guint src_port[2] = { 0, 0 };
void
reassemble_tcp( u_long sequence, u_long length, const char* data,
u_long data_length, int synflag, address *net_src,
address *net_dst, u_int srcport, u_int dstport) {
reassemble_tcp( gulong sequence, gulong length, const char* data,
gulong data_length, int synflag, address *net_src,
address *net_dst, guint srcport, guint dstport) {
guint8 srcx[MAX_IPADDR_LEN], dstx[MAX_IPADDR_LEN];
int src_index, j, first = 0, len;
u_long newseq;
gulong newseq;
tcp_frag *tmp_frag;
tcp_stream_chunk sc;
@ -207,7 +203,7 @@ reassemble_tcp( u_long sequence, u_long length, const char* data,
info than we have already seen */
newseq = sequence + length;
if( newseq > seq[src_index] ) {
u_long new_len;
gulong new_len;
/* this one has more than we have seen. let's get the
payload that we have not seen. */
@ -244,7 +240,7 @@ reassemble_tcp( u_long sequence, u_long length, const char* data,
/* out of order packet */
if(data_length > 0 && sequence > seq[src_index] ) {
tmp_frag = (tcp_frag *)malloc( sizeof( tcp_frag ) );
tmp_frag->data = (u_char *)malloc( data_length );
tmp_frag->data = (guchar *)malloc( data_length );
tmp_frag->seq = sequence;
tmp_frag->len = length;
tmp_frag->data_len = data_length;

View File

@ -1,6 +1,6 @@
/* follow.h
*
* $Id: follow.h,v 1.11 2002/01/21 07:36:31 guy Exp $
* $Id: follow.h,v 1.12 2002/08/02 23:35:46 jmayer Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
@ -34,10 +34,10 @@
extern gboolean incomplete_tcp_stream;
typedef struct _tcp_frag {
u_long seq;
u_long len;
u_long data_len;
u_char *data;
gulong seq;
gulong len;
gulong data_len;
guchar *data;
struct _tcp_frag *next;
} tcp_frag;
@ -48,8 +48,8 @@ typedef struct _tcp_stream_chunk {
} tcp_stream_chunk;
char* build_follow_filter( packet_info * );
void reassemble_tcp( u_long, u_long, const char*, u_long, int,
address *, address *, u_int, u_int );
void reassemble_tcp( gulong, gulong, const char*, gulong, int,
address *, address *, guint, guint );
void reset_tcp_reassembly( void );
typedef struct {

View File

@ -2,7 +2,7 @@
* 4.4-Lite-2 Internet checksum routine, modified to take a vector of
* pointers/lengths giving the pieces to be checksummed.
*
* $Id: in_cksum.c,v 1.6 2002/07/21 20:31:21 guy Exp $
* $Id: in_cksum.c,v 1.7 2002/08/02 23:35:46 jmayer Exp $
*/
/*
@ -40,22 +40,10 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <glib.h>
#include "in_cksum.h"
@ -210,7 +198,7 @@ in_cksum_shouldbe(guint16 sum, guint16 computed_sum)
* will be in host byte order, which is what we'll return.
*/
shouldbe = sum;
shouldbe += ntohs(computed_sum);
shouldbe += g_ntohs(computed_sum);
shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
return shouldbe;

View File

@ -1,7 +1,7 @@
/* ipproto.c
* Routines for converting IPv4 protocol/v6 nxthdr field into string
*
* $Id: ipproto.c,v 1.17 2002/01/21 07:36:31 guy Exp $
* $Id: ipproto.c,v 1.18 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,10 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif

View File

@ -1,6 +1,6 @@
/* Combine two dump files, either by appending or by merging by timestamp
*
* $Id: mergecap.c,v 1.9 2002/06/23 10:32:16 guy Exp $
* $Id: mergecap.c,v 1.10 2002/08/02 23:35:46 jmayer Exp $
*
* Written by Scott Renfro <scott@renfro.org> based on
* editcap by Richard Sharpe and Guy Harris
@ -23,10 +23,6 @@
#include <sys/time.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <string.h>
#include "wtap.h"
@ -65,8 +61,8 @@ static out_file_t out_file;
* Routine to write frame to output file
*/
static void
write_frame(u_char *user, const struct wtap_pkthdr *phdr, long offset _U_,
union wtap_pseudo_header *pseudo_header, const u_char *buf)
write_frame(guchar *user, const struct wtap_pkthdr *phdr, long offset _U_,
union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
wtap_dumper *pdh = (wtap_dumper*)user;
int err;
@ -102,7 +98,7 @@ append(int count, in_file_t in_files[], out_file_t *out_file)
for (i = 0; i < count; i++) {
if (!wtap_loop(in_files[i].wth, 0, write_frame,
(u_char*)out_file->pdh, &err)) {
(guchar*)out_file->pdh, &err)) {
fprintf(stderr, "mergecap: Error appending from %s to %s: %s\n",
in_files[i].filename, out_file->filename, wtap_strerror(err));
}
@ -170,7 +166,7 @@ merge(int count, in_file_t in_files[], out_file_t *out_file)
/* write out earliest frame, and fetch another from its
* input file
*/
write_frame((u_char*)out_file->pdh,
write_frame((guchar*)out_file->pdh,
wtap_phdr(in_files[i].wth),
in_files[i].data_offset,
wtap_pseudoheader(in_files[i].wth),

View File

@ -1,7 +1,7 @@
/* packet-aarp.c
* Routines for Appletalk ARP packet disassembly
*
* $Id: packet-aarp.c,v 1.35 2002/02/10 23:48:14 guy Exp $
* $Id: packet-aarp.c,v 1.36 2002/08/02 23:35:46 jmayer Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -28,10 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <stdio.h>
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for afp packet dissection
* Copyright 2002, Didier Gautheron <dgautheron@magic.fr>
*
* $Id: packet-afp.c,v 1.19 2002/07/29 06:35:12 guy Exp $
* $Id: packet-afp.c,v 1.20 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -32,14 +32,6 @@
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif

View File

@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
* $Id: packet-afs.c,v 1.47 2002/06/13 06:43:44 guy Exp $
* $Id: packet-afs.c,v 1.48 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -37,14 +37,6 @@
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for AIM Instant Messenger (OSCAR) dissection
* Copyright 2000, Ralf Hoelzer <ralf@well.com>
*
* $Id: packet-aim.c,v 1.15 2002/07/17 00:42:40 guy Exp $
* $Id: packet-aim.c,v 1.16 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -32,14 +32,6 @@
#include <string.h>
#include <ctype.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>
@ -79,7 +71,7 @@
static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static void get_message( u_char *msg, tvbuff_t *tvb, int msg_offset, int msg_length);
static void get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length);
static int get_buddyname( char *name, tvbuff_t *tvb, int len_offset, int name_offset);
/* Initialize the protocol and registered fields */
@ -107,7 +99,7 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 subtype;
guint8 buddyname_length = 0;
char buddyname[MAX_BUDDYNAME_LENGTH];
u_char msg[1000];
guchar msg[1000];
/* Set up structures we will need to add the protocol subtree and manage it */
proto_item *ti;
@ -486,7 +478,7 @@ static int get_buddyname( char *name, tvbuff_t *tvb, int len_offset, int name_of
}
static void get_message( u_char *msg, tvbuff_t *tvb, int msg_offset, int msg_length)
static void get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length)
{
int i,j,c;
int bracket = FALSE;

View File

@ -2,7 +2,7 @@
* Routines for AJP13 dissection
* Copyright 2002, Christopher K. St. John <cks@distributopia.com>
*
* $Id: packet-ajp13.c,v 1.6 2002/07/17 00:42:40 guy Exp $
* $Id: packet-ajp13.c,v 1.7 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for AODV dissection
* Copyright 2000, Erik Nordström <erik.nordstrom@it.uu.se>
*
* $Id: packet-aodv.c,v 1.2 2002/04/28 20:49:51 guy Exp $
* $Id: packet-aodv.c,v 1.3 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -3,7 +3,7 @@
* Copyright 2002, Antti J. Tuominen <ajtuomin@tml.hut.fi>
* Loosely based on packet-aodv.c.
*
* $Id: packet-aodv6.c,v 1.1 2002/05/29 21:32:10 guy Exp $
* $Id: packet-aodv6.c,v 1.2 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/int-64bit.h>

View File

@ -1,7 +1,7 @@
/* packet-arp.c
* Routines for ARP packet disassembly
*
* $Id: packet-arp.c,v 1.51 2002/03/10 00:05:20 guy Exp $
* $Id: packet-arp.c,v 1.52 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,10 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@ -769,7 +765,7 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* inform resolv.c module of the new discovered addresses */
u_int ip;
guint ip;
const guint8 *mac;
/* add sender address in all cases */

View File

@ -1,7 +1,7 @@
/* packet-ascend.c
* Routines for decoding Lucent/Ascend packet traces
*
* $Id: packet-ascend.c,v 1.30 2002/01/21 07:36:32 guy Exp $
* $Id: packet-ascend.c,v 1.31 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -25,10 +25,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <string.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for AppleTalk packet disassembly: LLAP, DDP, NBP, ATP, ASP,
* RTMP.
*
* $Id: packet-atalk.c,v 1.79 2002/06/29 22:15:41 guy Exp $
* $Id: packet-atalk.c,v 1.80 2002/08/02 23:35:47 jmayer Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -29,14 +29,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include <string.h>
@ -116,15 +108,15 @@ static int hf_ddp_type = -1;
static dissector_handle_t asp_handle;
static int proto_atp = -1;
static int hf_atp_ctrlinfo = -1; /* u_int8_t control information */
static int hf_atp_ctrlinfo = -1; /* guint8_t control information */
static int hf_atp_function = -1; /* bits 7,6 function */
static int hf_atp_xo = -1; /* bit 5 exactly-once */
static int hf_atp_eom = -1; /* bit 4 end-of-message */
static int hf_atp_sts = -1; /* bit 3 send transaction status */
static int hf_atp_treltimer = -1; /* bits 2,1,0 TRel timeout indicator */
static int hf_atp_bitmap = -1; /* u_int8_t bitmap or sequence number */
static int hf_atp_tid = -1; /* u_int16_t transaction id. */
static int hf_atp_bitmap = -1; /* guint8_t bitmap or sequence number */
static int hf_atp_tid = -1; /* guint16_t transaction id. */
static int hf_atp_user_bytes = -1;
static int hf_atp_segments = -1;
@ -1571,10 +1563,10 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&ddp, 0, sizeof(e_ddp));
ddp.dnet=ntohs(ddp.dnet);
ddp.snet=ntohs(ddp.snet);
ddp.sum=ntohs(ddp.sum);
ddp.hops_len=ntohs(ddp.hops_len);
ddp.dnet=g_ntohs(ddp.dnet);
ddp.snet=g_ntohs(ddp.snet);
ddp.sum=g_ntohs(ddp.sum);
ddp.hops_len=g_ntohs(ddp.hops_len);
src.net = ddp.snet;
src.node = ddp.snode;

View File

@ -1,7 +1,7 @@
/* packet-atm.c
* Routines for ATM packet disassembly
*
* $Id: packet-atm.c,v 1.47 2002/06/07 21:11:22 guy Exp $
* $Id: packet-atm.c,v 1.48 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,10 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <stdio.h>
#include <glib.h>
#include <epan/packet.h>
@ -617,7 +613,7 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
static void
capture_lane(const union wtap_pseudo_header *pseudo_header, const u_char *pd,
capture_lane(const union wtap_pseudo_header *pseudo_header, const guchar *pd,
int len, packet_counts *ld)
{
/* Is it LE Control, 802.3, 802.5, or "none of the above"? */
@ -760,7 +756,7 @@ static const value_string ipsilon_type_vals[] = {
};
void
capture_atm(const union wtap_pseudo_header *pseudo_header, const u_char *pd,
capture_atm(const union wtap_pseudo_header *pseudo_header, const guchar *pd,
int len, packet_counts *ld)
{
if (pseudo_header->atm.aal == AAL_5) {

View File

@ -1,6 +1,6 @@
/* packet-atm.h
*
* $Id: packet-atm.h,v 1.7 2002/06/07 21:11:22 guy Exp $
* $Id: packet-atm.h,v 1.8 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -24,7 +24,7 @@
#ifndef __PACKET_ATM_H__
#define __PACKET_ATM_H__
void capture_atm(const union wtap_pseudo_header *, const u_char *, int,
void capture_atm(const union wtap_pseudo_header *, const guchar *, int,
packet_counts *);
#endif

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-auto_rp.c,v 1.20 2002/02/01 12:05:59 guy Exp $
* $Id: packet-auto_rp.c,v 1.21 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -29,14 +29,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for BACnet (APDU) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
* $Id: packet-bacapp.c,v 1.11 2002/07/17 00:42:40 guy Exp $
* $Id: packet-bacapp.c,v 1.12 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -33,14 +33,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for BACnet (NPDU) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
* $Id: packet-bacnet.c,v 1.12 2002/07/17 00:42:40 guy Exp $
* $Id: packet-bacnet.c,v 1.13 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -33,14 +33,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -1,7 +1,7 @@
/* packet-beep.c
* Routines for BEEP packet disassembly
*
* $Id: packet-beep.c,v 1.9 2002/06/13 07:32:32 guy Exp $
* $Id: packet-beep.c,v 1.10 2002/08/02 23:35:47 jmayer Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
* Modified 2001 Darren New <dnew@invisible.net> for BEEP.
@ -32,14 +32,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

View File

@ -2,7 +2,7 @@
* Routines for BGP packet dissection.
* Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
*
* $Id: packet-bgp.c,v 1.59 2002/05/21 21:55:46 guy Exp $
* $Id: packet-bgp.c,v 1.60 2002/08/02 23:35:47 jmayer Exp $
*
* Supports:
* RFC1771 A Border Gateway Protocol 4 (BGP-4)
@ -46,14 +46,6 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@ -549,7 +541,7 @@ dissect_bgp_open(tvbuff_t *tvb, int offset, proto_tree *tree)
{
struct bgp_open bgpo; /* BGP OPEN message */
int hlen; /* message length */
u_int i; /* tmp */
guint i; /* tmp */
int ptype; /* parameter type */
int plen; /* parameter length */
int ctype; /* capability type */
@ -569,17 +561,17 @@ dissect_bgp_open(tvbuff_t *tvb, int offset, proto_tree *tree)
/* snarf OPEN message */
tvb_memcpy(tvb, bgpo.bgpo_marker, offset, BGP_MIN_OPEN_MSG_SIZE);
hlen = ntohs(bgpo.bgpo_len);
hlen = g_ntohs(bgpo.bgpo_len);
proto_tree_add_text(tree, tvb,
offset + offsetof(struct bgp_open, bgpo_version), 1,
"Version: %u", bgpo.bgpo_version);
proto_tree_add_text(tree, tvb,
offset + offsetof(struct bgp_open, bgpo_myas), 2,
"My AS: %u", ntohs(bgpo.bgpo_myas));
"My AS: %u", g_ntohs(bgpo.bgpo_myas));
proto_tree_add_text(tree, tvb,
offset + offsetof(struct bgp_open, bgpo_holdtime), 2,
"Hold time: %u", ntohs(bgpo.bgpo_holdtime));
"Hold time: %u", g_ntohs(bgpo.bgpo_holdtime));
proto_tree_add_text(tree, tvb,
offset + offsetof(struct bgp_open, bgpo_id), 4,
"BGP identifier: %s", ip_to_str((guint8 *)&bgpo.bgpo_id));
@ -1633,7 +1625,7 @@ dissect_bgp_notification(tvbuff_t *tvb, int offset, proto_tree *tree)
/* snarf message */
tvb_memcpy(tvb, bgpn.bgpn_marker, offset, BGP_MIN_NOTIFICATION_MSG_SIZE);
hlen = ntohs(bgpn.bgpn_len);
hlen = g_ntohs(bgpn.bgpn_len);
/* print error code */
proto_tree_add_text(tree, tvb,
@ -1668,7 +1660,7 @@ dissect_bgp_notification(tvbuff_t *tvb, int offset, proto_tree *tree)
static void
dissect_bgp_route_refresh(tvbuff_t *tvb, int offset, proto_tree *tree)
{
u_int i; /* tmp */
guint i; /* tmp */
/* AFI */
i = tvb_get_ntohs(tvb, offset + BGP_HEADER_SIZE);
@ -1700,7 +1692,7 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *bgp1_tree; /* BGP message tree */
int l, i; /* tmp */
int found; /* number of BGP messages in packet */
static u_char marker[] = { /* BGP message marker */
static guchar marker[] = { /* BGP message marker */
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};
@ -1727,7 +1719,7 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
found++;
hlen = ntohs(bgp.bgp_len);
hlen = g_ntohs(bgp.bgp_len);
/*
* Desegmentation check.

View File

@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
* $Id: packet-bootp.c,v 1.68 2002/06/29 19:45:01 guy Exp $
* $Id: packet-bootp.c,v 1.69 2002/08/02 23:35:47 jmayer Exp $
*
* The information used comes from:
* RFC 951: Bootstrap Protocol
@ -39,10 +39,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/int-64bit.h>
@ -146,11 +142,11 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff,
{
char *text;
enum field_type ftype;
u_char code = tvb_get_guint8(tvb, voff);
guchar code = tvb_get_guint8(tvb, voff);
int vlen;
u_char byte;
guchar byte;
int i,optp, consumed;
u_long time_secs;
gulong time_secs;
proto_tree *v_tree;
proto_item *vti;
guint8 protocol;
@ -767,12 +763,12 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff,
case val_u_short:
if (vlen == 2) {
/* one u_short */
/* one gushort */
proto_tree_add_text(bp_tree, tvb, voff, consumed,
"Option %d: %s = %d", code, text,
tvb_get_ntohs(tvb, voff+2));
} else {
/* > 1 u_short */
/* > 1 gushort */
vti = proto_tree_add_text(bp_tree, tvb, voff,
consumed, "Option %d: %s", code, text);
v_tree = proto_item_add_subtree(vti, ett_bootp_option);

View File

@ -1,7 +1,7 @@
/* packet-bootparams.c
* Routines for bootparams dissection
*
* $Id: packet-bootparams.c,v 1.20 2002/04/03 13:24:12 girlich Exp $
* $Id: packet-bootparams.c,v 1.21 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,14 +28,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
@ -78,7 +70,7 @@ dissect_bp_address(tvbuff_t *tvb, int offset, proto_tree *tree, int hfindex)
|((tvb_get_guint8(tvb, offset+11)&0xff)<<8 )
|((tvb_get_guint8(tvb, offset+15)&0xff) );
proto_tree_add_ipv4(tree, hfindex, tvb,
offset, 16, ntohl(ipaddr));
offset, 16, g_ntohl(ipaddr));
offset += 16;
break;

View File

@ -1,7 +1,7 @@
/* packet-bpdu.c
* Routines for BPDU (Spanning Tree Protocol) disassembly
*
* $Id: packet-bpdu.c,v 1.36 2002/05/30 01:56:54 guy Exp $
* $Id: packet-bpdu.c,v 1.37 2002/08/02 23:35:47 jmayer Exp $
*
* Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
*
@ -28,14 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <stdio.h>
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for BACnet/IP (BVLL, BVLC) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
* $Id: packet-bvlc.c,v 1.11 2002/07/17 00:42:40 guy Exp $
* $Id: packet-bvlc.c,v 1.12 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -35,14 +35,6 @@
#include "prefs.h"
#include <epan/strutil.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for the disassembly of the "Cisco Discovery Protocol"
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
* $Id: packet-cdp.c,v 1.46 2002/07/17 06:55:19 guy Exp $
* $Id: packet-cdp.c,v 1.47 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -25,10 +25,6 @@
#include "config.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <stdlib.h>
#include <string.h>

View File

@ -1,7 +1,7 @@
/* packet-cgmp.c
* Routines for the disassembly of the Cisco Group Management Protocol
*
* $Id: packet-cgmp.c,v 1.15 2002/03/23 22:02:20 guy Exp $
* $Id: packet-cgmp.c,v 1.16 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -24,10 +24,6 @@
#include "config.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <stdlib.h>
#include <string.h>

View File

@ -1,7 +1,7 @@
/* packet-chdlc.c
* Routines for Cisco HDLC packet disassembly
*
* $Id: packet-chdlc.c,v 1.13 2002/05/30 01:56:54 guy Exp $
* $Id: packet-chdlc.c,v 1.14 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,10 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "etypes.h"
@ -102,7 +98,7 @@ const value_string chdlc_vals[] = {
};
void
capture_chdlc( const u_char *pd, int offset, int len, packet_counts *ld ) {
capture_chdlc( const guchar *pd, int offset, int len, packet_counts *ld ) {
if (!BYTES_ARE_IN_FRAME(offset, len, 2)) {
ld->other++;
return;

View File

@ -1,6 +1,6 @@
/* packet-chdlc.h
*
* $Id: packet-chdlc.h,v 1.3 2001/11/20 21:59:12 guy Exp $
* $Id: packet-chdlc.h,v 1.4 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -33,7 +33,7 @@
#define CHDLC_ADDR_UNICAST 0x0f
#define CHDLC_ADDR_MULTICAST 0x8f
void capture_chdlc(const u_char *, int, int, packet_counts *);
void capture_chdlc(const guchar *, int, int, packet_counts *);
extern const value_string chdlc_vals[];

View File

@ -1,7 +1,7 @@
/* packet-clip.c
* Routines for clip packet disassembly
*
* $Id: packet-clip.c,v 1.19 2002/01/21 07:36:32 guy Exp $
* $Id: packet-clip.c,v 1.20 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -29,10 +29,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "packet-clip.h"
@ -43,7 +39,7 @@ static gint ett_clip = -1;
static dissector_handle_t ip_handle;
void
capture_clip( const u_char *pd, int len, packet_counts *ld ) {
capture_clip( const guchar *pd, int len, packet_counts *ld ) {
capture_ip(pd, 0, len, ld);
}

View File

@ -1,6 +1,6 @@
/* packet-clip.h
*
* $Id: packet-clip.h,v 1.5 2001/11/20 21:59:12 guy Exp $
* $Id: packet-clip.h,v 1.6 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -24,6 +24,6 @@
#ifndef __PACKET_CLIP_H__
#define __PACKET_CLIP_H__
void capture_clip(const u_char *, int, packet_counts *);
void capture_clip(const guchar *, int, packet_counts *);
#endif

View File

@ -1,7 +1,7 @@
/* packet-clnp.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
* $Id: packet-clnp.c,v 1.57 2002/06/07 10:11:38 guy Exp $
* $Id: packet-clnp.c,v 1.58 2002/08/02 23:35:48 jmayer Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@ -28,10 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <stdio.h>
#include <string.h>
#include <ctype.h>
@ -155,9 +151,9 @@ static const value_string npdu_type_vals[] = {
/* Segmentation part */
struct clnp_segment {
u_short cng_id; /* data unit identifier */
u_short cng_off; /* segment offset */
u_short cng_tot_len; /* total length */
gushort cng_id; /* data unit identifier */
gushort cng_off; /* segment offset */
gushort cng_tot_len; /* total length */
};
/* NSAP selector */
@ -276,8 +272,8 @@ static const value_string tp_vpart_type_vals[] = {
/* global variables */
static u_char li, tpdu, cdt; /* common fields */
static u_short dst_ref;
static guchar li, tpdu, cdt; /* common fields */
static gushort dst_ref;
/* List of dissectors to call for COTP packets put atop the Inactive
Subset of CLNP. */
@ -296,7 +292,7 @@ static gboolean clnp_reassemble = FALSE;
/* function definitions */
#define MAX_TSAP_LEN 32
static gchar *print_tsap(const u_char *tsap, int length)
static gchar *print_tsap(const guchar *tsap, int length)
{
static gchar str[3][MAX_TSAP_LEN * 2 + 1];
@ -677,8 +673,8 @@ static int osi_decode_DR(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree;
proto_item *ti;
u_short src_ref;
u_char reason;
gushort src_ref;
guchar reason;
char *str;
if (li < LI_MIN_DR)
@ -746,8 +742,8 @@ static int osi_decode_DT(tvbuff_t *tvb, int offset,
proto_item *ti;
gboolean is_extended;
gboolean is_class_234;
u_int tpdu_nr ;
u_int fragment = 0;
guint tpdu_nr ;
guint fragment = 0;
tvbuff_t *next_tvb;
/* VP_CHECKSUM is the only parameter allowed in the variable part.
@ -880,7 +876,7 @@ static int osi_decode_ED(tvbuff_t *tvb, int offset,
proto_tree *cotp_tree = NULL;
proto_item *ti;
gboolean is_extended;
u_int tpdu_nr ;
guint tpdu_nr ;
tvbuff_t *next_tvb;
/* ED TPDUs are never fragmented */
@ -985,8 +981,8 @@ static int osi_decode_RJ(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree;
proto_item *ti;
u_int tpdu_nr ;
u_short credit = 0;
guint tpdu_nr ;
gushort credit = 0;
switch(li) {
case LI_NORMAL_RJ :
@ -1043,8 +1039,8 @@ static int osi_decode_CC(tvbuff_t *tvb, int offset,
proto_tree *cotp_tree = NULL;
proto_item *ti;
u_short src_ref;
u_char class_option;
gushort src_ref;
guchar class_option;
src_ref = tvb_get_ntohs(tvb, offset + P_SRC_REF);
class_option = (tvb_get_guint8(tvb, offset + P_CLASS_OPTION) >> 4 ) & 0x0F;
@ -1113,7 +1109,7 @@ static int osi_decode_DC(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree = NULL;
proto_item *ti;
u_short src_ref;
gushort src_ref;
if (li > LI_MAX_DC)
return -1;
@ -1168,8 +1164,8 @@ static int osi_decode_AK(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree = NULL;
proto_item *ti;
u_int tpdu_nr;
u_short cdt_in_ak;
guint tpdu_nr;
gushort cdt_in_ak;
if (li > LI_MAX_AK)
return -1;
@ -1278,7 +1274,7 @@ static int osi_decode_EA(tvbuff_t *tvb, int offset,
proto_tree *cotp_tree = NULL;
proto_item *ti;
gboolean is_extended;
u_int tpdu_nr ;
guint tpdu_nr ;
if (li > LI_MAX_EA)
return -1;
@ -1371,7 +1367,7 @@ static int osi_decode_ER(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree;
proto_item *ti;
u_char *str;
guchar *str;
if (li > LI_MAX_ER)
return -1;
@ -1595,7 +1591,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 cnf_cksum;
cksum_status_t cksum_status;
int offset;
u_char src_len, dst_len, nsel, opt_len = 0;
guchar src_len, dst_len, nsel, opt_len = 0;
const guint8 *dst_addr, *src_addr;
gint len;
guint next_length;

View File

@ -1,7 +1,7 @@
/* packet-cosine.c
* Routines for decoding CoSine IPNOS L2 debug output
*
* $Id: packet-cosine.c,v 1.1 2002/07/31 19:27:39 guy Exp $
* $Id: packet-cosine.c,v 1.2 2002/08/02 23:35:48 jmayer Exp $
*
* Motonori Shindo <mshindo@mshindo.net>
*
@ -33,10 +33,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <string.h>
#include <epan/packet.h>

View File

@ -5,7 +5,7 @@
* Charles Levert <charles@comm.polymtl.ca>
* Copyright 2001 Charles Levert
*
* $Id: packet-cups.c,v 1.10 2002/01/24 09:20:47 guy Exp $
* $Id: packet-cups.c,v 1.11 2002/08/02 23:35:48 jmayer Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -27,10 +27,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <ctype.h>

View File

@ -2,7 +2,7 @@
* Routines for raw data (default case)
* Gilbert Ramirez <gram@alumni.rice.edu>
*
* $Id: packet-data.c,v 1.29 2002/05/10 23:20:38 guy Exp $
* $Id: packet-data.c,v 1.30 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,10 +27,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "packet-data.h"

View File

@ -4,7 +4,7 @@
*
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
* $Id: packet-dccp.c,v 1.6 2002/07/17 06:55:19 guy Exp $
* $Id: packet-dccp.c,v 1.7 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -33,14 +33,6 @@
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for dcerpc conv dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
* $Id: packet-dcerpc-conv.c,v 1.4 2002/06/24 00:03:16 tpot Exp $
* $Id: packet-dcerpc-conv.c,v 1.5 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for dcerpc endpoint mapper dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
* $Id: packet-dcerpc-epm.c,v 1.11 2002/06/24 00:03:17 tpot Exp $
* $Id: packet-dcerpc-epm.c,v 1.12 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for dcerpc mgmt dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
* $Id: packet-dcerpc-mgmt.c,v 1.4 2002/06/24 00:03:17 tpot Exp $
* $Id: packet-dcerpc-mgmt.c,v 1.5 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for DCERPC NDR dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
* $Id: packet-dcerpc-ndr.c,v 1.6 2002/05/27 09:50:57 sahlberg Exp $
* $Id: packet-dcerpc-ndr.c,v 1.7 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,10 +27,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <ctype.h>

View File

@ -2,7 +2,7 @@
* Routines for dcerpc nspi dissection
* Copyright 2001, Todd Sabin <tsabin@optonline.net>
*
* $Id: packet-dcerpc-nspi.c,v 1.3 2002/06/24 00:03:17 tpot Exp $
* $Id: packet-dcerpc-nspi.c,v 1.4 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,10 +27,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for DCOM OXID Resolver
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
* $Id: packet-dcerpc-oxid.c,v 1.4 2002/06/24 00:03:17 tpot Exp $
* $Id: packet-dcerpc-oxid.c,v 1.5 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,10 +27,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for DCOM Remote Activation
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
* $Id: packet-dcerpc-remact.c,v 1.5 2002/06/24 00:03:17 tpot Exp $
* $Id: packet-dcerpc-remact.c,v 1.6 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for DCERPC packet disassembly
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
* $Id: packet-dcerpc.c,v 1.69 2002/07/25 21:30:58 guy Exp $
* $Id: packet-dcerpc.c,v 1.70 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,10 +27,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <ctype.h>

View File

@ -3,7 +3,7 @@
* see http://ddt.sourceforge.net/
* Olivier Abad <oabad@cybercable.fr>
*
* $Id: packet-ddtp.c,v 1.20 2002/01/24 09:20:47 guy Exp $
* $Id: packet-ddtp.c,v 1.21 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -29,18 +29,11 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
/*#include <string.h>
#include <ctype.h>
#include <time.h>*/
#include <glib.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <epan/packet.h>
#include "packet-ddtp.h"

View File

@ -1,7 +1,7 @@
/* packet-dec-bpdu.c
* Routines for DEC BPDU (DEC Spanning Tree Protocol) disassembly
*
* $Id: packet-dec-bpdu.c,v 1.13 2002/03/19 09:02:01 guy Exp $
* $Id: packet-dec-bpdu.c,v 1.14 2002/08/02 23:35:48 jmayer Exp $
*
* Copyright 2001 Paul Ionescu <paul@acorp.ro>
*
@ -28,14 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <stdio.h>
#include <string.h>
#include <glib.h>

View File

@ -4,7 +4,7 @@
* IItom Tsutomu MIENO <iitom@utouto.com>
* SHIRASAKI Yasuhiro <yasuhiro@gnome.gr.jp>
*
* $Id: packet-dhcpv6.c,v 1.5 2002/06/26 01:24:42 guy Exp $
* $Id: packet-dhcpv6.c,v 1.6 2002/08/02 23:35:48 jmayer Exp $
*
* The information used comes from:
* draft-ietf-dhc-dhcpv6-26.txt
@ -37,10 +37,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/int-64bit.h>

View File

@ -1,7 +1,7 @@
/* packet-diameter.c
* Routines for Diameter packet disassembly
*
* $Id: packet-diameter.c,v 1.48 2002/05/10 23:20:38 guy Exp $
* $Id: packet-diameter.c,v 1.49 2002/08/02 23:35:48 jmayer Exp $
*
* Copyright (c) 2001 by David Frascone <dave@frascone.com>
*
@ -28,14 +28,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -1053,11 +1045,11 @@ static guint32 dissect_diameter_common(tvbuff_t *tvb, size_t start, packet_info
tvb_memcpy(tvb, (guint8*) &dh, offset, sizeof(dh));
/* Fix byte ordering in our static structure */
dh.versionLength = ntohl(dh.versionLength);
dh.flagsCmdCode = ntohl(dh.flagsCmdCode);
dh.vendorId = ntohl(dh.vendorId);
dh.hopByHopId = ntohl(dh.hopByHopId);
dh.endToEndId = ntohl(dh.endToEndId);
dh.versionLength = g_ntohl(dh.versionLength);
dh.flagsCmdCode = g_ntohl(dh.flagsCmdCode);
dh.vendorId = g_ntohl(dh.vendorId);
dh.hopByHopId = g_ntohl(dh.hopByHopId);
dh.endToEndId = g_ntohl(dh.endToEndId);
if (dh.vendorId) {
strcpy(vendorName,
@ -1383,8 +1375,8 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
tvb_memcpy(tvb, (guint8*) &avph, offset, MIN((long)sizeof(avph),packetLength));
/* Fix the byte ordering */
avph.avp_code = ntohl(avph.avp_code);
avph.avp_flagsLength = ntohl(avph.avp_flagsLength);
avph.avp_code = g_ntohl(avph.avp_code);
avph.avp_flagsLength = g_ntohl(avph.avp_flagsLength);
flags = (avph.avp_flagsLength & 0xff000000) >> 24;
avpLength = avph.avp_flagsLength & 0x00ffffff;
@ -1408,7 +1400,7 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
/* Dissect our vendor id if it exists and set hdr length */
if (flags & AVP_FLAGS_V) {
vendorId = ntohl(avph.avp_vendorId);
vendorId = g_ntohl(avph.avp_vendorId);
/* Vendor id */
hdrLength = sizeof(e_avphdr);
} else {

View File

@ -2,7 +2,7 @@
* Routines for DLSw packet dissection (Data Link Switching)
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
* $Id: packet-dlsw.c,v 1.5 2002/04/07 21:47:50 guy Exp $
* $Id: packet-dlsw.c,v 1.6 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,14 +31,6 @@
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>

View File

@ -1,7 +1,7 @@
/* packet-dns.c
* Routines for DNS packet disassembly
*
* $Id: packet-dns.c,v 1.89 2002/07/16 22:50:45 guy Exp $
* $Id: packet-dns.c,v 1.90 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,10 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
@ -270,7 +266,7 @@ http://www.microsoft.com/windows2000/library/resources/reskit/samplechapters/cnc
which discuss them to some extent. */
static char *
dns_type_name (u_int type)
dns_type_name (guint type)
{
char *type_names[] = {
"unused",
@ -362,7 +358,7 @@ dns_type_name (u_int type)
static char *
dns_long_type_name (u_int type)
dns_long_type_name (guint type)
{
char *type_names[] = {
"unused",
@ -773,7 +769,7 @@ dissect_dns_query(tvbuff_t *tvb, int offset, int dns_data_offset,
proto_tree *
add_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
const char *name, int namelen, const char *type_name, const char *class_name,
u_int ttl, u_short data_len)
guint ttl, gushort data_len)
{
proto_tree *rr_tree;
@ -794,7 +790,7 @@ add_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
static proto_tree *
add_opt_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
const char *name, int namelen, const char *type_name, int class,
u_int ttl, u_short data_len)
guint ttl, gushort data_len)
{
proto_tree *rr_tree;
@ -870,8 +866,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
int data_offset;
int cur_offset;
int data_start;
u_int ttl;
u_short data_len;
guint ttl;
gushort data_len;
proto_tree *rr_tree = NULL;
proto_item *trr = NULL;

View File

@ -2,7 +2,7 @@
* Definitions for packet disassembly structures and routines used both by
* DNS and NBNS.
*
* $Id: packet-dns.h,v 1.11 2001/07/02 07:17:29 guy Exp $
* $Id: packet-dns.h,v 1.12 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -35,6 +35,6 @@ int get_dns_name(tvbuff_t *, int, int, char *, int);
proto_tree *
add_rr_to_tree(proto_item *, int, tvbuff_t *, int, const char *,
int, const char *, const char *, u_int, u_short);
int, const char *, const char *, guint, gushort);
#endif /* packet-dns.h */

View File

@ -2,7 +2,7 @@
* Routines for dsi packet dissection
* Copyright 2001, Randy McEoin <rmceoin@pe.com>
*
* $Id: packet-dsi.c,v 1.22 2002/05/30 01:56:54 guy Exp $
* $Id: packet-dsi.c,v 1.23 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,14 +31,6 @@
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -1,7 +1,7 @@
/* packet-dvmrp.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP/DVMRP packet disassembly
*
* $Id: packet-dvmrp.c,v 1.11 2002/05/10 23:20:38 guy Exp $
* $Id: packet-dvmrp.c,v 1.12 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -55,10 +55,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <stdio.h>
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for EAP Extensible Authentication Protocol dissection
* RFC 2284
*
* $Id: packet-eap.c,v 1.26 2002/06/07 10:11:39 guy Exp $
* $Id: packet-eap.c,v 1.27 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,14 +27,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include <epan/conversation.h>

View File

@ -3,7 +3,7 @@
* (From IEEE Draft P802.1X/D11; is there a later draft, or a
* final standard? If so, check it.)
*
* $Id: packet-eapol.c,v 1.10 2002/04/29 08:20:07 guy Exp $
* $Id: packet-eapol.c,v 1.11 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,14 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "packet-ieee8023.h"

View File

@ -2,7 +2,7 @@
* Routines for EIGRP dissection
* Copyright 2000, Paul Ionescu <paul@acorp.ro>
*
* $Id: packet-eigrp.c,v 1.23 2002/05/02 09:28:43 guy Exp $
* $Id: packet-eigrp.c,v 1.24 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,14 +27,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include <epan/resolv.h>

View File

@ -2,7 +2,7 @@
* Routines for ISO/OSI End System to Intermediate System
* Routing Exchange Protocol ISO 9542.
*
* $Id: packet-esis.c,v 1.25 2002/04/30 23:56:58 guy Exp $
* $Id: packet-esis.c,v 1.26 2002/08/02 23:35:49 jmayer Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
@ -28,10 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <stdio.h>
#include <string.h>
#include <glib.h>
@ -64,11 +60,11 @@ static const value_string esis_vals[] = {
/* internal prototypes */
static void esis_dissect_esh_pdu( u_char len, tvbuff_t *tvb,
static void esis_dissect_esh_pdu( guchar len, tvbuff_t *tvb,
proto_tree *treepd);
static void esis_dissect_ish_pdu( u_char len, tvbuff_t *tvb,
static void esis_dissect_ish_pdu( guchar len, tvbuff_t *tvb,
proto_tree *tree);
static void esis_dissect_redirect_pdu( u_char len, tvbuff_t *tvb,
static void esis_dissect_redirect_pdu( guchar len, tvbuff_t *tvb,
proto_tree *tree);
/* ################## Descriptions ###########################################*/
@ -153,7 +149,7 @@ esis_dissect_unknown( tvbuff_t *tvb, proto_tree *tree, char *fmat, ...){
static void
esis_dissect_esh_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
esis_dissect_esh_pdu( guchar len, tvbuff_t *tvb, proto_tree *tree) {
proto_tree *esis_area_tree;
int offset = 0;
int no_sa = 0;
@ -187,7 +183,7 @@ esis_dissect_esh_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
} /* esis_dissect_esh_pdu */ ;
static void
esis_dissect_ish_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
esis_dissect_ish_pdu( guchar len, tvbuff_t *tvb, proto_tree *tree) {
int offset = 0;
int netl = 0;
@ -210,7 +206,7 @@ esis_dissect_ish_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
};
static void
esis_dissect_redirect_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
esis_dissect_redirect_pdu( guchar len, tvbuff_t *tvb, proto_tree *tree) {
int offset = 0;
int tmpl = 0;
@ -283,7 +279,7 @@ dissect_esis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_item *ti;
proto_tree *esis_tree = NULL;
int variable_len = 0;
u_int tmp_uint = 0;
guint tmp_uint = 0;
char *cksum_status;
if (check_col(pinfo->cinfo, COL_PROTOCOL))

View File

@ -1,7 +1,7 @@
/* packet-eth.c
* Routines for ethernet packet disassembly
*
* $Id: packet-eth.c,v 1.73 2002/04/24 06:03:33 guy Exp $
* $Id: packet-eth.c,v 1.74 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,10 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "etypes.h"
@ -71,7 +67,7 @@ static dissector_handle_t isl_handle;
#define ETHERNET_SNAP 3
void
capture_eth(const u_char *pd, int offset, int len, packet_counts *ld)
capture_eth(const guchar *pd, int offset, int len, packet_counts *ld)
{
guint16 etype, length;
int ethhdr_type; /* the type of ethernet frame */

View File

@ -1,6 +1,6 @@
/* packet-eth.h
*
* $Id: packet-eth.h,v 1.6 2001/11/20 21:59:12 guy Exp $
* $Id: packet-eth.h,v 1.7 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -24,6 +24,6 @@
#ifndef __PACKET_ETH_H__
#define __PACKET_ETH_H__
void capture_eth(const u_char *, int, int, packet_counts *);
void capture_eth(const guchar *, int, int, packet_counts *);
#endif

View File

@ -1,7 +1,7 @@
/* ethertype.c
* Routines for calling the right protocol for the ethertype.
*
* $Id: packet-ethertype.c,v 1.29 2002/06/13 07:18:47 guy Exp $
* $Id: packet-ethertype.c,v 1.30 2002/08/02 23:35:49 jmayer Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
@ -28,10 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "packet-ip.h"
@ -104,7 +100,7 @@ static void add_trailer(proto_tree *fh_tree, int trailer_id, tvbuff_t *tvb,
tvbuff_t *next_tvb, int offset_after_etype, guint length_before);
void
capture_ethertype(guint16 etype, const u_char *pd, int offset, int len,
capture_ethertype(guint16 etype, const guchar *pd, int offset, int len,
packet_counts *ld)
{
switch (etype) {

View File

@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
* $Id: packet-fddi.c,v 1.56 2002/01/21 07:36:34 guy Exp $
* $Id: packet-fddi.c,v 1.57 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <stdio.h>
#include <string.h>
#include <glib.h>
@ -129,7 +125,7 @@ static dissector_handle_t llc_handle;
static dissector_handle_t data_handle;
static void
swap_mac_addr(u_char *swapped_addr, const u_char *orig_addr)
swap_mac_addr(guchar *swapped_addr, const guchar *orig_addr)
{
int i;
@ -140,7 +136,7 @@ swap_mac_addr(u_char *swapped_addr, const u_char *orig_addr)
void
capture_fddi(const u_char *pd, int len, packet_counts *ld)
capture_fddi(const guchar *pd, int len, packet_counts *ld)
{
int offset = 0, fc;
@ -263,8 +259,8 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *ti;
gchar *fc_str;
proto_tree *fc_tree;
static u_char src[6], dst[6];
u_char src_swapped[6], dst_swapped[6];
static guchar src[6], dst[6];
guchar src_swapped[6], dst_swapped[6];
tvbuff_t *next_tvb;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
@ -304,10 +300,10 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Extract the destination address, possibly bit-swapping it. */
if (bitswapped)
swap_mac_addr(dst, (u_char *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6));
swap_mac_addr(dst, (guchar *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6));
else
memcpy(dst, (u_char *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6), sizeof dst);
swap_mac_addr(dst_swapped, (u_char*) tvb_get_ptr(tvb, FDDI_P_DHOST, 6));
memcpy(dst, (guchar *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6), sizeof dst);
swap_mac_addr(dst_swapped, (guchar*) tvb_get_ptr(tvb, FDDI_P_DHOST, 6));
/* XXX - copy them to some buffer associated with "pi", rather than
just making "dst" static? */
@ -325,10 +321,10 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Extract the source address, possibly bit-swapping it. */
if (bitswapped)
swap_mac_addr(src, (u_char *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6));
swap_mac_addr(src, (guchar *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6));
else
memcpy(src, (u_char *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6), sizeof src);
swap_mac_addr(src_swapped, (u_char*) tvb_get_ptr(tvb, FDDI_P_SHOST, 6));
memcpy(src, (guchar *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6), sizeof src);
swap_mac_addr(src_swapped, (guchar*) tvb_get_ptr(tvb, FDDI_P_SHOST, 6));
/* XXX - copy them to some buffer associated with "pi", rather than
just making "src" static? */

View File

@ -1,6 +1,6 @@
/* packet-fddi.h
*
* $Id: packet-fddi.h,v 1.5 2001/11/20 21:59:12 guy Exp $
* $Id: packet-fddi.h,v 1.6 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -24,6 +24,6 @@
#ifndef __PACKET_FDDI_H__
#define __PACKET_FDDI_H__
void capture_fddi(const u_char *, int, packet_counts *);
void capture_fddi(const guchar *, int, packet_counts *);
#endif

View File

@ -3,7 +3,7 @@
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* Copyright 2001, Juan Toledo <toledo@users.sourceforge.net> (Passive FTP)
*
* $Id: packet-ftp.c,v 1.47 2002/07/17 06:55:19 guy Exp $
* $Id: packet-ftp.c,v 1.48 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -34,14 +34,6 @@
#include <stdlib.h>
#include <ctype.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@ -118,11 +110,11 @@ dissect_ftpdata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
* the address and port number.
*/
static void
handle_pasv_response(const u_char *line, int linelen, packet_info *pinfo)
handle_pasv_response(const guchar *line, int linelen, packet_info *pinfo)
{
char *args;
char *p;
u_char c;
guchar c;
int i;
int address[4], port[2];
guint16 server_port;
@ -213,13 +205,13 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *ftp_tree = NULL;
proto_item *ti;
gint offset = 0;
const u_char *line;
const guchar *line;
guint32 code;
gboolean is_pasv_response = FALSE;
gint next_offset;
int linelen;
int tokenlen;
const u_char *next_token;
const guchar *next_token;
if (pinfo->match_port == pinfo->destport)
is_request = TRUE;

View File

@ -9,7 +9,7 @@
* Frank Singleton <frank.singleton@ericsson.com>
* Trevor Shepherd <eustrsd@am1.ericsson.se>
*
* $Id: packet-giop.c,v 1.61 2002/05/13 01:24:45 guy Exp $
* $Id: packet-giop.c,v 1.62 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -282,10 +282,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <string.h>
#include <stdio.h>
#include <errno.h>
@ -2825,11 +2821,11 @@ dissect_target_address(tvbuff_t * tvb, packet_info *pinfo, int *offset, proto_tr
}
static void
dissect_reply_body (tvbuff_t *tvb, u_int offset, packet_info *pinfo,
dissect_reply_body (tvbuff_t *tvb, guint offset, packet_info *pinfo,
proto_tree *tree, gboolean stream_is_big_endian,
guint32 reply_status, MessageHeader *header, proto_tree *clnp_tree) {
u_int sequence_length;
guint sequence_length;
gboolean exres = FALSE; /* result of trying explicit dissectors */
gchar * repoid = NULL; /* Repositor ID looked up from objkey */
@ -3078,7 +3074,7 @@ static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
MessageHeader * header,
gboolean stream_is_big_endian) {
u_int offset = 0;
guint offset = 0;
guint32 request_id;
guint32 reply_status;
proto_tree *reply_tree = NULL;
@ -3158,7 +3154,7 @@ static void dissect_giop_cancel_request (tvbuff_t * tvb, packet_info * pinfo,
proto_tree * tree,
gboolean stream_is_big_endian) {
u_int offset = 0;
guint offset = 0;
guint32 request_id;
proto_tree *cancel_request_tree = NULL;
proto_item *tf;
@ -3742,15 +3738,15 @@ dissect_giop_fragment( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/* Main entry point */
gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
u_int offset = 0;
guint offset = 0;
MessageHeader header;
tvbuff_t *giop_header_tvb;
tvbuff_t *payload_tvb;
proto_tree *clnp_tree = NULL;
proto_item *ti;
u_int message_size;
u_int minor_version;
guint message_size;
guint minor_version;
gboolean stream_is_big_endian;

View File

@ -5,7 +5,7 @@
* Based on the code from packet-gvrp.c (GVRP) from
* Kevin Shi <techishi@ms22.hinet.net> Copyright 2000
*
* $Id: packet-gmrp.c,v 1.8 2002/07/17 00:42:40 guy Exp $
* $Id: packet-gmrp.c,v 1.9 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -34,14 +34,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for gnutella dissection
* Copyright 2001, B. Johannessen <bob@havoq.com>
*
* $Id: packet-gnutella.c,v 1.13 2002/07/17 00:42:40 guy Exp $
* $Id: packet-gnutella.c,v 1.14 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <glib.h>

View File

@ -2,7 +2,7 @@
* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
* $Id: packet-gre.c,v 1.50 2002/01/21 07:36:34 guy Exp $
* $Id: packet-gre.c,v 1.51 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,13 +27,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "packet-wccp.h"

View File

@ -4,7 +4,7 @@
* Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
* Nicolas Balkota <balkota@mac.com>
*
* $Id: packet-gtp.c,v 1.31 2002/07/17 00:42:40 guy Exp $
* $Id: packet-gtp.c,v 1.32 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -33,14 +33,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>
@ -4794,8 +4786,8 @@ dissect_gtpv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(flags_tree, hf_gtpv0_flags_spare, tvb, 0, 1, gtpv0_hdr.flags);
proto_tree_add_boolean(flags_tree, hf_gtpv0_flags_snn, tvb, 0, 1, gtpv0_hdr.flags);
gtpv0_hdr.length = ntohs(gtpv0_hdr.length);
gtpv0_hdr.seq_no = ntohs(gtpv0_hdr.seq_no);
gtpv0_hdr.length = g_ntohs(gtpv0_hdr.length);
gtpv0_hdr.seq_no = g_ntohs(gtpv0_hdr.seq_no);
proto_tree_add_uint(gtpv0_tree, hf_gtpv0_message_type, tvb, 1, 1, gtpv0_hdr.message);
proto_tree_add_uint(gtpv0_tree, hf_gtpv0_length, tvb, 2, 2, gtpv0_hdr.length);
proto_tree_add_uint(gtpv0_tree, hf_gtpv0_seq_number, tvb, 4, 2, gtpv0_hdr.seq_no);
@ -4893,7 +4885,7 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_uint(gtpv1_tree, hf_gtpv1_message_type, tvb, 1, 1, gtpv1_hdr.message);
gtpv1_hdr.length = ntohs(gtpv1_hdr.length);
gtpv1_hdr.length = g_ntohs(gtpv1_hdr.length);
proto_tree_add_uint(gtpv1_tree, hf_gtpv1_length, tvb, 2, 2, gtpv1_hdr.length);
gtp_prime = (gtpv1_hdr.flags & 0x01) >> 4;
@ -4902,7 +4894,7 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
if (!gtp_prime) {
gtpv1_hdr.teid = ntohl(gtpv1_hdr.teid);
gtpv1_hdr.teid = g_ntohl(gtpv1_hdr.teid);
proto_tree_add_uint(gtpv1_tree, hf_gtpv1_teid, tvb, 4, 4, gtpv1_hdr.teid);
if (gtpv1_hdr.flags & 0x07) {

View File

@ -2,7 +2,7 @@
* Routines for GVRP (GARP VLAN Registration Protocol) dissection
* Copyright 2000, Kevin Shi <techishi@ms22.hinet.net>
*
* $Id: packet-gvrp.c,v 1.12 2002/07/17 00:42:40 guy Exp $
* $Id: packet-gvrp.c,v 1.13 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -2,7 +2,7 @@
* Routines for Sinec H1 packet disassembly
* Gerrit Gehnen <G.Gehnen@atrie.de>
*
* $Id: packet-h1.c,v 1.23 2002/01/21 07:36:34 guy Exp $
* $Id: packet-h1.c,v 1.24 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,10 +27,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <string.h>
#include <glib.h>

View File

@ -2,7 +2,7 @@
*
* Routines for ITU-T Recommendation H.261 dissection
*
* $Id: packet-h261.c,v 1.15 2002/02/01 07:37:20 guy Exp $
* $Id: packet-h261.c,v 1.16 2002/08/02 23:35:50 jmayer Exp $
*
* Copyright 2000, Philips Electronics N.V.
* Andreas Sikkema <andreas.sikkema@philips.com>
@ -41,14 +41,6 @@
#include <glib.h>
#include <epan/packet.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <stdio.h>
#include <string.h>

View File

@ -2,7 +2,7 @@
* Routines for hclnfsd (Hummingbird NFS Daemon) dissection
* Copyright 2001, Mike Frisch <frisch@hummingbird.com>
*
* $Id: packet-hclnfsd.c,v 1.15 2002/07/31 19:58:28 guy Exp $
* $Id: packet-hclnfsd.c,v 1.16 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -29,10 +29,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include "packet-rpc.h"

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-hsrp.c,v 1.22 2002/01/24 09:20:48 guy Exp $
* $Id: packet-hsrp.c,v 1.23 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,14 +31,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-http.c,v 1.49 2002/07/17 06:55:19 guy Exp $
* $Id: packet-http.c,v 1.50 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <ctype.h>
@ -77,7 +73,7 @@ typedef enum {
PROTO_SSDP /* Simple Service Discovery Protocol */
} http_proto_t;
static int is_http_request_or_reply(const u_char *data, int linelen, http_type_t *type);
static int is_http_request_or_reply(const guchar *data, int linelen, http_type_t *type);
static dissector_table_t subdissector_table;
static heur_dissector_list_t heur_subdissector_list;
@ -90,11 +86,11 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *http_tree = NULL;
proto_item *ti = NULL;
gint offset = 0;
const u_char *line;
const guchar *line;
gint next_offset;
const u_char *linep, *lineend;
const guchar *linep, *lineend;
int linelen;
u_char c;
guchar c;
http_type_t http_type;
int datalen;
@ -295,7 +291,7 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* anyway.
*/
static int
is_http_request_or_reply(const u_char *data, int linelen, http_type_t *type)
is_http_request_or_reply(const guchar *data, int linelen, http_type_t *type)
{
int isHttpRequestOrReply = FALSE;
@ -321,7 +317,7 @@ is_http_request_or_reply(const u_char *data, int linelen, http_type_t *type)
*type = HTTP_RESPONSE;
isHttpRequestOrReply = TRUE; /* response */
} else {
u_char * ptr = (u_char *)data;
guchar * ptr = (guchar *)data;
int index = 0;
/* Look for the space following the Method */

View File

@ -2,7 +2,7 @@
* Routines for IAPP dissection
* Copyright 2002, Alfred Arnold <aarnold@elsa.de>
*
* $Id: packet-iapp.c,v 1.4 2002/07/17 00:42:40 guy Exp $
* $Id: packet-iapp.c,v 1.5 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -37,14 +37,6 @@
#include <string.h>
#include <ctype.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#include <epan/packet.h>

View File

@ -3,7 +3,7 @@
*
* Srishylam Simharajan simha@netapp.com
*
* $Id: packet-icap.c,v 1.10 2002/07/17 06:55:19 guy Exp $
* $Id: packet-icap.c,v 1.11 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <ctype.h>
@ -59,18 +55,18 @@ static gint ett_icap = -1;
static dissector_handle_t data_handle;
#define TCP_PORT_ICAP 1344
static int is_icap_message(const u_char *data, int linelen, icap_type_t *type);
static int is_icap_message(const guchar *data, int linelen, icap_type_t *type);
static void
dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *icap_tree = NULL;
proto_item *ti = NULL;
gint offset = 0;
const u_char *line;
const guchar *line;
gint next_offset;
const u_char *linep, *lineend;
const guchar *linep, *lineend;
int linelen;
u_char c;
guchar c;
icap_type_t icap_type;
int datalen;
@ -235,7 +231,7 @@ is_icap_header:
static int
is_icap_message(const u_char *data, int linelen, icap_type_t *type)
is_icap_message(const guchar *data, int linelen, icap_type_t *type)
{
#define ICAP_COMPARE(string, length, msgtype) { \
if (strncmp(data, string, length) == 0) { \

View File

@ -1,7 +1,7 @@
/* packet-icmpv6.c
* Routines for ICMPv6 packet disassembly
*
* $Id: packet-icmpv6.c,v 1.65 2002/01/30 22:58:54 guy Exp $
* $Id: packet-icmpv6.c,v 1.66 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -39,14 +39,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <glib.h>
#ifdef NEED_SNPRINTF_H
@ -1192,7 +1184,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dp->icmp6_code,
"Code: %u", dp->icmp6_code);
}
cksum = (guint16)htons(dp->icmp6_cksum);
cksum = (guint16)g_htons(dp->icmp6_cksum);
length = tvb_length(tvb);
reported_length = tvb_reported_length(tvb);
if (!pinfo->fragmented && length >= reported_length) {
@ -1205,8 +1197,8 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cksum_vec[1].ptr = pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
phdr[0] = htonl(tvb_reported_length(tvb));
phdr[1] = htonl(IP_PROTO_ICMPV6);
phdr[0] = g_htonl(tvb_reported_length(tvb));
phdr[1] = g_htonl(IP_PROTO_ICMPV6);
cksum_vec[2].len = 8;
cksum_vec[3].len = tvb_reported_length(tvb);
cksum_vec[3].ptr = tvb_get_ptr(tvb, offset, cksum_vec[3].len);
@ -1260,10 +1252,10 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case ICMP6_ECHO_REPLY:
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct icmp6_hdr, icmp6_id), 2,
"ID: 0x%04x", (guint16)ntohs(dp->icmp6_id));
"ID: 0x%04x", (guint16)g_ntohs(dp->icmp6_id));
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct icmp6_hdr, icmp6_seq), 2,
"Sequence: 0x%04x", (guint16)ntohs(dp->icmp6_seq));
"Sequence: 0x%04x", (guint16)g_ntohs(dp->icmp6_seq));
next_tvb = tvb_new_subset(tvb, offset + sizeof(*dp), -1, -1);
call_dissector(data_handle,next_tvb, pinfo, icmp6_tree);
break;
@ -1273,7 +1265,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct icmp6_hdr, icmp6_maxdelay), 2,
"Maximum response delay: %u",
(guint16)ntohs(dp->icmp6_maxdelay));
(guint16)g_ntohs(dp->icmp6_maxdelay));
proto_tree_add_text(icmp6_tree, tvb, offset + sizeof(*dp), 16,
"Multicast Address: %s",
ip6_to_str((struct e_in6_addr *)(tvb_get_ptr(tvb, offset + sizeof *dp, sizeof (struct e_in6_addr)))));
@ -1313,7 +1305,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct nd_router_advert, nd_ra_router_lifetime),
2, "Router lifetime: %u",
(guint16)ntohs(ra->nd_ra_router_lifetime));
(guint16)g_ntohs(ra->nd_ra_router_lifetime));
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct nd_router_advert, nd_ra_reachable), 4,
"Reachable time: %u", pntohl(&ra->nd_ra_reachable));

View File

@ -4,7 +4,7 @@
* By Peter Torvals
* Copyright 1999 Peter Torvals
*
* $Id: packet-icp.c,v 1.21 2002/01/21 07:36:35 guy Exp $
* $Id: packet-icp.c,v 1.22 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -30,14 +30,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,7 +1,7 @@
/* packet-icq.c
* Routines for ICQ packet disassembly
*
* $Id: packet-icq.c,v 1.45 2002/07/17 00:42:40 guy Exp $
* $Id: packet-icq.c,v 1.46 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -33,14 +33,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif
@ -360,7 +352,7 @@ static const value_string clientCmdCode[] = {
/*
* All ICQv5 decryption code thanx to Sebastien Dault (daus01@gel.usherb.ca)
*/
static const u_char
static const guchar
table_v5 [] = {
0x59, 0x60, 0x37, 0x6B, 0x65, 0x62, 0x46, 0x48, 0x53, 0x61, 0x4C, 0x59, 0x60, 0x57, 0x5B, 0x3D,
0x5E, 0x34, 0x6D, 0x36, 0x50, 0x3F, 0x6F, 0x67, 0x53, 0x61, 0x4C, 0x59, 0x40, 0x47, 0x63, 0x39,
@ -436,7 +428,7 @@ get_v5key(tvbuff_t *tvb, int len)
}
static void
decrypt_v5(u_char *bfr, guint32 size,guint32 key)
decrypt_v5(guchar *bfr, guint32 size,guint32 key)
{
guint32 i;
guint32 k;
@ -444,12 +436,12 @@ decrypt_v5(u_char *bfr, guint32 size,guint32 key)
for (i=ICQ5_CL_SESSIONID; i < size; i+=4 ) {
k = key+table_v5[i&0xff];
if ( i != 0x16 ) {
bfr[i] ^= (u_char)(k & 0xff);
bfr[i+1] ^= (u_char)((k & 0xff00)>>8);
bfr[i] ^= (guchar)(k & 0xff);
bfr[i+1] ^= (guchar)((k & 0xff00)>>8);
}
if ( i != 0x12 ) {
bfr[i+2] ^= (u_char)((k & 0xff0000)>>16);
bfr[i+3] ^= (u_char)((k & 0xff000000)>>24);
bfr[i+2] ^= (guchar)((k & 0xff0000)>>16);
bfr[i+3] ^= (guchar)((k & 0xff000000)>>24);
}
}
}
@ -1113,7 +1105,7 @@ icqv5_cmd_login(proto_tree* tree,
char *aTime;
guint32 port;
guint32 passwdLen;
const u_char *ipAddrp;
const guchar *ipAddrp;
guint32 status;
if (tree) {
@ -1256,7 +1248,7 @@ icqv5_srv_login_reply(proto_tree* tree,/* Tree to put the data in */
{
proto_tree* subtree;
proto_item* ti;
const u_char *ipAddrp;
const guchar *ipAddrp;
if (tree) {
if (size < SRV_LOGIN_REPLY_IP + 8) {
@ -1290,8 +1282,8 @@ icqv5_srv_user_online(proto_tree* tree,/* Tree to put the data in */
{
proto_tree* subtree;
proto_item* ti;
const u_char *ipAddrp;
const u_char *realipAddrp;
const guchar *ipAddrp;
const guchar *realipAddrp;
guint32 status;
if (tree) {

View File

@ -3,7 +3,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
* $Id: packet-ieee80211.c,v 1.72 2002/07/31 09:00:02 guy Exp $
* $Id: packet-ieee80211.c,v 1.73 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -41,14 +41,6 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
@ -449,7 +441,7 @@ find_header_length (guint16 fcf)
/* This is the capture function used to update packet counts */
/* ************************************************************************* */
static void
capture_ieee80211_common (const u_char * pd, int offset, int len,
capture_ieee80211_common (const guchar * pd, int offset, int len,
packet_counts * ld, gboolean fixed_length_header)
{
guint16 fcf, hdr_length;
@ -511,7 +503,7 @@ capture_ieee80211_common (const u_char * pd, int offset, int len,
* Handle 802.11 with a variable-length link-layer header.
*/
void
capture_ieee80211 (const u_char * pd, int offset, int len, packet_counts * ld)
capture_ieee80211 (const guchar * pd, int offset, int len, packet_counts * ld)
{
capture_ieee80211_common (pd, offset, len, ld, FALSE);
}
@ -521,7 +513,7 @@ capture_ieee80211 (const u_char * pd, int offset, int len, packet_counts * ld)
* maximum length).
*/
void
capture_ieee80211_fixed (const u_char * pd, int offset, int len, packet_counts * ld)
capture_ieee80211_fixed (const guchar * pd, int offset, int len, packet_counts * ld)
{
capture_ieee80211_common (pd, offset, len, ld, TRUE);
}

View File

@ -4,7 +4,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
* $Id: packet-ieee80211.h,v 1.5 2002/01/28 01:13:48 guy Exp $
* $Id: packet-ieee80211.h,v 1.6 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -27,5 +27,5 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
void capture_ieee80211 (const u_char *, int, int, packet_counts *);
void capture_ieee80211_fixed (const u_char *, int, int, packet_counts *);
void capture_ieee80211 (const guchar *, int, int, packet_counts *);
void capture_ieee80211_fixed (const guchar *, int, int, packet_counts *);

View File

@ -1,7 +1,7 @@
/* packet-ieee8023.c
* Routine for dissecting 802.3 (as opposed to D/I/X Ethernet) packets.
*
* $Id: packet-ieee8023.c,v 1.2 2002/01/21 07:36:35 guy Exp $
* $Id: packet-ieee8023.c,v 1.3 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,10 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <glib.h>
#include <epan/packet.h>
#include "packet-ieee8023.h"

View File

@ -1,7 +1,7 @@
/* packet-igmp.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP packet disassembly
*
* $Id: packet-igmp.c,v 1.19 2002/05/02 07:54:41 guy Exp $
* $Id: packet-igmp.c,v 1.20 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -92,10 +92,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <stdio.h>
#include <string.h>
#include <glib.h>
@ -853,18 +849,18 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
case IGMP_TYPE_0x23:
dst = htonl(MC_ALL_IGMPV3_ROUTERS);
dst = g_htonl(MC_ALL_IGMPV3_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_msnip(tvb, pinfo, parent_tree, offset);
}
break;
case IGMP_TYPE_0x24:
dst = htonl(MC_ALL_ROUTERS);
dst = g_htonl(MC_ALL_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_mrdisc(tvb, pinfo, parent_tree, offset);
}
dst = htonl(MC_ALL_IGMPV3_ROUTERS);
dst = g_htonl(MC_ALL_IGMPV3_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_msnip(tvb, pinfo, parent_tree, offset);
}
@ -876,7 +872,7 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
offset = dissect_msnip(tvb, pinfo, parent_tree, offset);
} else {
/* ok its not MSNIP, check if it might be MRDISC */
dst = htonl(MC_ALL_ROUTERS);
dst = g_htonl(MC_ALL_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_mrdisc(tvb, pinfo, parent_tree, offset);
}
@ -884,7 +880,7 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
case IGMP_TYPE_0x26:
dst = htonl(MC_ALL_ROUTERS);
dst = g_htonl(MC_ALL_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_mrdisc(tvb, pinfo, parent_tree, offset);
}

View File

@ -2,7 +2,7 @@
* Routines for imap packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-imap.c,v 1.20 2002/07/17 06:55:19 guy Exp $
* $Id: packet-imap.c,v 1.21 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -31,14 +31,6 @@
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@ -58,11 +50,11 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean is_request;
proto_tree *imap_tree, *ti;
gint offset = 0;
const u_char *line;
const guchar *line;
gint next_offset;
int linelen;
int tokenlen;
const u_char *next_token;
const guchar *next_token;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IMAP");

View File

@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
* $Id: packet-ip.c,v 1.171 2002/07/15 20:54:45 guy Exp $
* $Id: packet-ip.c,v 1.172 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,14 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <stdio.h>
#include <string.h>
#include <glib.h>
@ -347,7 +339,7 @@ ip_defragment_init(void)
}
void
capture_ip(const u_char *pd, int offset, int len, packet_counts *ld) {
capture_ip(const guchar *pd, int offset, int len, packet_counts *ld) {
if (!BYTES_ARE_IN_FRAME(offset, len, IPH_MIN_LEN)) {
ld->other++;
return;
@ -658,7 +650,7 @@ dissect_ip_tcp_options(tvbuff_t *tvb, int offset, guint length,
const ip_tcp_opt *opttab, int nopts, int eol,
packet_info *pinfo, proto_tree *opt_tree)
{
u_char opt;
guchar opt;
const ip_tcp_opt *optp;
opt_len_type len_type;
unsigned int optlen;

View File

@ -1,7 +1,7 @@
/* packet-ip.h
* Definitions for IP packet disassembly structures and routines
*
* $Id: packet-ip.h,v 1.23 2001/12/29 22:01:11 guy Exp $
* $Id: packet-ip.h,v 1.24 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,7 +26,7 @@
#ifndef __PACKET_IP_H__
#define __PACKET_IP_H__
void capture_ip(const u_char *, int, int, packet_counts *);
void capture_ip(const guchar *, int, int, packet_counts *);
typedef enum {
NO_LENGTH, /* option has no data, hence no length */

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-ipp.c,v 1.31 2002/05/30 01:56:55 guy Exp $
* $Id: packet-ipp.c,v 1.32 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,10 +28,6 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#include <ctype.h>

View File

@ -1,7 +1,7 @@
/* packet-ipsec.c
* Routines for IPsec/IPComp packet disassembly
*
* $Id: packet-ipsec.c,v 1.40 2002/05/30 05:26:05 guy Exp $
* $Id: packet-ipsec.c,v 1.41 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,14 +28,6 @@
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@ -147,7 +139,7 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "AH (SPI=0x%08x)",
(guint32)ntohl(ah.ah_spi));
(guint32)g_ntohl(ah.ah_spi));
}
if (tree) {
@ -164,10 +156,10 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
"Length: %u", (ah.ah_len + 2) << 2);
proto_tree_add_uint(ah_tree, hf_ah_spi, tvb,
offsetof(struct newah, ah_spi), 4,
(guint32)ntohl(ah.ah_spi));
(guint32)g_ntohl(ah.ah_spi));
proto_tree_add_uint(ah_tree, hf_ah_sequence, tvb,
offsetof(struct newah, ah_seq), 4,
(guint32)ntohl(ah.ah_seq));
(guint32)g_ntohl(ah.ah_seq));
proto_tree_add_text(ah_tree, tvb,
sizeof(ah), (ah.ah_len - 1) << 2,
"ICV");
@ -213,7 +205,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "ESP (SPI=0x%08x)",
(guint32)ntohl(esp.esp_spi));
(guint32)g_ntohl(esp.esp_spi));
}
/*
@ -225,10 +217,10 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
esp_tree = proto_item_add_subtree(ti, ett_esp);
proto_tree_add_uint(esp_tree, hf_esp_spi, tvb,
offsetof(struct newesp, esp_spi), 4,
(guint32)ntohl(esp.esp_spi));
(guint32)g_ntohl(esp.esp_spi));
proto_tree_add_uint(esp_tree, hf_esp_sequence, tvb,
offsetof(struct newesp, esp_seq), 4,
(guint32)ntohl(esp.esp_seq));
(guint32)g_ntohl(esp.esp_seq));
call_dissector(data_handle,
tvb_new_subset(tvb, sizeof(struct newesp), -1, -1),
pinfo, esp_tree);
@ -255,10 +247,10 @@ dissect_ipcomp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb_memcpy(tvb, (guint8 *)&ipcomp, 0, sizeof(ipcomp));
if (check_col(pinfo->cinfo, COL_INFO)) {
p = match_strval(ntohs(ipcomp.comp_cpi), cpi2val);
p = match_strval(g_ntohs(ipcomp.comp_cpi), cpi2val);
if (p == NULL) {
col_add_fstr(pinfo->cinfo, COL_INFO, "IPComp (CPI=0x%04x)",
ntohs(ipcomp.comp_cpi));
g_ntohs(ipcomp.comp_cpi));
} else
col_add_fstr(pinfo->cinfo, COL_INFO, "IPComp (CPI=%s)", p);
}
@ -280,7 +272,7 @@ dissect_ipcomp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ipcomp.comp_flags);
proto_tree_add_uint(ipcomp_tree, hf_ipcomp_cpi, tvb,
offsetof(struct ipcomp, comp_cpi), 2,
ntohs(ipcomp.comp_cpi));
g_ntohs(ipcomp.comp_cpi));
call_dissector(data_handle,
tvb_new_subset(tvb, sizeof(struct ipcomp), -1, -1), pinfo,
ipcomp_tree);

View File

@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
* $Id: packet-ipv6.c,v 1.84 2002/07/30 07:25:29 guy Exp $
* $Id: packet-ipv6.c,v 1.85 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -28,18 +28,10 @@
# include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_h
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <string.h>
#include <stdio.h>
#include <glib.h>
@ -208,7 +200,7 @@ dissect_frag6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
tvb_memcpy(tvb, (guint8 *)&frag, offset, sizeof(frag));
len = sizeof(frag);
frag.ip6f_offlg = ntohs(frag.ip6f_offlg);
frag.ip6f_offlg = g_ntohs(frag.ip6f_offlg);
*offlg = frag.ip6f_offlg;
*ident = frag.ip6f_ident;
if (check_col(pinfo->cinfo, COL_INFO)) {
@ -685,7 +677,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->ipproto = ipv6.ip6_nxt; /* XXX make work TCP follow (ipproto = 6) */
/* Get the payload length */
plen = ntohs(ipv6.ip6_plen);
plen = g_ntohs(ipv6.ip6_plen);
/* Adjust the length of this tvbuff to include only the IPv6 datagram. */
set_actual_length(tvb, plen + sizeof (struct ip6_hdr));
@ -707,7 +699,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(ipv6_tree, hf_ipv6_class, tvb,
offset + offsetof(struct ip6_hdr, ip6_flow), 4,
(guint8)((ntohl(ipv6.ip6_flow) >> 20) & 0xff));
(guint8)((g_ntohl(ipv6.ip6_flow) >> 20) & 0xff));
/*
* there should be no alignment problems for ip6_flow, since it's the first
@ -715,9 +707,9 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
proto_tree_add_uint_format(ipv6_tree, hf_ipv6_flow, tvb,
offset + offsetof(struct ip6_hdr, ip6_flow), 4,
(unsigned long)(ntohl(ipv6.ip6_flow) & IPV6_FLOWLABEL_MASK),
(unsigned long)(g_ntohl(ipv6.ip6_flow) & IPV6_FLOWLABEL_MASK),
"Flowlabel: 0x%05lx",
(unsigned long)(ntohl(ipv6.ip6_flow) & IPV6_FLOWLABEL_MASK));
(unsigned long)(g_ntohl(ipv6.ip6_flow) & IPV6_FLOWLABEL_MASK));
proto_tree_add_uint(ipv6_tree, hf_ipv6_plen, tvb,
offset + offsetof(struct ip6_hdr, ip6_plen), 2,

View File

@ -1,7 +1,7 @@
/* packet-ipv6.h
* Definitions for IPv6 packet disassembly
*
* $Id: packet-ipv6.h,v 1.26 2002/01/21 07:36:35 guy Exp $
* $Id: packet-ipv6.h,v 1.27 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -77,8 +77,8 @@ struct ip6_hdr {
*/
struct ip6_ext {
u_char ip6e_nxt;
u_char ip6e_len;
guchar ip6e_nxt;
guchar ip6e_len;
};
/* Hop-by-Hop options header */

Some files were not shown because too many files have changed in this diff Show More