aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-01-16 13:52:42 -0800
committerGuy Harris <guy@alum.mit.edu>2016-01-16 21:53:23 +0000
commit330162378440b44b6faeaea20c868e70c48d228a (patch)
treec3b90574c2b4fd6214f43f97cd8145c7e8622913 /wiretap
parent49fe90fb6d8b759481e157766ec88c42d74fd4d0 (diff)
Add WTAP_ENCAP_NFC_LLCP to the list of types require a pseudo-header.
Discovered by changing wtap_encap_requires_phdr() to use a switch statement and comparing the case arms. Change-Id: I2a23b86ddfbc88c1b3251a0e97f7f00ee93f630e Reviewed-on: https://code.wireshark.org/review/13341 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/pcap-common.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c
index 3df298f6f5..76f74ce4d2 100644
--- a/wiretap/pcap-common.c
+++ b/wiretap/pcap-common.c
@@ -692,19 +692,21 @@ wtap_wtap_encap_to_pcap_encap(int encap)
}
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_BLUETOOTH_LINUX_MONITOR) ||
- (encap == WTAP_ENCAP_PPP_WITH_PHDR)
- ) {
+wtap_encap_requires_phdr(int wtap_encap)
+{
+ switch (wtap_encap) {
+
+ case WTAP_ENCAP_ATM_PDUS:
+ case WTAP_ENCAP_IRDA:
+ case WTAP_ENCAP_MTP2_WITH_PHDR:
+ case WTAP_ENCAP_LINUX_LAPD:
+ case WTAP_ENCAP_SITA:
+ case WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR:
+ case WTAP_ENCAP_BLUETOOTH_LINUX_MONITOR:
+ case WTAP_ENCAP_NFC_LLCP:
+ case WTAP_ENCAP_PPP_WITH_PHDR:
+ case WTAP_ENCAP_ERF:
+ case WTAP_ENCAP_I2C:
return TRUE;
}
return FALSE;