wiretap: un-export some routines.

wtap_file_get_shb_for_new_file() and wtap_file_get_nrb_for_new_file()
are intended to be used only internally to libwiretap and by libwiretap
plugins.
This commit is contained in:
Guy Harris 2021-05-31 04:39:59 -07:00
parent 162251176a
commit 7477431325
3 changed files with 41 additions and 46 deletions

View File

@ -95,10 +95,8 @@ libwiretap.so.0 libwiretap0 #MINVER#
wtap_file_encap@Base 1.9.1
wtap_file_get_idb_info@Base 1.9.1
wtap_file_get_nrb@Base 2.1.2
wtap_file_get_nrb_for_new_file@Base 1.99.9
wtap_file_get_num_shbs@Base 3.3.0
wtap_file_get_shb@Base 1.99.9
wtap_file_get_shb_for_new_file@Base 1.99.9
wtap_file_size@Base 1.9.1
wtap_file_tsprec@Base 1.99.0
wtap_file_type_subtype@Base 1.12.0~rc1

View File

@ -127,7 +127,6 @@ WS_DLL_PUBLIC gboolean wtap_dump_file_write(wtap_dumper *wdh, const void *buf,
WS_DLL_PUBLIC gint64 wtap_dump_file_seek(wtap_dumper *wdh, gint64 offset, int whence, int *err);
WS_DLL_PUBLIC gint64 wtap_dump_file_tell(wtap_dumper *wdh, int *err);
extern gint wtap_num_file_types;
#include <wsutil/pint.h>
@ -363,6 +362,47 @@ struct backwards_compatibiliity_lua_name {
WS_DLL_PUBLIC
const GArray *get_backwards_compatibility_lua_table(void);
/**
* @brief Gets new section header block for new file, based on existing info.
* @details Creates a new wtap_block_t section header block and only
* copies appropriate members of the SHB for a new file. In
* particular, the comment string is copied, and any custom options
* which should be copied are copied. The os, hardware, and
* application strings are *not* copied.
*
* @note Use wtap_free_shb() to free the returned section header.
*
* @param wth The wiretap session.
* @return The new section header, which must be wtap_free_shb'd.
*/
GArray* wtap_file_get_shb_for_new_file(wtap *wth);
/**
* @brief Generate an IDB, given a wiretap handle for the file,
* using the file's encapsulation type, snapshot length,
* and time stamp resolution, and add it to the interface
* data for a file.
* @note This requires that the encapsulation type and time stamp
* resolution not be per-packet; it will terminate the process
* if either of them are.
*
* @param wth The wiretap handle for the file.
*/
WS_DLL_PUBLIC
void wtap_add_generated_idb(wtap *wth);
/**
* @brief Gets new name resolution info for new file, based on existing info.
* @details Creates a new wtap_block_t of name resolution info and only
* copies appropriate members for a new file.
*
* @note Use wtap_free_nrb() to free the returned pointer.
*
* @param wth The wiretap session.
* @return The new name resolution info, which must be freed.
*/
GArray* wtap_file_get_nrb_for_new_file(wtap *wth);
#endif /* __WTAP_INT_H__ */
/*

View File

@ -1824,22 +1824,6 @@ guint wtap_file_get_num_shbs(wtap *wth);
WS_DLL_PUBLIC
wtap_block_t wtap_file_get_shb(wtap *wth, guint shb_num);
/**
* @brief Gets new section header block for new file, based on existing info.
* @details Creates a new wtap_block_t section header block and only
* copies appropriate members of the SHB for a new file. In
* particular, the comment string is copied, and any custom options
* which should be copied are copied. The os, hardware, and
* application strings are *not* copied.
*
* @note Use wtap_free_shb() to free the returned section header.
*
* @param wth The wiretap session.
* @return The new section header, which must be wtap_free_shb'd.
*/
WS_DLL_PUBLIC
GArray* wtap_file_get_shb_for_new_file(wtap *wth);
/**
* @brief Sets or replaces the section header comment.
* @details The passed-in comment string is set to be the comment
@ -1853,20 +1837,6 @@ GArray* wtap_file_get_shb_for_new_file(wtap *wth);
WS_DLL_PUBLIC
void wtap_write_shb_comment(wtap *wth, gchar *comment);
/**
* @brief Generate an IDB, given a wiretap handle for the file,
* using the file's encapsulation type, snapshot length,
* and time stamp resolution, and add it to the interface
* data for a file.
* @note This requires that the encapsulation type and time stamp
* resolution not be per-packet; it will terminate the process
* if either of them are.
*
* @param wth The wiretap handle for the file.
*/
WS_DLL_PUBLIC
void wtap_add_generated_idb(wtap *wth);
/**
* @brief Gets existing interface descriptions.
* @details Returns a new struct containing a pointer to the existing
@ -1938,19 +1908,6 @@ gchar *wtap_get_debug_if_descr(const wtap_block_t if_descr,
WS_DLL_PUBLIC
wtap_block_t wtap_file_get_nrb(wtap *wth);
/**
* @brief Gets new name resolution info for new file, based on existing info.
* @details Creates a new wtap_block_t of name resolution info and only
* copies appropriate members for a new file.
*
* @note Use wtap_free_nrb() to free the returned pointer.
*
* @param wth The wiretap session.
* @return The new name resolution info, which must be freed.
*/
WS_DLL_PUBLIC
GArray* wtap_file_get_nrb_for_new_file(wtap *wth);
/*** close the file descriptors for the current file ***/
WS_DLL_PUBLIC
void wtap_fdclose(wtap *wth);