diff options
author | Gerald Combs <gerald@wireshark.org> | 2011-03-24 22:47:57 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2011-03-24 22:47:57 +0000 |
commit | fcf51fc73b9f99da83914168e493f4f07a6a02d5 (patch) | |
tree | 982df185f08cae7b0a892b37069a03cd3721edc6 /wiretap/wtap.c | |
parent | 57833dc7786403cf833e3058e6c238ea16813576 (diff) |
Add initial pcapng name resolution record support. Wireshark has read
support; TShark has read+write support. Additionally TShark can read a
"hosts" file and write those records to a capture file.
This uses "struct addrinfo" in many places and probably won't compile on
some platforms.
svn path=/trunk/; revision=36318
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r-- | wiretap/wtap.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c index ae070418b7..2c420fd4ca 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -40,7 +40,6 @@ #endif #include "wtap-int.h" -#include "wtap.h" #include "file_wrappers.h" #include <wsutil/file_util.h> @@ -671,6 +670,16 @@ wtap_cleareof(wtap *wth _U_) { #endif } +void wtap_set_cb_new_ipv4(wtap *wth, wtap_new_ipv4_callback_t add_new_ipv4) { + if (wth) + wth->add_new_ipv4 = add_new_ipv4; +} + +void wtap_set_cb_new_ipv6(wtap *wth, wtap_new_ipv6_callback_t add_new_ipv6) { + if (wth) + wth->add_new_ipv6 = add_new_ipv6; +} + gboolean wtap_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) { |