aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-04-03 11:00:49 +0000
committerGuy Harris <guy@alum.mit.edu>2005-04-03 11:00:49 +0000
commit466c3e9c8d23fe1f1ebceaf516e9869bcf74a478 (patch)
tree5e20e152c62b60e48114f43a53f6eb9d8dba78cf /wiretap
parent951b7c9aaa9c99875b99eba36a18f65597732a14 (diff)
Make editcap use wtap_read(); that eliminates the last user of
wtap_loop(), so eliminate wtap_loop(). svn path=/trunk/; revision=14006
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/ascend.c2
-rw-r--r--wiretap/cosine.c2
-rw-r--r--wiretap/csids.c2
-rw-r--r--wiretap/dbs-etherwatch.c2
-rw-r--r--wiretap/eyesdn.c2
-rw-r--r--wiretap/pppdump.c2
-rw-r--r--wiretap/toshiba.c2
-rw-r--r--wiretap/vms.c2
-rw-r--r--wiretap/wtap.c23
-rw-r--r--wiretap/wtap.def1
-rw-r--r--wiretap/wtap.h8
11 files changed, 8 insertions, 40 deletions
diff --git a/wiretap/ascend.c b/wiretap/ascend.c
index 95ad5cd3c9..a411d78d60 100644
--- a/wiretap/ascend.c
+++ b/wiretap/ascend.c
@@ -250,7 +250,7 @@ static void config_pseudo_header(union wtap_pseudo_header *pseudo_head)
}
}
-/* Read the next packet; called from wtap_loop(). */
+/* Read the next packet; called from wtap_read(). */
static gboolean ascend_read(wtap *wth, int *err, gchar **err_info,
long *data_offset)
{
diff --git a/wiretap/cosine.c b/wiretap/cosine.c
index c17171ea69..2b8138910c 100644
--- a/wiretap/cosine.c
+++ b/wiretap/cosine.c
@@ -303,7 +303,7 @@ int cosine_open(wtap *wth, int *err, gchar **err_info _U_)
return 1;
}
-/* Find the next packet and parse it; called from wtap_loop(). */
+/* Find the next packet and parse it; called from wtap_read(). */
static gboolean cosine_read(wtap *wth, int *err, gchar **err_info,
long *data_offset)
{
diff --git a/wiretap/csids.c b/wiretap/csids.c
index cfe1ce7a65..4312c3a4fa 100644
--- a/wiretap/csids.c
+++ b/wiretap/csids.c
@@ -142,7 +142,7 @@ int csids_open(wtap *wth, int *err, gchar **err_info _U_)
return 1;
}
-/* Find the next packet and parse it; called from wtap_loop(). */
+/* Find the next packet and parse it; called from wtap_read(). */
static gboolean csids_read(wtap *wth, int *err, gchar **err_info _U_,
long *data_offset)
{
diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c
index 8b1a8e834d..7cd7ebc8e3 100644
--- a/wiretap/dbs-etherwatch.c
+++ b/wiretap/dbs-etherwatch.c
@@ -203,7 +203,7 @@ int dbs_etherwatch_open(wtap *wth, int *err, gchar **err_info _U_)
return 1;
}
-/* Find the next packet and parse it; called from wtap_loop(). */
+/* Find the next packet and parse it; called from wtap_read(). */
static gboolean dbs_etherwatch_read(wtap *wth, int *err, gchar **err_info,
long *data_offset)
{
diff --git a/wiretap/eyesdn.c b/wiretap/eyesdn.c
index 90a2ad39b6..73a964d374 100644
--- a/wiretap/eyesdn.c
+++ b/wiretap/eyesdn.c
@@ -159,7 +159,7 @@ int eyesdn_open(wtap *wth, int *err, gchar **err_info _U_)
return 1;
}
-/* Find the next packet and parse it; called from wtap_loop() and wtap_read(). */
+/* Find the next packet and parse it; called from wtap_read(). */
static gboolean eyesdn_read(wtap *wth, int *err, gchar **err_info,
long *data_offset)
{
diff --git a/wiretap/pppdump.c b/wiretap/pppdump.c
index 006828d92d..72061bdcd9 100644
--- a/wiretap/pppdump.c
+++ b/wiretap/pppdump.c
@@ -310,7 +310,7 @@ pppdump_open(wtap *wth, int *err, gchar **err_info _U_)
return 1;
}
-/* Find the next packet and parse it; called from wtap_loop(). */
+/* Find the next packet and parse it; called from wtap_read(). */
static gboolean
pppdump_read(wtap *wth, int *err, gchar **err_info, long *data_offset)
{
diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c
index 1c4121aab4..086ed50be8 100644
--- a/wiretap/toshiba.c
+++ b/wiretap/toshiba.c
@@ -230,7 +230,7 @@ int toshiba_open(wtap *wth, int *err, gchar **err_info _U_)
return 1;
}
-/* Find the next packet and parse it; called from wtap_loop(). */
+/* Find the next packet and parse it; called from wtap_read(). */
static gboolean toshiba_read(wtap *wth, int *err, gchar **err_info,
long *data_offset)
{
diff --git a/wiretap/vms.c b/wiretap/vms.c
index 96262d3efe..fccd4b1c13 100644
--- a/wiretap/vms.c
+++ b/wiretap/vms.c
@@ -275,7 +275,7 @@ int vms_open(wtap *wth, int *err, gchar **err_info _U_)
return 1;
}
-/* Find the next packet and parse it; called from wtap_loop(). */
+/* Find the next packet and parse it; called from wtap_read(). */
static gboolean vms_read(wtap *wth, int *err, gchar **err_info,
long *data_offset)
{
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index e5a1c0dcb5..78b629a4fa 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -447,29 +447,6 @@ wtap_buf_ptr(wtap *wth)
}
gboolean
-wtap_loop(wtap *wth, int count, wtap_handler callback, guchar* user, int *err,
- gchar **err_info)
-{
- long data_offset;
- int loop = 0;
-
- /* Start by clearing error flag */
- *err = 0;
-
- while ( (wtap_read(wth, err, err_info, &data_offset)) ) {
- callback(user, &wth->phdr, data_offset,
- &wth->pseudo_header, buffer_start_ptr(wth->frame_buffer));
- if (count > 0 && ++loop >= count)
- break;
- }
-
- if (*err == 0)
- return TRUE; /* success */
- else
- return FALSE; /* failure */
-}
-
-gboolean
wtap_seek_read(wtap *wth, long seek_off,
union wtap_pseudo_header *pseudo_header, guint8 *pd, int len,
int *err, gchar **err_info)
diff --git a/wiretap/wtap.def b/wiretap/wtap.def
index 3e847a3bba..1554ebefc4 100644
--- a/wiretap/wtap.def
+++ b/wiretap/wtap.def
@@ -17,7 +17,6 @@ wtap_file_type_short_string
wtap_file_type_string
wtap_get_bytes_dumped
wtap_set_bytes_dumped
-wtap_loop
wtap_open_offline
wtap_pcap_encap_to_wtap_encap
wtap_phdr
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 730ce7909e..85b3030a14 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -457,9 +457,6 @@ struct wtap_pkthdr {
int pkt_encap;
};
-typedef void (*wtap_handler)(guchar*, const struct wtap_pkthdr*,
- long, union wtap_pseudo_header *pseudo_header, const guchar *);
-
struct wtap;
struct Buffer;
struct wtap_dumper;
@@ -478,11 +475,6 @@ typedef struct wtap_dumper wtap_dumper;
struct wtap* wtap_open_offline(const char *filename, int *err,
gchar **err_info, gboolean do_random);
-/* 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, guchar*, int *err,
- gchar **err_info);
-
/* 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
* located. */