diff options
author | David Perry <boolean263@protonmail.com> | 2021-04-29 07:23:21 -0400 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-07-07 18:40:24 +0000 |
commit | 73087d6fb486a61e8eb0886a02e6c6403534fa36 (patch) | |
tree | 2cee7a922a2225628103bb247818a8bb2db133b3 /file.h | |
parent | 20f38c06eab3f9a995468141cdfb14ec821a6503 (diff) |
Use wtap_blocks for packet comments
Mostly functioning proof of concept for #14329. This work is intended to
allow Wireshark to support multiple packet comments per packet.
Uses and expands upon the `wtap_block` API in `wiretap/wtap_opttypes.h`.
It attaches a `wtap_block` structure to `wtap_rec` in place of its
current `opt_comment` and `packet_verdict` members to hold OPT_COMMENT
and OPT_PKT_VERDICT option values.
Diffstat (limited to 'file.h')
-rw-r--r-- | file.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -689,24 +689,24 @@ cf_merge_files_to_tempfile(gpointer pd_window, char **out_filenamep, void cf_update_section_comment(capture_file *cf, gchar *comment); /* - * Get the comment on a packet (record). - * If the comment has been edited, it returns the result of the edit, - * otherwise it returns the comment from the file. + * Get the packet block for a packet (record). + * If the block has been edited, it returns the result of the edit, + * otherwise it returns the block from the file. * * @param cf the capture file * @param fd the frame_data structure for the frame - * @returns A comment (use g_free to free) or NULL if there is none. + * @returns A block (use wtap_block_unref to free) or NULL if there is none. */ -char *cf_get_packet_comment(capture_file *cf, const frame_data *fd); +wtap_block_t cf_get_packet_block(capture_file *cf, const frame_data *fd); /** - * Update(replace) the comment on a capture from a frame + * Update(replace) the block on a capture from a frame * * @param cf the capture file * @param fd the frame_data structure for the frame - * @param new_comment the string replacing the old comment + * @param new_block the block replacing the old block */ -gboolean cf_set_user_packet_comment(capture_file *cf, frame_data *fd, const gchar *new_comment); +gboolean cf_set_user_packet_block(capture_file *cf, frame_data *fd, wtap_block_t new_block); /** * What types of comments does this file have? |