summaryrefslogtreecommitdiff
path: root/wiretap/wtap_opttypes.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-05-30 23:42:41 -0400
committerMichael Mann <mmann78@netscape.net>2016-06-01 14:33:23 +0000
commit6fa77a6acb7955c804ec73a571177163ad022623 (patch)
tree29ca6bfacc3ad843a6a81615bd593c4cab872d0b /wiretap/wtap_opttypes.c
parentbd932bb2e11f90c3f95b135ccaeaab7d57623963 (diff)
downloadwireshark-6fa77a6acb7955c804ec73a571177163ad022623.tar.gz
Add data structures necessary to support multiple Section Header blocks.
This doesn't try to use any data from multiple Section Header blocks, it just converts single Section Header block usage into a GArray, so the potential is there to then use/support multiple Section Header blocks within a file format (like pcapng) Change-Id: I6ad1f7b8daf4b1ad7ba0eb1ecf2e170421505486 Reviewed-on: https://code.wireshark.org/review/15636 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wiretap/wtap_opttypes.c')
-rw-r--r--wiretap/wtap_opttypes.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wiretap/wtap_opttypes.c b/wiretap/wtap_opttypes.c
index f5506750b5..d87fd3b805 100644
--- a/wiretap/wtap_opttypes.c
+++ b/wiretap/wtap_opttypes.c
@@ -196,6 +196,18 @@ void wtap_optionblock_free(wtap_optionblock_t block)
}
}
+void wtap_optionblock_array_free(GArray* block_array)
+{
+ guint block;
+ if (block_array == NULL)
+ return;
+
+ for (block = 0; block < block_array->len; block++) {
+ wtap_optionblock_free(g_array_index(block_array, wtap_optionblock_t, block));
+ }
+ g_array_free(block_array, TRUE);
+}
+
void wtap_optionblock_copy_options(wtap_optionblock_t dest_block, wtap_optionblock_t src_block)
{
guint i;