/* 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>
#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>
/* 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>
* 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 */
/* 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>
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 *);
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;
}
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);
}
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);
/* 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>
#ifdef HAVE_LIBPCAP
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#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 *);
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() */
{
char tmpname[128+1];
gboolean is_tempfile;
- u_char c;
+ guchar c;
int i;
guint byte_count;
char *msg;
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;
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;
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;
* "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;
}
}
#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;
}
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;
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <ctype.h>
/* 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.
#include <sys/time.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#include <string.h>
#include "wtap.h"
*/
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;
# -*- 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)
#
#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
/* 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>
#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>
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;
{
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;
/* 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>
#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"
/* 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>
*
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "follow.h"
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 * );
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;
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. */
/* 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;
/* 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>
*
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;
} 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 {
* 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 $
*/
/*
# 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"
* 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;
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
/* 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
#include <sys/time.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#include <string.h>
#include "wtap.h"
* 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;
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));
}
/* 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),
/* 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>
*
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <epan/packet.h>
* 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>
#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
* 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>
#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>
* 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>
#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>
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 */
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;
}
-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;
* 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>
#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>
* 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>
#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>
* 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>
# 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>
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
/* inform resolv.c module of the new discovered addresses */
- u_int ip;
+ guint ip;
const guint8 *mac;
/* add sender address in all cases */
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
* 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>
*
# 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>
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;
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;
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <epan/packet.h>
}
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"? */
};
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) {
/* 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>
#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
*
* 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>
# 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>
* 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>
#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>
* 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>
#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>
/* 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.
#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>
* 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)
#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
{
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 */
/* 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));
/* 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,
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);
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,
};
}
found++;
- hlen = ntohs(bgp.bgp_len);
+ hlen = g_ntohs(bgp.bgp_len);
/*
* Desegmentation check.
* 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
# 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>
{
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;
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);
/* 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>
#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>
|((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;
/* 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>
*
# 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>
* 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>
#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>
* 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>
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdlib.h>
#include <string.h>
/* 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>
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdlib.h>
#include <string.h>
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "etypes.h"
};
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;
/* 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>
#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[];
/* 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>
# 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"
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);
}
/* 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>
#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
/* 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>
*
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <ctype.h>
/* 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 */
/* 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. */
/* 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];
{
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)
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.
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 */
{
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 :
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;
{
proto_tree *cotp_tree = NULL;
proto_item *ti;
- u_short src_ref;
+ gushort src_ref;
if (li > LI_MAX_DC)
return -1;
{
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;
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;
{
proto_tree *cotp_tree;
proto_item *ti;
- u_char *str;
+ guchar *str;
if (li > LI_MAX_ER)
return -1;
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;
/* 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>
*
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
* 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
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
* 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>
# 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"
*
* 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>
#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>
* 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>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
* 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>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
* 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>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
* 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>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
* 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>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
* 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>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
* 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>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
* 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>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
* 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>
#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"
/* 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>
*
# 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>
* 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
# 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>
/* 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>
*
#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>
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,
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;
/* 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 {
* 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>
#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>
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
which discuss them to some extent. */
static char *
-dns_type_name (u_int type)
+dns_type_name (guint type)
{
char *type_names[] = {
"unused",
static char *
-dns_long_type_name (u_int type)
+dns_long_type_name (guint type)
{
char *type_names[] = {
"unused",
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;
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;
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;
* 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>
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 */
* 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>
#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>
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
* 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>
# 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>
* (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>
# 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"
* 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>
# 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>
* 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
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
/* 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 ###########################################*/
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;
} /* 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;
};
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;
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))
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "etypes.h"
#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 */
/* 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>
#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
/* 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>
*
# 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"
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) {
*
* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
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;
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;
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))
/* 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? */
/* 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? */
/* 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>
#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
* 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>
#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>
* 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;
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;
* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <stdio.h>
#include <errno.h>
}
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 */
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;
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;
/* 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;
* 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>
#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>
* 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>
#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>
* 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>
# 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"
* 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>
#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>
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);
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;
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) {
* 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>
#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>
* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
*
* 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>
#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>
* 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>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include "packet-rpc.h"
*
* 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>
# 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>
*
* 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>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
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;
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;
* 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;
*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 */
* 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>
#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>
*
* 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>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
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;
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) { \
/* 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>
#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
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) {
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);
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;
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)))));
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));
* 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>
#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>
/* 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>
#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
/*
* 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,
}
static void
-decrypt_v5(u_char *bfr, guint32 size,guint32 key)
+decrypt_v5(guchar *bfr, guint32 size,guint32 key)
{
guint32 i;
guint32 k;
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);
}
}
}
char *aTime;
guint32 port;
guint32 passwdLen;
- const u_char *ipAddrp;
+ const guchar *ipAddrp;
guint32 status;
if (tree) {
{
proto_tree* subtree;
proto_item* ti;
- const u_char *ipAddrp;
+ const guchar *ipAddrp;
if (tree) {
if (size < SRV_LOGIN_REPLY_IP + 8) {
{
proto_tree* subtree;
proto_item* ti;
- const u_char *ipAddrp;
- const u_char *realipAddrp;
+ const guchar *ipAddrp;
+ const guchar *realipAddrp;
guint32 status;
if (tree) {
* 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>
#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
/* 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;
* 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);
}
* 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);
}
* 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>
* 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 *);
/* 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>
# 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"
/* 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>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
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);
}
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);
}
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);
}
* 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>
#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>
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");
/* 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>
# 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>
}
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;
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;
/* 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>
#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 */
*
* 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>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
/* 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>
#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>
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) {
"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");
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));
}
/*
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);
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);
}
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);
/* 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>
# 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>
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)) {
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));
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
*/
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,
/* 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>
*/
struct ip6_ext {
- u_char ip6e_nxt;
- u_char ip6e_len;
+ guchar ip6e_nxt;
+ guchar ip6e_len;
};
/* Hop-by-Hop options header */
* Routines for NetWare's IPX
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-ipx.c,v 1.107 2002/07/04 20:47:28 guy Exp $
+ * $Id: packet-ipx.c,v 1.108 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
/* packet-irc.c
* Routines for IRC packet dissection
*
- * $Id: packet-irc.c,v 1.19 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-irc.c,v 1.20 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
{
proto_tree *irc_tree, *ti;
gint offset = 0;
- const u_char *line;
+ const guchar *line;
gint next_offset;
int linelen;
* for ISAKMP (RFC 2407)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-isakmp.c,v 1.55 2002/05/20 01:29:07 guy Exp $
+ * $Id: packet-isakmp.c,v 1.56 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <glib.h>
#ifdef NEED_SNPRINTF_H
* Routines for iSCSI dissection
* Copyright 2001, Eurologic and Mark Burton <markb@ordern.com>
*
- * $Id: packet-iscsi.c,v 1.35 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-iscsi.c,v 1.36 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
/* packet-isis-clv.c
* Common CLV decode routines.
*
- * $Id: packet-isis-clv.c,v 1.21 2002/06/29 23:03:24 guy Exp $
+ * $Id: packet-isis-clv.c,v 1.22 2002/08/02 23:35:51 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
isis_dissect_authentication_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
int length, char *meaning)
{
- u_char pw_type;
+ guchar pw_type;
char sbuf[300]; /* 255 + header info area */
char *s = sbuf;
int auth_unsupported;
/* packet-isis-hello.c
* Routines for decoding isis hello packets and their CLVs
*
- * $Id: packet-isis-hello.c,v 1.30 2002/05/02 10:13:56 guy Exp $
+ * $Id: packet-isis-hello.c,v 1.31 2002/08/02 23:35:51 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
/* packet-isis-lsp.c
* Routines for decoding isis lsp packets and their CLVs
*
- * $Id: packet-isis-lsp.c,v 1.31 2002/05/07 18:52:26 guy Exp $
+ * $Id: packet-isis-lsp.c,v 1.32 2002/08/02 23:35:51 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
/* packet-isis-snp.c
* Routines for decoding isis complete & partial SNP and their payload
*
- * $Id: packet-isis-snp.c,v 1.16 2002/05/02 10:13:56 guy Exp $
+ * $Id: packet-isis-snp.c,v 1.17 2002/08/02 23:35:52 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
* Routines for ISO/OSI network and transport protocol packet disassembly, core
* bits.
*
- * $Id: packet-isis.c,v 1.31 2002/04/07 22:36:55 guy Exp $
+ * $Id: packet-isis.c,v 1.32 2002/08/02 23:35:52 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
/* packet-isl.c
* Routines for Cisco ISL Ethernet header disassembly
*
- * $Id: packet-isl.c,v 1.30 2002/01/21 07:36:36 guy Exp $
+ * $Id: packet-isl.c,v 1.31 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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-isl.h"
static dissector_handle_t data_handle;
void
-capture_isl(const u_char *pd, int offset, int len, packet_counts *ld)
+capture_isl(const guchar *pd, int offset, int len, packet_counts *ld)
{
guint8 type;
/* packet-isl.h
*
- * $Id: packet-isl.h,v 1.4 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-isl.h,v 1.5 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#ifndef __PACKET_ISL_H__
#define __PACKET_ISL_H__
-void capture_isl(const u_char *, int, int, packet_counts *);
+void capture_isl(const guchar *, int, int, packet_counts *);
#endif
* Routines for ISUP dissection
* Copyright 2001, Martina Obermeier <martina.obermeier@icn.siemens.de>
*
- * $Id: packet-isup.c,v 1.13 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-isup.c,v 1.14 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
* Wes Hardaker (c) 2000
* wjhardaker@ucdavis.edu
*
- * $Id: packet-kerberos.c,v 1.22 2002/07/29 02:03:54 sharpe Exp $
+ * $Id: packet-kerberos.c,v 1.23 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <string.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
/* packet-klm.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for klm dissection
*
- * $Id: packet-klm.c,v 1.8 2002/04/03 13:24:12 girlich Exp $
+ * $Id: packet-klm.c,v 1.9 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-nfs.h"
* Laurent Cazalet <laurent.cazalet@mailclub.net>
* Thomas Parvais <thomas.parvais@advalvas.be>
*
- * $Id: packet-l2tp.c,v 1.33 2002/07/10 20:55:45 guy Exp $
+ * $Id: packet-l2tp.c,v 1.34 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
* Routines for lapb frame disassembly
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-lapb.c,v 1.35 2002/04/09 08:15:02 guy Exp $
+ * $Id: packet-lapb.c,v 1.36 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
* Richard Sharpe <rsharpe@ns.aus.com> based on the lapb module by
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-lapbether.c,v 1.9 2002/01/21 07:36:36 guy Exp $
+ * $Id: packet-lapbether.c,v 1.10 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
* Routines for LAPD frame disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-lapd.c,v 1.29 2002/02/22 08:54:54 guy Exp $
+ * $Id: packet-lapd.c,v 1.30 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
/* packet-ldap.c
* Routines for ldap packet dissection
*
- * $Id: packet-ldap.c,v 1.42 2002/05/06 02:12:36 guy Exp $
+ * $Id: packet-ldap.c,v 1.43 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
/* packet-ldp.c
* Routines for LDP (RFC 3036) packet disassembly
*
- * $Id: packet-ldp.c,v 1.39 2002/05/01 08:26:57 guy Exp $
+ * $Id: packet-ldp.c,v 1.40 2002/08/02 23:35:53 jmayer Exp $
*
* Copyright (c) November 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
#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>
* Routines for IEEE 802.2 LLC layer
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-llc.c,v 1.98 2002/05/29 03:08:01 guy Exp $
+ * $Id: packet-llc.c,v 1.99 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "oui.h"
};
void
-capture_llc(const u_char *pd, int offset, int len, packet_counts *ld) {
+capture_llc(const guchar *pd, int offset, int len, packet_counts *ld) {
int is_snap;
guint16 control;
/* packet-llc.h
*
- * $Id: packet-llc.h,v 1.6 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-llc.h,v 1.7 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#ifndef __PACKET_LLC_H__
#define __PACKET_LLC_H__
-void capture_llc(const u_char *, int, int, packet_counts *);
+void capture_llc(const guchar *, int, int, packet_counts *);
void dissect_snap(tvbuff_t *, int, packet_info *, proto_tree *,
proto_tree *, int, int, int, int, int);
* Routines for Frame Relay Local Management Interface (LMI) disassembly
* Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-lmi.c,v 1.9 2002/01/21 07:36:37 guy Exp $
+ * $Id: packet-lmi.c,v 1.10 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-lmp.c,v 1.10 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-lmp.c,v 1.11 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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/tvbuff.h>
* Routines for LPR and LPRng packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-lpd.c,v 1.35 2002/01/24 09:20:49 guy Exp $
+ * $Id: packet-lpd.c,v 1.36 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
*
* Copyright 2000, 2001, 2002, Michael Tuexen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-m3ua.c,v 1.19 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-m3ua.c,v 1.20 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <stdlib.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>
*
* for information on Modbus/TCP.
*
- * $Id: packet-mbtcp.c,v 1.9 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-mbtcp.c,v 1.10 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
/* Make entries in Info column on summary display (updated after building proto tree) */
tvb_memcpy(tvb, (guint8 *)&mh, offset, sizeof(mbtcp_hdr));
- mh.transaction_id = ntohs(mh.transaction_id);
- mh.protocol_id = ntohs(mh.protocol_id);
- mh.len = ntohs(mh.len);
+ mh.transaction_id = g_ntohs(mh.transaction_id);
+ mh.protocol_id = g_ntohs(mh.protocol_id);
+ mh.len = g_ntohs(mh.len);
if ( mh.mdbs_hdr.function_code & 0x80 ) {
mh.mdbs_hdr.function_code ^= 0x80;
exception_returned = 1;
do {
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&mh, offset, sizeof(mbtcp_hdr));
- mh.transaction_id = ntohs(mh.transaction_id);
- mh.protocol_id = ntohs(mh.protocol_id);
- mh.len = ntohs(mh.len);
+ mh.transaction_id = g_ntohs(mh.transaction_id);
+ mh.protocol_id = g_ntohs(mh.protocol_id);
+ mh.len = g_ntohs(mh.len);
if ( mh.mdbs_hdr.function_code & 0x80 ) {
tvb_memcpy(tvb, (guint8 *)&exception_code, offset + sizeof(mbtcp_hdr), 1);
* Routines for Mobile IP dissection
* Copyright 2000, Stefan Raab <sraab@cisco.com>
*
- * $Id: packet-mip.c,v 1.31 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-mip.c,v 1.32 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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
-
#include <string.h>
#include <glib.h>
#include <time.h>
* Routines for MMS Message Encapsulation dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-mmse.c,v 1.13 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-mmse.c,v 1.14 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
/* packet-mount.c
* Routines for mount dissection
*
- * $Id: packet-mount.c,v 1.31 2002/04/15 08:55:03 girlich Exp $
+ * $Id: packet-mount.c,v 1.32 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include "packet-rpc.h"
*
* Routines for RFC 2250 MPEG-1 dissection
*
- * $Id: packet-mpeg1.c,v 1.7 2002/02/01 04:34:15 gram Exp $
+ * $Id: packet-mpeg1.c,v 1.8 2002/08/02 23:35:54 jmayer Exp $
*
* Copyright 2001,
* Francisco Javier Cabello Torres, <fjcabello@vtools.es>
#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>
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-mpls.c,v 1.26 2002/03/18 18:56:53 guy Exp $
+ * $Id: packet-mpls.c,v 1.27 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "ppptypes.h"
/* packet-mrdisc.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP/MRDISC packet disassembly
*
- * $Id: packet-mrdisc.c,v 1.7 2002/02/01 11:01:57 guy Exp $
+ * $Id: packet-mrdisc.c,v 1.8 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
*
* Copyright 2001, Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-msdp.c,v 1.6 2002/01/24 09:20:49 guy Exp $
+ * $Id: packet-msdp.c,v 1.7 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
/* packet-msnip.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP/MSNIP packet disassembly
*
- * $Id: packet-msnip.c,v 1.6 2002/02/01 11:01:57 guy Exp $
+ * $Id: packet-msnip.c,v 1.7 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
* Routines for Microsoft Proxy packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-msproxy.c,v 1.30 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-msproxy.c,v 1.31 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
#include "packet-udp.h"
extern void udp_hash_add(guint16 proto,
- void (*dissect)(const u_char *, int, frame_data *, proto_tree *));
+ void (*dissect)(const guchar *, int, frame_data *, proto_tree *));
static int proto_msproxy = -1;
* Routines for NetBIOS over IPX packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-nbipx.c,v 1.46 2002/01/21 07:36:37 guy Exp $
+ * $Id: packet-nbipx.c,v 1.47 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
* to when it had only NBNS)
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-nbns.c,v 1.76 2002/05/15 07:24:20 guy Exp $
+ * $Id: packet-nbns.c,v 1.77 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
static void
nbns_add_nbns_flags(proto_tree *nbns_tree, tvbuff_t *tvb, int offset,
- u_short flags, int is_wack)
+ gushort flags, int is_wack)
{
char buf[128+1];
guint16 opcode;
}
static void
-nbns_add_nb_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset, u_short flags)
+nbns_add_nb_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset, gushort flags)
{
char buf[128+1];
proto_tree *field_tree;
static void
nbns_add_name_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset,
- u_short flags)
+ gushort flags)
{
char buf[128+1];
proto_item *field_tree;
int data_offset;
int cur_offset;
int data_start;
- u_int ttl;
- u_short data_len;
- u_short flags;
+ guint ttl;
+ gushort data_len;
+ gushort flags;
proto_tree *rr_tree;
proto_item *trr;
char name_str[(NETBIOS_NAME_LEN - 1)*4 + 1];
- u_int num_names;
+ guint num_names;
char nbname[16+4+1]; /* 4 for [<last char>] */
- u_short name_flags;
+ gushort name_flags;
data_start = data_offset = offset;
cur_offset = offset;
* Gilbert Ramirez <gram@alumni.rice.edu>
* Modified to allow NCP over TCP/IP decodes by James Coe <jammer@cin.net>
*
- * $Id: packet-ncp.c,v 1.64 2002/05/25 12:44:06 guy Exp $
+ * $Id: packet-ncp.c,v 1.65 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
* Routines for NDMP dissection
* 2001 Ronnie Sahlberg (see AUTHORS for email)
*
- * $Id: packet-ndmp.c,v 1.20 2002/06/05 11:32:14 sahlberg Exp $
+ * $Id: packet-ndmp.c,v 1.21 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
*
* derived from the packet-nbns.c
*
- * $Id: packet-netbios.c,v 1.49 2002/07/22 20:52:21 tpot Exp $
+ * $Id: packet-netbios.c,v 1.50 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
int
-process_netbios_name(const u_char *name_ptr, char *name_ret)
+process_netbios_name(const guchar *name_ptr, char *name_ret)
{
int i;
int name_type = *(name_ptr + NETBIOS_NAME_LEN - 1);
- u_char name_char;
+ guchar name_char;
static const char hex_digits[16] = "0123456789abcdef";
for (i = 0; i < NETBIOS_NAME_LEN - 1; i++) {
}
-static u_char zeroes[10];
+static guchar zeroes[10];
static void dissect_netb_datagram( tvbuff_t *tvb, int offset, proto_tree *tree)
*
* derived from the packet-nbns.c
*
- * $Id: packet-netbios.h,v 1.13 2002/04/24 06:03:34 guy Exp $
+ * $Id: packet-netbios.h,v 1.14 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
void capture_netbios(packet_counts *);
-extern int process_netbios_name(const u_char *name_ptr, char *name_ret);
+extern int process_netbios_name(const guchar *name_ptr, char *name_ret);
extern int get_netbios_name(tvbuff_t *tvb, int offset,
char *name_ret);
extern char *netbios_name_type_descr(int name_type);
* Routines for nfs dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
* Copyright 2000-2002, Mike Frisch <frisch@hummingbird.com> (NFSv4 decoding)
- * $Id: packet-nfs.c,v 1.73 2002/06/20 20:55:49 guy Exp $
+ * $Id: packet-nfs.c,v 1.74 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-nfsacl.c,v 1.2 2002/05/16 08:57:12 sahlberg Exp $
+ * $Id: packet-nfsacl.c,v 1.3 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
*
* Ronnie Sahlberg
*
- * $Id: packet-nfsauth.c,v 1.1 2002/05/16 08:51:17 sahlberg Exp $
+ * $Id: packet-nfsauth.c,v 1.2 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
/* packet-nisplus.c
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
- * $Id: packet-nisplus.c,v 1.11 2002/04/03 13:24:12 girlich Exp $
+ * $Id: packet-nisplus.c,v 1.12 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <time.h>
#include "packet-rpc.h"
/* packet-nlm.c
* Routines for nlm dissection
*
- * $Id: packet-nlm.c,v 1.27 2002/05/21 10:17:27 sahlberg Exp $
+ * $Id: packet-nlm.c,v 1.28 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-nfs.h"
* Routines for nntp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-nntp.c,v 1.25 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-nntp.c,v 1.26 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
* Routines for NTLM Secure Service Provider
* Devin Heitmueller <dheitmueller@netilla.com>
*
- * $Id: packet-ntlmssp.c,v 1.3 2002/07/10 06:17:55 guy Exp $
+ * $Id: packet-ntlmssp.c,v 1.4 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
* Routines for NTP packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-ntp.c,v 1.35 2002/04/02 01:32:46 guy Exp $
+ * $Id: packet-ntp.c,v 1.36 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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 <time.h>
#include <math.h>
/* packet-null.c
* Routines for null packet disassembly
*
- * $Id: packet-null.c,v 1.53 2002/07/30 07:25:29 guy Exp $
+ * $Id: packet-null.c,v 1.54 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <glib.h>
#ifdef HAVE_SYS_SOCKET_H
static dissector_handle_t ppp_hdlc_handle;
static dissector_handle_t data_handle;
void
-capture_null( const u_char *pd, int len, packet_counts *ld )
+capture_null( const guchar *pd, int len, packet_counts *ld )
{
guint32 null_header;
/* packet-null.h
*
- * $Id: packet-null.h,v 1.5 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-null.h,v 1.6 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#ifndef __PACKET_NULL_H__
#define __PACKET_NULL_H__
-void capture_null(const u_char *, int, packet_counts *);
+void capture_null(const guchar *, int, packet_counts *);
#endif
* ISO 10589 ISIS (Intradomain Routing Information Exchange Protocol)
* ISO 9542 ESIS (End System To Intermediate System Routing Exchange Protocol)
*
- * $Id: packet-osi-options.c,v 1.12 2002/04/30 23:56:58 guy Exp $
+ * $Id: packet-osi-options.c,v 1.13 2002/08/02 23:35:55 jmayer Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
static void
-dissect_option_qos( const u_char type, const u_char sub_type, int offset,
- u_char len, tvbuff_t *tvb, proto_tree *tree ) {
+dissect_option_qos( const guchar type, const guchar sub_type, int offset,
+ guchar len, tvbuff_t *tvb, proto_tree *tree ) {
- u_char tmp_type = 0;
+ guchar tmp_type = 0;
proto_item *ti;
proto_tree *osi_qos_tree = NULL;
}
static void
-dissect_option_route( u_char parm_type, u_char offset, u_char parm_len,
+dissect_option_route( guchar parm_type, guchar offset, guchar parm_len,
tvbuff_t *tvb, proto_tree *tree ) {
- u_char next_hop = 0;
- u_char this_hop = 0;
- u_char netl = 0;
- u_char last_hop = 0;
- u_char cnt_hops = 0;
+ guchar next_hop = 0;
+ guchar this_hop = 0;
+ guchar netl = 0;
+ guchar last_hop = 0;
+ guchar cnt_hops = 0;
proto_item *ti;
proto_tree *osi_route_tree = NULL;
static void
-dissect_option_rfd( const u_char error, const u_char field, u_char offset,
- u_char len, tvbuff_t *tvb, proto_tree *tree ) {
- u_char error_class = 0;
+dissect_option_rfd( const guchar error, const guchar field, guchar offset,
+ guchar len, tvbuff_t *tvb, proto_tree *tree ) {
+ guchar error_class = 0;
char *format_string[] =
{ "Reason for discard {General} : %s, in field %u",
"Reason for discard {Address} : %s, in field %u",
* main esis tree data and call the sub-protocols as needed.
*
* Input:
- * u_char : length of option section
+ * guchar : length of option section
* tvbuff_t * : tvbuff containing packet data
* int : offset into packet where we are (packet_data[offset]== start
* of what we care about)
* void, but we will add to the proto_tree if it is not NULL.
*/
void
-dissect_osi_options( u_char opt_len, tvbuff_t *tvb,
+dissect_osi_options( guchar opt_len, tvbuff_t *tvb,
int offset, proto_tree *tree) {
proto_item *ti;
proto_tree *osi_option_tree = NULL;
- u_char parm_len = 0;
- u_char parm_type = 0;
+ guchar parm_len = 0;
+ guchar parm_type = 0;
guint8 octet;
if (tree) {
/* packet-osi-options.h
* Defines for OSI options part decode
*
- * $Id: packet-osi-options.h,v 1.4 2002/04/30 23:56:58 guy Exp $
+ * $Id: packet-osi-options.h,v 1.5 2002/08/02 23:35:55 jmayer Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
/*
* published API functions
*/
-extern void dissect_osi_options( u_char, tvbuff_t *, int,
+extern void dissect_osi_options( guchar, tvbuff_t *, int,
proto_tree *);
extern void proto_register_osi_options(void);
* Routines for ISO/OSI network and transport protocol packet disassembly
* Main entrance point and common functions
*
- * $Id: packet-osi.c,v 1.53 2002/01/21 07:36:38 guy Exp $
+ * $Id: packet-osi.c,v 1.54 2002/08/02 23:35:55 jmayer Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <ctype.h>
cksum_status_t
-calc_checksum( tvbuff_t *tvb, int offset, u_int len, u_int checksum) {
+calc_checksum( tvbuff_t *tvb, int offset, guint len, guint checksum) {
const gchar *buffer;
guint available_len;
const guint8 *p;
guint32 c0, c1;
- u_int seglen;
- u_int i;
+ guint seglen;
+ guint i;
if ( 0 == checksum )
return( NO_CKSUM );
/* packet-osi.h
*
- * $Id: packet-osi.h,v 1.10 2002/02/28 19:24:24 gram Exp $
+ * $Id: packet-osi.h,v 1.11 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
CKSUM_NOT_OK /* checksum is not OK */
} cksum_status_t;
-extern cksum_status_t calc_checksum(tvbuff_t *, int, u_int, u_int);
+extern cksum_status_t calc_checksum(tvbuff_t *, int, guint, guint);
#endif /* _PACKET_OSI_H */
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-ospf.c,v 1.68 2002/05/30 05:26:05 guy Exp $
+ * $Id: packet-ospf.c,v 1.69 2002/08/02 23:35:55 jmayer Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
# 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>
cksum_vec[1].ptr = pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
- phdr[0] = htonl(ospflen);
- phdr[1] = htonl(IP_PROTO_OSPF);
+ phdr[0] = g_htonl(ospflen);
+ phdr[1] = g_htonl(IP_PROTO_OSPF);
cksum_vec[2].len = 8;
cksum_vec[3].ptr = tvb_get_ptr(tvb, 0, reported_length);
/* packet-pcnfsd.c
* Routines for PCNFSD dissection
*
- * $Id: packet-pcnfsd.c,v 1.8 2002/05/14 21:22:39 guy Exp $
+ * $Id: packet-pcnfsd.c,v 1.9 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include "packet-rpc.h"
/* packet-pflog.c
* Routines for pflog (OpenBSD Firewall Logging) packet disassembly
*
- * $Id: packet-pflog.c,v 1.5 2002/07/15 20:55:51 guy Exp $
+ * $Id: packet-pflog.c,v 1.6 2002/08/02 23:35:56 jmayer Exp $
*
* Copyright 2001 Mike Frantzen
* All rights reserved.
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
static gint ett_pflog = -1;
void
-capture_pflog(const u_char *pd, int offset, int len, packet_counts *ld)
+capture_pflog(const guchar *pd, int offset, int len, packet_counts *ld)
{
struct pfloghdr pflogh;
/* packet-pgm.c
* Routines for pgm packet disassembly
*
- * $Id: packet-pgm.c,v 1.16 2002/04/29 08:20:09 guy Exp $
+ * $Id: packet-pgm.c,v 1.17 2002/08/02 23:35:56 jmayer Exp $
*
* Copyright (c) 2000 by Talarian Corp
*
#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 <stdio.h>
#include <stdlib.h>
#include <ctype.h>
nshort_t tsdulen; /* TSDU length */
} pgm_type;
#define pgmhdr_ntoh(_p) \
- (_p)->sport = ntohs((_p)->sport); \
- (_p)->dport = ntohs((_p)->dport); \
- (_p)->type = ntohs((_p)->type); \
- (_p)->opts = ntohs((_p)->opts); \
- (_p)->cksum = ntohs((_p)->cksum); \
- (_p)->tsdulen = ntohs((_p)->tsdulen)
+ (_p)->sport = g_ntohs((_p)->sport); \
+ (_p)->dport = g_ntohs((_p)->dport); \
+ (_p)->type = g_ntohs((_p)->type); \
+ (_p)->opts = g_ntohs((_p)->opts); \
+ (_p)->cksum = g_ntohs((_p)->cksum); \
+ (_p)->tsdulen = g_ntohs((_p)->tsdulen)
/* The PGM SPM header */
typedef struct {
} pgm_spm_t;
static const size_t PGM_SPM_SZ = sizeof(pgm_type)+sizeof(pgm_spm_t);
#define spm_ntoh(_p) \
- (_p)->sqn = ntohl((_p)->sqn); \
- (_p)->trail = ntohl((_p)->trail); \
- (_p)->lead = ntohl((_p)->lead); \
- (_p)->path_afi = ntohs((_p)->path_afi); \
- (_p)->res = ntohs((_p)->res);
+ (_p)->sqn = g_ntohl((_p)->sqn); \
+ (_p)->trail = g_ntohl((_p)->trail); \
+ (_p)->lead = g_ntohl((_p)->lead); \
+ (_p)->path_afi = g_ntohs((_p)->path_afi); \
+ (_p)->res = g_ntohs((_p)->res);
/* The PGM Data (ODATA/RDATA) header */
typedef struct {
nlong_t trail; /* Trailing edge sequence number */
} pgm_data_t;
#define data_ntoh(_p) \
- (_p)->sqn = ntohl((_p)->sqn); \
- (_p)->trail = ntohl((_p)->trail)
+ (_p)->sqn = g_ntohl((_p)->sqn); \
+ (_p)->trail = g_ntohl((_p)->trail)
static const size_t PGM_DATA_HDR_SZ = sizeof(pgm_type)+sizeof(pgm_data_t);
/* The PGM NAK (NAK/N-NAK/NCF) header */
} pgm_nak_t;
static const size_t PGM_NAK_SZ = sizeof(pgm_type)+sizeof(pgm_nak_t);
#define nak_ntoh(_p) \
- (_p)->sqn = ntohl((_p)->sqn); \
- (_p)->src_afi = ntohs((_p)->src_afi); \
- (_p)->src_res = ntohs((_p)->src_res); \
- (_p)->grp_afi = ntohs((_p)->grp_afi); \
- (_p)->grp_res = ntohs((_p)->grp_res)
+ (_p)->sqn = g_ntohl((_p)->sqn); \
+ (_p)->src_afi = g_ntohs((_p)->src_afi); \
+ (_p)->src_res = g_ntohs((_p)->src_res); \
+ (_p)->grp_afi = g_ntohs((_p)->grp_afi); \
+ (_p)->grp_res = g_ntohs((_p)->grp_res)
/* The PGM ACK header (PGMCC) */
typedef struct {
} pgm_ack_t;
static const size_t PGM_ACK_SZ = sizeof(pgm_type)+sizeof(pgm_ack_t);
#define ack_ntoh(_p) \
- (_p)->rx_max_sqn = ntohl((_p)->rx_max_sqn); \
- (_p)->bitmap = ntohl((_p)->bitmap)
+ (_p)->rx_max_sqn = g_ntohl((_p)->rx_max_sqn); \
+ (_p)->bitmap = g_ntohl((_p)->bitmap)
/* constants for hdr types */
#if defined(PGM_SPEC_01_PCKTS)
int theend = 0, firsttime = 1;
tvb_memcpy(tvb, (guint8 *)&opts, offset, sizeof(opts));
- opts.total_len = ntohs(opts.total_len);
+ opts.total_len = g_ntohs(opts.total_len);
tf = proto_tree_add_text(tree, tvb, offset,
opts.total_len,
offset+3, 1, optdata.res);
proto_tree_add_uint(opt_tree, hf_pgm_opt_join_minjoin, tvb,
- offset+4, 4, ntohl(optdata.opt_join_min));
+ offset+4, 4, g_ntohl(optdata.opt_join_min));
break;
}
paritystr(optdata.po), optdata.po);
proto_tree_add_uint(opt_tree, hf_pgm_opt_parity_prm_prmtgsz,
- tvb, offset+4, 4, ntohl(optdata.prm_tgsz));
+ tvb, offset+4, 4, g_ntohl(optdata.prm_tgsz));
break;
}
offset+3, 1, optdata.res);
proto_tree_add_uint(opt_tree, hf_pgm_opt_parity_grp_prmgrp,
- tvb, offset+4, 4, ntohl(optdata.prm_grp));
+ tvb, offset+4, 4, g_ntohl(optdata.prm_grp));
break;
}
*/
for (i=0; i < naks; i++) {
sprintf(nakbuf+soffset, "0x%lx ",
- (unsigned long)ntohl(naklist[i]));
+ (unsigned long)g_ntohl(naklist[i]));
soffset = strlen(nakbuf);
if ((++j % 8) == 0) {
if (firsttime) {
offset+4, 4, optdata.tsp);
proto_tree_add_uint(opt_tree, hf_pgm_opt_ccdata_afi, tvb,
- offset+8, 2, ntohs(optdata.acker_afi));
+ offset+8, 2, g_ntohs(optdata.acker_afi));
proto_tree_add_uint(opt_tree, hf_pgm_opt_ccdata_res2, tvb,
- offset+10, 2, ntohs(optdata.res2));
+ offset+10, 2, g_ntohs(optdata.res2));
- switch (ntohs(optdata.acker_afi)) {
+ switch (g_ntohs(optdata.acker_afi)) {
case AFNUM_INET:
proto_tree_add_ipv4(opt_tree, hf_pgm_opt_ccdata_acker,
offset+4, 4, optdata.tsp);
proto_tree_add_uint(opt_tree, hf_pgm_opt_ccfeedbk_afi, tvb,
- offset+8, 2, ntohs(optdata.acker_afi));
+ offset+8, 2, g_ntohs(optdata.acker_afi));
proto_tree_add_uint(opt_tree, hf_pgm_opt_ccfeedbk_lossrate, tvb,
- offset+10, 2, ntohs(optdata.loss_rate));
+ offset+10, 2, g_ntohs(optdata.loss_rate));
- switch (ntohs(optdata.acker_afi)) {
+ switch (g_ntohs(optdata.acker_afi)) {
case AFNUM_INET:
proto_tree_add_ipv4(opt_tree, hf_pgm_opt_ccfeedbk_acker,
}
if ((hdr->opts & PGM_OPT)) {
tvb_memcpy(tvb, (guint8 *)&opts, bytes, sizeof(opts));
- bytes += ntohs(opts.total_len);
+ bytes += g_ntohs(opts.total_len);
}
return(bytes);
}
tvb_memcpy(tvb, (guint8 *)&pgmhdr, offset, sizeof(pgm_type));
hlen = sizeof(pgm_type);
- pgmhdr.sport = ntohs(pgmhdr.sport);
- pgmhdr.dport = ntohs(pgmhdr.dport);
- pgmhdr.tsdulen = ntohs(pgmhdr.tsdulen);
+ pgmhdr.sport = g_ntohs(pgmhdr.sport);
+ pgmhdr.dport = g_ntohs(pgmhdr.dport);
+ pgmhdr.tsdulen = g_ntohs(pgmhdr.tsdulen);
pktname = val_to_str(pgmhdr.type, type_vals, "Unknown (0x%02x)");
* Routines for PIM disassembly
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-pim.c,v 1.40 2002/04/22 07:41:32 guy Exp $
+ * $Id: packet-pim.c,v 1.41 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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 <stddef.h> /* For offsetof */
#include <string.h>
#include <glib.h>
cksum_vec[1].ptr = pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
- phdr[0] = htonl(pim_length);
- phdr[1] = htonl(IP_PROTO_PIM);
+ phdr[0] = g_htonl(pim_length);
+ phdr[1] = g_htonl(IP_PROTO_PIM);
cksum_vec[2].len = 8;
cksum_vec[3].ptr = tvb_get_ptr(tvb, 0, pim_length);
cksum_vec[3].len = pim_length;
* Routines for pop packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-pop.c,v 1.31 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-pop.c,v 1.32 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
#define TCP_PORT_POP 110
-static gboolean response_is_continuation(const u_char *data);
+static gboolean response_is_continuation(const guchar *data);
static void
dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *pop_tree;
proto_item *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, "POP");
}
}
-static gboolean response_is_continuation(const u_char *data)
+static gboolean response_is_continuation(const guchar *data)
{
if (strncmp(data, "+OK", strlen("+OK")) == 0)
return FALSE;
/* packet-portmap.c
* Routines for portmap dissection
*
- * $Id: packet-portmap.c,v 1.37 2002/05/11 18:52:55 guy Exp $
+ * $Id: packet-portmap.c,v 1.38 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-portmap.h"
/* packet-ppp.c
* Routines for ppp packet disassembly
*
- * $Id: packet-ppp.c,v 1.93 2002/05/22 09:52:14 guy Exp $
+ * $Id: packet-ppp.c,v 1.94 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include "prefs.h"
}
void
-capture_ppp_hdlc( const u_char *pd, int offset, int len, packet_counts *ld ) {
+capture_ppp_hdlc( const guchar *pd, int offset, int len, packet_counts *ld ) {
if (!BYTES_ARE_IN_FRAME(offset, len, 2)) {
ld->other++;
return;
/* packet-ppp.h
*
- * $Id: packet-ppp.h,v 1.9 2001/12/19 21:14:49 guy Exp $
+ * $Id: packet-ppp.h,v 1.10 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
/* PPP options */
extern gboolean ppp_vj_decomp;/* FALSE = No VJ header decompression,
TRUE = Decompress VJ */
-void capture_ppp_hdlc(const u_char *, int, int, packet_counts *);
+void capture_ppp_hdlc(const guchar *, int, int, packet_counts *);
#endif
/* packet-pppoe.c
* Routines for PPP Over Ethernet (PPPoE) packet disassembly (RFC2516)
*
- * $Id: packet-pppoe.c,v 1.22 2002/05/01 07:54:08 guy Exp $
+ * $Id: packet-pppoe.c,v 1.23 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/strutil.h>
* Routines for the Point-to-Point Tunnelling Protocol (PPTP) (RFC 2637)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-pptp.c,v 1.24 2002/05/01 08:08:01 guy Exp $
+ * $Id: packet-pptp.c,v 1.25 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
*
* By Tim Newsham
*
- * $Id: packet-prism.c,v 1.6 2002/01/21 07:36:38 guy Exp $
+ * $Id: packet-prism.c,v 1.7 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
static dissector_handle_t ieee80211_handle;
void
-capture_prism(const u_char *pd, int offset, int len, packet_counts *ld)
+capture_prism(const guchar *pd, int offset, int len, packet_counts *ld)
{
if(!BYTES_ARE_IN_FRAME(offset, len, (int)sizeof(struct prism_hdr))) {
ld->other ++;
*
* By Tim Newsham
*
- * $Id: packet-prism.h,v 1.1 2001/11/28 07:11:07 guy Exp $
+ * $Id: packet-prism.h,v 1.2 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-void capture_prism(const u_char *pd, int offset, int len, packet_counts *ld);
+void capture_prism(const guchar *pd, int offset, int len, packet_counts *ld);
void proto_register_prism(void);
void proto_reg_handoff_prism(void);
* Routines for Q.2931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q2931.c,v 1.27 2002/05/28 23:29:25 guy Exp $
+ * $Id: packet-q2931.c,v 1.28 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q931.c,v 1.44 2002/05/14 09:24:26 guy Exp $
+ * $Id: packet-q931.c,v 1.45 2002/08/02 23:35:56 jmayer Exp $
*
* Modified by Andreas Sikkema for possible use with H.323
*
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
* Routines for QLLC protocol - Qualified? LLC
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-qllc.c,v 1.5 2002/01/24 09:20:50 guy Exp $
+ * $Id: packet-qllc.c,v 1.6 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
- * $Id: packet-quake.c,v 1.26 2002/04/02 06:28:16 girlich Exp $
+ * $Id: packet-quake.c,v 1.27 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
* http://www.dgs.monash.edu.au/~timf/bottim/
* http://www.opt-sci.Arizona.EDU/Pandora/default.asp
*
- * $Id: packet-quake2.c,v 1.11 2002/07/29 09:28:28 girlich Exp $
+ * $Id: packet-quake2.c,v 1.12 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "prefs.h"
*
* Uwe Girlich <uwe@planetquake.com>
*
- * $Id: packet-quake3.c,v 1.12 2002/04/02 06:28:16 girlich Exp $
+ * $Id: packet-quake3.c,v 1.13 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
- * $Id: packet-quakeworld.c,v 1.14 2002/06/09 21:25:47 guy Exp $
+ * $Id: packet-quakeworld.c,v 1.15 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
*
* RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869
*
- * $Id: packet-radius.c,v 1.65 2002/07/17 01:02:45 guy Exp $
+ * $Id: packet-radius.c,v 1.66 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
rhcode= (int)rh.rh_code;
rhident= (int)rh.rh_ident;
- rhlength= (int)ntohs(rh.rh_pktlength);
+ rhlength= (int)g_ntohs(rh.rh_pktlength);
codestrval= match_strval(rhcode,radius_vals);
if (codestrval==NULL)
{
* Based on 3GPP TS 25.413 V3.4.0
* Copyright 2001, Martin Held <Martin.Held@icn.siemens.de>
*
- * $Id: packet-ranap.c,v 1.13 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-ranap.c,v 1.14 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <stdlib.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>
/* packet-raw.c
* Routines for raw packet disassembly
*
- * $Id: packet-raw.c,v 1.33 2002/02/05 00:09:45 guy Exp $
+ * $Id: packet-raw.c,v 1.34 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
static dissector_handle_t ppp_hdlc_handle;
void
-capture_raw(const u_char *pd, int len, packet_counts *ld)
+capture_raw(const guchar *pd, int len, packet_counts *ld)
{
/* So far, the only time we get raw connection types are with Linux and
* Irix PPP connections. We can't tell what type of data is coming down
/* packet-raw.h
*
- * $Id: packet-raw.h,v 1.5 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-raw.h,v 1.6 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#ifndef __PACKET_RAW_H__
#define __PACKET_RAW_H__
-void capture_raw(const u_char *, int, packet_counts *);
+void capture_raw(const guchar *, int, packet_counts *);
#endif
* RFC1058, RFC2453
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-rip.c,v 1.31 2002/04/04 23:20:33 guy Exp $
+ * $Id: packet-rip.c,v 1.32 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.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>
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
* derived from packet-rip.c
*
- * $Id: packet-ripng.c,v 1.25 2002/01/24 09:20:51 guy Exp $
+ * $Id: packet-ripng.c,v 1.26 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.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>
ip6_to_str(&ni6.rip6_dest),
ni6.rip6_plen,
ni6.rip6_metric,
- ntohs(ni6.rip6_tag));
+ g_ntohs(ni6.rip6_tag));
} else {
ti = proto_tree_add_text(ripng_tree, tvb, offset,
sizeof(ni6), "IP Address: %s/%u, Metric: %u",
proto_tree_add_text(subtree, tvb,
offset + offsetof(struct netinfo6, rip6_tag),
sizeof(ni6.rip6_tag), "Tag: 0x%04x",
- ntohs(ni6.rip6_tag));
+ g_ntohs(ni6.rip6_tag));
proto_tree_add_text(subtree, tvb,
offset + offsetof(struct netinfo6, rip6_plen),
sizeof(ni6.rip6_plen), "Prefix length: %u",
* RIPng definition
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-ripng.h,v 1.4 2000/08/11 13:34:28 deniel Exp $
+ * $Id: packet-ripng.h,v 1.5 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
struct netinfo6 {
struct e_in6_addr rip6_dest;
- u_short rip6_tag;
- u_char rip6_plen;
- u_char rip6_metric;
+ gushort rip6_tag;
+ guchar rip6_plen;
+ guchar rip6_metric;
};
struct rip6 {
- u_char rip6_cmd;
- u_char rip6_vers;
- u_char rip6_res1[2];
+ guchar rip6_cmd;
+ guchar rip6_vers;
+ guchar rip6_res1[2];
union {
struct netinfo6 ru6_nets[1];
char ru6_tracefile[1];
* Routines for unix rlogin packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-rlogin.c,v 1.26 2002/01/24 09:20:51 guy Exp $
+ * $Id: packet-rlogin.c,v 1.27 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
* Routines for java rmiregistry dissection
* Copyright 2002, Michael Stiller <ms@2scale.net>
*
- * $Id: packet-rmi.c,v 1.3 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-rmi.c,v 1.4 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
gint offset;
gint next_offset;
int datalen;
- const u_char *data;
+ const guchar *data;
guint16 version, len, port;
guint8 message, proto;
}
static rmi_type
-get_rmi_type(const u_char *data, int datalen)
+get_rmi_type(const guchar *data, int datalen)
{
guint16 ser_magic;
* header file for java rmiregistry dissection
* Copyright 2002, Michael Stiller <ms@2scale.net>
*
- * $Id: packet-rmi.h,v 1.1 2002/05/29 18:52:26 guy Exp $
+ * $Id: packet-rmi.h,v 1.2 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
dissect_ser(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static rmi_type
-get_rmi_type(const u_char *data, int datalen);
+get_rmi_type(const guchar *data, int datalen);
#endif
* Routines for rpc dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
*
- * $Id: packet-rpc.c,v 1.97 2002/06/07 10:11:39 guy Exp $
+ * $Id: packet-rpc.c,v 1.98 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <stdio.h>
#include <string.h>
* Routines for rquota dissection
* Copyright 2001, Mike Frisch <frisch@hummingbird.com>
*
- * $Id: packet-rquota.c,v 1.7 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-rquota.c,v 1.8 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-rquota.h"
* Robert Tsai <rtsai@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rsh.c,v 1.18 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-rsh.c,v 1.19 2002/08/02 23:35:58 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/strutil.h>
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rstat.c,v 1.1 2002/05/15 07:21:41 guy Exp $
+ * $Id: packet-rstat.c,v 1.2 2002/08/02 23:35:58 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-rsvp.c,v 1.71 2002/07/31 10:10:44 guy Exp $
+ * $Id: packet-rsvp.c,v 1.72 2002/08/02 23:35:58 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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
/* packet-rtcp.c
*
- * $Id: packet-rtcp.c,v 1.33 2002/07/17 10:37:31 guy Exp $
+ * $Id: packet-rtcp.c,v 1.34 2002/08/02 23:35:59 jmayer Exp $
*
* Routines for RTCP dissection
* RTCP = Real-time Transport Control Protocol
#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>
* Copyright 2000, Philips Electronics N.V.
* Written by Andreas Sikkema <andreas.sikkema@philips.com>
*
- * $Id: packet-rtp.c,v 1.34 2002/05/30 01:56:55 guy Exp $
+ * $Id: packet-rtp.c,v 1.35 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rtsp.c,v 1.48 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-rtsp.c,v 1.49 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
return offset - orig_offset;
}
-static void process_rtsp_request(tvbuff_t *tvb, int offset, const u_char *data,
+static void process_rtsp_request(tvbuff_t *tvb, int offset, const guchar *data,
size_t linelen, proto_tree *tree);
-static void process_rtsp_reply(tvbuff_t *tvb, int offset, const u_char *data,
+static void process_rtsp_reply(tvbuff_t *tvb, int offset, const guchar *data,
size_t linelen, proto_tree *tree);
typedef enum {
#define RTSP_NMETHODS (sizeof rtsp_methods / sizeof rtsp_methods[0])
static rtsp_type_t
-is_rtsp_request_or_reply(const u_char *line, size_t linelen)
+is_rtsp_request_or_reply(const guchar *line, size_t linelen)
{
unsigned ii;
static const char rtsp_content_type[] = "Content-Type:";
static int
-is_content_sdp(const u_char *line, size_t linelen)
+is_content_sdp(const guchar *line, size_t linelen)
{
static const char type[] = "application/sdp";
size_t typelen = STRLEN_CONST(type);
static const char rtsp_inter[] = "interleaved=";
static void
-rtsp_create_conversation(packet_info *pinfo, const u_char *line_begin,
+rtsp_create_conversation(packet_info *pinfo, const guchar *line_begin,
size_t line_len)
{
conversation_t *conv;
- u_char buf[256];
- u_char *tmp;
- u_int c_data_port, c_mon_port;
- u_int s_data_port, s_mon_port;
+ guchar buf[256];
+ guchar *tmp;
+ guint c_data_port, c_mon_port;
+ guint s_data_port, s_mon_port;
address null_addr;
if (line_len > sizeof(buf) - 1) {
}
if (!c_data_port) {
rtsp_conversation_data_t *data;
- u_int s_data_chan, s_mon_chan;
+ guint s_data_chan, s_mon_chan;
int i;
/*
static const char rtsp_content_length[] = "Content-Length:";
static int
-rtsp_get_content_length(const u_char *line_begin, size_t line_len)
+rtsp_get_content_length(const guchar *line_begin, size_t line_len)
{
- u_char buf[256];
- u_char *tmp;
+ guchar buf[256];
+ guchar *tmp;
long content_length;
char *p;
- u_char *up;
+ guchar *up;
if (line_len > sizeof(buf) - 1) {
/*
{
proto_tree *rtsp_tree;
proto_item *ti = NULL;
- const u_char *line;
+ const guchar *line;
gint next_offset;
- const u_char *linep, *lineend;
+ const guchar *linep, *lineend;
int orig_offset;
size_t linelen;
- u_char c;
+ guchar c;
gboolean is_mime_header;
int is_sdp = FALSE;
int datalen;
}
static void
-process_rtsp_request(tvbuff_t *tvb, int offset, const u_char *data,
+process_rtsp_request(tvbuff_t *tvb, int offset, const guchar *data,
size_t linelen, proto_tree *tree)
{
- const u_char *lineend = data + linelen;
+ const guchar *lineend = data + linelen;
unsigned ii;
- const u_char *url;
- const u_char *url_start;
- u_char *tmp_url;
+ const guchar *url;
+ const guchar *url_start;
+ guchar *tmp_url;
/* Request Methods */
for (ii = 0; ii < RTSP_NMETHODS; ii++) {
}
static void
-process_rtsp_reply(tvbuff_t *tvb, int offset, const u_char *data,
+process_rtsp_reply(tvbuff_t *tvb, int offset, const guchar *data,
size_t linelen, proto_tree *tree)
{
- const u_char *lineend = data + linelen;
- const u_char *status = data;
- const u_char *status_start;
+ const guchar *lineend = data + linelen;
+ const guchar *status = data;
+ const guchar *status_start;
unsigned int status_i;
/* status code */
/* packet-rwall.c
*
- * $Id: packet-rwall.c,v 1.5 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-rwall.c,v 1.6 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-rwall.h"
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
- * $Id: packet-rx.c,v 1.35 2002/04/14 23:22:21 guy Exp $
+ * $Id: packet-rx.c,v 1.36 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-sadmind.c,v 1.1 2002/05/15 07:21:41 guy Exp $
+ * $Id: packet-sadmind.c,v 1.2 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-sap.c,v 1.27 2002/01/24 09:20:51 guy Exp $
+ * $Id: packet-sap.c,v 1.28 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
*
* Copyright 2002, Jeff Morriss <jeff.morriss[AT]ulticom.com>
*
- * $Id: packet-sccp.c,v 1.5 2002/04/13 22:34:17 guy Exp $
+ * $Id: packet-sccp.c,v 1.6 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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
-
#include <string.h>
#include "epan/packet.h"
* Routines for decoding SCSI CDBs and responses
* Author: Dinesh G Dutt (ddutt@cisco.com)
*
- * $Id: packet-scsi.c,v 1.10 2002/06/13 07:36:52 guy Exp $
+ * $Id: packet-scsi.c,v 1.11 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/strutil.h>
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-sdp.c,v 1.30 2002/04/14 23:22:22 guy Exp $
+ * $Id: packet-sdp.c,v 1.31 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
gint offset = 0;
gint next_offset;
int linelen;
- u_char section;
- u_char type;
- u_char delim;
+ guchar section;
+ guchar type;
+ guchar delim;
int datalen;
int tokenoffset;
int hf = -1;
* Adds support for the data packet protocol for the SliMP3
* See www.slimdevices.com for details.
*
- * $Id: packet-slimp3.c,v 1.6 2002/05/06 01:45:58 guy Exp $
+ * $Id: packet-slimp3.c,v 1.7 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
/* packet-sll.c
* Routines for disassembly of packets from Linux "cooked mode" captures
*
- * $Id: packet-sll.c,v 1.17 2002/04/24 06:03:34 guy Exp $
+ * $Id: packet-sll.c,v 1.18 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
static dissector_handle_t data_handle;
void
-capture_sll(const u_char *pd, int len, packet_counts *ld)
+capture_sll(const guchar *pd, int len, packet_counts *ld)
{
guint16 protocol;
/* packet-sll.h
*
- * $Id: packet-sll.h,v 1.2 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-sll.h,v 1.3 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#ifndef __PACKET_SLL_H__
#define __PACKET_SLL_H__
-void capture_sll(const u_char *, int, packet_counts *);
+void capture_sll(const guchar *, int, packet_counts *);
#endif
/* packet-slowprotocols.c
* Routines for EtherType (0x8809) Slow Protocols disassembly.
*
- * $Id: packet-slowprotocols.c,v 1.2 2002/06/13 21:20:24 guy Exp $
+ * $Id: packet-slowprotocols.c,v 1.3 2002/08/02 23:36:01 jmayer Exp $
*
* Copyright 2002 Steve Housley <steve_housley@3com.com>
*
# 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>
* Routines for SMB Browser packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb-browse.c,v 1.22 2002/04/30 11:03:08 guy Exp $
+ * $Id: packet-smb-browse.c,v 1.23 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <time.h>
#include <string.h>
#include <glib.h>
* Routines for SMB packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb-common.h,v 1.12 2002/05/24 10:57:38 guy Exp $
+ * $Id: packet-smb-common.h,v 1.13 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <time.h>
#include <string.h>
#include <glib.h>
* significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and
* Guy Harris 2001
*
- * $Id: packet-smb-pipe.c,v 1.80 2002/07/03 18:17:30 guy Exp $
+ * $Id: packet-smb-pipe.c,v 1.81 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <time.h>
#include <string.h>
#include <glib.h>
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* 2001 Rewrite by Ronnie Sahlberg and Guy Harris
*
- * $Id: packet-smb.c,v 1.274 2002/07/27 05:03:53 sahlberg Exp $
+ * $Id: packet-smb.c,v 1.275 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <time.h>
#include <string.h>
#include <glib.h>
* Routines for Short Message Peer to Peer dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-smpp.c,v 1.7 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-smpp.c,v 1.8 2002/08/02 23:36:02 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <string.h>
#include <time.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>
/* packet-smtp.c
* Routines for SMTP packet disassembly
*
- * $Id: packet-smtp.c,v 1.30 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-smtp.c,v 1.31 2002/08/02 23:36:02 jmayer Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
#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>
int request = 0;
conversation_t *conversation;
struct smtp_request_val *request_val;
- const u_char *line;
+ const guchar *line;
guint32 code;
int linelen;
gboolean eom_seen = FALSE;
* Routines for SNA
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-sna.c,v 1.40 2002/05/29 08:55:28 guy Exp $
+ * $Id: packet-sna.c,v 1.41 2002/08/02 23:36:02 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "llcsaps.h"
/* packet-snaeth.c
* Routines for SNA-over-Ethernet (Ethernet type 80d5)
*
- * $Id: packet-snaeth.c,v 1.2 2002/02/17 00:51:19 guy Exp $
+ * $Id: packet-snaeth.c,v 1.3 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "etypes.h"
*
* See RFCs 1905, 1906, 1909, and 1910 for SNMPv2u.
*
- * $Id: packet-snmp.c,v 1.93 2002/05/30 01:56:55 guy Exp $
+ * $Id: packet-snmp.c,v 1.94 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
unsigned int i;
char *buf;
#ifdef HAVE_UCD_SNMP
- u_char *oid_string;
+ guchar *oid_string;
size_t oid_string_len;
size_t oid_out_len;
#endif
}
#ifdef HAVE_UCD_SNMP
-static u_char *
+static guchar *
check_var_length(guint vb_length, guint required_length)
{
- u_char *buf;
+ guchar *buf;
static const char badlen_fmt[] = "Length is %u, should be %u";
if (vb_length != required_length) {
return NULL; /* length is OK */
}
-static u_char *
+static guchar *
format_var(struct variable_list *variable, subid_t *variable_oid,
guint variable_oid_length, gushort vb_type, guint val_len)
{
- u_char *buf;
+ guchar *buf;
size_t buf_len;
size_t out_len;
* Routines for socks versions 4 &5 packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-socks.c,v 1.41 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-socks.c,v 1.42 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
/* Display the ping/trace_route conversation */
- const u_char *data, *dataend;
- const u_char *lineend, *eol;
+ const guchar *data, *dataend;
+ const guchar *lineend, *eol;
int linelen;
/* handle the end command */
/* packet-spray.c
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
- * $Id: packet-spray.c,v 1.8 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-spray.c,v 1.9 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-spray.h"
* In particular I have not had an opportunity to see how it
* responds to SRVLOC over TCP.
*
- * $Id: packet-srvloc.c,v 1.31 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-srvloc.c,v 1.32 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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
-
#include <string.h>
#include <time.h>
#include <glib.h>
guint16 length;
guint8 flags;
guint8 dialect;
- u_char language[2];
+ guchar language[2];
guint16 encoding;
guint16 xid;
};
* Routines for SSCOP (Q.2110, Q.SAAL) frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-sscop.c,v 1.18 2002/01/21 07:36:43 guy Exp $
+ * $Id: packet-sscop.c,v 1.19 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
* Routines for async NSM stat callback dissection
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
- * $Id: packet-stat-notify.c,v 1.9 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-stat-notify.c,v 1.10 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-stat-notify.h"
/* packet-stat.c
* Routines for stat dissection
*
- * $Id: packet-stat.c,v 1.15 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-stat.c,v 1.16 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-stat.h"
*
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-sua.c,v 1.8 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-sua.c,v 1.9 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <stdlib.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>
* Routines for cisco tacacs/xtacacs/tacacs+ packet dissection
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
- * $Id: packet-tacacs.c,v 1.21 2002/01/24 09:20:52 guy Exp $
+ * $Id: packet-tacacs.c,v 1.22 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
/* packet-tcp.c
* Routines for TCP packet disassembly
*
- * $Id: packet-tcp.c,v 1.147 2002/08/02 22:41:56 sahlberg Exp $
+ * $Id: packet-tcp.c,v 1.148 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
switch (pinfo->src.type) {
case AT_IPv4:
- phdr[0] = htonl((IP_PROTO_TCP<<16) + reported_len);
+ phdr[0] = g_htonl((IP_PROTO_TCP<<16) + reported_len);
cksum_vec[2].len = 4;
break;
case AT_IPv6:
- phdr[0] = htonl(reported_len);
- phdr[1] = htonl(IP_PROTO_TCP);
+ phdr[0] = g_htonl(reported_len);
+ phdr[1] = g_htonl(IP_PROTO_TCP);
cksum_vec[2].len = 8;
break;
* Routines for telnet packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-telnet.c,v 1.30 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-telnet.c,v 1.31 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
int offset = start_offset;
guint8 opt_byte;
int subneg_len, req;
- const u_char *opt;
+ const guchar *opt;
guint len;
offset += 2; /* skip IAC and SB */
telnet_command(proto_tree *telnet_tree, tvbuff_t *tvb, int start_offset)
{
int offset = start_offset;
- u_char optcode;
+ guchar optcode;
offset += 1; /* skip IAC */
optcode = tvb_get_guint8(tvb, offset);
* Craig Newell <CraigN@cheque.uq.edu.au>
* RFC2347 TFTP Option Extension
*
- * $Id: packet-tftp.c,v 1.38 2002/06/13 08:48:43 guy Exp $
+ * $Id: packet-tftp.c,v 1.39 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
guint16 opcode;
guint16 bytes;
guint16 blocknum;
- u_int i1;
+ guint i1;
guint16 error;
/*
/* packet-tns.c
* Routines for Oracle TNS packet dissection
*
- * $Id: packet-tns.c,v 1.34 2002/07/09 20:02:54 guy Exp $
+ * $Id: packet-tns.c,v 1.35 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
* Routine to dissect RFC 1006 TPKT packet containing OSI TP PDU
* Copyright 2001, Martin Thomas <Martin_A_Thomas@yahoo.com>
*
- * $Id: packet-tpkt.c,v 1.20 2002/07/31 18:45:50 guy Exp $
+ * $Id: packet-tpkt.c,v 1.21 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-tr.c,v 1.71 2002/07/02 08:23:53 guy Exp $
+ * $Id: packet-tr.c,v 1.72 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <stdio.h>
#include <glib.h>
}
static
-int check_for_old_linux(const u_char * pd)
+int check_for_old_linux(const guchar * pd)
{
int x;
for(x=1;x<=18;x++)
add_ring_bridge_pairs(int rcf_len, tvbuff_t*, proto_tree *tree);
void
-capture_tr(const u_char *pd, int offset, int len, packet_counts *ld) {
+capture_tr(const guchar *pd, int offset, int len, packet_counts *ld) {
int source_routed = 0;
int frame_type;
/* packet-tr.h
*
- * $Id: packet-tr.h,v 1.5 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-tr.h,v 1.6 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#ifndef __PACKET_TR_H__
#define __PACKET_TR_H__
-void capture_tr(const u_char *, int, int, packet_counts *);
+void capture_tr(const guchar *, int, int, packet_counts *);
#endif
* Routines for Token-Ring Media Access Control
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-trmac.c,v 1.36 2002/06/02 17:51:00 gerald Exp $
+ * $Id: packet-trmac.c,v 1.37 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
proto_tree *sv_tree;
proto_item *ti;
- u_char errors[6]; /* isolating or non-isolating */
+ guchar errors[6]; /* isolating or non-isolating */
/* Check the SV length.
XXX - Should we do this in each case statement below, e.g. to force
*
* Uwe Girlich <Uwe.Girlich@philosys.de>
*
- * $Id: packet-tsp.c,v 1.1 2002/01/31 07:50:29 girlich Exp $
+ * $Id: packet-tsp.c,v 1.2 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
* Routines for Universal Computer Protocol dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-ucp.c,v 1.17 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-ucp.c,v 1.18 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <ctype.h>
#include <time.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>
/* packet-udp.c
* Routines for UDP packet disassembly
*
- * $Id: packet-udp.c,v 1.103 2002/06/08 21:54:51 guy Exp $
+ * $Id: packet-udp.c,v 1.104 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&uh, offset, sizeof(e_udphdr));
- uh_sport = ntohs(uh.uh_sport);
- uh_dport = ntohs(uh.uh_dport);
- uh_ulen = ntohs(uh.uh_ulen);
- uh_sum = ntohs(uh.uh_sum);
+ uh_sport = g_ntohs(uh.uh_sport);
+ uh_dport = g_ntohs(uh.uh_dport);
+ uh_ulen = g_ntohs(uh.uh_ulen);
+ uh_sum = g_ntohs(uh.uh_sum);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Source port: %s Destination port: %s",
switch (pinfo->src.type) {
case AT_IPv4:
- phdr[0] = htonl((IP_PROTO_UDP<<16) + reported_len);
+ phdr[0] = g_htonl((IP_PROTO_UDP<<16) + reported_len);
cksum_vec[2].len = 4;
break;
case AT_IPv6:
- phdr[0] = htonl(reported_len);
- phdr[1] = htonl(IP_PROTO_UDP);
+ phdr[0] = g_htonl(reported_len);
+ phdr[1] = g_htonl(IP_PROTO_UDP);
cksum_vec[2].len = 8;
break;
* Routines for v120 frame disassembly
* Bert Driehuis <driehuis@playbeing.org>
*
- * $Id: packet-v120.c,v 1.26 2002/04/11 09:38:03 guy Exp $
+ * $Id: packet-v120.c,v 1.27 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
/* packet-vines.c
* Routines for Banyan VINES protocol packet disassembly
*
- * $Id: packet-vines.c,v 1.41 2002/05/30 01:56:55 guy Exp $
+ * $Id: packet-vines.c,v 1.42 2002/08/02 23:36:04 jmayer Exp $
*
* Don Lafontaine <lafont02@cn.ca>
*
#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>
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&viph, offset, sizeof(e_vip));
- viph.vip_chksum = ntohs(viph.vip_chksum);
- viph.vip_pktlen = ntohs(viph.vip_pktlen);
- viph.vip_dnet = ntohl(viph.vip_dnet);
- viph.vip_dsub = ntohs(viph.vip_dsub);
- viph.vip_snet = ntohl(viph.vip_snet);
- viph.vip_ssub = ntohs(viph.vip_ssub);
+ viph.vip_chksum = g_ntohs(viph.vip_chksum);
+ viph.vip_pktlen = g_ntohs(viph.vip_pktlen);
+ viph.vip_dnet = g_ntohl(viph.vip_dnet);
+ viph.vip_dsub = g_ntohs(viph.vip_dsub);
+ viph.vip_snet = g_ntohl(viph.vip_snet);
+ viph.vip_ssub = g_ntohs(viph.vip_ssub);
switch (viph.vip_proto) {
case VIP_PROTO_IPC:
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&viph, offset, sizeof(e_vspp));
- viph.vspp_sport = ntohs(viph.vspp_sport);
- viph.vspp_dport = ntohs(viph.vspp_dport);
- viph.vspp_lclid = ntohs(viph.vspp_lclid);
- viph.vspp_rmtid = ntohs(viph.vspp_rmtid);
+ viph.vspp_sport = g_ntohs(viph.vspp_sport);
+ viph.vspp_dport = g_ntohs(viph.vspp_dport);
+ viph.vspp_lclid = g_ntohs(viph.vspp_lclid);
+ viph.vspp_rmtid = g_ntohs(viph.vspp_rmtid);
switch (viph.vspp_pkttype) {
case VSPP_PKTTYPE_DATA:
/* packet-vj.c
* Routines for Van Jacobson header decompression.
*
- * $Id: packet-vj.c,v 1.14 2002/07/15 09:56:04 guy Exp $
+ * $Id: packet-vj.c,v 1.15 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
pbuf = g_malloc(buf_len);
memcpy(pbuf, data_ptr, hdr_len);
tvb_memcpy(src_tvb, pbuf + hdr_len, offset, buf_len - hdr_len);
- *dst_tvb = tvb_new_real_data(pbuf, buf_len, ntohs(ip->tot_len));
+ *dst_tvb = tvb_new_real_data(pbuf, buf_len, g_ntohs(ip->tot_len));
tvb_set_child_real_data_tvbuff(src_tvb, *dst_tvb);
add_new_data_source(pinfo, *dst_tvb, "VJ Decompressed");
return VJ_OK;
proto_tree_add_uint(tree, hf_vj_tcp_cksum, src_tvb, offset, 2, tcp_cksum);
if(cs != NULL) {
hdrlen = lo_nibble(ip->ihl_version) * 4 + TCP_OFFSET(thp) * 4;
- thp->cksum = htons(tcp_cksum);
+ thp->cksum = g_htons(tcp_cksum);
}
offset += 2;
if(cs != NULL) {
switch(changes & SPECIALS_MASK){
case SPECIAL_I: /* Echoed terminal traffic */
if(cs != NULL) {
- word = ntohs(ip->tot_len) - hdrlen;
- thp->ack_seq = htonl(ntohl(thp->ack_seq) + word);
- thp->seq = htonl(ntohl(thp->seq) + word);
+ word = g_ntohs(ip->tot_len) - hdrlen;
+ thp->ack_seq = g_htonl(g_ntohl(thp->ack_seq) + word);
+ thp->seq = g_htonl(g_ntohl(thp->seq) + word);
}
break;
case SPECIAL_D: /* Unidirectional data */
if(cs != NULL)
- thp->seq = htonl(ntohl(thp->seq) + ntohs(ip->tot_len) - hdrlen);
+ thp->seq = g_htonl(g_ntohl(thp->seq) + g_ntohs(ip->tot_len) - hdrlen);
break;
default:
if(changes & NEW_U){
if(changes & NEW_W) {
delta = get_signed_delta(src_tvb, &offset, hf_vj_win_delta, tree);
if(cs != NULL)
- thp->window = htons(ntohs(thp->window) + delta);
+ thp->window = g_htons(g_ntohs(thp->window) + delta);
}
if(changes & NEW_A) {
delta = get_unsigned_delta(src_tvb, &offset, hf_vj_ack_delta, tree);
if(cs != NULL)
- thp->ack_seq = htonl(ntohl(thp->ack_seq) + delta);
+ thp->ack_seq = g_htonl(g_ntohl(thp->ack_seq) + delta);
}
if(changes & NEW_S) {
delta = get_unsigned_delta(src_tvb, &offset, hf_vj_seq_delta, tree);
if(cs != NULL)
- thp->seq = htonl(ntohl(thp->seq) + delta);
+ thp->seq = g_htonl(g_ntohl(thp->seq) + delta);
}
break;
}
else
delta = 1;
if(cs != NULL)
- ip->id = htons(ntohs(ip->id) + delta);
+ ip->id = g_htons(g_ntohs(ip->id) + delta);
/* Compute IP packet length and the buffer length needed */
len = tvb_reported_length_remaining(src_tvb, offset);
if(cs != NULL) {
len += hdrlen;
- ip->tot_len = htons(len);
+ ip->tot_len = g_htons(len);
/* Compute IP check sum */
ip->cksum = ZERO;
ip->cksum = ip_csum((guint8 *)ip, lo_nibble(ip->ihl_version) * 4);
/* packet-vlan.c
* Routines for VLAN 802.1Q ethernet header disassembly
*
- * $Id: packet-vlan.c,v 1.39 2002/04/24 06:03:34 guy Exp $
+ * $Id: packet-vlan.c,v 1.40 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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"
static gint ett_vlan = -1;
void
-capture_vlan(const u_char *pd, int offset, int len, packet_counts *ld ) {
+capture_vlan(const guchar *pd, int offset, int len, packet_counts *ld ) {
guint16 encap_proto;
if ( !BYTES_ARE_IN_FRAME(offset,len,5) ) {
ld->other++;
/* packet-vlan.h
*
- * $Id: packet-vlan.h,v 1.4 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-vlan.h,v 1.5 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#ifndef __PACKET_VLAN_H__
#define __PACKET_VLAN_H__
-void capture_vlan(const u_char *, int, int, packet_counts *);
+void capture_vlan(const guchar *, int, int, packet_counts *);
#endif
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-vrrp.c,v 1.23 2002/03/28 07:40:54 itojun Exp $
+ * $Id: packet-vrrp.c,v 1.24 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
cksum_vec[1].ptr = pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
- phdr[0] = htonl(vrrp_len);
- phdr[1] = htonl(IP_PROTO_VRRP);
+ phdr[0] = g_htonl(vrrp_len);
+ phdr[1] = g_htonl(IP_PROTO_VRRP);
cksum_vec[2].len = 8;
cksum_vec[3].ptr = tvb_get_ptr(tvb, 0, vrrp_len);
cksum_vec[3].len = vrrp_len;
/* packet-vtp.c
* Routines for the disassembly of Cisco's Virtual Trunking Protocol
*
- * $Id: packet-vtp.c,v 1.19 2002/01/24 09:20:52 guy Exp $
+ * $Id: packet-vtp.c,v 1.20 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdlib.h>
#include <string.h>
*
* Utility routines for WAP dissectors
*
- * $Id: packet-wap.c,v 1.5 2002/01/21 07:36:44 guy Exp $
+ * $Id: packet-wap.c,v 1.6 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "packet-wap.h"
* Routines for Web Cache Coordination Protocol dissection
* Jerry Talkington <jerryt@netapp.com>
*
- * $Id: packet-wccp.c,v 1.31 2002/04/15 21:12:56 guy Exp $
+ * $Id: packet-wccp.c,v 1.32 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# 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>
* Routines for Wellfleet Compression frame disassembly
* Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-wcp.c,v 1.26 2002/07/31 19:27:39 guy Exp $
+ * $Id: packet-wcp.c,v 1.27 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
* Routines for who protocol (see man rwhod)
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-who.c,v 1.23 2002/01/24 09:20:52 guy Exp $
+ * $Id: packet-who.c,v 1.24 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <time.h>
#include <glib.h>
*
* Routines to dissect WSP component of WAP traffic.
*
- * $Id: packet-wsp.c,v 1.59 2002/07/30 07:36:22 guy Exp $
+ * $Id: packet-wsp.c,v 1.60 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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
*
* Routines to dissect WTLS component of WAP traffic.
*
- * $Id: packet-wtls.c,v 1.20 2002/07/17 00:42:43 guy Exp $
+ * $Id: packet-wtls.c,v 1.21 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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
*
* Routines to dissect WTP component of WAP traffic.
*
- * $Id: packet-wtp.c,v 1.36 2002/07/17 00:42:43 guy Exp $
+ * $Id: packet-wtp.c,v 1.37 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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
* Routines for X11 dissection
* Copyright 2000, Christophe Tronche <ch.tronche@computer.org>
*
- * $Id: packet-x11.c,v 1.44 2002/05/16 19:29:03 guy Exp $
+ * $Id: packet-x11.c,v 1.45 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
int i;
for(i = 8, m = modifiers; i; i--, m++) {
- u_char c = tvb_get_guint8(tvb, *offsetp);
+ guchar c = tvb_get_guint8(tvb, *offsetp);
*offsetp += 1;
if (c)
bp += sprintf(bp, " %s=%d", *m, c);
Note that "non-printable characters" may depend on your locale.... */
static void stringCopy(char *dest, const char *source, int length)
{
- u_char c;
+ guchar c;
while(length--) {
c = *source++;
if (!isgraph(c) && c != ' ') c = '.';
* Routines for x25 packet disassembly
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-x25.c,v 1.67 2002/05/09 11:18:47 guy Exp $
+ * $Id: packet-x25.c,v 1.68 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <stdlib.h>
* Routines for XDMCP message dissection
* Copyright 2002, Pasi Eronen <pasi.eronen@nixu.com>
*
- * $Id: packet-xdmcp.c,v 1.1 2002/03/16 02:25:48 guy Exp $
+ * $Id: packet-xdmcp.c,v 1.2 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
/* Copied from packet-x11.c */
static void stringCopy(char *dest, const char *source, int length)
{
- u_char c;
+ guchar c;
while(length--) {
c = *source++;
if (!isgraph(c) && c != ' ') c = '.';
* Routines for yahoo messenger packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-yhoo.c,v 1.23 2002/02/01 07:12:53 guy Exp $
+ * $Id: packet-yhoo.c,v 1.24 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#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>
/* packet-ypbind.c
* Routines for ypbind dissection
*
- * $Id: packet-ypbind.c,v 1.11 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-ypbind.c,v 1.12 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-ypbind.h"
/* packet-yppasswd.c
* Routines for yppasswd dissection
*
- * $Id: packet-yppasswd.c,v 1.6 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-yppasswd.c,v 1.7 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-yppasswd.h"
/* packet-ypserv.c
* Routines for ypserv dissection
*
- * $Id: packet-ypserv.c,v 1.22 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-ypserv.c,v 1.23 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-ypserv.h"
/* packet-ypxfr.c
* Routines for ypxfr dissection
*
- * $Id: packet-ypxfr.c,v 1.6 2001/01/18 09:55:10 guy Exp $
+ * $Id: packet-ypxfr.c,v 1.7 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-ypxfr.h"
*
* Jochen Friedrich <jochen@scram.de>
*
- * $Id: packet-zebra.c,v 1.21 2002/04/02 01:32:11 guy Exp $
+ * $Id: packet-zebra.c,v 1.22 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
/* pcap-util.c
* Utility routines for packet capture
*
- * $Id: pcap-util.c,v 1.8 2002/06/27 22:39:16 gerald Exp $
+ * $Id: pcap-util.c,v 1.9 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
/* prefs.c
* Routines for handling preferences
*
- * $Id: prefs.c,v 1.87 2002/08/01 03:15:25 jmayer Exp $
+ * $Id: prefs.c,v 1.88 2002/08/02 23:36:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int
prefs_set_pref(char *prefarg)
{
- u_char *p, *colonp;
+ guchar *p, *colonp;
int ret;
/*
/* print.c
* Routines for printing packet analysis trees.
*
- * $Id: print.c,v 1.55 2002/06/29 09:45:06 guy Exp $
+ * $Id: print.c,v 1.56 2002/08/02 23:36:06 jmayer Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <epan/epan.h>
#include <epan/epan_dissect.h>
#include <epan/tvbuff.h>
#include "packet-data.h"
static void proto_tree_print_node(GNode *node, gpointer data);
-static void print_hex_data_buffer(FILE *fh, register const u_char *cp,
- register u_int length, char_enc encoding, gint format);
+static void print_hex_data_buffer(FILE *fh, register const guchar *cp,
+ register guint length, char_enc encoding, gint format);
static void ps_clean_string(unsigned char *out, const unsigned char *in,
int outbuf_size);
tvbuff_t *tvb;
char *name;
char *line;
- const u_char *cp;
+ const guchar *cp;
guint length;
/*
from data dump, data dump */
static void
-print_hex_data_buffer(FILE *fh, register const u_char *cp,
- register u_int length, char_enc encoding, gint format)
+print_hex_data_buffer(FILE *fh, register const guchar *cp,
+ register guint length, char_enc encoding, gint format)
{
register unsigned int ad, i, j, k, l;
- u_char c;
- u_char line[MAX_LINE_LEN + 1];
+ guchar c;
+ guchar line[MAX_LINE_LEN + 1];
unsigned int use_digits;
- static u_char binhex[16] = {
+ static guchar binhex[16] = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
/* ringbuffer.c
* Routines for packet capture windows
*
- * $Id: ringbuffer.c,v 1.3 2002/06/23 20:30:01 guy Exp $
+ * $Id: ringbuffer.c,v 1.4 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <fcntl.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
/*
- * $Id: snprintf.h,v 1.7 2002/07/19 12:59:21 girlich Exp $
+ * $Id: snprintf.h,v 1.8 2002/08/02 23:36:07 jmayer Exp $
*/
#ifndef __ETHEREAL_SNPRINTF_H__
#endif
/* for size_t */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
extern int vsnprintf(char *string, size_t length, const char * format,
va_list args);
/* tethereal.c
*
- * $Id: tethereal.c,v 1.150 2002/08/01 03:15:26 jmayer Exp $
+ * $Id: tethereal.c,v 1.151 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
static loop_data ld;
static int capture(int);
-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 *);
#ifdef _WIN32
static BOOL WINAPI capture_cleanup(DWORD);
#else /* _WIN32 */
} cb_args_t;
static int load_cap_file(capture_file *, int);
-static void wtap_dispatch_cb_write(u_char *, const struct wtap_pkthdr *, long,
- union wtap_pseudo_header *, const u_char *);
+static void wtap_dispatch_cb_write(guchar *, const struct wtap_pkthdr *, long,
+ union wtap_pseudo_header *, const guchar *);
static void show_capture_file_io_error(const char *, int, gboolean);
-static void wtap_dispatch_cb_print(u_char *, const struct wtap_pkthdr *, long,
- union wtap_pseudo_header *, const u_char *);
+static void wtap_dispatch_cb_print(guchar *, const struct wtap_pkthdr *, long,
+ union wtap_pseudo_header *, const guchar *);
capture_file cfile;
ts_type timestamp_type = RELATIVE;
static gboolean
set_autostop_criterion(const char *autostoparg)
{
- u_char *p, *colonp;
+ guchar *p, *colonp;
colonp = strchr(autostoparg, ':');
if (colonp == NULL)
each packet. */
pcap_cnt = 1;
}
- inpkts = pcap_dispatch(ld.pch, pcap_cnt, capture_pcap_cb, (u_char *) &ld);
+ inpkts = pcap_dispatch(ld.pch, pcap_cnt, capture_pcap_cb, (guchar *) &ld);
if (inpkts < 0) {
/* Error from "pcap_dispatch()". */
ld.go = FALSE;
}
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;
args.cf = &cfile;
args.pdh = ld->pdh;
if (ld->pdh) {
- wtap_dispatch_cb_write((u_char *)&args, &whdr, 0, &pseudo_header, pd);
+ wtap_dispatch_cb_write((guchar *)&args, &whdr, 0, &pseudo_header, pd);
/* Report packet capture count if not quiet */
if (!quiet) {
if (ld->packet_count != 0) {
}
}
} else {
- wtap_dispatch_cb_print((u_char *)&args, &whdr, 0, &pseudo_header, pd);
+ wtap_dispatch_cb_print((guchar *)&args, &whdr, 0, &pseudo_header, pd);
}
}
}
args.cf = cf;
args.pdh = pdh;
- success = wtap_loop(cf->wth, 0, wtap_dispatch_cb_write, (u_char *) &args,
+ success = wtap_loop(cf->wth, 0, wtap_dispatch_cb_write, (guchar *) &args,
&err);
/* Now close the capture file. */
} else {
args.cf = cf;
args.pdh = NULL;
- success = wtap_loop(cf->wth, 0, wtap_dispatch_cb_print, (u_char *) &args,
+ success = wtap_loop(cf->wth, 0, wtap_dispatch_cb_print, (guchar *) &args,
&err);
}
if (!success) {
}
static void
-wtap_dispatch_cb_write(u_char *user, const struct wtap_pkthdr *phdr,
- long offset, union wtap_pseudo_header *pseudo_header, const u_char *buf)
+wtap_dispatch_cb_write(guchar *user, const struct wtap_pkthdr *phdr,
+ long offset, union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
cb_args_t *args = (cb_args_t *) user;
capture_file *cf = args->cf;
}
static void
-wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr,
- long offset, union wtap_pseudo_header *pseudo_header, const u_char *buf)
+wtap_dispatch_cb_print(guchar *user, const struct wtap_pkthdr *phdr,
+ long offset, union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
cb_args_t *args = (cb_args_t *) user;
capture_file *cf = args->cf;
*
* (c) Copyright 2001 Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: text2pcap.c,v 1.20 2002/07/21 20:27:30 guy Exp $
+ * $Id: text2pcap.c,v 1.21 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <time.h>
#include <glib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-#endif
-
#include <errno.h>
#include <assert.h>
while( count > 1 ) {
/* This is the inner loop */
- sum += ntohs(* (unsigned short *) addr++);
+ sum += g_ntohs(* (unsigned short *) addr++);
count -= 2;
}
while (sum>>16)
sum = (sum & 0xffff) + (sum >> 16);
- return htons(~sum);
+ return g_htons(~sum);
}
/* The CRC32C code is taken from draft-ietf-tsvwg-sctpcsum-01.txt.
/* Write Ethernet header */
if (hdr_ethernet) {
- HDR_ETHERNET.l3pid = htons(hdr_ethernet_proto);
+ HDR_ETHERNET.l3pid = g_htons(hdr_ethernet_proto);
fwrite(&HDR_ETHERNET, sizeof(HDR_ETHERNET), 1, output_file);
}
/* Write IP header */
if (hdr_ip) {
- HDR_IP.packet_length = htons(ip_length);
+ HDR_IP.packet_length = g_htons(ip_length);
HDR_IP.protocol = hdr_ip_proto;
HDR_IP.hdr_checksum = 0;
HDR_IP.hdr_checksum = in_checksum(&HDR_IP, sizeof(HDR_IP));
/* Write UDP header */
if (hdr_udp) {
- HDR_UDP.source_port = htons(hdr_udp_src);
- HDR_UDP.dest_port = htons(hdr_udp_dest);
- HDR_UDP.length = htons(udp_length);
+ HDR_UDP.source_port = g_htons(hdr_udp_src);
+ HDR_UDP.dest_port = g_htons(hdr_udp_dest);
+ HDR_UDP.length = g_htons(udp_length);
fwrite(&HDR_UDP, sizeof(HDR_UDP), 1, output_file);
}
if (hdr_data_chunk) {
HDR_DATA_CHUNK.type = hdr_data_chunk_type;
HDR_DATA_CHUNK.bits = hdr_data_chunk_bits;
- HDR_DATA_CHUNK.length = htons(curr_offset + sizeof(HDR_DATA_CHUNK));
- HDR_DATA_CHUNK.tsn = htonl(hdr_data_chunk_tsn);
- HDR_DATA_CHUNK.sid = htons(hdr_data_chunk_sid);
- HDR_DATA_CHUNK.ssn = htons(hdr_data_chunk_ssn);
- HDR_DATA_CHUNK.ppid = htonl(hdr_data_chunk_ppid);
+ HDR_DATA_CHUNK.length = g_htons(curr_offset + sizeof(HDR_DATA_CHUNK));
+ HDR_DATA_CHUNK.tsn = g_htonl(hdr_data_chunk_tsn);
+ HDR_DATA_CHUNK.sid = g_htons(hdr_data_chunk_sid);
+ HDR_DATA_CHUNK.ssn = g_htons(hdr_data_chunk_ssn);
+ HDR_DATA_CHUNK.ppid = g_htonl(hdr_data_chunk_ppid);
padding_length = number_of_padding_bytes(curr_offset);
for (i=0; i<padding_length; i++)
/* Write SCTP header */
if (hdr_sctp) {
- HDR_SCTP.src_port = htons(hdr_sctp_src);
- HDR_SCTP.dest_port = htons(hdr_sctp_dest);
- HDR_SCTP.tag = htonl(hdr_sctp_tag);
- HDR_SCTP.checksum = htonl(0);
+ HDR_SCTP.src_port = g_htons(hdr_sctp_src);
+ HDR_SCTP.dest_port = g_htons(hdr_sctp_dest);
+ HDR_SCTP.tag = g_htonl(hdr_sctp_tag);
+ HDR_SCTP.checksum = g_htonl(0);
HDR_SCTP.checksum = crc32c((unsigned char *)&HDR_SCTP, sizeof(HDR_SCTP), ~0L);
if (hdr_data_chunk)
HDR_SCTP.checksum = crc32c((unsigned char *)&HDR_DATA_CHUNK, sizeof(HDR_DATA_CHUNK), HDR_SCTP.checksum);
- HDR_SCTP.checksum = htonl(finalize_crc32c(crc32c(packet_buf, curr_offset, HDR_SCTP.checksum)));
+ HDR_SCTP.checksum = g_htonl(finalize_crc32c(crc32c(packet_buf, curr_offset, HDR_SCTP.checksum)));
fwrite(&HDR_SCTP, sizeof(HDR_SCTP), 1, output_file);
}
/* util.c
* Utility routines
*
- * $Id: util.c,v 1.55 2002/04/08 20:23:55 gram Exp $
+ * $Id: util.c,v 1.56 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
* Routines for use by various SDLC-derived protocols, such as HDLC
* and its derivatives LAPB, IEEE 802.2 LLC, etc..
*
- * $Id: xdlc.c,v 1.18 2002/03/31 21:09:00 guy Exp $
+ * $Id: xdlc.c,v 1.19 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
};
int
-get_xdlc_control(const u_char *pd, int offset, int is_extended)
+get_xdlc_control(const guchar *pd, int offset, int is_extended)
{
guint16 control;
* Define *DLC frame types, and routine to dissect the control field of
* a *DLC frame.
*
- * $Id: xdlc.h,v 1.15 2002/03/31 21:09:00 guy Exp $
+ * $Id: xdlc.h,v 1.16 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
#define XDLC_CONTROL_LEN(control, is_extended) \
((((control) & 0x3) == XDLC_U || !(is_extended)) ? 1 : 2)
-int get_xdlc_control(const u_char *pd, int offset,
+int get_xdlc_control(const guchar *pd, int offset,
int extended);
int dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo,