From 07ee5de75cc07a869dee294c2294f2a03dfc381c Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 8 Apr 2014 12:19:55 -0700 Subject: 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 --- epan/dissectors/packet-opensafety.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'epan') 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 #include #include +#include #include #include #include @@ -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 ); -- cgit v1.2.3