diff options
Diffstat (limited to 'epan/dissectors/packet-openflow.c')
-rw-r--r-- | epan/dissectors/packet-openflow.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-openflow.c b/epan/dissectors/packet-openflow.c index 8b21ed55..34c6d65f 100644 --- a/epan/dissectors/packet-openflow.c +++ b/epan/dissectors/packet-openflow.c @@ -26,7 +26,7 @@ void proto_reg_handoff_openflow(void); #define OFP_LEGACY_PORT 6633 #define OFP_LEGACY2_PORT 6634 #define OFP_IANA_PORT 6653 -static range_t *g_openflow_ports = NULL; +static range_t *g_openflow_ports; static dissector_handle_t openflow_handle; static dissector_handle_t openflow_v1_handle; @@ -35,12 +35,12 @@ static dissector_handle_t openflow_v5_handle; static dissector_handle_t openflow_v6_handle; /* Initialize the protocol and registered fields */ -static int proto_openflow = -1; -static int hf_openflow_version = -1; +static int proto_openflow; +static int hf_openflow_version; -static expert_field ei_openflow_version = EI_INIT; +static expert_field ei_openflow_version; -static gboolean openflow_desegment = TRUE; +static bool openflow_desegment = true; #define OFP_VERSION_1_0 1 #define OFP_VERSION_1_1 2 @@ -59,7 +59,7 @@ static const value_string openflow_version_values[] = { { 0, NULL } }; -static guint +static unsigned get_openflow_pdu_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) { @@ -69,11 +69,11 @@ get_openflow_pdu_length(packet_info *pinfo _U_, tvbuff_t *tvb, static int dissect_openflow_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { - guint offset = 0; - guint8 version; + unsigned offset = 0; + uint8_t version; proto_item* ti; - version = tvb_get_guint8(tvb, 0); + version = tvb_get_uint8(tvb, 0); /* Set the Protocol column to the constant string of openflow */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "OpenFlow"); col_clear(pinfo->cinfo,COL_INFO); @@ -108,7 +108,7 @@ dissect_openflow(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data return tvb_captured_length(tvb); } -static gboolean +static bool dissect_openflow_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { @@ -118,14 +118,14 @@ dissect_openflow_heur(tvbuff_t *tvb, packet_info *pinfo, (pinfo->destport != OFP_LEGACY2_PORT) && (pinfo->destport != OFP_IANA_PORT) && (!value_is_in_range(g_openflow_ports, pinfo->destport))) { - return FALSE; + return false; } conversation = find_or_create_conversation(pinfo); conversation_set_dissector(conversation, openflow_handle); dissect_openflow(tvb, pinfo, tree, data); - return TRUE; + return true; } static void |