aboutsummaryrefslogtreecommitdiffstats
path: root/pcapio.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2012-12-20 14:53:09 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2012-12-20 14:53:09 +0000
commit7e84abf005afa5952b046d11584d3ff36522c721 (patch)
tree286d014028d629d7a13a35ce19d42169ca2996c0 /pcapio.c
parenta1cca8c54ac5fb3d0b9415c0ea86437f80458357 (diff)
Add ws_fclose(), ws_fflush(), and ws_fdopen() to the fileutils.
Retire libpcap_fdopen(), libpcap_dump_flush(), and libpcap_dump_close(). svn path=/trunk/; revision=46636
Diffstat (limited to 'pcapio.c')
-rw-r--r--pcapio.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/pcapio.c b/pcapio.c
index b45a0e7284..f4bb7f30dc 100644
--- a/pcapio.c
+++ b/pcapio.c
@@ -194,19 +194,6 @@ struct option {
} while (0); \
}
-/* Returns a FILE * to write to on success, NULL on failure */
-FILE *
-libpcap_fdopen(int fd, int *err)
-{
- FILE *fp;
-
- fp = fdopen(fd, "wb");
- if (fp == NULL) {
- *err = errno;
- }
- return fp;
-}
-
/* Write the file header to a dump file.
Returns TRUE on success, FALSE on failure.
Sets "*err" to an error code, or 0 for a short write, on failure*/
@@ -751,28 +738,6 @@ libpcap_write_interface_statistics_block(FILE *fp,
return TRUE;
}
-gboolean
-libpcap_dump_flush(FILE *pd, int *err)
-{
- if (fflush(pd) == EOF) {
- if (err != NULL)
- *err = errno;
- return FALSE;
- }
- return TRUE;
-}
-
-gboolean
-libpcap_dump_close(FILE *pd, int *err)
-{
- if (fclose(pd) == EOF) {
- if (err != NULL)
- *err = errno;
- return FALSE;
- }
- return TRUE;
-}
-
#endif /* HAVE_LIBPCAP */
/*