aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.h
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-07-29 06:09:59 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-07-29 06:09:59 +0000
commitde218ad690b03be0ab4da7db9ddc8ce68f491656 (patch)
tree8e70c43d1f42de696be79b546042e67623be1c06 /wiretap/wtap.h
parent1d59fe3c0736281842bb70101b3e79dce27bdd71 (diff)
From Joerg Mayer:
All files: - Replace types from sys/types.h by those from glib.h - Replace ntoh family of macros from netinet/in.h and winsock2.h by g_ntoh family from glib.h - Remove now unneeded includes of sys/types.h, netinet/in.h and winsock2.h wtap.h Move includes to the top git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5909 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r--wiretap/wtap.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 7b73452804..4254cd2870 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -1,6 +1,6 @@
/* wtap.h
*
- * $Id: wtap.h,v 1.117 2002/07/16 07:15:09 guy Exp $
+ * $Id: wtap.h,v 1.118 2002/07/29 06:09:59 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -23,6 +23,13 @@
#ifndef __WTAP_H__
#define __WTAP_H__
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <glib.h>
+#include <stdio.h>
+
/* Encapsulation types. Choose names that truly reflect
* what is contained in the packet trace file.
*
@@ -155,21 +162,6 @@
*/
#define WTAP_MAX_PACKET_SIZE 65535
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
-#include <glib.h>
-#include <stdio.h>
-
/*
* "Pseudo-headers" are used to supply to the clients of wiretap
* per-packet information that's not part of the packet payload
@@ -314,8 +306,8 @@ struct wtap_pkthdr {
int pkt_encap;
};
-typedef void (*wtap_handler)(u_char*, const struct wtap_pkthdr*,
- long, union wtap_pseudo_header *pseudo_header, const u_char *);
+typedef void (*wtap_handler)(guchar*, const struct wtap_pkthdr*,
+ long, union wtap_pseudo_header *pseudo_header, const guchar *);
struct wtap;
struct Buffer;
@@ -336,7 +328,7 @@ struct wtap* wtap_open_offline(const char *filename, int *err, gboolean do_rando
/* Returns TRUE if entire loop-reading was successful. If read failure
* happened, FALSE is returned and err is set. */
-gboolean wtap_loop(wtap *wth, int, wtap_handler, u_char*, int *err);
+gboolean wtap_loop(wtap *wth, int, wtap_handler, guchar*, int *err);
/* Returns TRUE if read was successful. FALSE if failure. data_offset is
* set the the offset in the file where the data for the read packet is
@@ -375,7 +367,7 @@ wtap_dumper* wtap_dump_open(const char *filename, int filetype, int encap,
wtap_dumper* wtap_dump_fdopen(int fd, int filetype, int encap, int snaplen,
int *err);
gboolean wtap_dump(wtap_dumper *, const struct wtap_pkthdr *,
- const union wtap_pseudo_header *pseudo_header, const u_char *, int *err);
+ const union wtap_pseudo_header *pseudo_header, const guchar *, int *err);
FILE* wtap_dump_file(wtap_dumper *);
gboolean wtap_dump_close(wtap_dumper *, int *);
long wtap_get_bytes_dumped(wtap_dumper *);