diff options
author | Michael Tüxen <tuexen@fh-muenster.de> | 2012-12-20 14:53:09 +0000 |
---|---|---|
committer | Michael Tüxen <tuexen@fh-muenster.de> | 2012-12-20 14:53:09 +0000 |
commit | 7e84abf005afa5952b046d11584d3ff36522c721 (patch) | |
tree | 286d014028d629d7a13a35ce19d42169ca2996c0 /pcapio.c | |
parent | a1cca8c54ac5fb3d0b9415c0ea86437f80458357 (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.c | 35 |
1 files changed, 0 insertions, 35 deletions
@@ -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 */ /* |