diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-02-18 10:03:04 -0500 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-02-25 21:06:21 +0000 |
commit | 860747e1e78aefdaf31e77408ad590b9d759d1aa (patch) | |
tree | bcdb8aebc725be4f21e807d3345c0194a74ba28f /epan/tap.c | |
parent | 907a8259862401af3fdc8ad1201e13c6abf677db (diff) | |
download | wireshark-860747e1e78aefdaf31e77408ad590b9d759d1aa.tar.gz |
Adds some Lua helper functions: some commonly used functions, and to help troubleshooting Lua scripts
There are some common things people need to do, such as convert to/from hex or get
the raw binary string in a ByteArray/Tvb/TvbRange. These have been added, as well
as some tests for them in the testsuites. Also, functions have been added to allow
a script to get all the available tap types and filter fields, since they are
not exactly what one can see in the Wireshark gui.
Change-Id: I92e5e4eae713bb90d79b0c024eaa4e55b99cc96b
Reviewed-on: https://code.wireshark.org/review/249
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/tap.c')
-rw-r--r-- | epan/tap.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/epan/tap.c b/epan/tap.c index f4036afdb6..564254802b 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -421,7 +421,21 @@ draw_tap_listeners(gboolean draw_all) } } +/* Gets a GList of the tap names. The content of the list + is owned by the tap table and should not be modified or freed. + Use g_list_free() when done using the list. */ +GList* +get_tap_names() +{ + GList *list = NULL; + tap_dissector_t *td; + for(td=tap_dissector_list; td; td=td->next) { + list = g_list_prepend(list, td->name); + } + + return g_list_reverse(list); +} /* ********************************************************************** * Functions used by tap to |