xmpp: Add whitespace keepalive indication
RFC 6120 section 4.6.1 defines the use of a single whitespace as "whitespace keepalive", so indicate this in the Info column. Change-Id: I685431d91be2a37fbd66f8d1cdabe53f33092e93 Reviewed-on: https://code.wireshark.org/review/17323 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
8ce301704b
commit
c661da414d
|
@ -423,13 +423,18 @@ dissect_xmpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
|
|||
}
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "XMPP");
|
||||
|
||||
col_clear(pinfo->cinfo, COL_INFO);
|
||||
|
||||
/*if tree == NULL then xmpp_item and xmpp_tree will also NULL*/
|
||||
xmpp_item = proto_tree_add_item(tree, proto_xmpp, tvb, 0, -1, ENC_NA);
|
||||
xmpp_tree = proto_item_add_subtree(xmpp_item, ett_xmpp);
|
||||
|
||||
if ((tvb_reported_length(tvb) == 1) && tvb_get_guint8(tvb, 0) == ' ') {
|
||||
/* RFC 6120 section 4.6.1 */
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "Whitespace Keepalive");
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
call_dissector_with_data(xml_handle, tvb, pinfo, xmpp_tree, NULL);
|
||||
|
||||
/* If XML dissector is disabled, we can't do much */
|
||||
|
@ -523,9 +528,9 @@ dissect_xmpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
|
|||
xmpp_features(xmpp_tree, tvb, pinfo, packet);
|
||||
} else if (strcmp(packet->name, "starttls") == 0) {
|
||||
xmpp_starttls(xmpp_tree, tvb, pinfo, packet, xmpp_info);
|
||||
}else if (strcmp(packet->name, "proceed") == 0) {
|
||||
} else if (strcmp(packet->name, "proceed") == 0) {
|
||||
xmpp_proceed(xmpp_tree, tvb, pinfo, packet, xmpp_info);
|
||||
}else {
|
||||
} else {
|
||||
xmpp_proto_tree_show_first_child(xmpp_tree);
|
||||
expert_add_info_format(pinfo, xmpp_tree, &ei_xmpp_packet_unknown, "Unknown packet: %s", packet->name);
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "UNKNOWN PACKET ");
|
||||
|
|
Loading…
Reference in New Issue