diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-09-14 20:23:18 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-09-14 20:23:18 +0000 |
commit | 762e5ac93f08912c6daae6e83033b01332e914ab (patch) | |
tree | b7782b13f2ffe300f89dd3144a341b33afd4c363 /wiretap | |
parent | 670dff46e451ca0e701bdafb5c13d75c42b261f6 (diff) | |
download | wireshark-762e5ac93f08912c6daae6e83033b01332e914ab.tar.gz |
Create a common libui using CMake similar to what we do with Autotools.
Move the GTK+ text import code to the common UI directory. Create
wtap_encap_requires_phdr() from code in file_import_dlg.c.
svn path=/trunk/; revision=44904
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/pcap-common.c | 19 | ||||
-rw-r--r-- | wiretap/pcap-encap.h | 9 | ||||
-rw-r--r-- | wiretap/wtap.def | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c index f1655020d6..1b52422f01 100644 --- a/wiretap/pcap-common.c +++ b/wiretap/pcap-common.c @@ -660,6 +660,25 @@ wtap_wtap_encap_to_pcap_encap(int encap) return -1; } +gboolean +wtap_encap_requires_phdr(int encap) { + if ( + (encap == WTAP_ENCAP_ATM_PDUS) || + (encap == WTAP_ENCAP_IRDA) || + (encap == WTAP_ENCAP_MTP2_WITH_PHDR) || + (encap == WTAP_ENCAP_LINUX_LAPD) || + (encap == WTAP_ENCAP_SITA) || + (encap == WTAP_ENCAP_ERF) || + (encap == WTAP_ENCAP_I2C) || + (encap == WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR) || + (encap == WTAP_ENCAP_PPP_WITH_PHDR) + ) { + return TRUE; + } + return FALSE; +} + + /* * Various pseudo-headers that appear at the beginning of packet data. * diff --git a/wiretap/pcap-encap.h b/wiretap/pcap-encap.h index 3644394807..6d0fa74fdd 100644 --- a/wiretap/pcap-encap.h +++ b/wiretap/pcap-encap.h @@ -30,7 +30,16 @@ #include <glib.h> #include <wiretap/wtap.h> +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + extern int wtap_pcap_encap_to_wtap_encap(int encap); extern int wtap_wtap_encap_to_pcap_encap(int encap); +extern gboolean wtap_encap_requires_phdr(int encap); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif diff --git a/wiretap/wtap.def b/wiretap/wtap.def index 0ed9650392..a7f9e0a6f4 100644 --- a/wiretap/wtap.def +++ b/wiretap/wtap.def @@ -40,6 +40,7 @@ wtap_dump_flush wtap_dump_open wtap_dump_open_ng wtap_dump_set_addrinfo_list +wtap_encap_requires_phdr wtap_encap_short_string wtap_encap_string wtap_fdclose |