diff options
author | Balint Reczey <balint@balintreczey.hu> | 2013-02-28 21:11:32 +0000 |
---|---|---|
committer | Balint Reczey <balint@balintreczey.hu> | 2013-02-28 21:11:32 +0000 |
commit | ccc76ff07f095ed94b45344c662262786e4f0661 (patch) | |
tree | f9e5d8912c8e273959a76590c51fc7b8cb33e759 /wiretap/file_access.c | |
parent | 969ec935fabc5768d4e495a40e3892e2545e8e41 (diff) |
Fix MSVC build errors related to symbol visibility
svn path=/trunk/; revision=47952
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r-- | wiretap/file_access.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index c63f538c2f..23662a9379 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -186,6 +186,7 @@ static void init_open_routines(void) { open_routines = (wtap_open_routine_t*)(void *)open_routines_arr->data; } +WS_DLL_PUBLIC void wtap_register_open_routine(wtap_open_routine_t open_routine, gboolean has_magic) { init_open_routines(); @@ -223,6 +224,7 @@ void wtap_register_open_routine(wtap_open_routine_t open_routine, gboolean has_m so that it can do sequential I/O to a capture file that's being written to as new packets arrive independently of random I/O done to display protocol trees for packets when they're selected. */ +WS_DLL_PUBLIC wtap* wtap_open_offline(const char *filename, int *err, char **err_info, gboolean do_random) { @@ -436,6 +438,7 @@ success: * reopens the random stream. */ gboolean +WS_DLL_PUBLIC wtap_fdreopen(wtap *wth, const char *filename, int *err) { ws_statb64 statb; @@ -764,6 +767,7 @@ static void init_file_types(void) { dump_open_table = (const struct file_type_info*)(void *)dump_open_table_arr->data; } +WS_DLL_PUBLIC int wtap_register_file_type(const struct file_type_info* fi) { init_file_types(); @@ -774,6 +778,7 @@ int wtap_register_file_type(const struct file_type_info* fi) { return wtap_num_file_types++; } +WS_DLL_PUBLIC int wtap_get_num_file_types(void) { return wtap_num_file_types; @@ -785,6 +790,7 @@ int wtap_get_num_file_types(void) * there's only one type, it's that type, otherwise it's * WTAP_ENCAP_PER_PACKET. */ +WS_DLL_PUBLIC int wtap_dump_file_encap_type(const GArray *file_encaps) { @@ -802,6 +808,7 @@ wtap_dump_file_encap_type(const GArray *file_encaps) * Return TRUE if a capture with a given GArray of WTAP_ENCAP_ types * can be written in a specified format, and FALSE if it can't. */ +WS_DLL_PUBLIC gboolean wtap_dump_can_write_encaps(int ft, const GArray *file_encaps) { @@ -842,6 +849,7 @@ wtap_dump_can_write_encaps(int ft, const GArray *file_encaps) * to save a file of a given type with a given GArray of WTAP_ENCAP_ * types. */ +WS_DLL_PUBLIC GArray * wtap_get_savable_file_types(int file_type, const GArray *file_encaps) { @@ -910,6 +918,7 @@ wtap_get_savable_file_types(int file_type, const GArray *file_encaps) } /* Name that should be somewhat descriptive. */ +WS_DLL_PUBLIC const char *wtap_file_type_string(int filetype) { if (filetype < 0 || filetype >= wtap_num_file_types) { @@ -921,6 +930,7 @@ const char *wtap_file_type_string(int filetype) } /* Name to use in, say, a command-line flag specifying the type. */ +WS_DLL_PUBLIC const char *wtap_file_type_short_string(int filetype) { if (filetype < 0 || filetype >= wtap_num_file_types) @@ -930,6 +940,7 @@ const char *wtap_file_type_short_string(int filetype) } /* Translate a short name to a capture file type. */ +WS_DLL_PUBLIC int wtap_short_string_to_file_type(const char *short_name) { int filetype; @@ -975,6 +986,7 @@ static GSList *add_extensions(GSList *extensions, const gchar *extension, All strings in the list are allocated with g_malloc() and must be freed with g_free(). */ +WS_DLL_PUBLIC GSList *wtap_get_file_extensions_list(int filetype, gboolean include_compressed) { gchar **extensions_set, **extensionp; @@ -1041,6 +1053,7 @@ GSList *wtap_get_file_extensions_list(int filetype, gboolean include_compressed) /* * Free a list returned by wtap_file_extensions_list(). */ +WS_DLL_PUBLIC void wtap_free_file_extensions_list(GSList *extensions) { GSList *extension; @@ -1054,6 +1067,7 @@ void wtap_free_file_extensions_list(GSList *extensions) /* Return the default file extension to use with the specified file type; that's just the extension, without any ".". */ +WS_DLL_PUBLIC const char *wtap_default_file_extension(int filetype) { if (filetype < 0 || filetype >= wtap_num_file_types) @@ -1062,6 +1076,7 @@ const char *wtap_default_file_extension(int filetype) return dump_open_table[filetype].default_file_extension; } +WS_DLL_PUBLIC gboolean wtap_dump_can_open(int filetype) { if (filetype < 0 || filetype >= wtap_num_file_types @@ -1071,6 +1086,7 @@ gboolean wtap_dump_can_open(int filetype) return TRUE; } +WS_DLL_PUBLIC gboolean wtap_dump_can_write_encap(int filetype, int encap) { if (filetype < 0 || filetype >= wtap_num_file_types @@ -1084,6 +1100,7 @@ gboolean wtap_dump_can_write_encap(int filetype, int encap) } #ifdef HAVE_LIBZ +WS_DLL_PUBLIC gboolean wtap_dump_can_compress(int filetype) { /* @@ -1098,12 +1115,14 @@ gboolean wtap_dump_can_compress(int filetype) return TRUE; } #else +WS_DLL_PUBLIC gboolean wtap_dump_can_compress(int filetype _U_) { return FALSE; } #endif +WS_DLL_LOCAL gboolean wtap_dump_has_name_resolution(int filetype) { if (filetype < 0 || filetype >= wtap_num_file_types @@ -1122,6 +1141,7 @@ static WFILE_T wtap_dump_file_open(wtap_dumper *wdh, const char *filename); static WFILE_T wtap_dump_file_fdopen(wtap_dumper *wdh, int fd); static int wtap_dump_file_close(wtap_dumper *wdh); +WS_DLL_PUBLIC wtap_dumper* wtap_dump_open(const char *filename, int filetype, int encap, int snaplen, gboolean compressed, int *err) { @@ -1171,6 +1191,7 @@ wtap_dump_init_dumper(int filetype, int encap, int snaplen, gboolean compressed, return wdh; } +WS_DLL_PUBLIC wtap_dumper* wtap_dump_open_ng(const char *filename, int filetype, int encap, int snaplen, gboolean compressed, wtapng_section_t *shb_hdr, wtapng_iface_descriptions_t *idb_inf, int *err) { @@ -1230,12 +1251,14 @@ wtap_dumper* wtap_dump_open_ng(const char *filename, int filetype, int encap, return wdh; } +WS_DLL_PUBLIC wtap_dumper* wtap_dump_fdopen(int fd, int filetype, int encap, int snaplen, gboolean compressed, int *err) { return wtap_dump_fdopen_ng(fd, filetype, encap, snaplen, compressed, NULL, NULL, err); } +WS_DLL_PUBLIC wtap_dumper* wtap_dump_fdopen_ng(int fd, int filetype, int encap, int snaplen, gboolean compressed, wtapng_section_t *shb_hdr, wtapng_iface_descriptions_t *idb_inf, int *err) { @@ -1363,12 +1386,14 @@ static gboolean wtap_dump_open_finish(wtap_dumper *wdh, int filetype, gboolean c return TRUE; /* success! */ } +WS_DLL_PUBLIC gboolean wtap_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, const guint8 *pd, int *err) { return (wdh->subtype_write)(wdh, phdr, pd, err); } +WS_DLL_PUBLIC void wtap_dump_flush(wtap_dumper *wdh) { #ifdef HAVE_LIBZ @@ -1381,6 +1406,7 @@ void wtap_dump_flush(wtap_dumper *wdh) } } +WS_DLL_PUBLIC gboolean wtap_dump_close(wtap_dumper *wdh, int *err) { gboolean ret = TRUE; @@ -1413,16 +1439,19 @@ gboolean wtap_dump_close(wtap_dumper *wdh, int *err) return ret; } +WS_DLL_PUBLIC gint64 wtap_get_bytes_dumped(wtap_dumper *wdh) { return wdh->bytes_dumped; } +WS_DLL_PUBLIC void wtap_set_bytes_dumped(wtap_dumper *wdh, gint64 bytes_dumped) { wdh->bytes_dumped = bytes_dumped; } +WS_DLL_PUBLIC gboolean wtap_dump_set_addrinfo_list(wtap_dumper *wdh, struct addrinfo *addrinfo_list) { if (!wdh || wdh->file_type < 0 || wdh->file_type >= wtap_num_file_types @@ -1467,6 +1496,7 @@ static WFILE_T wtap_dump_file_fdopen(wtap_dumper *wdh _U_, int fd) #endif /* internally writing raw bytes (compressed or not) */ +WS_DLL_LOCAL gboolean wtap_dump_file_write(wtap_dumper *wdh, const void *buf, size_t bufsize, int *err) { |