aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-04-08 12:19:55 -0700
committerGuy Harris <guy@alum.mit.edu>2014-04-08 19:20:15 +0000
commit07ee5de75cc07a869dee294c2294f2a03dfc381c (patch)
tree7a6b079ae30b9b5b2fd5470b96f38d6a9a826ab4 /epan
parent7d458fa4a6d10f4e79b2b90dc3355c1c802b09da (diff)
Get the UDP protocol number from a Wireshark header.
We have epan/ipproto.h to define various IP protocol numbers; use that. Change-Id: I1ec72028182125f7e11dc159791753ee26d35f12 Reviewed-on: https://code.wireshark.org/review/1027 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-opensafety.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c
index 68ae04e72b..4b2d14943f 100644
--- a/epan/dissectors/packet-opensafety.c
+++ b/epan/dissectors/packet-opensafety.c
@@ -43,6 +43,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/etypes.h>
+#include <epan/ipproto.h>
#include <epan/wmem/wmem.h>
#include <epan/expert.h>
#include <epan/reassemble.h>
@@ -75,11 +76,6 @@
#define OPENSAFETY_DEFAULT_DOMAIN 0x1
-/* Under linux, this gets defined in netinet/in.h */
-#ifndef IPPROTO_UDP
-#define IPPROTO_UDP 0x11
-#endif
-
#ifndef OPENSAFETY_PINFO_CONST_DATA
#define OPENSAFETY_PINFO_CONST_DATA 0xAABBCCDD
#endif
@@ -2282,7 +2278,7 @@ dissect_opensafety_siii(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *t
if ( ! global_enable_siii )
return result;
- if ( pinfo->ipproto == IPPROTO_UDP )
+ if ( pinfo->ipproto == IP_PROTO_UDP )
{
return opensafety_package_dissector("openSAFETY/SercosIII UDP", "", FALSE, FALSE, 0,
message_tvb, pinfo, tree, OPENSAFETY_ACYCLIC_DATA );