aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.h
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r--wiretap/wtap.h59
1 files changed, 21 insertions, 38 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index b89701f24c..566ec50a75 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -1268,7 +1268,7 @@ typedef struct wtapng_section_mandatory_s {
} wtapng_mandatory_section_t;
/** struct holding the information to build IDB:s
- * the interface_data array holds an array of wtap_optionblock_t
+ * the interface_data array holds an array of wtap_block_t
* represending IDB of one per interface.
*/
typedef struct wtapng_iface_descriptions_s {
@@ -1592,13 +1592,15 @@ int wtap_file_tsprec(wtap *wth);
*
* @param wth The wiretap session.
* @return The existing section header, which must NOT be g_free'd.
+ *
+ * XXX - need to be updated to handle multiple SHBs.
*/
WS_DLL_PUBLIC
-wtap_optionblock_t wtap_file_get_shb(wtap *wth);
+wtap_block_t wtap_file_get_shb(wtap *wth);
/**
* @brief Gets new section header block for new file, based on existing info.
- * @details Creates a new wtap_optionblock_t section header block and only
+ * @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
@@ -1613,16 +1615,6 @@ WS_DLL_PUBLIC
GArray* wtap_file_get_shb_for_new_file(wtap *wth);
/**
- * @brief Gets the section header comment string.
- * @details This gets the pointer, without duplicating the string.
- *
- * @param wth The wtap session.
- * @return The comment string.
- */
-WS_DLL_PUBLIC
-const gchar* wtap_file_get_shb_comment(wtap *wth);
-
-/**
* @brief Sets or replaces the section header comment.
* @details The passed-in comment string is set to be the comment
* for the section header block. The passed-in string's
@@ -1675,46 +1667,37 @@ void wtap_free_idb_info(wtapng_iface_descriptions_t *idb_info);
* @return A newly allocated gcahr array string, which must be g_free'd.
*/
WS_DLL_PUBLIC
-gchar *wtap_get_debug_if_descr(const wtap_optionblock_t if_descr,
+gchar *wtap_get_debug_if_descr(const wtap_block_t if_descr,
const int indent,
const char* line_end);
/**
- * @brief Gets new name resolution info for new file, based on existing info.
- * @details Creates a new wtap_optionblock_t of name resolution info and only
- * copies appropriate members for a new file.
- *
- * @note Use wtap_free_nrb() to free the returned pointer.
+ * @brief Gets existing name resolution block, not for new file.
+ * @details Returns the pointer to the existing NRB, without creating a
+ * new one. This should only be used for accessing info, not
+ * for creating a new file based on existing NRB info. Use
+ * wtap_file_get_nrb_for_new_file() for that.
*
* @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);
-
-/**
- * @brief Gets the name resolution comment, if any.
- * @details This retrieves the name resolution comment string pointer,
- * possibly NULL.
+ * @return The existing section header, which must NOT be g_free'd.
*
- * @param wth The wiretap session.
- * @return The comment string.
+ * XXX - need to be updated to handle multiple NRBs.
*/
WS_DLL_PUBLIC
-const gchar* wtap_get_nrb_comment(wtap *wth);
+wtap_block_t wtap_file_get_nrb(wtap *wth);
/**
- * @brief Sets or replaces the name resolution comment.
- * @details The passed-in comment string is set to be the comment
- * for the name resolution block. The passed-in string's
- * ownership will be owned by the block, so it should be
- * duplicated before passing into this function.
+ * @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.
- * @param comment The comment string.
+ * @return The new name resolution info, which must be freed.
*/
WS_DLL_PUBLIC
-void wtap_write_nrb_comment(wtap *wth, gchar *comment);
+GArray* wtap_file_get_nrb_for_new_file(wtap *wth);
/*** close the file descriptors for the current file ***/
WS_DLL_PUBLIC