From 2ac134b3c5bbc4020fd64b878db984f526b432cb Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Sun, 13 Oct 2013 19:56:52 +0000 Subject: whitespace fixes; mostly: remove trailing blanks svn path=/trunk/; revision=52591 --- epan/dissectors/packet-beep.c | 12 +- epan/dissectors/packet-ber.c | 12 +- epan/dissectors/packet-ber.h | 14 +- epan/dissectors/packet-bfcp.c | 4 +- epan/dissectors/packet-bssgp.c | 6 +- epan/dissectors/packet-bssgp.h | 4 +- epan/dissectors/packet-bthci_acl.c | 2 +- epan/dissectors/packet-btsap.c | 4 +- epan/dissectors/packet-carp.c | 2 +- epan/dissectors/packet-cell_broadcast.h | 6 +- epan/dissectors/packet-cip.c | 10 +- epan/dissectors/packet-cipsafety.h | 2 +- epan/dissectors/packet-coap.c | 8 +- epan/dissectors/packet-cops.c | 2 +- epan/dissectors/packet-dccp.c | 2 +- epan/dissectors/packet-dcerpc-frsapi.h | 2 +- epan/dissectors/packet-dcerpc-messenger.c | 8 +- epan/dissectors/packet-dcerpc-netlogon.h | 4 +- epan/dissectors/packet-dcerpc-nt.h | 20 +- epan/dissectors/packet-dcerpc-pnp.h | 2 +- epan/dissectors/packet-dcerpc-rras.h | 2 +- epan/dissectors/packet-dcerpc-svcctl.h | 2 +- epan/dissectors/packet-dcerpc.h | 58 +- epan/dissectors/packet-dcm.c | 20 +- epan/dissectors/packet-dcom.h | 20 +- epan/dissectors/packet-diameter_3gpp.c | 6 +- epan/dissectors/packet-dis-enums.h | 8 +- epan/dissectors/packet-dis-fields.h | 6 +- epan/dissectors/packet-dis.c | 2 +- epan/dissectors/packet-dtcp-ip.c | 4 +- epan/dissectors/packet-dtls.c | 2 +- epan/dissectors/packet-dtn.c | 6 +- epan/dissectors/packet-dtn.h | 6 +- epan/dissectors/packet-dtp.c | 2 +- epan/dissectors/packet-dvb-ait.c | 4 +- epan/dissectors/packet-dvbci.c | 14 +- epan/dissectors/packet-dvbci.h | 2 +- epan/dissectors/packet-eap.c | 2 +- epan/dissectors/packet-edonkey.h | 16 +- epan/dissectors/packet-enip.c | 2 +- epan/dissectors/packet-enip.h | 2 +- epan/dissectors/packet-epl.c | 6 +- epan/dissectors/packet-erf.h | 6 +- epan/dissectors/packet-erldp.c | 6 +- epan/dissectors/packet-esio.c | 2 +- epan/dissectors/packet-etsi_card_app_toolkit.c | 4 +- epan/dissectors/packet-exported_pdu.c | 2 +- epan/dissectors/packet-fc.h | 8 +- epan/dissectors/packet-fcbls.h | 8 +- epan/dissectors/packet-fcct.h | 6 +- epan/dissectors/packet-fcdns.h | 12 +- epan/dissectors/packet-fcels.h | 2 +- epan/dissectors/packet-fcfcs.h | 8 +- epan/dissectors/packet-fclctl.h | 14 +- epan/dissectors/packet-fcp.h | 8 +- epan/dissectors/packet-fcsb3.h | 8 +- epan/dissectors/packet-fcswils.h | 6 +- epan/dissectors/packet-fmp_notify.c | 2 +- epan/dissectors/packet-ftp.c | 14 +- epan/dissectors/packet-gadu-gadu.c | 10 +- epan/dissectors/packet-ged125.c | 578 +++---- epan/dissectors/packet-giop.h | 4 +- epan/dissectors/packet-gmr1_rr.c | 2 +- epan/dissectors/packet-gsm_a_common.c | 2 +- epan/dissectors/packet-gsm_a_common.h | 6 +- epan/dissectors/packet-gsm_a_dtap.c | 2 +- epan/dissectors/packet-gsm_a_rp.c | 2 +- epan/dissectors/packet-gsm_rlcmac.c | 58 +- epan/dissectors/packet-gssapi.h | 8 +- epan/dissectors/packet-gtp.c | 16 +- epan/dissectors/packet-gtp.h | 4 +- epan/dissectors/packet-h248_10.c | 10 +- epan/dissectors/packet-h248_7.c | 16 +- epan/dissectors/packet-h248_q1950.c | 2 +- epan/dissectors/packet-h264.h | 6 +- epan/dissectors/packet-hp-erm.c | 2 +- epan/dissectors/packet-hpfeeds.c | 62 +- epan/dissectors/packet-http-urlencoded.c | 4 +- epan/dissectors/packet-i2c.c | 2 +- epan/dissectors/packet-iax2.c | 8 +- epan/dissectors/packet-iax2.h | 6 +- epan/dissectors/packet-icep.c | 1938 +++++++++++----------- epan/dissectors/packet-icq.c | 4 +- epan/dissectors/packet-iec104.c | 24 +- epan/dissectors/packet-ieee1722.c | 6 +- epan/dissectors/packet-ieee17221.c | 2 +- epan/dissectors/packet-ieee80211-radiotap-defs.h | 2 +- epan/dissectors/packet-image-jfif.c | 2 +- epan/dissectors/packet-imf.h | 4 +- epan/dissectors/packet-ipsec.c | 2 +- epan/dissectors/packet-ipsi-ctl.c | 2 +- epan/dissectors/packet-ipxwan.c | 10 +- epan/dissectors/packet-isakmp.c | 2 +- epan/dissectors/packet-iscsi.c | 2 +- epan/dissectors/packet-isis-lsp.c | 2 +- epan/dissectors/packet-isis-snp.c | 4 +- epan/dissectors/packet-iso7816.c | 4 +- epan/dissectors/packet-isup.c | 8 +- epan/dissectors/packet-ixiatrailer.c | 2 +- epan/dissectors/packet-json.c | 8 +- epan/dissectors/packet-jxta.c | 2 +- epan/dissectors/packet-kdsp.c | 4 +- epan/dissectors/packet-lapd.c | 2 +- epan/dissectors/packet-lmp.c | 2 +- epan/dissectors/packet-mac-lte.c | 40 +- epan/dissectors/packet-mac-lte.h | 10 +- epan/dissectors/packet-mgcp.h | 2 +- epan/dissectors/packet-mime-encap.c | 2 +- epan/dissectors/packet-mojito.c | 4 +- epan/dissectors/packet-mount.h | 2 +- epan/dissectors/packet-mp4ves.h | 2 +- epan/dissectors/packet-mq-pcf.c | 2 +- epan/dissectors/packet-mrcpv2.c | 2 +- epan/dissectors/packet-mtp2.c | 24 +- epan/dissectors/packet-mux27010.c | 4 +- epan/dissectors/packet-nas_eps.c | 2 +- epan/dissectors/packet-nat-pmp.c | 18 +- epan/dissectors/packet-ndps.h | 12 +- epan/dissectors/packet-nlm.h | 2 +- epan/dissectors/packet-opensafety.c | 12 +- epan/dissectors/packet-ospf.c | 20 +- epan/dissectors/packet-ouch.c | 8 +- epan/dissectors/packet-packetlogger.c | 2 +- epan/dissectors/packet-per.c | 2 +- epan/dissectors/packet-pim.c | 20 +- epan/dissectors/packet-ppcap.c | 2 +- epan/dissectors/packet-ptp.c | 76 +- epan/dissectors/packet-pw-atm.h | 8 +- epan/dissectors/packet-q2931.c | 2 +- epan/dissectors/packet-radius.c | 2 +- epan/dissectors/packet-reload-framing.c | 2 +- epan/dissectors/packet-rfid-felica.c | 30 +- epan/dissectors/packet-rfid-pn532.c | 2 +- epan/dissectors/packet-rmcp.c | 8 +- epan/dissectors/packet-rmt-alc.c | 2 +- epan/dissectors/packet-rmt-fec.c | 2 +- epan/dissectors/packet-rohc.h | 2 +- epan/dissectors/packet-rpc.h | 6 +- epan/dissectors/packet-rtcdc.c | 6 +- epan/dissectors/packet-rtcp.c | 8 +- epan/dissectors/packet-rtp.h | 4 +- epan/dissectors/packet-rtps.c | 114 +- epan/dissectors/packet-rtps.h | 26 +- epan/dissectors/packet-rtsp.h | 2 +- epan/dissectors/packet-sap.c | 2 +- epan/dissectors/packet-sccp.c | 2 +- epan/dissectors/packet-sccp.h | 8 +- epan/dissectors/packet-scsi-osd.c | 2 +- epan/dissectors/packet-scsi.c | 2 +- epan/dissectors/packet-scsi.h | 10 +- epan/dissectors/packet-sctp.h | 4 +- epan/dissectors/packet-ses.h | 2 +- epan/dissectors/packet-sflow.c | 2 +- epan/dissectors/packet-sip.c | 8 +- epan/dissectors/packet-sip.h | 2 +- epan/dissectors/packet-skinny.c | 8 +- epan/dissectors/packet-slimp3.c | 6 +- epan/dissectors/packet-smb-browse.h | 2 +- epan/dissectors/packet-smb-sidsnooping.h | 2 +- epan/dissectors/packet-smb.c | 6 +- epan/dissectors/packet-smb.h | 2 +- epan/dissectors/packet-smpp.h | 2 +- epan/dissectors/packet-smtp.c | 2 +- epan/dissectors/packet-soupbintcp.c | 8 +- epan/dissectors/packet-ssl.c | 6 +- epan/dissectors/packet-ssl.h | 2 +- epan/dissectors/packet-stun.c | 2 +- epan/dissectors/packet-symantec.c | 6 +- epan/dissectors/packet-tacacs.h | 10 +- epan/dissectors/packet-tcp.h | 2 +- epan/dissectors/packet-tipc.c | 2 +- epan/dissectors/packet-tn5250.c | 2 +- epan/dissectors/packet-tnef.c | 2 +- epan/dissectors/packet-tte.h | 2 +- epan/dissectors/packet-udt.c | 6 +- epan/dissectors/packet-umts_fp.h | 10 +- epan/dissectors/packet-usb-audio.c | 2 +- epan/dissectors/packet-usb-ccid.c | 6 +- epan/dissectors/packet-usb-hub.c | 8 +- epan/dissectors/packet-usb-video.c | 70 +- epan/dissectors/packet-usb.c | 4 +- epan/dissectors/packet-usb.h | 2 +- epan/dissectors/packet-vines.c | 4 +- epan/dissectors/packet-wccp.c | 2 +- epan/dissectors/packet-websocket.c | 2 +- epan/dissectors/packet-windows-common.h | 6 +- epan/dissectors/packet-wps.h | 2 +- epan/dissectors/packet-x11-keysymdef.h | 54 +- epan/dissectors/packet-x25.c | 4 +- epan/dissectors/packet-xdmcp.c | 8 +- epan/dissectors/packet-xot.c | 6 +- epan/dissectors/packet-zbee-zcl-meas-sensing.c | 2 +- epan/dissectors/packet-zbee-zcl.c | 26 +- epan/dissectors/packet-zbee.h | 4 +- epan/dissectors/packet-ziop.h | 2 +- 195 files changed, 2063 insertions(+), 2063 deletions(-) diff --git a/epan/dissectors/packet-beep.c b/epan/dissectors/packet-beep.c index ded418df1e..54922e99b7 100644 --- a/epan/dissectors/packet-beep.c +++ b/epan/dissectors/packet-beep.c @@ -295,14 +295,14 @@ check_term(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree) return 1; } - + if ((tvb_get_guint8(tvb, offset) == 0x0a) && !global_beep_strict_term) { proto_tree_add_expert(tree, pinfo, &ei_beep_lf_terminator, tvb, offset, 1); return 1; } - proto_tree_add_expert_format(tree, pinfo, &ei_beep_invalid_terminator, tvb, + proto_tree_add_expert_format(tree, pinfo, &ei_beep_invalid_terminator, tvb, offset, 1, "Terminator: %s", tvb_format_text(tvb, offset, 2)); return -1; } @@ -532,7 +532,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo, } else { /* Protocol violation, so dissect rest as undisectable */ if (tree && (tvb_length_remaining(tvb, offset) > 0)) { - proto_tree_add_item(tree, hf_beep_payload_undissected, tvb, offset, + proto_tree_add_item(tree, hf_beep_payload_undissected, tvb, offset, tvb_length_remaining(tvb, offset), ENC_NA|ENC_ASCII); } return -1; @@ -564,7 +564,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo, /* We dissect the rest as data and bail ... */ if (tree && (tvb_length_remaining(tvb, offset) > 0)) { - proto_tree_add_item(tree, hf_beep_payload_undissected, tvb, offset, + proto_tree_add_item(tree, hf_beep_payload_undissected, tvb, offset, tvb_length_remaining(tvb, offset), ENC_NA|ENC_ASCII); } @@ -646,7 +646,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo, /* We dissect the rest as data and bail ... */ if (tree && (tvb_length_remaining(tvb, offset) > 0)) { - proto_tree_add_item(tree, hf_beep_payload_undissected, tvb, offset, + proto_tree_add_item(tree, hf_beep_payload_undissected, tvb, offset, tvb_length_remaining(tvb, offset), ENC_NA|ENC_ASCII); } @@ -675,7 +675,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo, /* We dissect the rest as data and bail ... */ if (tree && (tvb_length_remaining(tvb, offset) > 0)) { - proto_tree_add_item(tree, hf_beep_payload_undissected, tvb, offset, + proto_tree_add_item(tree, hf_beep_payload_undissected, tvb, offset, tvb_length_remaining(tvb, offset), ENC_NA|ENC_ASCII); } diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index b6425cec9a..607b170cd1 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -2635,7 +2635,7 @@ printf("SEQUENCE dissect_ber_old_sequence(%s) subdissector ate %d bytes\n", name tree, hf_ber_error, tvb, offset-2, 2, "illegal_length", "Sequence ate %d too many bytes", offset - end_offset); - expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, "BER Error: too many bytes in Sequence"); } if (ind) { @@ -2914,7 +2914,7 @@ printf("SET dissect_ber_set(%s) calling subdissector\n", name); tree, hf_ber_error, tvb, offset-2, 2, "illegal_length", "SET ate %d too many bytes", offset - end_offset); - expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, "BER Error: too many bytes in SET"); } @@ -3188,7 +3188,7 @@ printf("SET dissect_old_ber_set(%s) calling subdissector\n", name); tree, hf_ber_error, tvb, offset-2, 2, "illegal_length", "SET ate %d too many bytes", offset - end_offset); - expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, "BER Error: too many bytes in SET"); } @@ -3868,7 +3868,7 @@ printf("OBJECT IDENTIFIER dissect_ber_any_oid(%s) entered\n", name); offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL); eoffset = offset + len; if ( (ber_class != BER_CLASS_UNI) - || (is_absolute && tag != BER_UNI_TAG_OID) + || (is_absolute && tag != BER_UNI_TAG_OID) || (!is_absolute && tag != BER_UNI_TAG_RELATIVE_OID) ) { tvb_ensure_bytes_exist(tvb, hoffset, 2); cause = proto_tree_add_string_format_value( @@ -4198,7 +4198,7 @@ printf("SQ OF dissect_ber_sq_of(%s) entered\n", name); "%s Of ate %d too many bytes", (type == BER_UNI_TAG_SEQUENCE) ? "Set" : "Sequence", offset - end_offset); - expert_add_info_format(actx->pinfo, causex, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, causex, &ei_ber_error_length, "BER Error:too many byte in %s", (type == BER_UNI_TAG_SEQUENCE) ? "Set" : "Sequence"); } @@ -4429,7 +4429,7 @@ printf("SQ OF dissect_ber_old_sq_of(%s) entered\n", name); "%s Of ate %d too many bytes", (type == BER_UNI_TAG_SEQUENCE) ? "Set" : "Sequence", offset-end_offset); - expert_add_info_format(actx->pinfo, causex, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, causex, &ei_ber_error_length, "BER Error:too many byte in %s", (type == BER_UNI_TAG_SEQUENCE) ? "Set" : "Sequence"); } diff --git a/epan/dissectors/packet-ber.h b/epan/dissectors/packet-ber.h index cde878590a..255e57d486 100644 --- a/epan/dissectors/packet-ber.h +++ b/epan/dissectors/packet-ber.h @@ -70,7 +70,7 @@ typedef int (*ber_old_type_fn)(gboolean, tvbuff_t*, int, asn1_ctx_t *actx, proto #define BER_UNI_TAG_EMBEDDED_PDV 11 #define BER_UNI_TAG_UTF8String 12 #define BER_UNI_TAG_RELATIVE_OID 13 -/* UNIVERSAL 14-15 +/* UNIVERSAL 14-15 * Reserved for future editions of this * Recommendation | International Standard */ @@ -148,8 +148,8 @@ typedef struct _ber_old_sequence_t { guint32 flags; ber_old_callback func; } ber_old_sequence_t; -/* - * This function dissects a BER sequence +/* + * This function dissects a BER sequence */ WS_DLL_PUBLIC int dissect_ber_sequence(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); WS_DLL_PUBLIC int dissect_ber_set(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); @@ -175,14 +175,14 @@ typedef struct _ber_old_choice_t { guint32 flags; ber_old_callback func; } ber_old_choice_t; -/* - * This function dissects a BER choice +/* + * This function dissects a BER choice */ WS_DLL_PUBLIC int dissect_ber_choice(asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_choice_t *ch, gint hf_id, gint ett_id, gint *branch_taken); /* To be removed when the transition to the "New" type is complete */ WS_DLL_PUBLIC int dissect_ber_old_choice(asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_choice_t *ch, gint hf_id, gint ett_id, gint *branch_taken); -/* +/* * This function dissects a BER strings */ extern int dissect_ber_constrained_restricted_string(gboolean implicit_tag, gint32 type, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint32 min_len, gint32 max_len, gint hf_id, tvbuff_t **out_tvb); @@ -216,7 +216,7 @@ extern int dissect_ber_old_set_of(gboolean implicit_tag, asn1_ctx_t *actx, proto WS_DLL_PUBLIC int dissect_ber_GeneralizedTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id); WS_DLL_PUBLIC int dissect_ber_UTCTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id); - + typedef struct _asn_namedbit { guint32 bit; int *p_id; diff --git a/epan/dissectors/packet-bfcp.c b/epan/dissectors/packet-bfcp.c index 78399a893f..b188087e12 100644 --- a/epan/dissectors/packet-bfcp.c +++ b/epan/dissectors/packet-bfcp.c @@ -374,7 +374,7 @@ dissect_bfcp_attributes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int default: proto_tree_add_item(bfcp_attr_tree, hf_bfcp_payload, tvb, offset, length-2, ENC_NA); - offset = offset + length - 2; + offset = offset + length - 2; break; } if (length < (offset - attr_start_offset)){ @@ -451,7 +451,7 @@ dissect_bfcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* if(tree) */ } -static gboolean +static gboolean dissect_bfcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { guint8 primitive; diff --git a/epan/dissectors/packet-bssgp.c b/epan/dissectors/packet-bssgp.c index 4f2e545a8e..ac9dc8b9d5 100644 --- a/epan/dissectors/packet-bssgp.c +++ b/epan/dissectors/packet-bssgp.c @@ -3255,7 +3255,7 @@ de_bssgp_redir_attempt_flg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _ return(curr_offset-offset); } - + /* * 11.3.112 Redirection Indication */ @@ -3286,7 +3286,7 @@ de_bssgp_redir_indication(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U { guint32 curr_offset; - curr_offset = offset; + curr_offset = offset; proto_tree_add_item(tree, hf_bssgp_redir_indiction_reroute_reject_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN); curr_offset += 1; @@ -3303,7 +3303,7 @@ static const value_string bssgp_redir_complete_outcome_vals[] = { {0x02, "MS is not accepted"}, {0x03, "MS is already registered"}, /* {0x04~0xFF, "Reserved"} */ - { 0, NULL }, + { 0, NULL }, }; static guint16 diff --git a/epan/dissectors/packet-bssgp.h b/epan/dissectors/packet-bssgp.h index cb9be9a529..9a6d5d4917 100644 --- a/epan/dissectors/packet-bssgp.h +++ b/epan/dissectors/packet-bssgp.h @@ -12,12 +12,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/epan/dissectors/packet-bthci_acl.c b/epan/dissectors/packet-bthci_acl.c index 9ab50f848b..39121b990a 100644 --- a/epan/dissectors/packet-bthci_acl.c +++ b/epan/dissectors/packet-bthci_acl.c @@ -262,7 +262,7 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) localhost_ether_addr = get_ether_name(localhost_bdaddr_entry->bd_addr); memcpy(localhost_bdaddr, localhost_bdaddr_entry->bd_addr, 6); - } else { + } else { localhost_ether_addr = "localhost"; /* XXX - is this the right value to use? */ memset(localhost_bdaddr, 0, 6); diff --git a/epan/dissectors/packet-btsap.c b/epan/dissectors/packet-btsap.c index 28ba849a3b..f0903972a2 100644 --- a/epan/dissectors/packet-btsap.c +++ b/epan/dissectors/packet-btsap.c @@ -562,7 +562,7 @@ dissect_btsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; } - if (parameters_check < required_parameters) { + if (parameters_check < required_parameters) { proto_tree_add_expert_format(tree, pinfo, &ei_btsap_parameter_error, tvb, offset, 0, "There are no required parameters"); } else if (parameters_check > required_parameters) { @@ -702,7 +702,7 @@ proto_register_btsap(void) static ei_register_info ei[] = { { &ei_btsap_parameter_error, { "btsap.parameter_error", PI_PROTOCOL, PI_WARN, "Parameter error", EXPFILL }}, }; - + proto_btsap = proto_register_protocol("Bluetooth SAP Profile", "BT SAP", "btsap"); register_dissector("btsap", dissect_btsap, proto_btsap); diff --git a/epan/dissectors/packet-carp.c b/epan/dissectors/packet-carp.c index f7f1fef57a..85250fde2e 100644 --- a/epan/dissectors/packet-carp.c +++ b/epan/dissectors/packet-carp.c @@ -60,7 +60,7 @@ test_carp_packet(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, vo { guint8 ver_type, version, auth_length; - /* First some simple check if the data is + /* First some simple check if the data is really CARP */ if (tvb_length(tvb) < 36) return FALSE; diff --git a/epan/dissectors/packet-cell_broadcast.h b/epan/dissectors/packet-cell_broadcast.h index ad9547c296..516384b851 100644 --- a/epan/dissectors/packet-cell_broadcast.h +++ b/epan/dissectors/packet-cell_broadcast.h @@ -29,7 +29,7 @@ /** * Dissects the GSM/UMTS/SABP Message Identifier - * + * * @param tvb the tv buffer of the current data * @param tree the tree to append this item to * @param offset the offset in the tvb @@ -39,7 +39,7 @@ void dissect_cbs_message_identifier(tvbuff_t *tvb, proto_tree *tree, guint16 off /** * Decodes the GSM/UMTS/SABP message Serial Number - * + * * @param tvb the tv buffer of the current data * @param tree the tree to append this item to * @param offset the offset in the tvb @@ -49,7 +49,7 @@ void dissect_cbs_serial_number(tvbuff_t *tvb, proto_tree *tree, guint16 offset); /** * Dissects UMTS/SABP Cell Broadcast Message - * + * * @param tvb the tv buffer of the current data * @param pinfo the packet info of the current data * @param tree the tree to append this item to diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c index 8319ba6537..131467ee6a 100644 --- a/epan/dissectors/packet-cip.c +++ b/epan/dissectors/packet-cip.c @@ -5012,7 +5012,7 @@ dissect_cip_cm_fwd_open_rsp_success(cip_req_info_t *preq_info, proto_tree *tree, proto_tree_add_item(tree, hf_cip_reserved8, tvb, offset+25, 1, ENC_LITTLE_ENDIAN ); if (app_rep_size > 0) { - if ((preq_info == NULL) || (preq_info->connInfo == NULL) || + if ((preq_info == NULL) || (preq_info->connInfo == NULL) || (preq_info->connInfo->safety.safety_seg == FALSE)) { proto_tree_add_item(tree, hf_cip_cm_app_reply_data, tvb, offset+26, app_rep_size, ENC_NA ); @@ -5020,11 +5020,11 @@ dissect_cip_cm_fwd_open_rsp_success(cip_req_info_t *preq_info, proto_tree *tree, else if (preq_info->connInfo->safety.format == CIP_SAFETY_BASE_FORMAT) { ti = proto_tree_add_text( tree, tvb, offset+28, 10, "Safety Application Reply Data"); - safety_tree = proto_item_add_subtree( ti, ett_cip_cm_safety ); + safety_tree = proto_item_add_subtree( ti, ett_cip_cm_safety ); proto_tree_add_item( safety_tree, hf_cip_cm_consumer_number, tvb, offset+26, 2, ENC_LITTLE_ENDIAN); ti = proto_tree_add_text( safety_tree, tvb, offset+28, 8, "PID/CID"); pid_tree = proto_item_add_subtree( ti, ett_cip_cm_pid ); - proto_tree_add_item( pid_tree, hf_cip_cm_targ_vendor_id, tvb, offset+28, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item( pid_tree, hf_cip_cm_targ_vendor_id, tvb, offset+28, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item( pid_tree, hf_cip_cm_targ_dev_serial_num, tvb, offset+30, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item( pid_tree, hf_cip_cm_targ_conn_serial_num, tvb, offset+34, 2, ENC_LITTLE_ENDIAN); @@ -5034,11 +5034,11 @@ dissect_cip_cm_fwd_open_rsp_success(cip_req_info_t *preq_info, proto_tree *tree, else if (preq_info->connInfo->safety.format == CIP_SAFETY_EXTENDED_FORMAT) { ti = proto_tree_add_text( tree, tvb, offset+28, 14, "Safety Application Reply Data"); - safety_tree = proto_item_add_subtree( ti, ett_cip_cm_safety ); + safety_tree = proto_item_add_subtree( ti, ett_cip_cm_safety ); proto_tree_add_item( safety_tree, hf_cip_cm_consumer_number, tvb, offset+26, 2, ENC_LITTLE_ENDIAN); ti = proto_tree_add_text( safety_tree, tvb, offset+28, 12, "PID/CID"); pid_tree = proto_item_add_subtree( ti, ett_cip_cm_pid ); - proto_tree_add_item( pid_tree, hf_cip_cm_targ_vendor_id, tvb, offset+28, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item( pid_tree, hf_cip_cm_targ_vendor_id, tvb, offset+28, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item( pid_tree, hf_cip_cm_targ_dev_serial_num, tvb, offset+30, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item( pid_tree, hf_cip_cm_targ_conn_serial_num, tvb, offset+34, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item( pid_tree, hf_cip_cm_initial_timestamp, tvb, offset+36, 2, ENC_LITTLE_ENDIAN); diff --git a/epan/dissectors/packet-cipsafety.h b/epan/dissectors/packet-cipsafety.h index e342f148dc..7c8e9ace93 100644 --- a/epan/dissectors/packet-cipsafety.h +++ b/epan/dissectors/packet-cipsafety.h @@ -58,7 +58,7 @@ typedef struct cip_safety_info { /* ** Exported functions */ -extern void dissect_unid(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_item *pi, const char* ssn_name, int hf_ssn_timestamp, +extern void dissect_unid(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_item *pi, const char* ssn_name, int hf_ssn_timestamp, int hf_ssn_date, int hf_ssn_time, int hf_macid, gint ett, gint ett_ssn); extern void dissect_cipsafety_ssn(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int hf_real_datetime, int hf_date, int hf_time); diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c index 5c0ced7139..622b43bb89 100644 --- a/epan/dissectors/packet-coap.c +++ b/epan/dissectors/packet-coap.c @@ -600,7 +600,7 @@ dissect_coap_options_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tr * * 14: A 16-bit unsigned integer in network byte order precedes the * Option Value and indicates the Option Length minus 269. - * + * * 15: Reserved for future use. If the field is set to this value, * it MUST be processed as a message format error. */ @@ -639,14 +639,14 @@ dissect_coap_options_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tr coap_opt_check(pinfo, coap_tree, *opt_num, opt_length); - g_snprintf(strbuf, sizeof(strbuf), + g_snprintf(strbuf, sizeof(strbuf), "#%u: %s", opt_count, val_to_str_const(*opt_num, vals_opt_type, *opt_num % 14 == 0 ? "No-Op" : "Unknown Option")); item = proto_tree_add_string(coap_tree, hf_coap_opt_name, tvb, orig_offset, offset - orig_offset + opt_length, strbuf); subtree = proto_item_add_subtree(item, ett_coap_option); - g_snprintf(strbuf, sizeof(strbuf), + g_snprintf(strbuf, sizeof(strbuf), "Type %u, %s, %s%s", *opt_num, (*opt_num & 1) ? "Critical" : "Elective", (*opt_num & 2) ? "Unsafe" : "Safe", @@ -872,7 +872,7 @@ dissect_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) if (coap_ctype_value == DEFAULT_COAP_CTYPE_VALUE) coap_ctype_str = "text/plain; charset=utf-8"; - g_snprintf(str_payload, sizeof(str_payload), + g_snprintf(str_payload, sizeof(str_payload), "Payload Content-Format: %s%s, Length: %u", coap_ctype_str, coap_ctype_value == DEFAULT_COAP_CTYPE_VALUE ? " (no Content-Format)" : "", payload_length); diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c index e8693bf135..12f7323040 100644 --- a/epan/dissectors/packet-cops.c +++ b/epan/dissectors/packet-cops.c @@ -1086,7 +1086,7 @@ dissect_cops_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (is_response) { pdus_array = (GPtrArray *)wmem_tree_lookup32(cops_conv_info->pdus_tree, handle_value); - + if (pdus_array == NULL) /* There's no request with this handle value */ return; diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c index 37cd9626a3..75460c333b 100644 --- a/epan/dissectors/packet-dccp.c +++ b/epan/dissectors/packet-dccp.c @@ -839,7 +839,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ proto_item_append_text(dccp_item, " Seq=%" G_GINT64_MODIFIER "u", dccph->seq); } - col_append_fstr(pinfo->cinfo, COL_INFO, + col_append_fstr(pinfo->cinfo, COL_INFO, " Seq=%" G_GINT64_MODIFIER "u", dccph->seq); diff --git a/epan/dissectors/packet-dcerpc-frsapi.h b/epan/dissectors/packet-dcerpc-frsapi.h index a7e1d47615..a009790893 100644 --- a/epan/dissectors/packet-dcerpc-frsapi.h +++ b/epan/dissectors/packet-dcerpc-frsapi.h @@ -1,5 +1,5 @@ /* packet-dcerpc-frsapi.h - * Routines for the frs API (File Replication Service) MSRPC interface + * Routines for the frs API (File Replication Service) MSRPC interface * Copyright 2004 Jean-Baptiste Marchand * * $Id$ diff --git a/epan/dissectors/packet-dcerpc-messenger.c b/epan/dissectors/packet-dcerpc-messenger.c index a5a492fd3d..f411d3f24a 100644 --- a/epan/dissectors/packet-dcerpc-messenger.c +++ b/epan/dissectors/packet-dcerpc-messenger.c @@ -90,7 +90,7 @@ messenger_dissect_send_message_reply(tvbuff_t *tvb, int offset, packet_info *pin static dcerpc_sub_dissector dcerpc_messenger_dissectors[] = { - {0, "NetrSendMessage", + {0, "NetrSendMessage", messenger_dissect_send_message_rqst, messenger_dissect_send_message_reply }, {0, NULL, NULL, NULL } @@ -109,15 +109,15 @@ proto_register_dcerpc_messenger(void) { "Return code", "messenger.rc", FT_UINT32, BASE_HEX, VALS (NT_errors), 0x0, NULL, HFILL }}, { &hf_messenger_server, { - "Server", "messenger.server", + "Server", "messenger.server", FT_STRING, BASE_NONE, NULL, 0, "Server to send the message to", HFILL }}, { &hf_messenger_client, { - "Client", "messenger.client", + "Client", "messenger.client", FT_STRING, BASE_NONE, NULL, 0, "Client that sent the message", HFILL }}, { &hf_messenger_message, { - "Message", "messenger.message", + "Message", "messenger.message", FT_STRING, BASE_NONE, NULL, 0, "The message being sent", HFILL }} }; diff --git a/epan/dissectors/packet-dcerpc-netlogon.h b/epan/dissectors/packet-dcerpc-netlogon.h index 32faecff5f..51cd763a77 100644 --- a/epan/dissectors/packet-dcerpc-netlogon.h +++ b/epan/dissectors/packet-dcerpc-netlogon.h @@ -82,13 +82,13 @@ /* needed to decrypt PAC_LOGON_INFO in kerberos */ -int +int netlogon_dissect_PAC_LOGON_INFO(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); /* needed to decrypt PAC_S4U_DELEGATION_INFO in kerberos */ -int +int netlogon_dissect_PAC_S4U_DELEGATION_INFO(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); diff --git a/epan/dissectors/packet-dcerpc-nt.h b/epan/dissectors/packet-dcerpc-nt.h index d1cc7a8b4e..972bff0a68 100644 --- a/epan/dissectors/packet-dcerpc-nt.h +++ b/epan/dissectors/packet-dcerpc-nt.h @@ -91,12 +91,12 @@ dissect_ndr_datablob(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, int use_remaining_space); -int +int dissect_null_term_string(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, int levels); -int +int dissect_null_term_wstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, int levels); @@ -115,7 +115,7 @@ dissect_ndr_counted_ascii_string(tvbuff_t *tvb, int offset, int dissect_ndr_counted_string_cb(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, - guint8 *drep, int hf_index, + guint8 *drep, int hf_index, dcerpc_callback_fnct_t *callback, void *callback_args); @@ -168,8 +168,8 @@ dissect_ndr_nt_SID(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); int -dissect_ndr_nt_SID_with_options(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, +dissect_ndr_nt_SID_with_options(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 options); int dissect_ndr_nt_PSID(tvbuff_t *tvb, int offset, @@ -265,9 +265,9 @@ int dissect_ndr_uint16s(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, int length); -int dissect_ndr_str_pointer_item(tvbuff_t *tvb, gint offset, - packet_info *pinfo, proto_tree *tree, - guint8 *drep, int type, const char *text, +int dissect_ndr_str_pointer_item(tvbuff_t *tvb, gint offset, + packet_info *pinfo, proto_tree *tree, + guint8 *drep, int type, const char *text, int hf_index, int levels); /* @@ -280,11 +280,11 @@ int dissect_ndr_str_pointer_item(tvbuff_t *tvb, gint offset, #define CB_STR_COL_INFO 0x10000000 /* Append string to COL_INFO */ void cb_wstr_postprocess(packet_info *pinfo, proto_tree *tree _U_, - proto_item *item, tvbuff_t *tvb, + proto_item *item, tvbuff_t *tvb, int start_offset, int end_offset, void *callback_args); void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_, - proto_item *item, tvbuff_t *tvb, + proto_item *item, tvbuff_t *tvb, int start_offset, int end_offset, void *callback_args); diff --git a/epan/dissectors/packet-dcerpc-pnp.h b/epan/dissectors/packet-dcerpc-pnp.h index a6baddf638..3a898f8b32 100644 --- a/epan/dissectors/packet-dcerpc-pnp.h +++ b/epan/dissectors/packet-dcerpc-pnp.h @@ -1,5 +1,5 @@ /* packet-dcerpc-pnp.h - * Routines for the pnp (Plug and Play) MSRPC interface + * Routines for the pnp (Plug and Play) MSRPC interface * Copyright 2005 Jean-Baptiste Marchand * * $Id$ diff --git a/epan/dissectors/packet-dcerpc-rras.h b/epan/dissectors/packet-dcerpc-rras.h index 84a4630bd0..04b48e1acb 100644 --- a/epan/dissectors/packet-dcerpc-rras.h +++ b/epan/dissectors/packet-dcerpc-rras.h @@ -1,5 +1,5 @@ /* packet-dcerpc-rras.h - * Routines for the rras (Routing and Remote Access service) MSRPC interface + * Routines for the rras (Routing and Remote Access service) MSRPC interface * Copyright 2005 Jean-Baptiste Marchand * * $Id$ diff --git a/epan/dissectors/packet-dcerpc-svcctl.h b/epan/dissectors/packet-dcerpc-svcctl.h index 43184e939b..0043be6732 100644 --- a/epan/dissectors/packet-dcerpc-svcctl.h +++ b/epan/dissectors/packet-dcerpc-svcctl.h @@ -32,7 +32,7 @@ #define SVC_LOCK_SERVICE_DATABASE 0x03 #define SVC_QUERY_SERVICE_OBJECT_SECURITY 0x04 #define SVC_SET_SERVICE_OBJECT_SECURITY 0x05 -#define SVC_QUERY_SERVICE_STATUS 0x06 +#define SVC_QUERY_SERVICE_STATUS 0x06 #define SVC_SET_SERVICE_STATUS 0x07 #define SVC_UNLOCK_SERVICE_DATABASE 0x08 #define SVC_NOTIFY_BOOT_CONFIG_STATUS 0x09 diff --git a/epan/dissectors/packet-dcerpc.h b/epan/dissectors/packet-dcerpc.h index ac39df70cb..3230def4cd 100644 --- a/epan/dissectors/packet-dcerpc.h +++ b/epan/dissectors/packet-dcerpc.h @@ -41,7 +41,7 @@ (((drep)[0] & DREP_LITTLE_ENDIAN) ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN) #ifdef PT_R4 -/* now glib always includes signal.h and on linux PPC +/* now glib always includes signal.h and on linux PPC * signal.h defines PT_R4 */ #undef PT_R4 @@ -152,13 +152,13 @@ int dissect_dcerpc_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint64 *pdata); int dissect_dcerpc_float (tvbuff_t *tvb, gint offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, int hfindex, gfloat *pdata); int dissect_dcerpc_double (tvbuff_t *tvb, gint offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, int hfindex, gdouble *pdata); int dissect_dcerpc_time_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, int hfindex, guint32 *pdata); WS_DLL_PUBLIC int dissect_dcerpc_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, @@ -192,14 +192,14 @@ int dissect_ndr_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo, int hfindex, guint64 *pdata); int PIDL_dissect_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 param); int dissect_ndr_float (tvbuff_t *tvb, gint offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, int hfindex, gfloat *pdata); WS_DLL_PUBLIC int dissect_ndr_double (tvbuff_t *tvb, gint offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, int hfindex, gdouble *pdata); int dissect_ndr_time_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, int hfindex, guint32 *pdata); WS_DLL_PUBLIC int dissect_ndr_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, @@ -234,22 +234,22 @@ typedef void (dcerpc_callback_fnct_t)(packet_info *pinfo, proto_tree *tree, prot int dissect_ndr_pointer_cb(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, - dcerpc_dissect_fnct_t *fnct, int type, const char *text, + dcerpc_dissect_fnct_t *fnct, int type, const char *text, int hf_index, dcerpc_callback_fnct_t *callback, void *callback_args); int dissect_ndr_pointer(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, - dcerpc_dissect_fnct_t *fnct, int type, const char *text, + dcerpc_dissect_fnct_t *fnct, int type, const char *text, int hf_index); int dissect_deferred_pointers(packet_info *pinfo, tvbuff_t *tvb, int offset, guint8 *drep); int dissect_ndr_embedded_pointer(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, - dcerpc_dissect_fnct_t *fnct, int type, const char *text, + dcerpc_dissect_fnct_t *fnct, int type, const char *text, int hf_index); int dissect_ndr_toplevel_pointer(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, - dcerpc_dissect_fnct_t *fnct, int type, const char *text, + dcerpc_dissect_fnct_t *fnct, int type, const char *text, int hf_index); /* dissect a NDR unidimensional conformant array */ @@ -267,26 +267,26 @@ int dissect_ndr_uvarray(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, dcerpc_dissect_fnct_t *fnct); -int dissect_ndr_byte_array(tvbuff_t *tvb, int offset, packet_info *pinfo, +int dissect_ndr_byte_array(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -int dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, +int dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int size_is, int hfinfo, gboolean add_subtree, char **data); -int dissect_ndr_char_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, +int dissect_ndr_char_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -int dissect_ndr_wchar_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, +int dissect_ndr_wchar_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); int PIDL_dissect_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int chsize, int hfindex, guint32 param); -int dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo, +int dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int size_is, int hfinfo, gboolean add_subtree, char **data); -int dissect_ndr_char_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo, +int dissect_ndr_char_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -int dissect_ndr_wchar_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo, +int dissect_ndr_wchar_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); typedef struct _dcerpc_sub_dissector { @@ -311,7 +311,7 @@ dcerpc_sub_dissector *dcerpc_get_proto_sub_dissector(e_uuid_t *uuid, guint16 ver value_string *value_string_from_subdissectors(dcerpc_sub_dissector *sd); /* Private data passed to subdissectors from the main DCERPC dissector. - * One unique instance of this structure is created for each + * One unique instance of this structure is created for each * DCERPC request/response transaction when we see the initial request * of the transaction. * These instances are persistent and will remain available until the @@ -368,12 +368,12 @@ typedef struct _dcerpc_info { } dcerpc_info; -/* the init_protocol hooks. With MSVC and a +/* the init_protocol hooks. With MSVC and a * libwireshark.dll, we need a special declaration. */ WS_DLL_PUBLIC GHookList dcerpc_hooks_init_protos; -/* the registered subdissectors. With MSVC and a +/* the registered subdissectors. With MSVC and a * libwireshark.dll, we need a special declaration. */ WS_DLL_PUBLIC GHashTable *dcerpc_uuids; @@ -394,9 +394,9 @@ typedef struct _dcerpc_uuid_value { /* Authenticated pipe registration functions and miscellanea */ -typedef tvbuff_t *(dcerpc_decode_data_fnct_t)(tvbuff_t *data_tvb, +typedef tvbuff_t *(dcerpc_decode_data_fnct_t)(tvbuff_t *data_tvb, tvbuff_t *auth_tvb, - int offset, + int offset, packet_info *pinfo, dcerpc_auth_info *auth_info); @@ -443,17 +443,17 @@ struct _dcerpc_bind_value * dcerpc_add_conv_to_bind_table(decode_dcerpc_bind_values_t *binding); WS_DLL_PUBLIC -guint16 +guint16 dcerpc_get_transport_salt (packet_info *pinfo); /* Authentication services */ -/* +/* * For MS-specific SSPs (Security Service Provider), see * * http://msdn.microsoft.com/library/en-us/rpc/rpc/authentication_level_constants.asp */ - + #define DCE_C_RPC_AUTHN_PROTOCOL_NONE 0 #define DCE_C_RPC_AUTHN_PROTOCOL_KRB5 1 #define DCE_C_RPC_AUTHN_PROTOCOL_SPNEGO 9 @@ -483,10 +483,10 @@ init_ndr_pointer_list(packet_info *pinfo); /* These defines are used in the PIDL conformance files when using * the PARAM_VALUE directive. */ -/* Policy handle tracking. Describes in which function a handle is +/* Policy handle tracking. Describes in which function a handle is * opened/closed. See "winreg.cnf" for example. * - * The guint32 param is divided up into multiple fields + * The guint32 param is divided up into multiple fields * * +--------+--------+--------+--------+ * | Flags | Type | | | @@ -520,7 +520,7 @@ typedef struct pol_value { guint32 first_frame; /* First frame in which this instance was seen */ guint32 last_frame; /* Last frame in which this instance was seen */ char *name; /* Name of policy handle */ - guint32 type; /* policy handle type */ + guint32 type; /* policy handle type */ } pol_value; diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c index 94bec0c7ad..5c8e217e0e 100644 --- a/epan/dissectors/packet-dcm.c +++ b/epan/dissectors/packet-dcm.c @@ -5083,7 +5083,7 @@ dissect_dcm_assoc_role_selection(tvbuff_t *tvb, proto_tree *tree, guint32 offset guint16 item_len, sop_class_uid_len; guint8 scp_role, scu_role; - + gchar *buf_desc = (gchar *)wmem_alloc0(wmem_packet_scope(), MAX_BUF_LEN); /* Used for item text */ dcm_uid_t *sopclassuid; gchar *sopclassuid_str; @@ -5104,28 +5104,28 @@ dissect_dcm_assoc_role_selection(tvbuff_t *tvb, proto_tree *tree, guint32 offset scu_role = tvb_get_guint8(tvb, offset+6+sop_class_uid_len); scp_role = tvb_get_guint8(tvb, offset+7+sop_class_uid_len); - + if (scu_role) { proto_item_append_text(assoc_item_rolesel_item, "%s", "SCU-role: yes"); } else { proto_item_append_text(assoc_item_rolesel_item, "%s", "SCU-role: no"); } - + if (scp_role) { proto_item_append_text(assoc_item_rolesel_item, ", %s", "SCP-role: yes"); } else { proto_item_append_text(assoc_item_rolesel_item, ", %s", "SCP-role: no"); } - + if (sopclassuid) { g_snprintf(buf_desc, MAX_BUF_LEN, "%s (%s)", sopclassuid->name, sopclassuid->value); } else { g_snprintf(buf_desc, MAX_BUF_LEN, "%s", sopclassuid_str); } - + proto_tree_add_string(assoc_item_rolesel_tree, hf_dcm_info_rolesel_sopclassuid, tvb, offset+6, sop_class_uid_len, buf_desc); proto_tree_add_item(assoc_item_rolesel_tree, hf_dcm_info_rolesel_scurole, tvb, offset+6+sop_class_uid_len, 1, ENC_NA); @@ -5442,19 +5442,19 @@ dissect_dcm_userinfo(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 le break; case 0x53: /* async negotiation */ - + dissect_dcm_assoc_async_negotiation(tvb, userinfo_ptree, offset-4); - + offset += item_len; break; case 0x54: /* scp/scu role selection */ - + dissect_dcm_assoc_role_selection(tvb, userinfo_ptree, offset-4); - + offset += item_len; break; - + case 0x56: /* extended negotiation */ dissect_dcm_assoc_sopclass_extneg(tvb, userinfo_ptree, offset-4); diff --git a/epan/dissectors/packet-dcom.h b/epan/dissectors/packet-dcom.h index 2df3b02f0e..39b98fe17c 100644 --- a/epan/dissectors/packet-dcom.h +++ b/epan/dissectors/packet-dcom.h @@ -6,17 +6,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -123,12 +123,12 @@ dissect_dcom_append_UUID(tvbuff_t *tvb, int offset, extern int dissect_dcom_indexed_WORD(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, int hfindex, guint16 * pu16WORD, int field_index); WS_DLL_PUBLIC int dissect_dcom_indexed_DWORD(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, int hfindex, guint32 * pu32DWORD, int field_index); WS_DLL_PUBLIC int @@ -137,12 +137,12 @@ dissect_dcom_HRESULT(tvbuff_t *tvb, int offset, WS_DLL_PUBLIC int dissect_dcom_HRESULT_item(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, guint32 * pu32HResult, int field_index, proto_item **item); WS_DLL_PUBLIC int dissect_dcom_indexed_HRESULT(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, + proto_tree *tree, guint8 *drep, guint32 * pu32hresult, int field_index); extern int @@ -198,7 +198,7 @@ dissect_dcom_VARTYPE(tvbuff_t *tvb, int offset, guint16 *pu16Vartype); WS_DLL_PUBLIC int -dissect_dcom_VARIANT(tvbuff_t *tvb, int offset, packet_info *pinfo, +dissect_dcom_VARIANT(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex); /* dcom "dcerpc internal" unmarshalling */ @@ -222,11 +222,11 @@ dissect_dcom_nospec_data(tvbuff_t *tvb, int offset, /* very simple parameter-profiles dissectors (for very simple requests ;-) */ /* request: no parameters */ -WS_DLL_PUBLIC int +WS_DLL_PUBLIC int dissect_dcom_simple_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); /* response: only HRESULT */ -WS_DLL_PUBLIC int +WS_DLL_PUBLIC int dissect_dcom_simple_resp(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); diff --git a/epan/dissectors/packet-diameter_3gpp.c b/epan/dissectors/packet-diameter_3gpp.c index b310f0efb0..c31a930bf4 100644 --- a/epan/dissectors/packet-diameter_3gpp.c +++ b/epan/dissectors/packet-diameter_3gpp.c @@ -172,7 +172,7 @@ static gint diameter_3gpp_idr_flags_ett = -1; /* Dissector handles */ static dissector_handle_t xml_handle; -/* AVP Code: 23 3GPP-MS-TimeZone +/* AVP Code: 23 3GPP-MS-TimeZone * 3GPP TS 29.061 */ static const value_string daylight_saving_time_vals[] = { @@ -704,10 +704,10 @@ dissect_diameter_3gpp_ula_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre } -/* +/* * 3GPP TS 29.272 * 7.3.25 DSR-Flags - * AVP Code: 1421 DSR-Flags + * AVP Code: 1421 DSR-Flags */ static int dissect_diameter_3gpp_dsr_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) { diff --git a/epan/dissectors/packet-dis-enums.h b/epan/dissectors/packet-dis-enums.h index ed8385f943..913eb1f7f0 100644 --- a/epan/dissectors/packet-dis-enums.h +++ b/epan/dissectors/packet-dis-enums.h @@ -45,8 +45,8 @@ extern const value_string DIS_PDU_CryptoSystem_Strings[]; extern const value_string DIS_PDU_ModParamMsgStart_Strings[]; extern const value_string DIS_PDU_ModParamClrChannel_Strings[]; extern const value_string DIS_PDU_TSAllocationFidelity_Strings[]; -extern const value_string DIS_PDU_TerminalPrimaryMode_Strings[]; -extern const value_string DIS_PDU_TerminalSecondaryMode_Strings[]; +extern const value_string DIS_PDU_TerminalPrimaryMode_Strings[]; +extern const value_string DIS_PDU_TerminalSecondaryMode_Strings[]; extern const value_string DIS_PDU_ModParamSyncState_Strings[]; @@ -405,8 +405,8 @@ typedef enum DIS_PATTERN_SPHERICAL_HARMONIC = 2 } DIS_PDU_AntennaPattern_Type; -extern const value_string DIS_PDU_AntennaPatternType_Strings[]; - +extern const value_string DIS_PDU_AntennaPatternType_Strings[]; + typedef enum { DIS_SYSTEM_MOD_OTHER = 0, diff --git a/epan/dissectors/packet-dis-fields.h b/epan/dissectors/packet-dis-fields.h index bcf78d2095..d306a4d5b3 100644 --- a/epan/dissectors/packet-dis-fields.h +++ b/epan/dissectors/packet-dis-fields.h @@ -163,7 +163,7 @@ typedef enum DIS_FIELDTYPE_EMITTER_NAME, DIS_FIELDTYPE_EMISSION_FUNCTION, DIS_FIELDTYPE_BEAM_FUNCTION, - + /* other atomic types */ DIS_FIELDTYPE_PDU_LENGTH, DIS_FIELDTYPE_EXERCISE_ID, @@ -207,7 +207,7 @@ typedef enum DIS_FIELDTYPE_FH_MSG_START, DIS_FIELDTYPE_RESERVED, DIS_FIELDTYPE_FH_SYNC_TIME_OFFSET, - DIS_FIELDTYPE_FH_SECURITY_KEY, + DIS_FIELDTYPE_FH_SECURITY_KEY, DIS_FIELDTYPE_FH_CLEAR_CHANNEL, DIS_FIELDTYPE_TS_ALLOCATION_MODE, DIS_FIELDTYPE_TRANSMITTER_PRIMARY_MODE, @@ -255,7 +255,7 @@ typedef enum DIS_FIELDTYPE_UA_BEAMS, DIS_FIELDTYPE_UA_EMITTER_SYSTEM, DIS_FIELDTYPE_UA_BEAM_FUNDAMENTAL_PARAMETER_DATA, - + /* arrays */ DIS_FIELDTYPE_FIXED_DATUMS, DIS_FIELDTYPE_FIXED_DATUM_IDS, diff --git a/epan/dissectors/packet-dis.c b/epan/dissectors/packet-dis.c index 3595352068..da012a9ef7 100644 --- a/epan/dissectors/packet-dis.c +++ b/epan/dissectors/packet-dis.c @@ -299,7 +299,7 @@ static gint dissect_dis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi case DIS_PDUTYPE_UNDERWATER_ACOUSTIC: pduParser = DIS_PARSER_UNDERWATER_ACOUSTIC_PDU; break; - + /* DIS Radio Communications protocol (RCP) family PDUs */ case DIS_PDUTYPE_TRANSMITTER: pduParser = DIS_PARSER_TRANSMITTER_PDU; diff --git a/epan/dissectors/packet-dtcp-ip.c b/epan/dissectors/packet-dtcp-ip.c index 4415b59e36..311adc8de0 100644 --- a/epan/dissectors/packet-dtcp-ip.c +++ b/epan/dissectors/packet-dtcp-ip.c @@ -145,7 +145,7 @@ dissect_dtcp_ip(tvbuff_t *tvb, packet_info *pinfo, proto_item *pi, *pi_ctrl; proto_tree *dtcp_ip_tree = NULL, *dtcp_ip_ctrl_tree = NULL; guint8 subfct_val; - const gchar *subfct_str; + const gchar *subfct_str; gint ake_info_len; @@ -316,7 +316,7 @@ proto_reg_handoff_dtcp_ip(void) new_create_dissector_handle(dissect_dtcp_ip, proto_dtcp_ip); initialized = TRUE; } - else + else dissector_delete_uint("tcp.port", current_tcp_port, dtcp_ip_handle); current_tcp_port = pref_tcp_port; diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index 22e29442af..848a6b44de 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -1014,7 +1014,7 @@ dissect_dtls_record(tvbuff_t *tvb, packet_info *pinfo, (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = tvb_length(next_tvb); + exp_pdu_data->tvb_length = tvb_length(next_tvb); exp_pdu_data->pdu_tvb = next_tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-dtn.c b/epan/dissectors/packet-dtn.c index a21e927b98..e54716732b 100644 --- a/epan/dissectors/packet-dtn.c +++ b/epan/dissectors/packet-dtn.c @@ -1496,7 +1496,7 @@ display_metadata_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset += sdnv_length; } } - + block_length = evaluate_sdnv(tvb, offset, &sdnv_length); ti = proto_tree_add_int(block_tree, hf_block_control_block_length, tvb, offset, sdnv_length, block_length); if(block_length < 0) { @@ -1765,7 +1765,7 @@ get_tcpcl_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) return 0; return len+bytecount+1; - + case TCP_CONVERGENCE_KEEP_ALIVE: case TCP_CONVERGENCE_REFUSE_BUNDLE: /* always 1 byte */ @@ -1990,7 +1990,7 @@ dissect_tcpcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 8, get_dtn_contact_header_len, dissect_dtn_contact_header); return tvb_length(tvb); - } + } /* Not for us */ return 0; diff --git a/epan/dissectors/packet-dtn.h b/epan/dissectors/packet-dtn.h index 92c37d015c..b212897b13 100644 --- a/epan/dissectors/packet-dtn.h +++ b/epan/dissectors/packet-dtn.h @@ -4,9 +4,9 @@ * Approved for Public Release; Distribution Unlimited. * Tracking Number 07-0090. * - * The US Government will not be charged any license fee and/or royalties - * related to this software. Neither name of The MITRE Corporation; nor the - * names of its contributors may be used to endorse or promote products + * The US Government will not be charged any license fee and/or royalties + * related to this software. Neither name of The MITRE Corporation; nor the + * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * $Id$ diff --git a/epan/dissectors/packet-dtp.c b/epan/dissectors/packet-dtp.c index 0f8ed5f837..14690a11c3 100644 --- a/epan/dissectors/packet-dtp.c +++ b/epan/dissectors/packet-dtp.c @@ -316,7 +316,7 @@ proto_register_dtp(void) { &hf_dtp_tas, { "Trunk Administrative Status", "dtp.tas", FT_UINT8, BASE_HEX, VALS(dtp_tas_vals), DTP_TAS_MASK, NULL, HFILL }}, - + { &hf_dtp_tot, { "Trunk Operating Type", "dtp.tot", FT_UINT8, BASE_HEX, VALS(dtp_tot_vals), DTP_TOT_MASK, NULL, HFILL }}, diff --git a/epan/dissectors/packet-dvb-ait.c b/epan/dissectors/packet-dvb-ait.c index d359c4677d..44dbebe4ee 100644 --- a/epan/dissectors/packet-dvb-ait.c +++ b/epan/dissectors/packet-dvb-ait.c @@ -352,7 +352,7 @@ dissect_dvb_ait_descriptor(tvbuff_t *tvb, guint offset, return ret; } - + static int dissect_dvb_ait(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { @@ -364,7 +364,7 @@ dissect_dvb_ait(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data gint ret; guint32 org_id; guint16 app_id; - + col_clear(pinfo->cinfo, COL_INFO); col_set_str(pinfo->cinfo, COL_INFO, "Application Information Table (AIT)"); diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c index 1f064ea3a7..f8abcf4005 100644 --- a/epan/dissectors/packet-dvbci.c +++ b/epan/dissectors/packet-dvbci.c @@ -1909,7 +1909,7 @@ is_cc_item_exportable(guint8 dat_id) if (dat_id == CC_ID_KP) return FALSE; /* we could add some more items here which do not appear in SAC messages - normally: CC_ID_DHPH, CC_ID_DHPM */ + normally: CC_ID_DHPH, CC_ID_DHPM */ return TRUE; } @@ -3157,7 +3157,7 @@ dissect_sac_msg(guint32 tag, tvbuff_t *tvb, gint offset, exp_pdu_data = load_export_pdu_tags( pinfo, EXPORTED_SAC_MSG_PROTO, -1, EXP_PDU_TAG_DVBCI_EVT_BIT); - exp_pdu_data->tvb_length = tvb_length(clear_sac_msg_tvb); + exp_pdu_data->tvb_length = tvb_length(clear_sac_msg_tvb); exp_pdu_data->pdu_tvb = clear_sac_msg_tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); } @@ -3182,7 +3182,7 @@ dissect_dvbci_exported_sac_msg( derived from the direction of the transfer */ if (evt== DVBCI_EVT_DATA_CAM_TO_HOST) tag = T_CC_SAC_DATA_REQ; - else + else tag = T_CC_SAC_DATA_CNF; col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", @@ -3399,7 +3399,7 @@ dissect_dvbci_payload_ami(guint32 tag, gint len_field _U_, proto_tree_add_text(tree, tvb, offset, 1, "File name length %d", file_name_len); offset++; - file_name_str = tvb_get_string(wmem_packet_scope(), + file_name_str = tvb_get_string(wmem_packet_scope(), tvb, offset, file_name_len); if (!file_name_str) break; @@ -3525,7 +3525,7 @@ dissect_dvbci_payload_lsc(guint32 tag, gint len_field, else { /* length field == 1 byte id + param_len */ proto_tree_add_expert_format(tree, pinfo, &ei_dvbci_bad_length, tvb, - APDU_TAG_SIZE, offset_start-APDU_TAG_SIZE, + APDU_TAG_SIZE, offset_start-APDU_TAG_SIZE, "Length field must be 3 or 4"); break; } @@ -4552,7 +4552,7 @@ dissect_dvbci_cis_payload_config(tvbuff_t *data_tvb, else { /* skip unknown subtuple's content */ offset += st_len; - } + } } return offset; @@ -4596,7 +4596,7 @@ dissect_dvbci_cis_payload_cftable_entry(tvbuff_t *data_tvb, return offset; } - + static void dissect_dvbci_cis(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree) diff --git a/epan/dissectors/packet-dvbci.h b/epan/dissectors/packet-dvbci.h index 8748449078..1796f9623b 100644 --- a/epan/dissectors/packet-dvbci.h +++ b/epan/dissectors/packet-dvbci.h @@ -45,7 +45,7 @@ static const value_string dvbci_event[] = { { DVBCI_EVT_DATA_HOST_TO_CAM, "data transfer Host -> CAM" }, { DVBCI_EVT_DATA_CAM_TO_HOST, "data transfer CAM -> Host" }, { DVBCI_EVT_CIS_READ, "read the Card Information Structure (CIS)" }, - { DVBCI_EVT_COR_WRITE, + { DVBCI_EVT_COR_WRITE, "write into the Configuration Option Register (COR)" }, { DVBCI_EVT_HW_EVT, "hardware event" }, { 0, NULL } diff --git a/epan/dissectors/packet-eap.c b/epan/dissectors/packet-eap.c index 59386a8386..edb1584bff 100644 --- a/epan/dissectors/packet-eap.c +++ b/epan/dissectors/packet-eap.c @@ -1520,7 +1520,7 @@ proto_register_eap(void) { &ei_eap_ms_chap_v2_length, { "eap.ms_chap_v2.length.invalid", PI_PROTOCOL, PI_WARN, "Invalid Length", EXPFILL }}, { &ei_eap_mitm_attacks, { "eap.mitm_attacks", PI_SECURITY, PI_WARN, "Vulnerable to MITM attacks. If possible, change EAP type.", EXPFILL }}, { &ei_eap_md5_value_size_overflow, { "eap.md5.value_size.overflow", PI_PROTOCOL, PI_WARN, "Overflow", EXPFILL }}, - { &ei_eap_dictionary_attacks, { "eap.dictionary_attacks", PI_SECURITY, PI_WARN, + { &ei_eap_dictionary_attacks, { "eap.dictionary_attacks", PI_SECURITY, PI_WARN, "Vulnerable to dictionary attacks. If possible, change EAP type." " See http://www.cisco.com/warp/public/cc/pd/witc/ao350ap/prodlit/2331_pp.pdf", EXPFILL }}, }; diff --git a/epan/dissectors/packet-edonkey.h b/epan/dissectors/packet-edonkey.h index 2c5ff4d567..4e43b127ca 100644 --- a/epan/dissectors/packet-edonkey.h +++ b/epan/dissectors/packet-edonkey.h @@ -5,7 +5,7 @@ * Copyright 2008, Stefan Monhof * * eDonkey dissector based on protocol descriptions from mldonkey: - * http://savannah.nongnu.org/download/mldonkey/docs/Edonkey-Overnet/edonkey-protocol.txt + * http://savannah.nongnu.org/download/mldonkey/docs/Edonkey-Overnet/edonkey-protocol.txt * http://savannah.nongnu.org/download/mldonkey/docs/Edonkey-Overnet/overnet-protocol.txt * * Kademlia dissector based on source code inspection of aMule 2.1.3 and eMule 0.48a @@ -47,7 +47,7 @@ void proto_register_edonkey(void); /* EDONKEY TCP MESSAGES */ /* Client <-> Server */ #define EDONKEY_MSG_HELLO 0x01 -#define EDONKEY_MSG_BAD_PROTO 0x05 +#define EDONKEY_MSG_BAD_PROTO 0x05 #define EDONKEY_MSG_GET_SERVER_LIST 0x14 #define EDONKEY_MSG_OFFER_FILES 0x15 #define EDONKEY_MSG_SEARCH_FILES 0x16 @@ -73,7 +73,7 @@ void proto_register_edonkey(void); /* Client <-> Client */ #define EDONKEY_MSG_HELLO_CLIENT 0x10 /* 0x01 0x10 */ -#define EDONKEY_MSG_SENDING_PART 0x46 +#define EDONKEY_MSG_SENDING_PART 0x46 #define EDONKEY_MSG_REQUEST_PARTS 0x47 #define EDONKEY_MSG_NO_SUCH_FILE 0x48 #define EDONKEY_MSG_END_OF_DOWNLOAD 0x49 @@ -91,7 +91,7 @@ void proto_register_edonkey(void); #define EDONKEY_MSG_SLOT_GIVEN 0x55 #define EDONKEY_MSG_SLOT_RELEASE 0x56 #define EDONKEY_MSG_SLOT_TAKEN 0x57 -#define EDONKEY_MSG_FILE_REQUEST 0x58 +#define EDONKEY_MSG_FILE_REQUEST 0x58 #define EDONKEY_MSG_FILE_REQUEST_ANSWER 0x59 /*#define EDONKEY_MSG_UNKNOWN 0x5b*/ #define EDONKEY_MSG_GET_SHARED_DIRS 0x5d @@ -165,10 +165,10 @@ void proto_register_edonkey(void); #define OVERNET_MSG_UDP_FIREWALL_CONNECTION 0x18 #define OVERNET_MSG_UDP_FIREWALL_CONNECTION_ACK 0x19 #define OVERNET_MSG_UDP_FIREWALL_CONNECTION_NACK 0x1a -#define OVERNET_MSG_UDP_IP_QUERY 0x1b -#define OVERNET_MSG_UDP_IP_QUERY_ANSWER 0x1c -#define OVERNET_MSG_UDP_IP_QUERY_END 0x1d -#define OVERNET_MSG_UDP_IDENTIFY 0x1e +#define OVERNET_MSG_UDP_IP_QUERY 0x1b +#define OVERNET_MSG_UDP_IP_QUERY_ANSWER 0x1c +#define OVERNET_MSG_UDP_IP_QUERY_END 0x1d +#define OVERNET_MSG_UDP_IDENTIFY 0x1e /*#define OVERNET_MSG_UDP_UNKNOWN 0x21 */ /* EDONKEY META TAG TYPES */ diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index 250f34d51d..9ba50e2fc6 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -1287,7 +1287,7 @@ int dissect_tcpip_last_conflict(packet_info *pinfo, proto_tree *tree, proto_item if( tvb_get_guint8(tvb, offset) == 0 ) proto_tree_add_item(tree, hf_tcpip_lcd_arp_pdu, tvb, offset+7, 28, ENC_LITTLE_ENDIAN); else - { + { /* Dissect ARP PDU, but don't have it change column info */ save_info = col_get_writable(pinfo->cinfo); col_set_writable(pinfo->cinfo, FALSE); diff --git a/epan/dissectors/packet-enip.h b/epan/dissectors/packet-enip.h index f42ce0eb28..107e78ac6e 100644 --- a/epan/dissectors/packet-enip.h +++ b/epan/dissectors/packet-enip.h @@ -76,7 +76,7 @@ #define DLR_ADV_GATEWAY_PRECEDENCE 13 #define DLR_ADV_ADVERTISE_INTERVAL 14 #define DLR_ADV_ADVERTISE_TIMEOUT 18 -#define DLR_ADV_LEARNING_UPDATE_ENABLE 22 +#define DLR_ADV_LEARNING_UPDATE_ENABLE 22 #define DLR_ADV_RESERVED 23 /* Offset for Advertise frames */ diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c index 4c971fe479..82c9d06c57 100644 --- a/epan/dissectors/packet-epl.c +++ b/epan/dissectors/packet-epl.c @@ -16,7 +16,7 @@ * * Copyright (c) 2013: B&R Industrieelektronik GmbH * http://www.br-automation.com - * + * * - Roland Knall * - Extended to be similair in handling as to B&R plugin * - Multiple SOD Read/Write dissection @@ -1060,7 +1060,7 @@ dissect_epl_asnd(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 /* get ServiceID of payload */ svid = tvb_get_guint8(tvb, offset); item = proto_tree_add_uint(epl_tree, hf_epl_asnd_svid, tvb, offset, 1, svid); - + offset += 1; col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", @@ -1547,7 +1547,7 @@ dissect_epl_sdo_command(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, abort_code = tvb_get_letohl(tvb, offset); /* if AbortBit is set then print AbortMessage */ proto_tree_add_uint(sdo_cmd_tree, hf_epl_asnd_sdo_cmd_abort_code, tvb, offset, 4, abort_code); - + col_append_fstr(pinfo->cinfo, COL_INFO, "Abort = 0x%08X", abort_code); } else diff --git a/epan/dissectors/packet-erf.h b/epan/dissectors/packet-erf.h index 86c71f3dc0..d90ff58bbc 100644 --- a/epan/dissectors/packet-erf.h +++ b/epan/dissectors/packet-erf.h @@ -26,16 +26,16 @@ /** Gets the ERF extension header of the specified type, * - * Afterindex may be NULL, or set to a gint initialized to -1 and the function + * Afterindex may be NULL, or set to a gint initialized to -1 and the function * re-called in a loop to iterate through extension headers of hdrtype type. * * Note: pinfo is assumed to be a pointer to an ERF pinfo. * * @param pinfo Packet info of ERF record to get extension header of. * @param hdrtype Type code of extension header. More headers bit is ignored. - * @param afterinstance Pointer to header index to begin searching at, + * @param afterinstance Pointer to header index to begin searching at, * exclusive. - * Updated with index of extension header found. If NULL or initialized to -1 + * Updated with index of extension header found. If NULL or initialized to -1 * begin searching at the first extension header. * * @returns Pointer to extension header or NULL. diff --git a/epan/dissectors/packet-erldp.c b/epan/dissectors/packet-erldp.c index bc11fd86a8..48faf1c122 100644 --- a/epan/dissectors/packet-erldp.c +++ b/epan/dissectors/packet-erldp.c @@ -202,10 +202,10 @@ static gint dissect_etf_dist_header(packet_info *pinfo _U_, tvbuff_t *tvb, gint flags_tree = proto_item_add_subtree(ti_tmp, ett_etf_flags); for (i=0; icinfo, COL_PROTOCOL, "ESIO"); col_clear(pinfo->cinfo, COL_INFO); esio_telegram_type = tvb_get_guint8(tvb,5); - + switch (esio_telegram_type) { case ESIO_TRANSFER: esio_src_id = tvb_get_ntohl(tvb,16); diff --git a/epan/dissectors/packet-etsi_card_app_toolkit.c b/epan/dissectors/packet-etsi_card_app_toolkit.c index 23d70ff78f..e2fb966cb9 100644 --- a/epan/dissectors/packet-etsi_card_app_toolkit.c +++ b/epan/dissectors/packet-etsi_card_app_toolkit.c @@ -945,10 +945,10 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (g8) { case 0x20: proto_tree_add_item(elem_tree, hf_ctlv_result_term, tvb, pos+1, 1, ENC_NA); - break; + break; case 0x26: proto_tree_add_item(elem_tree, hf_ctlv_result_launch_browser, tvb, pos+1, 1, ENC_NA); - break; + break; case 0x38: proto_tree_add_item(elem_tree, hf_ctlv_result_multiplecard, tvb, pos+1, 1, ENC_NA); break; diff --git a/epan/dissectors/packet-exported_pdu.c b/epan/dissectors/packet-exported_pdu.c index e90ef1235e..7a28a579a0 100644 --- a/epan/dissectors/packet-exported_pdu.c +++ b/epan/dissectors/packet-exported_pdu.c @@ -341,7 +341,7 @@ proto_register_exported_pdu(void) " exported_pdu TCP port if other than the default", 10, &gPORT_PREF); #endif - /* Register for tapping + /* Register for tapping * The tap is registered here but it is to be used by dissectors that * want to export their PDU:s, see packet-sip.c */ diff --git a/epan/dissectors/packet-fc.h b/epan/dissectors/packet-fc.h index 7f4072bbd0..907fc10424 100644 --- a/epan/dissectors/packet-fc.h +++ b/epan/dissectors/packet-fc.h @@ -7,17 +7,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -60,7 +60,7 @@ /* * the following allows TAP code access to the messages - * without having to duplicate it. With MSVC and a + * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ WS_DLL_PUBLIC const value_string fc_fc4_val[]; diff --git a/epan/dissectors/packet-fcbls.h b/epan/dissectors/packet-fcbls.h index a3e0cf4ebd..daadf363ad 100644 --- a/epan/dissectors/packet-fcbls.h +++ b/epan/dissectors/packet-fcbls.h @@ -7,17 +7,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -29,7 +29,7 @@ #define FC_BLS_NOP 0x00 #define FC_BLS_ABTS 0x01 #define FC_BLS_RMC 0x02 -#define FC_BLS_BAACC 0x04 +#define FC_BLS_BAACC 0x04 #define FC_BLS_BARJT 0x05 #define FC_BLS_PRMT 0x06 diff --git a/epan/dissectors/packet-fcct.h b/epan/dissectors/packet-fcct.h index 6e497dd394..1b4e9bf495 100644 --- a/epan/dissectors/packet-fcct.h +++ b/epan/dissectors/packet-fcct.h @@ -5,17 +5,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/epan/dissectors/packet-fcdns.h b/epan/dissectors/packet-fcdns.h index 3d907a310e..2fd55bcb99 100644 --- a/epan/dissectors/packet-fcdns.h +++ b/epan/dissectors/packet-fcdns.h @@ -5,17 +5,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -172,12 +172,12 @@ static const value_string fc_dns_port_type_val [] = { #define FCDNS_RJT_IPANOTREG 0x06 #define FCDNS_RJT_FC4NOTREG 0x07 #define FCDNS_RJT_SPNAMENOTREG 0x08 -#define FCDNS_RJT_SNNAMENOTREG 0x09 +#define FCDNS_RJT_SNNAMENOTREG 0x09 #define FCDNS_RJT_PTYPENOTREG 0x0A #define FCDNS_RJT_IPPNOTREG 0x0B #define FCDNS_RJT_FPNAMENOTREG 0x0C #define FCDNS_RJT_HRDADDNOTREG 0x0D -#define FCDNS_RJT_FC4DESNOTREG 0x0E +#define FCDNS_RJT_FC4DESNOTREG 0x0E #define FCDNS_RJT_FC4FEANOTREG 0x0F #define FCDNS_RJT_ACCRJT 0x10 #define FCDNS_RJT_PTYPEFMT 0x11 @@ -216,7 +216,7 @@ static const value_string fc_dns_rjt_det_code_val [] = { {0, NULL}, }; -/* Actual servers serving the directory service type identified by subtype */ +/* Actual servers serving the directory service type identified by subtype */ #define FCDNS_GSSUBTYPE_DNS 0x02 #define FCDNS_GSSUBTYPE_IP 0x03 diff --git a/epan/dissectors/packet-fcels.h b/epan/dissectors/packet-fcels.h index 95a0fc44d7..b61054f42a 100644 --- a/epan/dissectors/packet-fcels.h +++ b/epan/dissectors/packet-fcels.h @@ -166,7 +166,7 @@ static const value_string fc_els_rjt_val[] = { #define FC_ELS_RJT_DET_DEACT_ALIAS_FAIL1 0x33 #define FC_ELS_RJT_DET_DEACT_ALIAS_FAIL2 0x34 #define FC_ELS_RJT_DET_SVCPARM_CONFLICT 0x35 -#define FC_ELS_RJT_DET_INV_ALIASTOK 0x36 +#define FC_ELS_RJT_DET_INV_ALIASTOK 0x36 #define FC_ELS_RJT_DET_UNSUPP_ALIASTOK 0x37 #define FC_ELS_RJT_DET_GRPFORM_FAIL 0x38 #define FC_ELS_RJT_DET_QOSPARM_ERR 0x40 diff --git a/epan/dissectors/packet-fcfcs.h b/epan/dissectors/packet-fcfcs.h index 3dc06173ff..21228f3d9d 100644 --- a/epan/dissectors/packet-fcfcs.h +++ b/epan/dissectors/packet-fcfcs.h @@ -5,17 +5,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -49,7 +49,7 @@ #define FCFCS_RPL 0x280 #define FCFCS_RPLN 0x291 #define FCFCS_RPLT 0x292 -#define FCFCS_RPLM 0x293 +#define FCFCS_RPLM 0x293 #define FCFCS_DPL 0x380 #define FCFCS_DPLN 0x391 #define FCFCS_DPLML 0x393 diff --git a/epan/dissectors/packet-fclctl.h b/epan/dissectors/packet-fclctl.h index d23e919fa8..c6cb97d8e9 100644 --- a/epan/dissectors/packet-fclctl.h +++ b/epan/dissectors/packet-fclctl.h @@ -7,17 +7,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -47,7 +47,7 @@ extern const value_string fc_lctl_proto_val[]; #define FC_LCTL_PBSY_PORTBSY 0x01 #define FC_LCTL_PBSY_RSRCBSY 0x03 -#define FC_LCTL_PBSY_MCASTBSY 0x07 +#define FC_LCTL_PBSY_MCASTBSY 0x07 #define FC_LCTL_PBSY_VENDBSY 0xFF #define FC_LCTL_RJT_ACODE_RETRY 0x01 @@ -76,15 +76,15 @@ extern const value_string fc_lctl_proto_val[]; #define FC_LCTL_RJT_CLS_NOTSUPP 0x15 #define FC_LCTL_RJT_LOGI_REQD 0x16 #define FC_LCTL_RJT_TOOMANY_SEQ 0x17 -#define FC_LCTL_RJT_EXCHG_NOTESTD 0x18 +#define FC_LCTL_RJT_EXCHG_NOTESTD 0x18 #define FC_LCTL_RJT_RSVD 0x19 #define FC_LCTL_RJT_FPATH_NOTAVAIL 0x1A -#define FC_LCTL_RJT_INV_VCID 0x1B +#define FC_LCTL_RJT_INV_VCID 0x1B #define FC_LCTL_RJT_INV_CSCTL 0x1C #define FC_LCTL_RJT_OORSRC 0x1D #define FC_LCTL_RJT_INV_CLASS 0x1F #define FC_LCTL_RJT_PRMPT_RJT 0x20 -#define FC_LCTL_RJT_PRMPT_DIS 0x21 +#define FC_LCTL_RJT_PRMPT_DIS 0x21 #define FC_LCTL_RJT_MCAST_ERR 0x22 #define FC_LCTL_RJT_MCAST_TERM 0x23 #define FC_LCTL_RJT_PRLI_REQD 0x24 diff --git a/epan/dissectors/packet-fcp.h b/epan/dissectors/packet-fcp.h index ad51b96f3e..a6fc296f11 100644 --- a/epan/dissectors/packet-fcp.h +++ b/epan/dissectors/packet-fcp.h @@ -1,5 +1,5 @@ /* packet-fcp.h - * Fibre Channel SCSI (FCP) Protocol definitions + * Fibre Channel SCSI (FCP) Protocol definitions * Copyright 2001 Dinesh G Dutt (ddutt@cisco.com) * * $Id$ @@ -7,17 +7,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/epan/dissectors/packet-fcsb3.h b/epan/dissectors/packet-fcsb3.h index 5927f6a765..e4bd3e222f 100644 --- a/epan/dissectors/packet-fcsb3.h +++ b/epan/dissectors/packet-fcsb3.h @@ -1,6 +1,6 @@ /* packet-fc-sb3.h * Routines for Fibre Channel Single Byte Protocol (SBCCS); used in FICON. - * This decoder is for FC-SB3 version 1.4 + * This decoder is for FC-SB3 version 1.4 * Copyright 2003 Dinesh G Dutt (ddutt@cisco.com) * * $Id$ @@ -8,17 +8,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/epan/dissectors/packet-fcswils.h b/epan/dissectors/packet-fcswils.h index 5326501cc6..635b45a1c8 100644 --- a/epan/dissectors/packet-fcswils.h +++ b/epan/dissectors/packet-fcswils.h @@ -7,17 +7,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/epan/dissectors/packet-fmp_notify.c b/epan/dissectors/packet-fmp_notify.c index b3dc1a5839..e93458c266 100644 --- a/epan/dissectors/packet-fmp_notify.c +++ b/epan/dissectors/packet-fmp_notify.c @@ -601,7 +601,7 @@ proto_register_fmp_notify(void) FT_UINT32, BASE_DEC, VALS(fmp_revokeHandleListReason_vals), 0, NULL, HFILL }}, - + }; static gint *ett[] = { diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c index e75c57befd..762b64b324 100644 --- a/epan/dissectors/packet-ftp.c +++ b/epan/dissectors/packet-ftp.c @@ -780,9 +780,9 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if (is_eprt_request) { - /* + /* * RFC2428 - sect. 2 - * This frame contains a EPRT request; let's dissect it and set up a + * This frame contains a EPRT request; let's dissect it and set up a * conversation for the data connection. */ if (parse_eprt_request(line, linelen, @@ -792,7 +792,7 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* since parse_eprt_request() returned TRUE, we know that we have a valid address family */ eprt_offset = tokenlen + 1 + 1; /* token, space, 1st delimiter */ - proto_tree_add_uint(reqresp_tree, hf_ftp_eprt_af, tvb, + proto_tree_add_uint(reqresp_tree, hf_ftp_eprt_af, tvb, eprt_offset, 1, eprt_af); eprt_offset += 1 + 1; /* addr family, 2nd delimiter */ @@ -819,7 +819,7 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) PT_TCP, ftp_port, 0, NO_PORT_B); if (conversation == NULL) { conversation = conversation_new( - pinfo->fd->num, &pinfo->src, &ftp_ip_address, + pinfo->fd->num, &pinfo->src, &ftp_ip_address, PT_TCP, ftp_port, 0, NO_PORT2); conversation_set_dissector(conversation, ftpdata_handle); @@ -827,7 +827,7 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { proto_item *item; - item = proto_tree_add_text(reqresp_tree, + item = proto_tree_add_text(reqresp_tree, tvb, offset - linelen - 1, linelen, "Invalid EPRT arguments"); expert_add_info(pinfo, item, &ei_ftp_eprt_args_invalid); } @@ -859,8 +859,8 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) PROTO_ITEM_SET_GENERATED(addr_it); } - proto_tree_add_uint(reqresp_tree, - hf_ftp_epsv_port, tvb, pasv_offset + 4, + proto_tree_add_uint(reqresp_tree, + hf_ftp_epsv_port, tvb, pasv_offset + 4, ftp_port_len, ftp_port); /* Find/create conversation for data */ diff --git a/epan/dissectors/packet-gadu-gadu.c b/epan/dissectors/packet-gadu-gadu.c index 6f39d0e7fc..313f3d4db7 100644 --- a/epan/dissectors/packet-gadu-gadu.c +++ b/epan/dissectors/packet-gadu-gadu.c @@ -235,7 +235,7 @@ static const value_string gadu_gadu_msg_ack_status_vals[] = { #define GG_STATUS_FFC_DESCR 0x18 #define GG_STATUS_AVAIL 0x02 #define GG_STATUS_AVAIL_DESCR 0x04 -#define GG_STATUS_BUSY 0x03 +#define GG_STATUS_BUSY 0x03 #define GG_STATUS_BUSY_DESCR 0x05 #define GG_STATUS_DND 0x21 #define GG_STATUS_DND_DESCR 0x22 @@ -562,7 +562,7 @@ static struct gadu_gadu_conv_data * gadu_gadu_get_conversation_data(packet_info *pinfo) { conversation_t *conv; - + conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0); if (conv) return (struct gadu_gadu_conv_data *)conversation_get_proto_data(conv, hfi_gadu_gadu->id); @@ -587,7 +587,7 @@ dissect_gadu_gadu_stringz_cp1250(tvbuff_t *tvb, const header_field_info *hfi, pr static const gunichar2 table_cp1250[] = { 0x20ac, 0xFFFD, 0x201a, 0xFFFD, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x80 - */ 0xFFFD, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179, /* - 0x8F */ - 0xFFFD, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x90 - */ + 0xFFFD, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x90 - */ 0xFFFD, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a, /* - 0x9F */ 0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, /* 0xA0 - */ 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b, /* - 0xAF */ @@ -608,7 +608,7 @@ dissect_gadu_gadu_stringz_cp1250(tvbuff_t *tvb, const header_field_info *hfi, pr wmem_strbuf_t *str; guint8 ch; gint len; - + len = tvb_reported_length_remaining(tvb, offset); str = wmem_strbuf_new(wmem_packet_scope(), ""); @@ -642,7 +642,7 @@ dissect_gadu_gadu_uint32_string_utf8(tvbuff_t *tvb, const header_field_info *hfi if (len > 0) { /* proto_item_fill_label() is broken for UTF-8 strings. - * It's using internally format_text() which doesn't support UTF-8 + * It's using internally format_text() which doesn't support UTF-8 */ /* proto_tree_add_item(tree, hfindex, tvb, offset, len, ENC_UTF_8|ENC_NA); */ diff --git a/epan/dissectors/packet-ged125.c b/epan/dissectors/packet-ged125.c index 94ec632f3e..6182bbf5b4 100644 --- a/epan/dissectors/packet-ged125.c +++ b/epan/dissectors/packet-ged125.c @@ -25,18 +25,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * GED125 - * This is Cisco's protocol that runs atop TCP (ged125 is in the payload of TCP). - * The protocol serves as a way for the ICM and the VRU to communicate to each + * This is Cisco's protocol that runs atop TCP (ged125 is in the payload of TCP). + * The protocol serves as a way for the ICM and the VRU to communicate to each * other in Cisco's CVP. The spec sheet that was used to write this dissector was * Revision 3.1a of November 26, 2007. * * Protocol Structure - * - * All messages have an eight byte header. The first 4 bytes represent the package + * + * All messages have an eight byte header. The first 4 bytes represent the package * length. This length doesn't include the length of the base header. Next, is the * message base type which is also 4 bytes. All ged125 messages have this format - * unless a message spans across several packets. The most common message is the - * service control type. This message type will have its own header and with in + * unless a message spans across several packets. The most common message is the + * service control type. This message type will have its own header and with in * that header have a few other things. One of these things is a sub-message type. */ @@ -49,7 +49,7 @@ #include #include "packet-tcp.h" -static int proto_ged125 = -1; +static int proto_ged125 = -1; static gint hf_ged125_length = -1; static gint hf_ged125_value = -1; @@ -163,34 +163,34 @@ static gboolean ged125_desegment_body = TRUE; #define GED125_FAILURE_EVENT_VALUE 2 #define GED125_OPEN_REQ_VALUE 3 #define GED125_OPEN_CONF_VALUE 4 -#define GED125_HEARTBEAT_REQ_VALUE 5 -#define GED125_HEARTBEAT_CONF_VALUE 6 +#define GED125_HEARTBEAT_REQ_VALUE 5 +#define GED125_HEARTBEAT_CONF_VALUE 6 #define GED125_CLOSE_REQ_VALUE 7 #define GED125_CLOSE_CONF_VALUE 8 #define GED125_INIT_DATA_REQ_VALUE 9 #define GED125_INIT_DATA_CONF_VALUE 10 -#define GED125_INIT_TRKGRP_DATA_EVENT_VALUE 11 +#define GED125_INIT_TRKGRP_DATA_EVENT_VALUE 11 #define GED125_INIT_SERVICE_DATA_EVENT_VALUE 12 #define GED125_INIT_VRU_DATA_EVENT_VALUE 13 #define GED125_INIT_DATA_END_EVENT_VALUE 14 #define GED125_DELIVERED_EVENT_VALUE 15 #define GED125_ORIGINATED_EVENT_VALUE 16 -#define GED125_CALL_CLEARED_EVENT_VALUE 17 +#define GED125_CALL_CLEARED_EVENT_VALUE 17 #define GED125_CONFERENCED_EVENT_VALUE 18 #define GED125_DIVERTED_EVENT_VALUE 19 #define GED125_NEW_TRANSACTION_EVENT_VALUE 20 -#define GED125_SET_CALL_VARIABLES_EVENT_VALUE 21 +#define GED125_SET_CALL_VARIABLES_EVENT_VALUE 21 #define GED125_VRU_STATUS_EVENT_VALUE 22 -#define GED125_TRKGRP_STATUS_EVENT_VALUE 23 +#define GED125_TRKGRP_STATUS_EVENT_VALUE 23 #define GED125_SERVICE_STATUS_EVENT_VALUE 24 #define GED125_ROUTE_REQUEST_EVENT_VALUE 41 #define GED125_ROUTE_SELECT_VALUE 42 -#define GED125_ROUTE_END_EVENT_VALUE 43 +#define GED125_ROUTE_END_EVENT_VALUE 43 #define GED125_ROUTE_END_VALUE 44 #define GED125_TIME_SYNCH_REQ_VALUE 45 #define GED125_TIME_SYNCH_CONF_VALUE 46 #define GED125_SERVICE_CONTROL_VALUE 47 -#define GED125_SIMULATOR_RESET_EVENT_VALUE 48 +#define GED125_SIMULATOR_RESET_EVENT_VALUE 48 #define GED125_REGISTER_VARIABLES_VALUE 49 #define GED125_INIT_SERVICE_CTRL_REQ_VALUE 1 @@ -281,45 +281,45 @@ static const value_string Cause_just_for_release_message_vals[] = { /*Base Message for the ged125*/ static const value_string base_message_values[] = { - { GED125_FAILURE_CONF_VALUE, "FAILURE_CONF" }, - { GED125_FAILURE_EVENT_VALUE, "FAILURE_EVENT" }, - { GED125_OPEN_REQ_VALUE, "OPEN_REQ" }, - { GED125_OPEN_CONF_VALUE, "OPEN_CONF" }, - { GED125_HEARTBEAT_REQ_VALUE, "HEARTBEAT_REQ" }, - { GED125_HEARTBEAT_CONF_VALUE, "HEARTBEAT_CONF" }, - { GED125_CLOSE_REQ_VALUE, "CLOSE_REQ" }, - { GED125_CLOSE_CONF_VALUE, "CLOSE_CONF" }, - { GED125_INIT_DATA_REQ_VALUE, "INIT_DATA_REQ" }, - { GED125_INIT_DATA_CONF_VALUE, "INIT_DATA_CONF" }, - { GED125_INIT_TRKGRP_DATA_EVENT_VALUE, "INIT_TRKGRP_DATA_EVENT" }, - { GED125_INIT_SERVICE_DATA_EVENT_VALUE, "INIT_SERVICE_DATA_EVENT" }, - { GED125_INIT_VRU_DATA_EVENT_VALUE, "INIT_VRU_DATA_EVENT" }, - { GED125_INIT_DATA_END_EVENT_VALUE, "INIT_DATA_END_EVENT" }, - { GED125_DELIVERED_EVENT_VALUE, "DELIVERED_EVENT" }, - { GED125_ORIGINATED_EVENT_VALUE, "ORIGINATED_EVENT" }, - { GED125_CALL_CLEARED_EVENT_VALUE, "CALL_CLEARED_EVENT" }, - { GED125_CONFERENCED_EVENT_VALUE, "CONFERENCED_EVENT" }, - { GED125_DIVERTED_EVENT_VALUE, "DIVERTED_EVENT" }, - { GED125_NEW_TRANSACTION_EVENT_VALUE, "NEW_TRANSACTION_EVENT" }, + { GED125_FAILURE_CONF_VALUE, "FAILURE_CONF" }, + { GED125_FAILURE_EVENT_VALUE, "FAILURE_EVENT" }, + { GED125_OPEN_REQ_VALUE, "OPEN_REQ" }, + { GED125_OPEN_CONF_VALUE, "OPEN_CONF" }, + { GED125_HEARTBEAT_REQ_VALUE, "HEARTBEAT_REQ" }, + { GED125_HEARTBEAT_CONF_VALUE, "HEARTBEAT_CONF" }, + { GED125_CLOSE_REQ_VALUE, "CLOSE_REQ" }, + { GED125_CLOSE_CONF_VALUE, "CLOSE_CONF" }, + { GED125_INIT_DATA_REQ_VALUE, "INIT_DATA_REQ" }, + { GED125_INIT_DATA_CONF_VALUE, "INIT_DATA_CONF" }, + { GED125_INIT_TRKGRP_DATA_EVENT_VALUE, "INIT_TRKGRP_DATA_EVENT" }, + { GED125_INIT_SERVICE_DATA_EVENT_VALUE, "INIT_SERVICE_DATA_EVENT" }, + { GED125_INIT_VRU_DATA_EVENT_VALUE, "INIT_VRU_DATA_EVENT" }, + { GED125_INIT_DATA_END_EVENT_VALUE, "INIT_DATA_END_EVENT" }, + { GED125_DELIVERED_EVENT_VALUE, "DELIVERED_EVENT" }, + { GED125_ORIGINATED_EVENT_VALUE, "ORIGINATED_EVENT" }, + { GED125_CALL_CLEARED_EVENT_VALUE, "CALL_CLEARED_EVENT" }, + { GED125_CONFERENCED_EVENT_VALUE, "CONFERENCED_EVENT" }, + { GED125_DIVERTED_EVENT_VALUE, "DIVERTED_EVENT" }, + { GED125_NEW_TRANSACTION_EVENT_VALUE, "NEW_TRANSACTION_EVENT" }, { GED125_SET_CALL_VARIABLES_EVENT_VALUE, "SET_CALL_VARIABLES_EVENT" }, - { GED125_VRU_STATUS_EVENT_VALUE, "VRU_STATUS_EVENT" }, - { GED125_TRKGRP_STATUS_EVENT_VALUE, "TRKGRP_STATUS_EVENT" }, - { GED125_SERVICE_STATUS_EVENT_VALUE, "SERVICE_STATUS_EVENT" }, - { GED125_ROUTE_REQUEST_EVENT_VALUE, "ROUTE_REQUEST_EVENT" }, - { GED125_ROUTE_SELECT_VALUE, "ROUTE_SELECT" }, - { GED125_ROUTE_END_EVENT_VALUE, "ROUTE_END_EVENT" }, - { GED125_ROUTE_END_VALUE, "ROUTE_END" }, - { GED125_TIME_SYNCH_REQ_VALUE, "TIME_SYNCH_REQ" }, - { GED125_TIME_SYNCH_CONF_VALUE, "TIME_SYNCH_CONF" }, - { GED125_SERVICE_CONTROL_VALUE, "SERVICE_CONTROL" }, - { GED125_SIMULATOR_RESET_EVENT_VALUE, "SIMULATOR_RESET_EVENT" }, - { GED125_REGISTER_VARIABLES_VALUE, "REGISTER_VARIABLES" }, + { GED125_VRU_STATUS_EVENT_VALUE, "VRU_STATUS_EVENT" }, + { GED125_TRKGRP_STATUS_EVENT_VALUE, "TRKGRP_STATUS_EVENT" }, + { GED125_SERVICE_STATUS_EVENT_VALUE, "SERVICE_STATUS_EVENT" }, + { GED125_ROUTE_REQUEST_EVENT_VALUE, "ROUTE_REQUEST_EVENT" }, + { GED125_ROUTE_SELECT_VALUE, "ROUTE_SELECT" }, + { GED125_ROUTE_END_EVENT_VALUE, "ROUTE_END_EVENT" }, + { GED125_ROUTE_END_VALUE, "ROUTE_END" }, + { GED125_TIME_SYNCH_REQ_VALUE, "TIME_SYNCH_REQ" }, + { GED125_TIME_SYNCH_CONF_VALUE, "TIME_SYNCH_CONF" }, + { GED125_SERVICE_CONTROL_VALUE, "SERVICE_CONTROL" }, + { GED125_SIMULATOR_RESET_EVENT_VALUE, "SIMULATOR_RESET_EVENT" }, + { GED125_REGISTER_VARIABLES_VALUE, "REGISTER_VARIABLES" }, { 0, NULL} }; /*status codes that may be included in the FAILURE_CONF, FAILURE_EVENT, - DIALOGUE_FAILURE_CONF, DIALOGUE_FAILURE_EVENT, ROUTE_END_EVENT, and - ROUTE_END messages.*/ + DIALOGUE_FAILURE_CONF, DIALOGUE_FAILURE_EVENT, ROUTE_END_EVENT, and + ROUTE_END messages.*/ static const value_string error_codes[] = { { 0x0, "E_NO_ERROR"}, { 0x1, "E_INVALID_VERSION" }, @@ -400,36 +400,36 @@ static const value_string vals_status_code_label_values[] = { /*Service Control Message Sub-values*/ static const value_string vals_service_control_message_subvalues[] = { - { GED125_INIT_SERVICE_CTRL_REQ_VALUE, "INIT_SERVICE_CTRL_REQ"}, - { GED125_INIT_SERVICE_CTRL_CONF_VALUE, "INIT_SERVICE_CTRL_CONF"}, - { GED125_INIT_SERVICE_CTRL_DATA_VALUE, "INIT_SERVICE_CTRL_DATA"}, - { GED125_INIT_SERVICE_CTRL_END_VALUE, "INIT_SERVICE_CTRL_END"}, - { GED125_NEW_CALL_VALUE, "NEW_CALL"}, - { GED125_REQUEST_INSTRUCTION_VALUE, "REQUEST_INSTRUCTION"}, - { GED125_RUN_SCRIPT_REQ_VALUE, "RUN_SCRIPT_REQ"}, - { GED125_RUN_SCRIPT_RESULT_VALUE, "RUN_SCRIPT_RESULT"}, - { GED125_CONNECT_VALUE, "CONNECT"}, - { GED125_EVENT_REPORT_VALUE, "EVENT_REPORT"}, - { GED125_DIALOGUE_FAILURE_CONF_VALUE, "DIALOGUE_FAILURE_CONF"}, - { GED125_DIALOGUE_FAILURE_EVENT_VALUE, "DIALOGUE_FAILURE_EVENT"}, - { GED125_INIT_SERVICE_CTRL_TRKGRP_VALUE, "INIT_SERVICE_CTRL_TRKGRP"}, + { GED125_INIT_SERVICE_CTRL_REQ_VALUE, "INIT_SERVICE_CTRL_REQ"}, + { GED125_INIT_SERVICE_CTRL_CONF_VALUE, "INIT_SERVICE_CTRL_CONF"}, + { GED125_INIT_SERVICE_CTRL_DATA_VALUE, "INIT_SERVICE_CTRL_DATA"}, + { GED125_INIT_SERVICE_CTRL_END_VALUE, "INIT_SERVICE_CTRL_END"}, + { GED125_NEW_CALL_VALUE, "NEW_CALL"}, + { GED125_REQUEST_INSTRUCTION_VALUE, "REQUEST_INSTRUCTION"}, + { GED125_RUN_SCRIPT_REQ_VALUE, "RUN_SCRIPT_REQ"}, + { GED125_RUN_SCRIPT_RESULT_VALUE, "RUN_SCRIPT_RESULT"}, + { GED125_CONNECT_VALUE, "CONNECT"}, + { GED125_EVENT_REPORT_VALUE, "EVENT_REPORT"}, + { GED125_DIALOGUE_FAILURE_CONF_VALUE, "DIALOGUE_FAILURE_CONF"}, + { GED125_DIALOGUE_FAILURE_EVENT_VALUE, "DIALOGUE_FAILURE_EVENT"}, + { GED125_INIT_SERVICE_CTRL_TRKGRP_VALUE, "INIT_SERVICE_CTRL_TRKGRP"}, { GED125_INIT_SERVICE_CTRL_SERVICE_VALUE, "INIT_SERVICE_CTRL_SERVICE"}, - { GED125_INIT_SERVICE_CTRL_VRU_VALUE, "INIT_SERVICE_CTRL_VRU"}, - { GED125_TRKGRP_STATUS_VALUE, "TRKGRP_STATUS"}, - { GED125_SERVICE_STATUS_VALUE, "SERVICE_STATUS"}, - { GED125_VRU_STATUS_VALUE, "VRU_STATUS"}, - { GED125_CANCEL_VALUE, "CANCEL"}, - { GED125_RELEASE_VALUE, "RELEASE"}, - { GED125_NEW_DIALOGUE_VALUE, "NEW_DIALOGUE"}, - { GED125_CONNECT_TO_RESOURCE_VALUE, "CONNECT_TO_RESOURCE"}, - { GED125_RESOURCE_CONNECTED_VALUE, "RESOURCE_CONNECTED"}, - { GED125_MICROAPP_CONTEXT_VALUE, "MICROAPP_CONTEXT"}, - { GED125_MICROAPP_PLAY_VALUE, "MICROAPP_PLAY"}, - { GED125_MICROAPP_PLAY_CONTINUE_VALUE, "MICROAPP_PLAY_CONTINUE"}, - { GED125_MICROAPP_COLLECT_DATA_VALUE, "MICROAPP_COLLECT_DATA"}, - { GED125_MICROAPP_MENU_VALUE, "MICROAPP_MENU"}, - { GED125_MICROAPP_RESULT_VALUE, "MICROAPP_RESULT"}, - { GED125_TEMPORARY_CONNECT_VALUE, "TEMPORARY_CONNECT"}, + { GED125_INIT_SERVICE_CTRL_VRU_VALUE, "INIT_SERVICE_CTRL_VRU"}, + { GED125_TRKGRP_STATUS_VALUE, "TRKGRP_STATUS"}, + { GED125_SERVICE_STATUS_VALUE, "SERVICE_STATUS"}, + { GED125_VRU_STATUS_VALUE, "VRU_STATUS"}, + { GED125_CANCEL_VALUE, "CANCEL"}, + { GED125_RELEASE_VALUE, "RELEASE"}, + { GED125_NEW_DIALOGUE_VALUE, "NEW_DIALOGUE"}, + { GED125_CONNECT_TO_RESOURCE_VALUE, "CONNECT_TO_RESOURCE"}, + { GED125_RESOURCE_CONNECTED_VALUE, "RESOURCE_CONNECTED"}, + { GED125_MICROAPP_CONTEXT_VALUE, "MICROAPP_CONTEXT"}, + { GED125_MICROAPP_PLAY_VALUE, "MICROAPP_PLAY"}, + { GED125_MICROAPP_PLAY_CONTINUE_VALUE, "MICROAPP_PLAY_CONTINUE"}, + { GED125_MICROAPP_COLLECT_DATA_VALUE, "MICROAPP_COLLECT_DATA"}, + { GED125_MICROAPP_MENU_VALUE, "MICROAPP_MENU"}, + { GED125_MICROAPP_RESULT_VALUE, "MICROAPP_RESULT"}, + { GED125_TEMPORARY_CONNECT_VALUE, "TEMPORARY_CONNECT"}, { 0, NULL} }; @@ -520,7 +520,7 @@ static const value_string floating_media_library_designator_vals[] = { { 0, NULL} }; -static void +static void OperationalStatus_funk(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, gint* offset) { guint32 value; @@ -529,32 +529,32 @@ OperationalStatus_funk(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, gint value = tvb_get_ntohl(tvb, *offset); ti = proto_tree_add_item(tree, hf_ged125_OperationalStatus, tvb, *offset, 4, ENC_BIG_ENDIAN); - if(value == 0) + if (value == 0) expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_normal); - else if(value <= 31 && value >0) + else if (value <= 31 && value >0) expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_loss_redundant_component); - else if(value <= 63 && value >= 32 ) /*32-63*/ + else if (value <= 63 && value >= 32 ) /*32-63*/ expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_degraded_call_processing); - else if(value <= 127 && value >= 64 ) /*64-127*/ + else if (value <= 127 && value >= 64 ) /*64-127*/ expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_conditions_prevent_call); - else if(value > 127) /*error*/ + else if (value > 127) /*error*/ expert_add_info(pinfo, ti, &ei_ged125_OperationalStatus_invalid_message); - *offset+=4; + *offset += 4; } -static void +static void StatusVariable_funk(tvbuff_t* tvb, proto_tree* tree, gint* offset, const gint size) { while(*offset+4 <= size) { proto_tree_add_item(tree, hf_ged125_StatusVariable, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; } } -static void +static void trunk_funk_without_status(tvbuff_t* tvb, proto_tree* z_tree, gint* offset, const gint size) { gint count = 0; @@ -562,12 +562,12 @@ trunk_funk_without_status(tvbuff_t* tvb, proto_tree* z_tree, gint* offset, const while(*offset+2 <= size && count < 1024) { proto_tree_add_item(z_tree, hf_ged125_TrunkNumber, tvb, *offset, 2, ENC_BIG_ENDIAN); - *offset+=2; + *offset += 2; count++; } } -static void +static void trunk_funk(tvbuff_t* tvb, proto_tree* tree, gint* offset, const gint size) { guint16 count = 0; @@ -575,31 +575,31 @@ trunk_funk(tvbuff_t* tvb, proto_tree* tree, gint* offset, const gint size) /* 1023 max trunks, the trunk loop(counting from 0 from 1023 is 1024)*/ while(*offset+4 <= size && count < 1024) { proto_tree_add_item(tree, hf_ged125_TrunkNumber, tvb, *offset, 2, ENC_BIG_ENDIAN); - *offset+=2; + *offset += 2; proto_tree_add_item(tree, hf_ged125_TrunkStatus, tvb, *offset, 2, ENC_BIG_ENDIAN); - *offset+=2; + *offset += 2; count++; } } -static void +static void Media_Specifier_dissect(tvbuff_t* tvb, proto_tree* tree, gint* offset, guint32 length) { guint8 media_protocol; media_protocol = tvb_get_guint8(tvb, *offset); proto_tree_add_item(tree, hf_ged125_floating_media_protocol, tvb, *offset, 1, ENC_BIG_ENDIAN); - *offset+=1; + *offset += 1; - switch(media_protocol) + switch (media_protocol) { case 'H': case 'S': case 'O': case 'F': proto_tree_add_item(tree, hf_ged125_floating_library_designator, tvb, *offset, 1, ENC_BIG_ENDIAN); - *offset+=1; + *offset += 1; proto_tree_add_item(tree, hf_ged125_floating_payload_strg, tvb, *offset, length - 2, ENC_NA|ENC_ASCII); break; @@ -609,17 +609,17 @@ Media_Specifier_dissect(tvbuff_t* tvb, proto_tree* tree, gint* offset, guint32 l case 'D': proto_tree_add_item(tree, hf_ged125_Data_Playback_Type, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(tree, hf_ged125_Data_Playback_Formats, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(tree, hf_ged125_floating_payload_strg, tvb, *offset, length - 9, ENC_NA|ENC_ASCII); break; } - - *offset+=length; + + *offset += length; } -static void +static void floating_fields(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, gint offset, const gint size) { gint32 length = 4; @@ -637,15 +637,15 @@ floating_fields(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, gint offset while (offset < size-2) { floating_type = tvb_get_guint8(tvb, offset); - ti = proto_tree_add_uint_format(ged125_tree, hf_ged125_floating, tvb, offset, 1, - floating_type, "%s", val_to_str(floating_type, + ti = proto_tree_add_uint_format(ged125_tree, hf_ged125_floating, tvb, offset, 1, + floating_type, "%s", val_to_str(floating_type, vals_floating_point_types, "Unknown %d")); float_tree = proto_item_add_subtree(ti, ett_ged125_float_field); - offset+=1; + offset += 1; length = tvb_get_guint8(tvb, offset); proto_tree_add_uint(float_tree, hf_ged125_length, tvb, offset, 1, length); - offset+=1; + offset += 1; if ((offset + length > size) && (length > 0)) { @@ -656,25 +656,25 @@ floating_fields(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, gint offset switch (floating_type) { case 42: - case 43: + case 43: proto_tree_add_item(float_tree, hf_ged125_floating_payload_ECC_tag, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; if (length-4 > 0) { proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length-4, ENC_NA|ENC_ASCII); - offset+=(length-4); + offset += (length-4); } break; case 44: /*ECC_VAR_ARRAY*/ proto_tree_add_item(float_tree, hf_ged125_floating_payload_ECC_tag, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(float_tree, hf_ged125_floating_uchar_array_index, tvb, offset, 1, ENC_BIG_ENDIAN); - offset+=1; + offset += 1; if (length-5 > 0) { proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length-4, ENC_NA|ENC_ASCII); - offset+=(length-5); + offset += (length-5); } break; @@ -686,8 +686,8 @@ floating_fields(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, gint offset break; case 19: /* unspec var type(UUI) */ - proto_tree_add_item(float_tree, hf_ged125_floating_payload_unspec, tvb, offset, length, ENC_NA); - offset+=length; + proto_tree_add_item(float_tree, hf_ged125_floating_payload_unspec, tvb, offset, length, ENC_NA); + offset += length; break; case 1: @@ -696,30 +696,30 @@ floating_fields(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, gint offset case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 37: case 38: case 39: case 40: case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58: - proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length, ENC_NA|ENC_ASCII); - offset+=length; + proto_tree_add_item(float_tree, hf_ged125_floating_payload_strg, tvb, offset, length, ENC_NA|ENC_ASCII); + offset += length; break; case 35: case 36: proto_tree_add_item(float_tree, hf_ged125_floating_payload_uint, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=length; + offset += length; break; case 41: proto_tree_add_item(float_tree, hf_ged125_floating_cause_code, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=length; + offset += length; break; case 45: case 46: proto_tree_add_item(float_tree, hf_ged125_floating_payload_bool, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=length; + offset += length; break; } } } -static void +static void service_control_dissect(tvbuff_t* tvb,proto_tree* msg_tree, proto_tree* ged125_tree, packet_info* pinfo, gint* offset, const gint size) { @@ -732,18 +732,18 @@ service_control_dissect(tvbuff_t* tvb,proto_tree* msg_tree, proto_tree* ged125_t /* get message sub type, don't want to output that just yet */ mess_type = tvb_get_ntohl(tvb, *offset); - *offset+=4; + *offset += 4; DialogueID = tvb_get_ntohl(tvb, *offset); proto_tree_add_item(service_tree, hf_ged125_DialogueID_num, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; col_add_fstr(pinfo->cinfo, COL_INFO, "Service_Control->%s DIALOGUE_ID=%u LEN=%u", val_to_str(mess_type, vals_service_control_message_subvalues, "Unknown %d"), DialogueID, size); SendSeqNo = tvb_get_ntohl(tvb, *offset); ti = proto_tree_add_item(service_tree, hf_ged125_SendSeqNo_num, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; if ((DialogueID != SendSeqNo) && ((DialogueID == 0xFFFFFFFF) || (SendSeqNo == 0xFFFFFFFF))) @@ -753,146 +753,146 @@ service_control_dissect(tvbuff_t* tvb,proto_tree* msg_tree, proto_tree* ged125_t tvb, *offset-12, 4, mess_type); data_tree = proto_item_add_subtree(ti, ett_ged125_service_control_data); - switch(mess_type) + switch (mess_type) { case GED125_INIT_SERVICE_CTRL_REQ_VALUE: case GED125_INIT_SERVICE_CTRL_CONF_VALUE: case GED125_INIT_SERVICE_CTRL_END_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; break; case GED125_INIT_SERVICE_CTRL_DATA_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ServiceFeatures, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; break; case GED125_NEW_CALL_VALUE: case GED125_REQUEST_INSTRUCTION_VALUE: proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_TrunkNumber, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_RUN_SCRIPT_REQ_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_RUN_SCRIPT_RESULT_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ResultCode, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_CONNECT_VALUE: proto_tree_add_item(data_tree, hf_ged125_LabelType, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_EVENT_REPORT_VALUE: proto_tree_add_item(data_tree, hf_ged125_EventID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_DIALOGUE_FAILURE_CONF_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ErrorCode, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; break; case GED125_DIALOGUE_FAILURE_EVENT_VALUE: proto_tree_add_item(data_tree, hf_ged125_ErrorCode, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; break; case GED125_INIT_SERVICE_CTRL_TRKGRP_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_TrunkCount, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; trunk_funk(tvb, data_tree, offset, size); break; case GED125_INIT_SERVICE_CTRL_SERVICE_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_AvailableNow, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_CallsInNow, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_CallsOutNow, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; break; case GED125_INIT_SERVICE_CTRL_VRU_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_CurrentTime_num, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_TimeZoneDelta, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; OperationalStatus_funk(tvb, pinfo, data_tree, offset); StatusVariable_funk(tvb, data_tree, offset, size); break; case GED125_TRKGRP_STATUS_VALUE: proto_tree_add_item(data_tree, hf_ged125_TrunkGroupID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_TrunkCount, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; trunk_funk(tvb, data_tree, offset, size); break; case GED125_SERVICE_STATUS_VALUE: proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ServiceAvailable, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; break; case GED125_VRU_STATUS_VALUE: proto_tree_add_item(data_tree, hf_ged125_CurrentTime_num, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_TimeZoneDelta, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; OperationalStatus_funk(tvb, pinfo, data_tree, offset); StatusVariable_funk(tvb, data_tree, offset, size); break; case GED125_CANCEL_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_RequestID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; break; case GED125_RELEASE_VALUE: proto_tree_add_item(data_tree, hf_ged125_Cause_just_for_release_message, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; break; case GED125_NEW_DIALOGUE_VALUE: proto_tree_add_item(data_tree, hf_ged125_CallID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ServiceID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; @@ -908,69 +908,69 @@ service_control_dissect(tvbuff_t* tvb,proto_tree* msg_tree, proto_tree* ged125_t case GED125_MICROAPP_PLAY_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ToBeContinued, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_MICROAPP_PLAY_CONTINUE_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ToBeContinued, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_MICROAPP_COLLECT_DATA_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_DTMF_Termination_Key, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_No_Entry_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Interdigit_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Number_of_No_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Number_of_Invalid_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Min_Length, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Max_Length, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ASR_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_MICROAPP_MENU_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_No_Entry_Timeout, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Number_of_No_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Number_of_Invalid_Entry_Tries, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_DTMF_Menu_Keys, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Barge_In_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_ASR_Allowed, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; case GED125_MICROAPP_RESULT_VALUE: proto_tree_add_item(data_tree, hf_ged125_InvokeID, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; proto_tree_add_item(data_tree, hf_ged125_Microapp_Error_Code, tvb, *offset, 4, ENC_BIG_ENDIAN); - *offset+=4; + *offset += 4; floating_fields(tvb, pinfo, ged125_tree, *offset, size); break; @@ -979,13 +979,13 @@ service_control_dissect(tvbuff_t* tvb,proto_tree* msg_tree, proto_tree* ged125_t } } -static guint +static guint get_ged125_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, gint offset _U_) { return tvb_get_ntohl(tvb, 0) + 8; } -static void +static void dissect_ged125_base_messages(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) { gint size = tvb_reported_length(tvb); @@ -997,8 +997,8 @@ dissect_ged125_base_messages(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree col_set_str(pinfo->cinfo, COL_PROTOCOL, "GED125"); col_clear(pinfo->cinfo, COL_INFO); - col_add_fstr(pinfo->cinfo, COL_INFO, "%s %u bytes", - val_to_str(message_type, base_message_values, "Unknown %d"), size); + col_add_fstr(pinfo->cinfo, COL_INFO, "%s %u bytes", + val_to_str(message_type, base_message_values, "Unknown %d"), size); ti = proto_tree_add_item(tree, proto_ged125, tvb, 0, -1, ENC_NA); ged125_tree = proto_item_add_subtree( ti, ett_ged125); @@ -1017,38 +1017,38 @@ dissect_ged125_base_messages(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree { case GED125_FAILURE_CONF_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_FAILURE_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_OPEN_REQ_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_VersionNumber, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_IdleTimeout, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_OPEN_CONF_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_UseEventFeed, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_UsePolledFeed, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_UseCallRouting, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_UseTimeSynch, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_UseServiceControl, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_HEARTBEAT_REQ_VALUE: @@ -1057,209 +1057,209 @@ dissect_ged125_base_messages(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree case GED125_INIT_DATA_REQ_VALUE: case GED125_INIT_DATA_CONF_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_CLOSE_REQ_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; floating_fields(tvb, pinfo, ged125_tree, offset, size); break; case GED125_INIT_TRKGRP_DATA_EVENT_VALUE: value = tvb_get_ntohl(tvb, offset); ti = proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; if (value > 65535) expert_add_info(pinfo, ti, &ei_ged125_trunk_group_id); value = tvb_get_ntohl(tvb, offset); ti = proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkCount, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; if (value > 1023) expert_add_info(pinfo, ti, &ei_ged125_TrunkCount_invalid); proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_InServiceTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_InUseInboundTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_InUseOutboundTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_AllTrunksInUseTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; trunk_funk(tvb, ged125_message_tree, &offset, size); break; case GED125_INIT_SERVICE_DATA_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_AvailableNow, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInNow, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutNow, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_CallsInToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_CallsOutToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_CallsHandledToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_HandleTimeToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_DivertedInToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_DivertedOutToday, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_INIT_VRU_DATA_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_TimeZoneDelta, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; OperationalStatus_funk(tvb, pinfo, ged125_message_tree, &offset); StatusVariable_funk(tvb, ged125_message_tree, &offset, size); break; - + case GED125_INIT_DATA_END_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_InitDataTime, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_StartOfDay, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_DELIVERED_EVENT_VALUE: case GED125_ORIGINATED_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkGroupID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkNumber, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; floating_fields(tvb, pinfo, ged125_tree, offset, size); break; case GED125_CALL_CLEARED_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_floating_CauseCode, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; floating_fields(tvb, pinfo, ged125_tree, offset, size); break; case GED125_CONFERENCED_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_ConferenceCallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_PrimaryCallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_SecondaryCallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_DIVERTED_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_NewServiceID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_NEW_TRANSACTION_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_NewCallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_SET_CALL_VARIABLES_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; floating_fields(tvb, pinfo, ged125_tree, offset, size); break; case GED125_VRU_STATUS_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CurrentTime_num, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_TimeZoneDelta, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; OperationalStatus_funk(tvb, pinfo, ged125_message_tree, &offset); StatusVariable_funk(tvb, ged125_message_tree, &offset, size); break; case GED125_TRKGRP_STATUS_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkGroupID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; value = tvb_get_ntohl(tvb, offset); ti = proto_tree_add_item(ged125_message_tree, hf_ged125_TrunkCount, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; if (value > 1023) expert_add_info(pinfo, ti, &ei_ged125_TrunkCount_invalid); proto_tree_add_item(ged125_message_tree, hf_ged125_InService, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; trunk_funk_without_status(tvb, ged125_message_tree, &offset, size); break; case GED125_SERVICE_STATUS_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_ServiceAvailable, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_ROUTE_REQUEST_EVENT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CrossRefID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_CallID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; floating_fields(tvb, pinfo, ged125_tree, offset, size); return; case GED125_ROUTE_SELECT_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CrossRefID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_LabelType, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; floating_fields(tvb, pinfo, ged125_tree, offset, size); break; case GED125_ROUTE_END_EVENT_VALUE: case GED125_ROUTE_END_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CrossRefID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_Status, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_TIME_SYNCH_REQ_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; proto_tree_add_item(ged125_message_tree, hf_ged125_VRUTimeLag, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_TIME_SYNCH_CONF_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_InvokeID, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + offset += 4; break; case GED125_SERVICE_CONTROL_VALUE: @@ -1272,7 +1272,7 @@ dissect_ged125_base_messages(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree case GED125_REGISTER_VARIABLES_VALUE: proto_tree_add_item(ged125_message_tree, hf_ged125_CallVarsMask, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; + offset += 2; floating_fields(tvb, pinfo, ged125_tree, offset, size); break; } @@ -1280,15 +1280,15 @@ dissect_ged125_base_messages(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree proto_item_set_len(message_item, offset-8); } -static int +static int dissect_ged125(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) -{ +{ gint size; guint32 message_type; size = tvb_length(tvb); - if(size < 12) + if (size < 12) return 0; message_type = tvb_get_ntohl(tvb, 4); @@ -1306,7 +1306,7 @@ dissect_ged125(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ return size; } -void +void proto_register_ged125 (void) { module_t* ged125_module; @@ -1322,7 +1322,7 @@ proto_register_ged125 (void) { &hf_ged125_service_control_value, { "Sub-Service Control Message value", "ged125.service_control", - FT_UINT32, BASE_DEC, VALS(vals_service_control_message_subvalues), + FT_UINT32, BASE_DEC, VALS(vals_service_control_message_subvalues), 0x0, NULL, HFILL }}, { &hf_ged125_DialogueID_num, @@ -1331,7 +1331,7 @@ proto_register_ged125 (void) { &hf_ged125_SendSeqNo_num, { "SendSeqNo", "ged125.send_seq_no", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC, NULL, 0x0, "Send sequence for the sent message", HFILL }}, { &hf_ged125_CurrentTime_num, @@ -1357,7 +1357,7 @@ proto_register_ged125 (void) { &hf_ged125_InvokeID, { "Invoke ID", "ged125.invoke_id", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC, NULL, 0x0, "Same as the corresponding req. mess", HFILL }}, { &hf_ged125_Status, @@ -1381,18 +1381,18 @@ proto_register_ged125 (void) { &hf_ged125_UseEventFeed, { "Use Event Feed", "ged125.use_event_feed", - FT_BOOLEAN, 32, NULL, 0x01, + FT_BOOLEAN, 32, NULL, 0x01, "Indicates if the VRU supports the Event Data Feed", HFILL }}, /* only valid for ICM version 4 or lower*/ - { &hf_ged125_UsePolledFeed, + { &hf_ged125_UsePolledFeed, { "Use Polled Feed", "ged125.use_polled_feed", - FT_BOOLEAN, 32, NULL, 0x01, + FT_BOOLEAN, 32, NULL, 0x01, "Indicates if the VRU supports the Polled Data Feed.", HFILL }}, { &hf_ged125_UseCallRouting, { "Use Call Routing", "ged125.use_call_routing", - FT_BOOLEAN, 32, NULL, 0x01, + FT_BOOLEAN, 32, NULL, 0x01, "Indicates if the VRU supports the Call Routing Interface", HFILL }}, { &hf_ged125_UseTimeSynch, @@ -1418,7 +1418,7 @@ proto_register_ged125 (void) { &hf_ged125_CallsInToday, { "Calls In Today", "ged125.calls_in_today", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC, NULL, 0x0, "The cumulative number of inbound calls that have arrived on the trunk group this day", HFILL }}, { &hf_ged125_CallsOutToday, @@ -1428,13 +1428,13 @@ proto_register_ged125 (void) { &hf_ged125_InServiceTimeToday, { "In Service Time Today", "ged125.in_service_time_today", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC, NULL, 0x0, "The cumulative amount of time (sec) that trunks in the trunk group " "have been in service this day", HFILL }}, { &hf_ged125_InUseInboundTimeToday, { "In Use Inbound Time Today", "ged125.in_use_inbound_time_today", - FT_UINT32, BASE_DEC,NULL, 0x0, + FT_UINT32, BASE_DEC,NULL, 0x0, "The cumulative amount of time (sec) that trunks in the trunk group " "have been in use on incoming calls this day", HFILL }}, @@ -1445,8 +1445,8 @@ proto_register_ged125 (void) "have been in use on outgoing calls this day", HFILL }}, { &hf_ged125_AllTrunksInUseTimeToday, - { "All Trunks In Use Time Today", "ged125.all_trunks_in_use_time_today", - FT_UINT32, BASE_DEC, NULL, 0x0, + { "All Trunks In Use Time Today", "ged125.all_trunks_in_use_time_today", + FT_UINT32, BASE_DEC, NULL, 0x0, "The cumulative amount of time (sec) that all trunks in the trunk group " "were simultaneously busy this day", HFILL }}, @@ -1460,17 +1460,17 @@ proto_register_ged125 (void) { &hf_ged125_ServiceID, { "Service ID", "ged125.service_id", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC, NULL, 0x0, "An ID assigned by the VRU to this service", HFILL }}, { &hf_ged125_AvailableNow, { "Available Now", "ged125.available_now", - FT_BOOLEAN, 32, NULL, 0x01, + FT_BOOLEAN, 32, NULL, 0x01, "Current availability of the service", HFILL }}, { &hf_ged125_CallsInNow, { "Call In Now", "ged125.call_in_now", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC, NULL, 0x0, "The number of inbound calls currently in progress on the service.", HFILL }}, { &hf_ged125_CallsOutNow, @@ -1572,7 +1572,7 @@ proto_register_ged125 (void) { &hf_ged125_ServiceAvailable, { "Service Available", "ged125.service_available", - FT_BOOLEAN, 32, NULL, 0x01, + FT_BOOLEAN, 32, NULL, 0x01, NULL, HFILL }}, { &hf_ged125_RequestID, @@ -1592,7 +1592,7 @@ proto_register_ged125 (void) { &hf_ged125_floating_cause_code,/* table 34*/ { "Call Cleared Code", "ged125.call_cleared_code", - FT_UINT32, BASE_DEC,VALS(vals_status_code_call_cleared), 0x0, + FT_UINT32, BASE_DEC,VALS(vals_status_code_call_cleared), 0x0, "Termination Call Details", HFILL }}, { &hf_ged125_DTMF_Termination_Key, @@ -1619,14 +1619,14 @@ proto_register_ged125 (void) "doesn't enter any data", HFILL }}, { &hf_ged125_Number_of_Invalid_Entry_Tries, - { "Number of Invalid Entry Tries", "ged125.number_of_invalid_entry_tries", + { "Number of Invalid Entry Tries", "ged125.number_of_invalid_entry_tries", FT_UINT32, BASE_DEC, NULL, 0x0, "Number of times VRU should repeat the 'Get data' cycle when the " "caller enters invalid data", HFILL }}, { &hf_ged125_Min_Length, { "Min Length of Digits", "ged125.min_length", - FT_UINT32, BASE_DEC, NULL, 0x0, + FT_UINT32, BASE_DEC, NULL, 0x0, "Minimum number of digits expected from the caller", HFILL }}, { &hf_ged125_Max_Length, @@ -1646,7 +1646,7 @@ proto_register_ged125 (void) { &hf_ged125_Microapp_Error_Code, { "Microapp Error Code", "ged125.microapp_error_code", - FT_UINT32, BASE_DEC, + FT_UINT32, BASE_DEC, VALS(status_code_microcapp_error_codes), 0x0, NULL, HFILL }}, { &hf_ged125_ConferenceCallID, @@ -1678,7 +1678,7 @@ proto_register_ged125 (void) FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ged125_CrossRefID, - { "Cross Reference ID", "ged125.cross_ref_id", + { "Cross Reference ID", "ged125.cross_ref_id", FT_UINT32, BASE_DEC, NULL, 0x0, "A cross-reference identifier assigned by the VRU to this call routing dialogue", HFILL }}, @@ -1699,7 +1699,7 @@ proto_register_ged125 (void) { &hf_ged125_floating_media_protocol, { "Media Protocol", "ged125.media_protocol", - FT_UINT8, BASE_DEC, VALS(floating_media_protocol_vals), 0x0, + FT_UINT8, BASE_DEC, VALS(floating_media_protocol_vals), 0x0, "Type of media", HFILL }}, { &hf_ged125_floating_library_designator, @@ -1769,17 +1769,17 @@ proto_register_ged125 (void) &ged125_desegment_body); } -void +void proto_reg_handoff_ged125(void) { static guint old_ged125_tcp_port = 0; /* Register TCP port for dissection */ - if(old_ged125_tcp_port != 0 && old_ged125_tcp_port != global_tcp_port_ged125) + if (old_ged125_tcp_port != 0 && old_ged125_tcp_port != global_tcp_port_ged125) dissector_delete_uint("tcp.port", old_ged125_tcp_port, ged125_handle); - if(global_tcp_port_ged125 != 0 && old_ged125_tcp_port != global_tcp_port_ged125) + if (global_tcp_port_ged125 != 0 && old_ged125_tcp_port != global_tcp_port_ged125) dissector_add_uint("tcp.port", global_tcp_port_ged125, ged125_handle); old_ged125_tcp_port = global_tcp_port_ged125; diff --git a/epan/dissectors/packet-giop.h b/epan/dissectors/packet-giop.h index 12be4794ee..9c2dfc9c25 100644 --- a/epan/dissectors/packet-giop.h +++ b/epan/dissectors/packet-giop.h @@ -173,7 +173,7 @@ extern void delete_giop_user_module(giop_sub_dissector_t *sub, gchar *name, */ WS_DLL_PUBLIC void get_CDR_any(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, - gint *offset, gboolean stream_is_big_endian, + gint *offset, gboolean stream_is_big_endian, int boundary, MessageHeader * header); @@ -260,7 +260,7 @@ WS_DLL_PUBLIC guint32 get_CDR_enum(tvbuff_t *tvb, int *offset, * */ -WS_DLL_PUBLIC void get_CDR_fixed(tvbuff_t *tvb, packet_info *pinfo, proto_item *item, +WS_DLL_PUBLIC void get_CDR_fixed(tvbuff_t *tvb, packet_info *pinfo, proto_item *item, gchar **seq, gint *offset, guint32 digits, gint32 scale); diff --git a/epan/dissectors/packet-gmr1_rr.c b/epan/dissectors/packet-gmr1_rr.c index 4f51e069eb..215621b9b0 100644 --- a/epan/dissectors/packet-gmr1_rr.c +++ b/epan/dissectors/packet-gmr1_rr.c @@ -149,7 +149,7 @@ static const value_string gmr1_ie_rr_strings[] = { "Packet Frequency Parameters" }, /* [3] 11.5.2.106 */ { GMR1_IE_RR_PKT_IMM_ASS_2_PRM, "Packet Imm. Ass. Type 2 Params" }, /* [3] 11.5.2.107 */ - { GMR1_IE_RR_USF, + { GMR1_IE_RR_USF, "USF" }, /* [3] 11.5.2.110 */ { GMR1_IE_RR_TIMING_ADV_IDX, "Timing Advance Index" }, /* [3] 10.1.18.3.4 */ diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c index 1e363cc33b..72bd089c46 100644 --- a/epan/dissectors/packet-gsm_a_common.c +++ b/epan/dissectors/packet-gsm_a_common.c @@ -2247,7 +2247,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin digit_str); if (sccp_assoc && ! sccp_assoc->calling_party) { - sccp_assoc->calling_party = wmem_strdup_printf(wmem_file_scope(), + sccp_assoc->calling_party = wmem_strdup_printf(wmem_file_scope(), ((oct & 0x07) == 3) ? "IMEISV: %s" : "IMSI: %s", digit_str ); } diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h index 6273bd3d75..137105c72a 100644 --- a/epan/dissectors/packet-gsm_a_common.h +++ b/epan/dissectors/packet-gsm_a_common.h @@ -211,7 +211,7 @@ extern const char* get_gsm_a_msg_string(int pdu_type, int idx); #define IS_UPLINK_UNKNOWN 2 /* Defines for handling half octet mandatory V IEs - * Named LEFT and RIGHT (as displayed) because the GSM definitions and our internal representation + * Named LEFT and RIGHT (as displayed) because the GSM definitions and our internal representation * have the bits numbered in opposite senses */ #define LEFT_NIBBLE (2) @@ -400,7 +400,7 @@ WS_DLL_PUBLIC guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo /* * Short Value (V_SHORT) element dissector * - * nibble used in this functions to indicate left or right nibble of the octet + * nibble used in this functions to indicate left or right nibble of the octet * This is expected to be used right nibble first, as the tables of 24.008. */ WS_DLL_PUBLIC guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint32 nibble); @@ -700,7 +700,7 @@ guint16 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pi guint16 de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); - + WS_DLL_PUBLIC guint16 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c index b139a186fc..d0f5ac67cf 100644 --- a/epan/dissectors/packet-gsm_a_dtap.c +++ b/epan/dissectors/packet-gsm_a_dtap.c @@ -4568,7 +4568,7 @@ dtap_mm_cm_reestab_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL); ELEM_OPT_TV(0x13, GSM_A_PDU_TYPE_COMMON, DE_LAI, NULL); - + ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL); diff --git a/epan/dissectors/packet-gsm_a_rp.c b/epan/dissectors/packet-gsm_a_rp.c index 67590aa47a..a11e009c75 100644 --- a/epan/dissectors/packet-gsm_a_rp.c +++ b/epan/dissectors/packet-gsm_a_rp.c @@ -539,7 +539,7 @@ proto_register_gsm_a_rp(void) gint *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_RP_MSG + NUM_GSM_RP_ELEM]; - + ett[0] = &ett_rp_msg; last_offset = NUM_INDIVIDUAL_ELEMS; diff --git a/epan/dissectors/packet-gsm_rlcmac.c b/epan/dissectors/packet-gsm_rlcmac.c index 42f7f0c659..da6415e726 100644 --- a/epan/dissectors/packet-gsm_rlcmac.c +++ b/epan/dissectors/packet-gsm_rlcmac.c @@ -6251,39 +6251,39 @@ static const value_string dl_rlc_message_type_vals[] = { {0x0C, "PACKET_NEIGHBOUR_CELL_DATA"}, {0x0D, "PACKET_SERVING_CELL_DATA"}, {0x0E, "Invalid Message Type"}, - {0x0F, "Invalid Message Type"}, - {0x10, "Invalid Message Type"}, - {0x11, "Invalid Message Type"}, - {0x12, "Invalid Message Type"}, - {0x13, "Invalid Message Type"}, - {0x14, "Invalid Message Type"}, + {0x0F, "Invalid Message Type"}, + {0x10, "Invalid Message Type"}, + {0x11, "Invalid Message Type"}, + {0x12, "Invalid Message Type"}, + {0x13, "Invalid Message Type"}, + {0x14, "Invalid Message Type"}, {0x15, "PACKET_HANDOVER_COMMAND"}, {0x16, "PACKET_PHYSICAL_INFORMATION"}, - {0x17, "Invalid Message Type"}, - {0x18, "Invalid Message Type"}, - {0x19, "Invalid Message Type"}, - {0x1A, "Invalid Message Type"}, - {0x1B, "Invalid Message Type"}, - {0x1C, "Invalid Message Type"}, - {0x1D, "Invalid Message Type"}, - {0x1E, "Invalid Message Type"}, - {0x1F, "Invalid Message Type"}, - {0x20, "Invalid Message Type"}, + {0x17, "Invalid Message Type"}, + {0x18, "Invalid Message Type"}, + {0x19, "Invalid Message Type"}, + {0x1A, "Invalid Message Type"}, + {0x1B, "Invalid Message Type"}, + {0x1C, "Invalid Message Type"}, + {0x1D, "Invalid Message Type"}, + {0x1E, "Invalid Message Type"}, + {0x1F, "Invalid Message Type"}, + {0x20, "Invalid Message Type"}, {0x21, "PACKET_ACCESS_REJECT"}, {0x22, "PACKET_PAGING_REQUEST"}, {0x23, "PACKET_PDCH_RELEASE"}, {0x24, "PACKET_PRACH_PARAMETERS"}, {0x25, "PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK"}, - {0x26, "Invalid Message Type"}, - {0x27, "Invalid Message Type"}, - {0x28, "Invalid Message Type"}, - {0x29, "Invalid Message Type"}, - {0x2A, "Invalid Message Type"}, - {0x2B, "Invalid Message Type"}, - {0x2C, "Invalid Message Type"}, - {0x2D, "Invalid Message Type"}, - {0x2E, "Invalid Message Type"}, - {0x2F, "Invalid Message Type"}, + {0x26, "Invalid Message Type"}, + {0x27, "Invalid Message Type"}, + {0x28, "Invalid Message Type"}, + {0x29, "Invalid Message Type"}, + {0x2A, "Invalid Message Type"}, + {0x2B, "Invalid Message Type"}, + {0x2C, "Invalid Message Type"}, + {0x2D, "Invalid Message Type"}, + {0x2E, "Invalid Message Type"}, + {0x2F, "Invalid Message Type"}, {0x30, "PACKET_SYSTEM_INFO_6"}, {0x31, "PACKET_SYSTEM_INFO_1"}, {0x32, "PACKET_SYSTEM_INFO_2"}, @@ -6295,7 +6295,7 @@ static const value_string dl_rlc_message_type_vals[] = { {0x38, "PACKET_SYSTEM_INFO_7"}, {0x39, "PACKET_SYSTEM_INFO_8"}, {0x3A, "PACKET_SYSTEM_INFO_14"}, - {0x3B, "Invalid Message Type"}, + {0x3B, "Invalid Message Type"}, {0x3C, "PACKET_SYSTEM_INFO_3_TER"}, {0x3D, "PACKET_SYSTEM_INFO_3_QUATER"}, {0x3E, "PACKET_SYSTEM_INFO_15"}, @@ -7415,7 +7415,7 @@ dissect_egprs_dl_header_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre break; } ((RlcMacPrivateData_t *)(pinfo->private_data))->u.egprs_dl_header_info.bsn1 = data->u.DL_Data_Block_EGPRS_Header.BSN1; - ((RlcMacPrivateData_t *)(pinfo->private_data))->u.egprs_dl_header_info.bsn2 = + ((RlcMacPrivateData_t *)(pinfo->private_data))->u.egprs_dl_header_info.bsn2 = (data->u.DL_Data_Block_EGPRS_Header.BSN1 + data->u.DL_Data_Block_EGPRS_Header.BSN2_offset) % 2048; } } @@ -7589,7 +7589,7 @@ dissect_egprs_ul_header_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre ((RlcMacPrivateData_t *)(pinfo->private_data))->u.egprs_ul_header_info.pi = data->u.UL_Data_Block_EGPRS_Header.PI; ((RlcMacPrivateData_t *)(pinfo->private_data))->u.egprs_ul_header_info.bsn1 = data->u.UL_Data_Block_EGPRS_Header.BSN1; - ((RlcMacPrivateData_t *)(pinfo->private_data))->u.egprs_ul_header_info.bsn2 = + ((RlcMacPrivateData_t *)(pinfo->private_data))->u.egprs_ul_header_info.bsn2 = (data->u.UL_Data_Block_EGPRS_Header.BSN1 + data->u.UL_Data_Block_EGPRS_Header.BSN2_offset) % 2048; } } diff --git a/epan/dissectors/packet-gssapi.h b/epan/dissectors/packet-gssapi.h index d0a27e044a..413e8bb2f3 100644 --- a/epan/dissectors/packet-gssapi.h +++ b/epan/dissectors/packet-gssapi.h @@ -45,14 +45,14 @@ gssapi_init_oid(const char *oid, int proto, int ett, dissector_handle_t handle, gssapi_oid_value * gssapi_lookup_oid_str(const gchar *oid_key); -int wrap_dissect_gssapi_verf(tvbuff_t *tvb, int offset, - packet_info *pinfo, +int wrap_dissect_gssapi_verf(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, guint8 *drep); -tvbuff_t *wrap_dissect_gssapi_payload(tvbuff_t *data_tvb, +tvbuff_t *wrap_dissect_gssapi_payload(tvbuff_t *data_tvb, tvbuff_t *auth_tvb, int offset, - packet_info *pinfo, + packet_info *pinfo, dcerpc_auth_info *auth_info); #endif /* __PACKET_GSSAPI_H */ diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index 0fae98c641..9685f964c9 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -4507,8 +4507,8 @@ decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const gchar * qos if(length > 13 ||((type == 2) && (length == 13))) { proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_src_stat_desc, tvb, offset + (12 - 1) * utf8_type + 1, utf8_type, src_stat_desc); proto_tree_add_boolean(ext_tree_qos, hf_gtp_qos_sig_ind, tvb, offset + (12 - 1) * utf8_type + 1, utf8_type, sig_ind); - } - + } + if(length > 14) { /* Octet 15 */ if ((max_dl_ext > 0) && (max_dl_ext <= 0x4a)) { @@ -7865,7 +7865,7 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) /* Setting the TEID to -1 to say that the TEID is not valid for this packet */ gtp_hdr->teid = -1; - + col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP"); col_clear(pinfo->cinfo, COL_INFO); @@ -7894,7 +7894,7 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) } pd_save = pinfo->private_data; pinfo->private_data = gtp_info; - + gtp_hdr->flags = tvb_get_guint8(tvb, offset); if (!(gtp_hdr->flags & 0x10)){ @@ -7980,12 +7980,12 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) } offset++; - gtp_hdr->length = tvb_get_ntohs(tvb, offset); + gtp_hdr->length = tvb_get_ntohs(tvb, offset); if (tree) { proto_tree_add_uint(gtp_tree, hf_gtp_length, tvb, 2, 2, gtp_hdr->length); } offset += 2; - + if (gtp_prime) { seq_no = tvb_get_ntohs(tvb, offset); proto_tree_add_uint(gtp_tree, hf_gtp_seq_number, tvb, offset, 2, seq_no); @@ -8117,7 +8117,7 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) * therefore the Length field has value 1" */ if (ext_hdr_length == 1) { - /* UDP Port of source */ + /* UDP Port of source */ proto_tree_add_item(ext_tree, hf_gtp_ext_hdr_udp_port, tvb, offset, 2, ENC_BIG_ENDIAN); } else { /* Bad length */ @@ -8235,7 +8235,7 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) call_dissector(sync_handle, next_tvb, pinfo, tree); col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "GTP <"); col_append_str(pinfo->cinfo, COL_PROTOCOL, ">"); - } + } pinfo->private_data = pd_save; tap_queue_packet(gtpv1_tap,pinfo, gtp_hdr); diff --git a/epan/dissectors/packet-gtp.h b/epan/dissectors/packet-gtp.h index 81577f19c8..0a8563c5e7 100644 --- a/epan/dissectors/packet-gtp.h +++ b/epan/dissectors/packet-gtp.h @@ -35,7 +35,7 @@ typedef struct gtp_msg_hash_entry { typedef struct _gtp_hdr { - guint8 flags; /* GTP header flags */ + guint8 flags; /* GTP header flags */ guint8 message; /* Message type */ guint16 length; /* Length of header */ gint64 teid; /* Tunnel End-point ID */ @@ -50,7 +50,7 @@ typedef struct _gtp_hdr { #define GTP_MSG_NODE_ALIVE_RESP 0x05 #define GTP_MSG_REDIR_REQ 0x06 #define GTP_MSG_REDIR_RESP 0x07 -/* +/* * 8-15 For future use. Shall not be sent. If received, * shall be treated as an Unknown message. */ diff --git a/epan/dissectors/packet-h248_10.c b/epan/dissectors/packet-h248_10.c index 37d2722c96..2bc3c62dab 100644 --- a/epan/dissectors/packet-h248_10.c +++ b/epan/dissectors/packet-h248_10.c @@ -75,12 +75,12 @@ static const h248_package_t h248_pkg_CHP = { 0x0029, &proto_h248_CHP, &ett_h248_CHP, - + h248_CHP_prop_vals, NULL, h248_CHP_events_vals, NULL, - + NULL, NULL, h248_CHP_mgcon_events, @@ -91,9 +91,9 @@ void proto_register_h248_dot10(void) { static hf_register_info hf[] = { /* H.248.1 E.1 Generic Package */ { &hf_h248_CHP_mgcon, { "MGCon", "h248.chp.mgcon", FT_BYTES, BASE_NONE, NULL, 0, "This event occurs when the MG requires that the MGC start or finish load reduction.", HFILL }}, - { &hf_h248_CHP_mgcon_reduction, { "Reduction", "h248.chp.mgcon.reduction", FT_UINT32, BASE_DEC, NULL, 0, "Percentage of the load that the MGC is requested to block", HFILL }}, + { &hf_h248_CHP_mgcon_reduction, { "Reduction", "h248.chp.mgcon.reduction", FT_UINT32, BASE_DEC, NULL, 0, "Percentage of the load that the MGC is requested to block", HFILL }}, }; - + static gint *ett[] = { &ett_h248_CHP, &ett_h248_CHP_mgcon, @@ -104,7 +104,7 @@ void proto_register_h248_dot10(void) { proto_register_field_array(proto_h248_CHP, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - + h248_register_package(&h248_pkg_CHP,REPLACE_PKG); } diff --git a/epan/dissectors/packet-h248_7.c b/epan/dissectors/packet-h248_7.c index b3ab9d4598..2e12f0377a 100644 --- a/epan/dissectors/packet-h248_7.c +++ b/epan/dissectors/packet-h248_7.c @@ -144,21 +144,21 @@ void proto_register_h248_7(void) { static hf_register_info hf[] = { { &hf_h248_an_apf, { "Fixed Announcement Play", "h248.an.apf", FT_BYTES, BASE_NONE, NULL, 0, "Initiates the play of a fixed announcement", HFILL }}, { &hf_h248_an_apf_an, { "Announcement name", "h248.an.apf.an", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_h248_an_apf_noc, { "Number of cycles", "h248.an.apf.noc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, + { &hf_h248_an_apf_noc, { "Number of cycles", "h248.an.apf.noc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, { &hf_h248_an_apf_av, { "Announcement Variant", "h248.an.apf.av", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_h248_an_apf_di, {"Announcement Direction","h248.an.apf.di",FT_UINT32, BASE_HEX, VALS(h248_an_di_vals), 0, NULL, HFILL}}, { &hf_h248_an_apv, { "Fixed Announcement Play", "h248.an.apv", FT_BYTES, BASE_NONE, NULL, 0, "Initiates the play of a fixed announcement", HFILL }}, { &hf_h248_an_apv_an, { "Announcement name", "h248.an.apv.an", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_h248_an_apv_noc, { "Number of cycles", "h248.an.apv.noc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, + { &hf_h248_an_apv_noc, { "Number of cycles", "h248.an.apv.noc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, { &hf_h248_an_apv_av, { "Announcement Variant", "h248.an.apv.av", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_h248_an_apv_num, { "Number", "h248.an.apv.num", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_h248_an_apv_spi, { "Specific parameters interpretation", "h248.an.apv.spi", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_h248_an_apv_sp, { "Specific parameters", "h248.an.apv.sp", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, + { &hf_h248_an_apv_num, { "Number", "h248.an.apv.num", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, + { &hf_h248_an_apv_spi, { "Specific parameters interpretation", "h248.an.apv.spi", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, + { &hf_h248_an_apv_sp, { "Specific parameters", "h248.an.apv.sp", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_h248_an_apv_di, {"Announcement Direction","h248.an.apv.di",FT_UINT32, BASE_HEX, VALS(h248_an_di_vals), 0, NULL, HFILL}} - + }; - + static gint *ett[] = { &ett_h248_an, &ett_h248_an_apf, @@ -170,7 +170,7 @@ void proto_register_h248_7(void) { proto_register_field_array(proto_h248_an, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - + h248_register_package(&h248_pkg_an,REPLACE_PKG); } diff --git a/epan/dissectors/packet-h248_q1950.c b/epan/dissectors/packet-h248_q1950.c index a9c202b8f6..b62b910448 100644 --- a/epan/dissectors/packet-h248_q1950.c +++ b/epan/dissectors/packet-h248_q1950.c @@ -416,7 +416,7 @@ static const value_string h248_pkg_bcg_signals_vals[] = { { 0x0049, "Pay Tone (bpy)" }, { 0, NULL } }; - + static h248_pkg_sig_t h248_pkg_bcg_signals[] = { /* All the tones have the same parameters */ { 0x0040, &hf_h248_pkg_bcg_sig_bdt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, diff --git a/epan/dissectors/packet-h264.h b/epan/dissectors/packet-h264.h index 7f4d46afe3..57ee101280 100644 --- a/epan/dissectors/packet-h264.h +++ b/epan/dissectors/packet-h264.h @@ -7,17 +7,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/epan/dissectors/packet-hp-erm.c b/epan/dissectors/packet-hp-erm.c index 10d2f0b6d3..5540dbf24e 100644 --- a/epan/dissectors/packet-hp-erm.c +++ b/epan/dissectors/packet-hp-erm.c @@ -39,7 +39,7 @@ * of the UDP packet consists of a 12 byte "header" followed by the * bytes of the mirrored frame. * - * After some additional tests, which involved injecting 802.1Q frames with + * After some additional tests, which involved injecting 802.1Q frames with * different priorities and VLAN identifiers. It was determined that the HP * ERM header has a part inside its header that closely resembles the 802.1Q * header. The only difference is the priority numbering. diff --git a/epan/dissectors/packet-hpfeeds.c b/epan/dissectors/packet-hpfeeds.c index 22acc381ca..be22bfee25 100644 --- a/epan/dissectors/packet-hpfeeds.c +++ b/epan/dissectors/packet-hpfeeds.c @@ -47,9 +47,9 @@ static int hf_hpfeeds_opcode = -1; static int hf_hpfeeds_msg_length = -1; static int hf_hpfeeds_nonce = -1; static int hf_hpfeeds_secret = -1; -static int hf_hpfeeds_payload = -1; -static int hf_hpfeeds_server_len = -1; -static int hf_hpfeeds_server = -1; +static int hf_hpfeeds_payload = -1; +static int hf_hpfeeds_server_len = -1; +static int hf_hpfeeds_server = -1; static int hf_hpfeeds_ident_len = -1; static int hf_hpfeeds_ident = -1; static int hf_hpfeeds_channel = -1; @@ -99,7 +99,7 @@ static const value_string opcode_vals[] = { }; /* -* +* * These values are the channel used by "most" spread and used honeypots * In case we have publish message in one of these channel we can decode * payload completely @@ -123,7 +123,7 @@ static void dissect_hpfeeds_error_pdu(tvbuff_t *tvb, proto_tree *tree, guint offset) { proto_tree_add_item(tree, hf_hpfeeds_errmsg, tvb, offset, -1, ENC_BIG_ENDIAN); -} +} static void dissect_hpfeeds_info_pdu(tvbuff_t *tvb, proto_tree *tree, guint offset) @@ -137,7 +137,7 @@ dissect_hpfeeds_info_pdu(tvbuff_t *tvb, proto_tree *tree, guint offset) /* don't move the offset yet as we need to get data after this operation */ strptr = tvb_get_string(wmem_packet_scope(), tvb, offset + 1, len); ti = proto_tree_add_text(tree, tvb, offset, -1, "Broker: %s", strptr); - data_subtree = proto_item_add_subtree(ti, ett_hpfeeds); + data_subtree = proto_item_add_subtree(ti, ett_hpfeeds); proto_tree_add_item(data_subtree, hf_hpfeeds_server_len, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -145,8 +145,8 @@ dissect_hpfeeds_info_pdu(tvbuff_t *tvb, proto_tree *tree, guint offset) proto_tree_add_item(data_subtree, hf_hpfeeds_server, tvb, offset, len, ENC_BIG_ENDIAN); - offset += len; - + offset += len; + proto_tree_add_item(data_subtree, hf_hpfeeds_nonce, tvb, offset, -1, ENC_BIG_ENDIAN); } @@ -155,15 +155,15 @@ static void dissect_hpfeeds_auth_pdu(tvbuff_t *tvb, proto_tree *tree, guint offset) { guint8 len = 0; - + len = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_hpfeeds_ident_len, tvb, + proto_tree_add_item(tree, hf_hpfeeds_ident_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(tree, hf_hpfeeds_ident, tvb, + proto_tree_add_item(tree, hf_hpfeeds_ident, tvb, offset, len, ENC_BIG_ENDIAN); - offset += len; - + offset += len; + proto_tree_add_item(tree, hf_hpfeeds_secret, tvb, offset, -1, ENC_BIG_ENDIAN); } @@ -175,7 +175,7 @@ dissect_hpfeeds_publish_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 len = 0; guint8 *strptr = NULL; gint8 channel = CH_EINVAL; - tvbuff_t *json_tvb = NULL; + tvbuff_t *json_tvb = NULL; len = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_hpfeeds_ident_len, tvb, offset, 1, @@ -183,14 +183,14 @@ dissect_hpfeeds_publish_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offset += 1; proto_tree_add_item(tree, hf_hpfeeds_ident, tvb, offset, len, ENC_BIG_ENDIAN); - offset += len; + offset += len; len = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_hpfeeds_chan_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - - /* get the channel name as ephemeral string just to make an attempt - * in order to decode more payload if channel is "well known" + + /* get the channel name as ephemeral string just to make an attempt + * in order to decode more payload if channel is "well known" */ strptr = tvb_get_string(wmem_packet_scope(), tvb, offset, len); proto_tree_add_item(tree, hf_hpfeeds_channel, tvb, offset, len, @@ -215,7 +215,7 @@ dissect_hpfeeds_publish_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ENC_NA); break; } - + } @@ -223,7 +223,7 @@ static void dissect_hpfeeds_subscribe_pdu(tvbuff_t *tvb, proto_tree *tree, guint offset) { guint8 len = 0; - /* get length of ident field */ + /* get length of ident field */ len = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_hpfeeds_ident_len, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -257,7 +257,7 @@ dissect_hpfeeds_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint8 opcode; proto_item *ti; proto_tree *data_subtree; - + /* Get opcode and write it */ opcode = tvb_get_guint8(tvb, offset); @@ -267,7 +267,7 @@ dissect_hpfeeds_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_add_fstr(pinfo->cinfo, COL_INFO, "Type %s", val_to_str(opcode, opcode_vals, "Unknown (0x%02x)")); - ti = proto_tree_add_item(tree, hf_hpfeeds_opcode, tvb, offset, + ti = proto_tree_add_item(tree, hf_hpfeeds_opcode, tvb, offset, 1, ENC_BIG_ENDIAN); data_subtree = proto_item_add_subtree(ti, ett_hpfeeds); offset += 1; @@ -300,7 +300,7 @@ dissect_hpfeeds_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } -static void +static void dissect_hpfeeds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { guint msglen = 0; @@ -314,14 +314,14 @@ dissect_hpfeeds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* get message length in order to decide if we need to reassemble packet */ msglen = tvb_get_ntohl(tvb, offset); - - /* Retrieve header data */ + + /* Retrieve header data */ if (tree) { ti = proto_tree_add_item(tree, proto_hpfeeds, tvb, 0, -1, ENC_NA); hpfeeds_tree = proto_item_add_subtree(ti, ett_hpfeeds); - proto_tree_add_item(hpfeeds_tree, hf_hpfeeds_msg_length, tvb, offset, + proto_tree_add_item(hpfeeds_tree, hf_hpfeeds_msg_length, tvb, offset, 4, ENC_BIG_ENDIAN); - } + } if (tvb_reported_length(tvb) < msglen) { /* we need to reassemble */ @@ -335,7 +335,7 @@ void proto_register_hpfeeds(void) { static hf_register_info hf[] = { - + { &hf_hpfeeds_opcode, { "Opcode", "hpfeeds.opcode", FT_UINT8, BASE_DEC_HEX, @@ -442,7 +442,7 @@ proto_register_hpfeeds(void) "To use this option, you must also enable \"Allow subdissectors to " "reassemble TCP streams\" in the TCP protocol settings.", &hpfeeds_desegment); - + prefs_register_uint_preference(hpfeeds_module, "dissector_port", "Dissector TCP port", @@ -456,7 +456,7 @@ proto_reg_handoff_hpfeeds(void) static dissector_handle_t hpfeeds_handle; static gboolean hpfeeds_prefs_initialized = FALSE; static gint16 hpfeeds_dissector_port; - + if (!hpfeeds_prefs_initialized) { hpfeeds_handle = create_dissector_handle(dissect_hpfeeds, proto_hpfeeds); hpfeeds_prefs_initialized = TRUE; @@ -468,7 +468,7 @@ proto_reg_handoff_hpfeeds(void) hpfeeds_dissector_port = hpfeeds_port_pref; dissector_add_uint("tcp.port", hpfeeds_dissector_port, hpfeeds_handle); - + json_hdl = find_dissector("json"); } diff --git a/epan/dissectors/packet-http-urlencoded.c b/epan/dissectors/packet-http-urlencoded.c index ad35cc4298..c4fea32689 100644 --- a/epan/dissectors/packet-http-urlencoded.c +++ b/epan/dissectors/packet-http-urlencoded.c @@ -111,7 +111,7 @@ get_form_key_value(tvbuff_t *tvb, char **ptr, int offset, char stop) if (ch == '%') { guint8 ch1, ch2; - + offset++; ch1 = tvb_get_guint8(tvb, offset); @@ -122,7 +122,7 @@ get_form_key_value(tvbuff_t *tvb, char **ptr, int offset, char stop) } else if (ch == '+') tmp[len] = ' '; - else + else tmp[len] = ch; len++; diff --git a/epan/dissectors/packet-i2c.c b/epan/dissectors/packet-i2c.c index b3339a60f9..94ed0e1825 100644 --- a/epan/dissectors/packet-i2c.c +++ b/epan/dissectors/packet-i2c.c @@ -227,7 +227,7 @@ dissect_i2c(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_protocol_format(tree, proto_i2c, tvb, 0, -1, "Inter-Integrated Circuit (%s)", is_event ? "Event" : "Data"); - + i2c_tree = proto_item_add_subtree(ti, ett_i2c); proto_tree_add_uint_format(i2c_tree, hf_i2c_bus, tvb, 0, 0, bus, "Bus: I2C-%d", bus); diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c index 4dec4e67a5..6da5e20d93 100644 --- a/epan/dissectors/packet-iax2.c +++ b/epan/dissectors/packet-iax2.c @@ -741,8 +741,8 @@ static void iax_init_hash( void ) * transferred. * */ -static circuit_t *iax2_new_circuit_for_call(packet_info *pinfo, proto_item * item, - guint circuit_id, guint framenum, +static circuit_t *iax2_new_circuit_for_call(packet_info *pinfo, proto_item * item, + guint circuit_id, guint framenum, iax_call_data *iax_call, gboolean reversed) { circuit_t *res; @@ -852,7 +852,7 @@ static iax_call_data *iax_lookup_call_from_dest(packet_info *pinfo, proto_item * g_debug("++ done"); #endif } else if (!is_reverse_circuit(src_circuit_id, iax_call)) { - expert_add_info_format(pinfo, item, &ei_iax_circuit_id_conflict, + expert_add_info_format(pinfo, item, &ei_iax_circuit_id_conflict, "IAX Packet %u from circuit ids %u->%u conflicts with earlier call with circuit ids %u->%u", framenum, src_circuit_id, dst_circuit_id, @@ -868,7 +868,7 @@ static iax_call_data *iax_lookup_call_from_dest(packet_info *pinfo, proto_item * reversed = FALSE; if (!is_forward_circuit(src_circuit_id, iax_call)) { - expert_add_info_format(pinfo, item, &ei_iax_circuit_id_conflict, + expert_add_info_format(pinfo, item, &ei_iax_circuit_id_conflict, "IAX Packet %u from circuit ids %u->%u conflicts with earlier call with circuit ids %u->%u", framenum, src_circuit_id, dst_circuit_id, diff --git a/epan/dissectors/packet-iax2.h b/epan/dissectors/packet-iax2.h index 9cfd978d67..9333552075 100644 --- a/epan/dissectors/packet-iax2.h +++ b/epan/dissectors/packet-iax2.h @@ -13,17 +13,17 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - + #ifndef _PACKET_IAX2_H #define _PACKET_IAX2_H diff --git a/epan/dissectors/packet-icep.c b/epan/dissectors/packet-icep.c index d7dcf55651..bd65d3a1b0 100644 --- a/epan/dissectors/packet-icep.c +++ b/epan/dissectors/packet-icep.c @@ -66,10 +66,10 @@ /* fixed values taken from the standard */ static const guint8 icep_magic[] = { 'I', 'c', 'e', 'P' }; -#define ICEP_HEADER_SIZE 14 -#define ICEP_MIN_REPLY_SIZE 5 -#define ICEP_MIN_PARAMS_SIZE 6 -#define ICEP_MIN_COMMON_REQ_HEADER_SIZE 13 +#define ICEP_HEADER_SIZE 14 +#define ICEP_MIN_REPLY_SIZE 5 +#define ICEP_MIN_PARAMS_SIZE 6 +#define ICEP_MIN_COMMON_REQ_HEADER_SIZE 13 /* Initialize the protocol and registered fields */ static int proto_icep = -1; @@ -122,46 +122,46 @@ static expert_field ei_icep_facet_missing = EI_INIT; static expert_field ei_icep_context_too_long = EI_INIT; /* Preferences */ -static guint icep_max_batch_requests = 64; -static guint icep_max_ice_string_len = 512; -static guint icep_max_ice_context_pairs = 64; -static guint icep_tcp_port = 0; -static guint icep_udp_port = 0; +static guint icep_max_batch_requests = 64; +static guint icep_max_ice_string_len = 512; +static guint icep_max_ice_context_pairs = 64; +static guint icep_tcp_port = 0; +static guint icep_udp_port = 0; static const value_string icep_msgtype_vals[] = { - {0x0, "Request"}, - {0x1, "Batch request"}, - {0x2, "Reply"}, - {0x3, "Validate connection"}, - {0x4, "Close connection"}, - {0, NULL} + {0x0, "Request"}, + {0x1, "Batch request"}, + {0x2, "Reply"}, + {0x3, "Validate connection"}, + {0x4, "Close connection"}, + {0, NULL} }; static const value_string icep_zipstatus_vals[] = { - {0x0, "Uncompressed, sender cannot accept a compressed reply"}, - {0x1, "Uncompressed, sender can accept a compressed reply"}, - {0x2, "Compressed, sender can accept a compressed reply"}, - {0, NULL} + {0x0, "Uncompressed, sender cannot accept a compressed reply"}, + {0x1, "Uncompressed, sender can accept a compressed reply"}, + {0x2, "Compressed, sender can accept a compressed reply"}, + {0, NULL} }; static const value_string icep_replystatus_vals[] = { - {0x0, "Success"}, - {0x1, "User exception"}, - {0x2, "Object does not exist"}, - {0x3, "Facet does not exist"}, - {0x4, "Operation does not exist"}, - {0x5, "Unknown Ice local exception"}, - {0x6, "Unknown Ice user exception"}, - {0x7, "Unknown exception"}, - {0, NULL} + {0x0, "Success"}, + {0x1, "User exception"}, + {0x2, "Object does not exist"}, + {0x3, "Facet does not exist"}, + {0x4, "Operation does not exist"}, + {0x5, "Unknown Ice local exception"}, + {0x6, "Unknown Ice user exception"}, + {0x7, "Unknown exception"}, + {0, NULL} }; static const value_string icep_mode_vals[] = { - {0x0, "normal"}, - {0x1, "nonmutating"}, - {0x2, "idempotent"}, - {0, NULL} + {0x0, "normal"}, + {0x1, "nonmutating"}, + {0x2, "idempotent"}, + {0, NULL} }; /* @@ -171,90 +171,90 @@ static const value_string icep_mode_vals[] = { * "*dest" is a null terminated version of the dissected Ice string. */ static void dissect_ice_string(packet_info *pinfo, proto_tree *tree, proto_item *item, int hf_icep, - tvbuff_t *tvb, guint32 offset, gint32 *consumed, char **dest) + tvbuff_t *tvb, guint32 offset, gint32 *consumed, char **dest) { - /* p. 586 chapter 23.2.1 and p. 588 chapter 23.2.5 - * string == Size + content - * string = 1byte (0..254) + string not null terminated - * or - * string = 1byte (255) + 1int (255..2^32-1) + string not null terminated - */ + /* p. 586 chapter 23.2.1 and p. 588 chapter 23.2.5 + * string == Size + content + * string = 1byte (0..254) + string not null terminated + * or + * string = 1byte (255) + 1int (255..2^32-1) + string not null terminated + */ - guint32 Size = 0; - char *s = NULL; + guint32 Size = 0; + char *s = NULL; - (*consumed) = 0; + (*consumed) = 0; - /* check for first byte */ - if ( !tvb_bytes_exist(tvb, offset, 1) ) { + /* check for first byte */ + if ( !tvb_bytes_exist(tvb, offset, 1) ) { - expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "1st byte of Size missing"); - col_append_str(pinfo->cinfo, COL_INFO, " (1st byte of Size missing)"); + expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "1st byte of Size missing"); + col_append_str(pinfo->cinfo, COL_INFO, " (1st byte of Size missing)"); - (*consumed) = -1; - return; - } + (*consumed) = -1; + return; + } - /* get the Size */ - Size = tvb_get_guint8(tvb, offset); - offset++; - (*consumed)++; + /* get the Size */ + Size = tvb_get_guint8(tvb, offset); + offset++; + (*consumed)++; - if ( Size == 255 ) { + if ( Size == 255 ) { - /* check for next 4 bytes */ - if ( !tvb_bytes_exist(tvb, offset, 4) ) { + /* check for next 4 bytes */ + if ( !tvb_bytes_exist(tvb, offset, 4) ) { - expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "second field of Size missing"); - col_append_str(pinfo->cinfo, COL_INFO, " (second field of Size missing)"); + expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "second field of Size missing"); + col_append_str(pinfo->cinfo, COL_INFO, " (second field of Size missing)"); - (*consumed) = -1; - return; - } + (*consumed) = -1; + return; + } - /* get second field of Size */ - Size = tvb_get_letohl(tvb, offset); - offset += 4; - (*consumed) += 4; - } + /* get second field of Size */ + Size = tvb_get_letohl(tvb, offset); + offset += 4; + (*consumed) += 4; + } - DBG1("string.Size --> %d\n", Size); + DBG1("string.Size --> %d\n", Size); - /* check if the string exists */ - if ( !tvb_bytes_exist(tvb, offset, Size) ) { + /* check if the string exists */ + if ( !tvb_bytes_exist(tvb, offset, Size) ) { - expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "missing or truncated string"); - col_append_str(pinfo->cinfo, COL_INFO, " (missing or truncated string)"); + expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "missing or truncated string"); + col_append_str(pinfo->cinfo, COL_INFO, " (missing or truncated string)"); - (*consumed) = -1; - return; - } + (*consumed) = -1; + return; + } - if ( Size > icep_max_ice_string_len ) { + if ( Size > icep_max_ice_string_len ) { - expert_add_info(pinfo, item, &ei_icep_string_too_long); - col_append_str(pinfo->cinfo, COL_INFO, " (string too long)"); + expert_add_info(pinfo, item, &ei_icep_string_too_long); + col_append_str(pinfo->cinfo, COL_INFO, " (string too long)"); - (*consumed) = -1; - return; - } + (*consumed) = -1; + return; + } - if ( Size != 0 ) { - s = tvb_get_string(wmem_packet_scope(), tvb, offset, Size); - proto_tree_add_string(tree, hf_icep, tvb, offset, Size, s); - } else { - s = wmem_strdup(wmem_packet_scope(), "(empty)"); - /* display the 0x00 Size byte when click on a empty ice_string */ - proto_tree_add_string(tree, hf_icep, tvb, offset - 1, 1, s); - } + if ( Size != 0 ) { + s = tvb_get_string(wmem_packet_scope(), tvb, offset, Size); + proto_tree_add_string(tree, hf_icep, tvb, offset, Size, s); + } else { + s = wmem_strdup(wmem_packet_scope(), "(empty)"); + /* display the 0x00 Size byte when click on a empty ice_string */ + proto_tree_add_string(tree, hf_icep, tvb, offset - 1, 1, s); + } - if ( dest != NULL ) - *dest = s; + if ( dest != NULL ) + *dest = s; - /*offset += Size;*/ - (*consumed) += Size; - return; + /*offset += Size;*/ + (*consumed) += Size; + return; } /* @@ -262,188 +262,188 @@ static void dissect_ice_string(packet_info *pinfo, proto_tree *tree, proto_item * bytes in "*consumed", if errors "*consumed" is -1. */ static void dissect_ice_facet(packet_info *pinfo, proto_tree *tree, proto_item *item, int hf_icep, - tvbuff_t *tvb, guint32 offset, gint32 *consumed) + tvbuff_t *tvb, guint32 offset, gint32 *consumed) { - /* p. 588, chapter 23.2.6: - * "facet" is a StringSeq, a StringSeq is a: - * sequence - * - * - * sequence == Size + SizeElements - * sequence = 1byte (0..254) + SizeElements - * or - * sequence = 1byte (255) + 1int (255..2^32-1) + SizeElements - * - * - * p.613. chapter 23.3.2 - * "facet has either zero elements (empty) or one element" - * - * - */ + /* p. 588, chapter 23.2.6: + * "facet" is a StringSeq, a StringSeq is a: + * sequence + * + * + * sequence == Size + SizeElements + * sequence = 1byte (0..254) + SizeElements + * or + * sequence = 1byte (255) + 1int (255..2^32-1) + SizeElements + * + * + * p.613. chapter 23.3.2 + * "facet has either zero elements (empty) or one element" + * + * + */ - guint32 Size = 0; /* number of elements in the sequence */ + guint32 Size = 0; /* number of elements in the sequence */ - (*consumed) = 0; + (*consumed) = 0; - /* check first byte */ - if ( !tvb_bytes_exist(tvb, offset, 1) ) { + /* check first byte */ + if ( !tvb_bytes_exist(tvb, offset, 1) ) { - expert_add_info(pinfo, item, &ei_icep_facet_missing); - col_append_str(pinfo->cinfo, COL_INFO, " (facet field missing)"); + expert_add_info(pinfo, item, &ei_icep_facet_missing); + col_append_str(pinfo->cinfo, COL_INFO, " (facet field missing)"); - (*consumed) = -1; - return; - } + (*consumed) = -1; + return; + } - /* get first byte of Size */ - Size = tvb_get_guint8(tvb, offset); - offset++; - (*consumed)++; + /* get first byte of Size */ + Size = tvb_get_guint8(tvb, offset); + offset++; + (*consumed)++; - if ( Size == 0 ) { - /* display the 0x00 Size byte when click on a empty ice_string */ - proto_tree_add_string(tree, hf_icep, tvb, offset - 1, 1, "(empty)"); - return; - } + if ( Size == 0 ) { + /* display the 0x00 Size byte when click on a empty ice_string */ + proto_tree_add_string(tree, hf_icep, tvb, offset - 1, 1, "(empty)"); + return; + } - if ( Size == 1 ) { + if ( Size == 1 ) { - gint32 consumed_facet = 0; + gint32 consumed_facet = 0; - dissect_ice_string(pinfo, tree, item, hf_icep, tvb, offset, &consumed_facet, NULL); + dissect_ice_string(pinfo, tree, item, hf_icep, tvb, offset, &consumed_facet, NULL); - if ( consumed_facet == -1 ) { - (*consumed) = -1; - return; - } + if ( consumed_facet == -1 ) { + (*consumed) = -1; + return; + } - /*offset += consumed_facet;*/ - (*consumed) += consumed_facet; - return; - } + /*offset += consumed_facet;*/ + (*consumed) += consumed_facet; + return; + } - /* if here => Size > 1 => not possible */ + /* if here => Size > 1 => not possible */ - /* display the XX Size byte when click here */ - expert_add_info(pinfo, item, &ei_icep_facet_max_one_element); + /* display the XX Size byte when click here */ + expert_add_info(pinfo, item, &ei_icep_facet_max_one_element); - col_append_str(pinfo->cinfo, COL_INFO, " (facet can be max one element)"); + col_append_str(pinfo->cinfo, COL_INFO, " (facet can be max one element)"); - (*consumed) = -1; - return; + (*consumed) = -1; + return; } /* * This function dissects an "Ice context", adds hf(s) to "tree" and returns consumed * bytes in "*consumed", if errors "*consumed" is -1. */ -static void dissect_ice_context(packet_info *pinfo, proto_tree *tree, proto_item *item, - tvbuff_t *tvb, guint32 offset, gint32 *consumed) +static void dissect_ice_context(packet_info *pinfo, proto_tree *tree, proto_item *item, + tvbuff_t *tvb, guint32 offset, gint32 *consumed) { - /* p. 588, chapter 23.2.7 and p. 613, 23.3.2: - * "context" is a dictionary - * - * dictionary == Size + SizeKeyValuePairs - * dictionary = 1byte (0..254) + SizeKeyValuePairs - * or - * dictionary= 1byte (255) + 1int (255..2^32-1)+SizeKeyValuePairs - * - */ - - guint32 Size = 0; /* number of key-value in the dictionary */ - guint32 i = 0; - const char *s = NULL; - - (*consumed) = 0; - - /* check first byte */ - if ( !tvb_bytes_exist(tvb, offset, 1) ) { - - expert_add_info_format(pinfo, item, &ei_icep_context_missing, "context missing"); - col_append_str(pinfo->cinfo, COL_INFO, " (context missing)"); - - (*consumed) = -1; - return; - } - - /* get first byte of Size */ - Size = tvb_get_guint8(tvb, offset); - offset++; - (*consumed)++; - - if ( Size == 255 ) { - - /* check for next 4 bytes */ - if ( !tvb_bytes_exist(tvb, offset, 4) ) { - - expert_add_info_format(pinfo, item, &ei_icep_context_missing, "second field of Size missing"); - col_append_str(pinfo->cinfo, COL_INFO, " (second field of Size missing)"); - - (*consumed) = -1; - return; - } - - /* get second field of Size */ - Size = tvb_get_letohl(tvb, offset); - offset += 4; - (*consumed) += 4; - } - - DBG1("context.Size --> %d\n", Size); - - if ( Size > icep_max_ice_context_pairs ) { - - /* display the XX Size byte when click here */ - expert_add_info(pinfo, item, &ei_icep_context_too_long); - - col_append_str(pinfo->cinfo, COL_INFO, " (too long context)"); - - (*consumed) = -1; - return; - } - - if (Size == 0) { - s = "(empty)"; - /* display the 0x00 Size byte when click on a empty context */ - proto_tree_add_string(tree, hf_icep_context, tvb, offset - 1, 1, s); - return; - } - - /* looping through the dictionary */ - for ( i = 0; i < Size; i++ ) { - /* key */ - gint32 consumed_key = 0; - char *str_key = NULL; - /* value */ - gint32 consumed_value = 0; - char *str_value = NULL; - proto_item *ti = NULL; - - DBG1("looping through context dictionary, loop #%d\n", i); - ti = proto_tree_add_text(tree, tvb, offset, -1, "Invocation Context"); - - dissect_ice_string(pinfo, tree, ti, hf_icep_invocation_key, tvb, offset, &consumed_key, &str_key); - - if ( consumed_key == -1 ) { - (*consumed) = -1; - return; - } - - offset += consumed_key; - (*consumed) += consumed_key; - - dissect_ice_string(pinfo, tree, ti, hf_icep_invocation_value, tvb, offset, &consumed_value, &str_value); - - if ( consumed_value == -1 ) { - (*consumed) = -1; - return; - } - - offset += consumed_value; - (*consumed) += consumed_value; - if (ti) - proto_item_set_len(ti, (consumed_key + consumed_value) + 1); - } + /* p. 588, chapter 23.2.7 and p. 613, 23.3.2: + * "context" is a dictionary + * + * dictionary == Size + SizeKeyValuePairs + * dictionary = 1byte (0..254) + SizeKeyValuePairs + * or + * dictionary= 1byte (255) + 1int (255..2^32-1)+SizeKeyValuePairs + * + */ + + guint32 Size = 0; /* number of key-value in the dictionary */ + guint32 i = 0; + const char *s = NULL; + + (*consumed) = 0; + + /* check first byte */ + if ( !tvb_bytes_exist(tvb, offset, 1) ) { + + expert_add_info_format(pinfo, item, &ei_icep_context_missing, "context missing"); + col_append_str(pinfo->cinfo, COL_INFO, " (context missing)"); + + (*consumed) = -1; + return; + } + + /* get first byte of Size */ + Size = tvb_get_guint8(tvb, offset); + offset++; + (*consumed)++; + + if ( Size == 255 ) { + + /* check for next 4 bytes */ + if ( !tvb_bytes_exist(tvb, offset, 4) ) { + + expert_add_info_format(pinfo, item, &ei_icep_context_missing, "second field of Size missing"); + col_append_str(pinfo->cinfo, COL_INFO, " (second field of Size missing)"); + + (*consumed) = -1; + return; + } + + /* get second field of Size */ + Size = tvb_get_letohl(tvb, offset); + offset += 4; + (*consumed) += 4; + } + + DBG1("context.Size --> %d\n", Size); + + if ( Size > icep_max_ice_context_pairs ) { + + /* display the XX Size byte when click here */ + expert_add_info(pinfo, item, &ei_icep_context_too_long); + + col_append_str(pinfo->cinfo, COL_INFO, " (too long context)"); + + (*consumed) = -1; + return; + } + + if (Size == 0) { + s = "(empty)"; + /* display the 0x00 Size byte when click on a empty context */ + proto_tree_add_string(tree, hf_icep_context, tvb, offset - 1, 1, s); + return; + } + + /* looping through the dictionary */ + for ( i = 0; i < Size; i++ ) { + /* key */ + gint32 consumed_key = 0; + char *str_key = NULL; + /* value */ + gint32 consumed_value = 0; + char *str_value = NULL; + proto_item *ti = NULL; + + DBG1("looping through context dictionary, loop #%d\n", i); + ti = proto_tree_add_text(tree, tvb, offset, -1, "Invocation Context"); + + dissect_ice_string(pinfo, tree, ti, hf_icep_invocation_key, tvb, offset, &consumed_key, &str_key); + + if ( consumed_key == -1 ) { + (*consumed) = -1; + return; + } + + offset += consumed_key; + (*consumed) += consumed_key; + + dissect_ice_string(pinfo, tree, ti, hf_icep_invocation_value, tvb, offset, &consumed_value, &str_value); + + if ( consumed_value == -1 ) { + (*consumed) = -1; + return; + } + + offset += consumed_value; + (*consumed) += consumed_value; + if (ti) + proto_item_set_len(ti, (consumed_key + consumed_value) + 1); + } } /* @@ -451,912 +451,912 @@ static void dissect_ice_context(packet_info *pinfo, proto_tree *tree, proto_item * bytes in "*consumed", if errors "*consumed" is -1. */ static void dissect_ice_params(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb, - guint32 offset, gint32 *consumed) + guint32 offset, gint32 *consumed) { - /* p. 612, chapter 23.3.2 and p. 587, 23.2.2: - * "params" is an Encapsulation - * - * struct Encapsulation { - * int size; - * byte major; - * byte minor; - * //(size - 6) bytes of data - * } - * - */ + /* p. 612, chapter 23.3.2 and p. 587, 23.2.2: + * "params" is an Encapsulation + * + * struct Encapsulation { + * int size; + * byte major; + * byte minor; + * //(size - 6) bytes of data + * } + * + */ - gint32 size = 0; - gint tvb_data_remained = 0; + gint32 size = 0; + gint tvb_data_remained = 0; - (*consumed) = 0; + (*consumed) = 0; - /* check first 6 bytes */ - if ( !tvb_bytes_exist(tvb, offset, ICEP_MIN_PARAMS_SIZE) ) { + /* check first 6 bytes */ + if ( !tvb_bytes_exist(tvb, offset, ICEP_MIN_PARAMS_SIZE) ) { - expert_add_info(pinfo, item, &ei_icep_params_missing); - col_append_str(pinfo->cinfo, COL_INFO, " (params missing)"); + expert_add_info(pinfo, item, &ei_icep_params_missing); + col_append_str(pinfo->cinfo, COL_INFO, " (params missing)"); - (*consumed) = -1; - return; - } + (*consumed) = -1; + return; + } - /* get the size */ - size = tvb_get_letohl(tvb, offset); + /* get the size */ + size = tvb_get_letohl(tvb, offset); - DBG1("params.size --> %d\n", size); + DBG1("params.size --> %d\n", size); - if ( size < ICEP_MIN_PARAMS_SIZE ) { + if ( size < ICEP_MIN_PARAMS_SIZE ) { - expert_add_info(pinfo, item, &ei_icep_params_size); - col_append_str(pinfo->cinfo, COL_INFO, " (params size too small)"); + expert_add_info(pinfo, item, &ei_icep_params_size); + col_append_str(pinfo->cinfo, COL_INFO, " (params size too small)"); - (*consumed) = -1; - return; - } + (*consumed) = -1; + return; + } - if ( tree ) { + if ( tree ) { - proto_tree_add_item(tree, hf_icep_params_size, tvb, offset, 4, ENC_LITTLE_ENDIAN); - offset += 4; - (*consumed) += 4; + proto_tree_add_item(tree, hf_icep_params_size, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + (*consumed) += 4; - proto_tree_add_item(tree, hf_icep_params_major, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset += 1; - (*consumed)++; + proto_tree_add_item(tree, hf_icep_params_major, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + (*consumed)++; - proto_tree_add_item(tree, hf_icep_params_minor, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset += 1; - (*consumed)++; + proto_tree_add_item(tree, hf_icep_params_minor, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + (*consumed)++; - } else { - /* skip size, major, minor */ - offset += 6; - (*consumed) += 6; - } + } else { + /* skip size, major, minor */ + offset += 6; + (*consumed) += 6; + } - if( size == ICEP_MIN_PARAMS_SIZE ) /* no encapsulatd data present, it's normal */ - return; + if( size == ICEP_MIN_PARAMS_SIZE ) /* no encapsulatd data present, it's normal */ + return; - /* check if I got all encapsulated data */ - tvb_data_remained = tvb_reported_length_remaining(tvb, offset); + /* check if I got all encapsulated data */ + tvb_data_remained = tvb_reported_length_remaining(tvb, offset); - if ( tvb_data_remained < ( size - ICEP_MIN_PARAMS_SIZE ) ) { + if ( tvb_data_remained < ( size - ICEP_MIN_PARAMS_SIZE ) ) { - expert_add_info_format(pinfo, item, &ei_icep_params_encapsulated, "missing encapsulated data (%d bytes)", size - ICEP_MIN_PARAMS_SIZE - tvb_data_remained); + expert_add_info_format(pinfo, item, &ei_icep_params_encapsulated, "missing encapsulated data (%d bytes)", size - ICEP_MIN_PARAMS_SIZE - tvb_data_remained); - col_append_fstr(pinfo->cinfo, COL_INFO, - " (missing encapsulated data (%d bytes))", - size - ICEP_MIN_PARAMS_SIZE - tvb_data_remained); + col_append_fstr(pinfo->cinfo, COL_INFO, + " (missing encapsulated data (%d bytes))", + size - ICEP_MIN_PARAMS_SIZE - tvb_data_remained); - (*consumed) = -1; - return; - } + (*consumed) = -1; + return; + } - /* encapsulated params */ - proto_tree_add_item(tree, hf_icep_params_encapsulated, tvb, offset, (size - ICEP_MIN_PARAMS_SIZE), ENC_LITTLE_ENDIAN); + /* encapsulated params */ + proto_tree_add_item(tree, hf_icep_params_encapsulated, tvb, offset, (size - ICEP_MIN_PARAMS_SIZE), ENC_LITTLE_ENDIAN); - (*consumed) += (size - ICEP_MIN_PARAMS_SIZE); + (*consumed) += (size - ICEP_MIN_PARAMS_SIZE); } static void dissect_icep_request_common(tvbuff_t *tvb, guint32 offset, - packet_info *pinfo, proto_tree *icep_sub_tree, proto_item* icep_sub_item, gint32 *total_consumed) + packet_info *pinfo, proto_tree *icep_sub_tree, proto_item* icep_sub_item, gint32 *total_consumed) { - /* p. 613, chapter 23.3.3 and p. 612 chapter 23.3.2: - * Request and BatchRequest differ only in the first 4 bytes (requestID) - * so them share this part - * - * Ice::Identity id; - * Ice::StringSeq facet; - * string operation; - * byte mode; - * Ice::Context context; - * Encapsulation params; - * } - */ + /* p. 613, chapter 23.3.3 and p. 612 chapter 23.3.2: + * Request and BatchRequest differ only in the first 4 bytes (requestID) + * so them share this part + * + * Ice::Identity id; + * Ice::StringSeq facet; + * string operation; + * byte mode; + * Ice::Context context; + * Encapsulation params; + * } + */ - gint32 consumed = 0; - char *namestr = NULL; - char *opstr = NULL; + gint32 consumed = 0; + char *namestr = NULL; + char *opstr = NULL; - (*total_consumed) = 0; + (*total_consumed) = 0; - /* check common header (i.e. the batch request one)*/ - if ( !tvb_bytes_exist(tvb, offset, ICEP_MIN_COMMON_REQ_HEADER_SIZE) ) { + /* check common header (i.e. the batch request one)*/ + if ( !tvb_bytes_exist(tvb, offset, ICEP_MIN_COMMON_REQ_HEADER_SIZE) ) { - expert_add_info_format(pinfo, icep_sub_item, &ei_icep_length, "too short header"); - col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); + expert_add_info_format(pinfo, icep_sub_item, &ei_icep_length, "too short header"); + col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); - goto error; - } + goto error; + } - /* got at least 15 bytes */ + /* got at least 15 bytes */ - /* "id" is a: - * struct Identity { - * string name; - * string category; - * } - */ + /* "id" is a: + * struct Identity { + * string name; + * string category; + * } + */ - dissect_ice_string(pinfo, icep_sub_tree, icep_sub_item, hf_icep_id_name, tvb, offset, &consumed, &namestr); + dissect_ice_string(pinfo, icep_sub_tree, icep_sub_item, hf_icep_id_name, tvb, offset, &consumed, &namestr); - if ( consumed == -1 ) - goto error; + if ( consumed == -1 ) + goto error; - offset += consumed; DBG1("consumed --> %d\n", consumed); - (*total_consumed) += consumed; + offset += consumed; DBG1("consumed --> %d\n", consumed); + (*total_consumed) += consumed; - dissect_ice_string(pinfo, icep_sub_tree, icep_sub_item, hf_icep_id_category, tvb, offset, &consumed, NULL); + dissect_ice_string(pinfo, icep_sub_tree, icep_sub_item, hf_icep_id_category, tvb, offset, &consumed, NULL); - if ( consumed == -1 ) - goto error; + if ( consumed == -1 ) + goto error; - offset += consumed; DBG1("consumed --> %d\n", consumed); - (*total_consumed) += consumed; + offset += consumed; DBG1("consumed --> %d\n", consumed); + (*total_consumed) += consumed; - /* "facet" is a: - * sequence StringSeq - * - */ + /* "facet" is a: + * sequence StringSeq + * + */ - dissect_ice_facet(pinfo, icep_sub_tree, icep_sub_item, hf_icep_facet, tvb, offset, &consumed); + dissect_ice_facet(pinfo, icep_sub_tree, icep_sub_item, hf_icep_facet, tvb, offset, &consumed); - if ( consumed == -1 ) - goto error; + if ( consumed == -1 ) + goto error; - offset += consumed; DBG1("consumed --> %d\n", consumed); - (*total_consumed) += consumed; + offset += consumed; DBG1("consumed --> %d\n", consumed); + (*total_consumed) += consumed; - /* "operation" is an ice_string - * - */ + /* "operation" is an ice_string + * + */ - dissect_ice_string(pinfo, icep_sub_tree, icep_sub_item, hf_icep_operation, tvb, offset, &consumed, &opstr); + dissect_ice_string(pinfo, icep_sub_tree, icep_sub_item, hf_icep_operation, tvb, offset, &consumed, &opstr); - if ( consumed == -1 ) - goto error; - else { - offset += consumed; DBG1("consumed --> %d\n", consumed); - (*total_consumed) += consumed; + if ( consumed == -1 ) + goto error; + else { + offset += consumed; DBG1("consumed --> %d\n", consumed); + (*total_consumed) += consumed; - if ( opstr && namestr ) { - DBG2("operation --> %s.%s()\n", namestr, opstr); - col_append_fstr(pinfo->cinfo, COL_INFO, " %s.%s()", - namestr, opstr); - opstr = NULL; - namestr = NULL; - } - } + if ( opstr && namestr ) { + DBG2("operation --> %s.%s()\n", namestr, opstr); + col_append_fstr(pinfo->cinfo, COL_INFO, " %s.%s()", + namestr, opstr); + opstr = NULL; + namestr = NULL; + } + } - /* check and get mode byte */ - if ( !tvb_bytes_exist(tvb, offset, 1) ) { + /* check and get mode byte */ + if ( !tvb_bytes_exist(tvb, offset, 1) ) { - expert_add_info(pinfo, icep_sub_item, &ei_icep_mode_missing); + expert_add_info(pinfo, icep_sub_item, &ei_icep_mode_missing); - col_append_str(pinfo->cinfo, COL_INFO, " (mode field missing)"); - goto error; - } + col_append_str(pinfo->cinfo, COL_INFO, " (mode field missing)"); + goto error; + } - proto_tree_add_item(icep_sub_tree, hf_icep_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(icep_sub_tree, hf_icep_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; DBG0("consumed --> 1\n"); - (*total_consumed)++; + offset++; DBG0("consumed --> 1\n"); + (*total_consumed)++; - /* "context" is a dictionary - * - */ + /* "context" is a dictionary + * + */ - dissect_ice_context(pinfo, icep_sub_tree, icep_sub_item, tvb, offset, &consumed); + dissect_ice_context(pinfo, icep_sub_tree, icep_sub_item, tvb, offset, &consumed); - if ( consumed == -1 ) - goto error; + if ( consumed == -1 ) + goto error; - offset += consumed; DBG1("consumed --> %d\n", consumed); - (*total_consumed) += consumed; + offset += consumed; DBG1("consumed --> %d\n", consumed); + (*total_consumed) += consumed; - /* "params" is a Encapsulation - * - */ + /* "params" is a Encapsulation + * + */ - dissect_ice_params(pinfo, icep_sub_tree, icep_sub_item, tvb, offset, &consumed); + dissect_ice_params(pinfo, icep_sub_tree, icep_sub_item, tvb, offset, &consumed); - if ( consumed == -1 ) - goto error; + if ( consumed == -1 ) + goto error; - /*offset += consumed;*/ - DBG1("consumed --> %d\n", consumed); - (*total_consumed) += consumed; + /*offset += consumed;*/ + DBG1("consumed --> %d\n", consumed); + (*total_consumed) += consumed; - return; + return; error: - (*total_consumed) = -1; + (*total_consumed) = -1; } -static void dissect_icep_request(tvbuff_t *tvb, guint32 offset, - packet_info *pinfo, proto_tree *icep_tree, proto_item* icep_item) +static void dissect_icep_request(tvbuff_t *tvb, guint32 offset, + packet_info *pinfo, proto_tree *icep_tree, proto_item* icep_item) { - /* p. 612, chapter 23.3.2: - * - * struct RequestData { - * int requestID; - * Ice::Identity id; - * Ice::StringSeq facet; - * string operation; - * byte mode; - * Ice::Context context; - * Encapsulation params; - * } - */ + /* p. 612, chapter 23.3.2: + * + * struct RequestData { + * int requestID; + * Ice::Identity id; + * Ice::StringSeq facet; + * string operation; + * byte mode; + * Ice::Context context; + * Encapsulation params; + * } + */ - proto_item *ti = NULL; - proto_tree *icep_sub_tree = NULL; - gint32 consumed = 0; - guint32 reqid = 0; + proto_item *ti = NULL; + proto_tree *icep_sub_tree = NULL; + gint32 consumed = 0; + guint32 reqid = 0; - DBG0("dissect request\n"); + DBG0("dissect request\n"); - /* check for req id */ - if ( !tvb_bytes_exist(tvb, offset, 4) ) { + /* check for req id */ + if ( !tvb_bytes_exist(tvb, offset, 4) ) { - expert_add_info_format(pinfo, icep_item, &ei_icep_length, "too short header"); - col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); - return; - } + expert_add_info_format(pinfo, icep_item, &ei_icep_length, "too short header"); + col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); + return; + } - /* got at least 4 bytes */ + /* got at least 4 bytes */ - /* create display subtree for this message type */ + /* create display subtree for this message type */ - reqid = tvb_get_letohl(tvb, offset); + reqid = tvb_get_letohl(tvb, offset); - ti = proto_tree_add_text(icep_tree, tvb, offset, -1, "Request Message Body"); - icep_sub_tree = proto_item_add_subtree(ti, ett_icep_msg); + ti = proto_tree_add_text(icep_tree, tvb, offset, -1, "Request Message Body"); + icep_sub_tree = proto_item_add_subtree(ti, ett_icep_msg); - proto_tree_add_item(icep_sub_tree, hf_icep_request_id, tvb, offset, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(icep_sub_tree, hf_icep_request_id, tvb, offset, 4, ENC_LITTLE_ENDIAN); - if ( reqid != 0 ) { - col_append_fstr(pinfo->cinfo, COL_INFO, "(%d):", tvb_get_letohl(tvb, offset)); - } else - col_append_str(pinfo->cinfo, COL_INFO, "(oneway):"); + if ( reqid != 0 ) { + col_append_fstr(pinfo->cinfo, COL_INFO, "(%d):", tvb_get_letohl(tvb, offset)); + } else + col_append_str(pinfo->cinfo, COL_INFO, "(oneway):"); - offset += 4; - DBG0("consumed --> 4\n"); + offset += 4; + DBG0("consumed --> 4\n"); - dissect_icep_request_common(tvb, offset, pinfo, icep_sub_tree, ti, &consumed); + dissect_icep_request_common(tvb, offset, pinfo, icep_sub_tree, ti, &consumed); - if ( consumed == -1 ) - return; + if ( consumed == -1 ) + return; - /*offset += consumed;*/ - DBG1("consumed --> %d\n", consumed); + /*offset += consumed;*/ + DBG1("consumed --> %d\n", consumed); } static void dissect_icep_batch_request(tvbuff_t *tvb, guint32 offset, - packet_info *pinfo, proto_tree *icep_tree, proto_item* icep_item) + packet_info *pinfo, proto_tree *icep_tree, proto_item* icep_item) { - /* p. 613, chapter 23.3.3 - * A batch request msg is a "sequence" of batch request - * Sequence is Size + elements - * - * struct BatchRequestData { - * Ice::Identity id; - * Ice::StringSeq facet; - * string operation; - * byte mode; - * Ice::Context context; - * Encapsulation params; - * } - * - * NOTE!!!: - * The only real implementation of the Ice protocol puts a 32bit count in front - * of a Batch Request, *not* an Ice::Sequence (as the standard says). Basically the - * same people wrote both code and standard so I'll follow the code. - */ + /* p. 613, chapter 23.3.3 + * A batch request msg is a "sequence" of batch request + * Sequence is Size + elements + * + * struct BatchRequestData { + * Ice::Identity id; + * Ice::StringSeq facet; + * string operation; + * byte mode; + * Ice::Context context; + * Encapsulation params; + * } + * + * NOTE!!!: + * The only real implementation of the Ice protocol puts a 32bit count in front + * of a Batch Request, *not* an Ice::Sequence (as the standard says). Basically the + * same people wrote both code and standard so I'll follow the code. + */ - proto_item *ti = NULL; - proto_tree *icep_sub_tree = NULL; - guint32 num_reqs = 0; - guint32 i = 0; - gint32 consumed = 0; + proto_item *ti = NULL; + proto_tree *icep_sub_tree = NULL; + guint32 num_reqs = 0; + guint32 i = 0; + gint32 consumed = 0; - DBG0("dissect batch request\n"); + DBG0("dissect batch request\n"); - /* check for first 4 byte */ - if ( !tvb_bytes_exist(tvb, offset, 4) ) { + /* check for first 4 byte */ + if ( !tvb_bytes_exist(tvb, offset, 4) ) { - expert_add_info_format(pinfo, icep_item, &ei_icep_length, "counter of batch requests missing"); - col_append_str(pinfo->cinfo, COL_INFO, " (counter of batch requests missing)"); - return; - } + expert_add_info_format(pinfo, icep_item, &ei_icep_length, "counter of batch requests missing"); + col_append_str(pinfo->cinfo, COL_INFO, " (counter of batch requests missing)"); + return; + } - num_reqs = tvb_get_letohl(tvb, offset); - offset += 4; + num_reqs = tvb_get_letohl(tvb, offset); + offset += 4; - DBG1("batch_requests.count --> %d\n", num_reqs); + DBG1("batch_requests.count --> %d\n", num_reqs); - if ( num_reqs > icep_max_batch_requests ) { + if ( num_reqs > icep_max_batch_requests ) { - expert_add_info_format(pinfo, icep_item, &ei_icep_batch_requests, "too many batch requests (%d)", num_reqs); + expert_add_info_format(pinfo, icep_item, &ei_icep_batch_requests, "too many batch requests (%d)", num_reqs); - col_append_fstr(pinfo->cinfo, COL_INFO, " (too many batch requests, %d)", num_reqs); - return; - } + col_append_fstr(pinfo->cinfo, COL_INFO, " (too many batch requests, %d)", num_reqs); + return; + } - if ( num_reqs == 0 ) { + if ( num_reqs == 0 ) { - proto_tree_add_text(icep_tree, tvb, offset, -1, - "empty batch requests sequence"); - col_append_str(pinfo->cinfo, COL_INFO, " (empty batch requests sequence)"); + proto_tree_add_text(icep_tree, tvb, offset, -1, + "empty batch requests sequence"); + col_append_str(pinfo->cinfo, COL_INFO, " (empty batch requests sequence)"); - return; - } + return; + } - col_append_str(pinfo->cinfo, COL_INFO, ":"); + col_append_str(pinfo->cinfo, COL_INFO, ":"); - /* - * process requests - */ + /* + * process requests + */ - for ( i = 0; i < num_reqs; i++ ) { + for ( i = 0; i < num_reqs; i++ ) { - DBG1("looping through sequence of batch requests, loop #%d\n", i); + DBG1("looping through sequence of batch requests, loop #%d\n", i); - /* create display subtree for this message type */ + /* create display subtree for this message type */ - ti = proto_tree_add_text(icep_tree, tvb, offset, -1, - "Batch Request Message Body: #%d", i); - icep_sub_tree = proto_item_add_subtree(ti, ett_icep_msg); + ti = proto_tree_add_text(icep_tree, tvb, offset, -1, + "Batch Request Message Body: #%d", i); + icep_sub_tree = proto_item_add_subtree(ti, ett_icep_msg); - if (i != 0) { - col_append_str(pinfo->cinfo, COL_INFO, ","); - } + if (i != 0) { + col_append_str(pinfo->cinfo, COL_INFO, ","); + } - dissect_icep_request_common(tvb, offset, pinfo, icep_sub_tree, ti, &consumed); + dissect_icep_request_common(tvb, offset, pinfo, icep_sub_tree, ti, &consumed); - if ( consumed == -1 ) - return; + if ( consumed == -1 ) + return; - if ( icep_tree && ti ) - proto_item_set_len(ti, consumed); + if ( icep_tree && ti ) + proto_item_set_len(ti, consumed); - offset += consumed; - DBG1("consumed --> %d\n", consumed); - } + offset += consumed; + DBG1("consumed --> %d\n", consumed); + } } -static void dissect_icep_reply(tvbuff_t *tvb, guint32 offset, - packet_info *pinfo, proto_tree *icep_tree, proto_item* icep_item) +static void dissect_icep_reply(tvbuff_t *tvb, guint32 offset, + packet_info *pinfo, proto_tree *icep_tree, proto_item* icep_item) { - /* p. 614, chapter 23.3.4: - * - * struct ReplyData { - * int requestId; - * byte replyStatus; - * [... messageSize - 19 bytes ... ] - * } - */ + /* p. 614, chapter 23.3.4: + * + * struct ReplyData { + * int requestId; + * byte replyStatus; + * [... messageSize - 19 bytes ... ] + * } + */ - gint32 messageSize = 0; - guint32 tvb_data_remained = 0; - guint32 reported_reply_data = 0; - proto_item *ti = NULL; - proto_tree *icep_sub_tree = NULL; + gint32 messageSize = 0; + guint32 tvb_data_remained = 0; + guint32 reported_reply_data = 0; + proto_item *ti = NULL; + proto_tree *icep_sub_tree = NULL; - DBG0("dissect reply\n"); + DBG0("dissect reply\n"); - /* get at least a full reply message header */ + /* get at least a full reply message header */ - if ( !tvb_bytes_exist(tvb, offset, ICEP_MIN_REPLY_SIZE) ) { + if ( !tvb_bytes_exist(tvb, offset, ICEP_MIN_REPLY_SIZE) ) { - expert_add_info_format(pinfo, icep_item, &ei_icep_length, "too short header"); + expert_add_info_format(pinfo, icep_item, &ei_icep_length, "too short header"); - col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); - return; - } + col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); + return; + } - /* got 5 bytes, then data */ + /* got 5 bytes, then data */ - /* create display subtree for this message type */ + /* create display subtree for this message type */ - ti = proto_tree_add_text(icep_tree, tvb, offset, -1, - "Reply Message Body"); + ti = proto_tree_add_text(icep_tree, tvb, offset, -1, + "Reply Message Body"); - icep_sub_tree = proto_item_add_subtree(ti, ett_icep_msg); + icep_sub_tree = proto_item_add_subtree(ti, ett_icep_msg); - proto_tree_add_item(icep_sub_tree, hf_icep_request_id, tvb, offset, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(icep_sub_tree, hf_icep_request_id, tvb, offset, 4, ENC_LITTLE_ENDIAN); - col_append_fstr(pinfo->cinfo, COL_INFO, "(%d):", tvb_get_letohl(tvb, offset)); + col_append_fstr(pinfo->cinfo, COL_INFO, "(%d):", tvb_get_letohl(tvb, offset)); - offset += 4; + offset += 4; - proto_tree_add_item(icep_sub_tree, hf_icep_reply_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(icep_sub_tree, hf_icep_reply_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); - col_append_fstr(pinfo->cinfo, COL_INFO, " %s", - val_to_str_const(tvb_get_guint8(tvb, offset), + col_append_fstr(pinfo->cinfo, COL_INFO, " %s", + val_to_str_const(tvb_get_guint8(tvb, offset), icep_replystatus_vals, "unknown reply status")); - offset++; + offset++; - DBG1("consumed --> %d\n", 5); + DBG1("consumed --> %d\n", 5); - /* check if I got all reply data */ - tvb_data_remained = tvb_length_remaining(tvb, offset); - messageSize = tvb_get_letohl(tvb, 10); - reported_reply_data = messageSize - (ICEP_HEADER_SIZE + ICEP_MIN_REPLY_SIZE); + /* check if I got all reply data */ + tvb_data_remained = tvb_length_remaining(tvb, offset); + messageSize = tvb_get_letohl(tvb, 10); + reported_reply_data = messageSize - (ICEP_HEADER_SIZE + ICEP_MIN_REPLY_SIZE); - /* no */ - if ( tvb_data_remained < reported_reply_data ) { + /* no */ + if ( tvb_data_remained < reported_reply_data ) { - expert_add_info_format(pinfo, ti, &ei_icep_reply_data, "Reply Data (missing %d bytes out of %d)", reported_reply_data - tvb_data_remained, reported_reply_data); + expert_add_info_format(pinfo, ti, &ei_icep_reply_data, "Reply Data (missing %d bytes out of %d)", reported_reply_data - tvb_data_remained, reported_reply_data); - col_append_fstr(pinfo->cinfo, COL_INFO, - " (missing reply data, %d bytes)", - reported_reply_data - tvb_data_remained); + col_append_fstr(pinfo->cinfo, COL_INFO, + " (missing reply data, %d bytes)", + reported_reply_data - tvb_data_remained); - /*offset += tvb_data_remained;*/ - DBG1("consumed --> %d\n", tvb_data_remained); - return; - } + /*offset += tvb_data_remained;*/ + DBG1("consumed --> %d\n", tvb_data_remained); + return; + } - /* yes (reported_reply_data can be 0) */ + /* yes (reported_reply_data can be 0) */ - proto_tree_add_item(icep_sub_tree, hf_icep_reply_data, tvb, offset, reported_reply_data, ENC_NA); + proto_tree_add_item(icep_sub_tree, hf_icep_reply_data, tvb, offset, reported_reply_data, ENC_NA); - /*offset += reported_reply_data;*/ - DBG1("consumed --> %d\n", reported_reply_data); + /*offset += reported_reply_data;*/ + DBG1("consumed --> %d\n", reported_reply_data); } static guint get_icep_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { - return tvb_get_letohl(tvb, offset + 10); + return tvb_get_letohl(tvb, offset + 10); } static void dissect_icep_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - /* p. 611, chapter 23.3.1: - * - * struct HeaderData { - * int magic; - * byte protocolMajor; - * byte protocolMinor; - * byte encodingMajor; - * byte encodingMinor; - * byte messageType; - * byte compressionStatus; - * int messageSize; - * } - */ - - proto_item *ti, *msg_item = NULL; - proto_tree *icep_tree; - guint32 offset = 0; - - /* Make entries in Protocol column and Info column on summary display */ - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICEP"); - - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str(tvb_get_guint8(tvb, 8), - icep_msgtype_vals, - "Unknown Message Type: 0x%02x")); - - DBG0("got an icep msg, start analysis\n"); - - /* create display subtree for the protocol */ - - ti = proto_tree_add_item(tree, proto_icep, tvb, 0, -1, ENC_NA); - icep_tree = proto_item_add_subtree(ti, ett_icep); - - if (icep_tree) { - /* add items to the subtree */ - - /* message header */ - - proto_tree_add_text(icep_tree, tvb, offset, 4, - "Magic Number: 'I','c','e','P'"); - offset += 4; - - proto_tree_add_item(icep_tree, hf_icep_protocol_major, - tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; - - proto_tree_add_item(icep_tree, hf_icep_protocol_minor, - tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; - - proto_tree_add_item(icep_tree, hf_icep_encoding_major, - tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; - - proto_tree_add_item(icep_tree, hf_icep_encoding_minor, - tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; - - msg_item = proto_tree_add_item(icep_tree, hf_icep_message_type, - tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; - - proto_tree_add_item(icep_tree, hf_icep_compression_status, - tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset++; - - proto_tree_add_item(icep_tree, hf_icep_message_size, - tvb, offset, 4, ENC_LITTLE_ENDIAN); - offset += 4; - } else { - offset += ICEP_HEADER_SIZE; - } - - switch(tvb_get_guint8(tvb, 8)) { - case 0x0: - DBG1("request message body: parsing %d bytes\n", - tvb_length_remaining(tvb, offset)); - dissect_icep_request(tvb, offset, pinfo, icep_tree, ti); - break; - case 0x1: - DBG1("batch request message body: parsing %d bytes\n", - tvb_length_remaining(tvb, offset)); - dissect_icep_batch_request(tvb, offset, pinfo, icep_tree, ti); - break; - case 0x2: - DBG1("reply message body: parsing %d bytes\n", - tvb_length_remaining(tvb, offset)); - dissect_icep_reply(tvb, offset, pinfo, icep_tree, ti); - break; - case 0x3: - case 0x4: - /* messages already dissected */ - break; - default: - expert_add_info_format(pinfo, msg_item, &ei_icep_message_type, "Unknown Message Type: 0x%02x", tvb_get_guint8(tvb, 8)); - break; - } + /* p. 611, chapter 23.3.1: + * + * struct HeaderData { + * int magic; + * byte protocolMajor; + * byte protocolMinor; + * byte encodingMajor; + * byte encodingMinor; + * byte messageType; + * byte compressionStatus; + * int messageSize; + * } + */ + + proto_item *ti, *msg_item = NULL; + proto_tree *icep_tree; + guint32 offset = 0; + + /* Make entries in Protocol column and Info column on summary display */ + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICEP"); + + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str(tvb_get_guint8(tvb, 8), + icep_msgtype_vals, + "Unknown Message Type: 0x%02x")); + + DBG0("got an icep msg, start analysis\n"); + + /* create display subtree for the protocol */ + + ti = proto_tree_add_item(tree, proto_icep, tvb, 0, -1, ENC_NA); + icep_tree = proto_item_add_subtree(ti, ett_icep); + + if (icep_tree) { + /* add items to the subtree */ + + /* message header */ + + proto_tree_add_text(icep_tree, tvb, offset, 4, + "Magic Number: 'I','c','e','P'"); + offset += 4; + + proto_tree_add_item(icep_tree, hf_icep_protocol_major, + tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset++; + + proto_tree_add_item(icep_tree, hf_icep_protocol_minor, + tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset++; + + proto_tree_add_item(icep_tree, hf_icep_encoding_major, + tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset++; + + proto_tree_add_item(icep_tree, hf_icep_encoding_minor, + tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset++; + + msg_item = proto_tree_add_item(icep_tree, hf_icep_message_type, + tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset++; + + proto_tree_add_item(icep_tree, hf_icep_compression_status, + tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset++; + + proto_tree_add_item(icep_tree, hf_icep_message_size, + tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + } else { + offset += ICEP_HEADER_SIZE; + } + + switch(tvb_get_guint8(tvb, 8)) { + case 0x0: + DBG1("request message body: parsing %d bytes\n", + tvb_length_remaining(tvb, offset)); + dissect_icep_request(tvb, offset, pinfo, icep_tree, ti); + break; + case 0x1: + DBG1("batch request message body: parsing %d bytes\n", + tvb_length_remaining(tvb, offset)); + dissect_icep_batch_request(tvb, offset, pinfo, icep_tree, ti); + break; + case 0x2: + DBG1("reply message body: parsing %d bytes\n", + tvb_length_remaining(tvb, offset)); + dissect_icep_reply(tvb, offset, pinfo, icep_tree, ti); + break; + case 0x3: + case 0x4: + /* messages already dissected */ + break; + default: + expert_add_info_format(pinfo, msg_item, &ei_icep_message_type, "Unknown Message Type: 0x%02x", tvb_get_guint8(tvb, 8)); + break; + } } /* entry point */ static gboolean dissect_icep_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - DBG0("triggered\n"); + DBG0("triggered\n"); - if ( tvb_memeql(tvb, 0, icep_magic, 4) == -1 ) { - /* Not a ICEP packet. */ - return FALSE; - } + if ( tvb_memeql(tvb, 0, icep_magic, 4) == -1 ) { + /* Not a ICEP packet. */ + return FALSE; + } - /* start dissecting */ + /* start dissecting */ - tcp_dissect_pdus(tvb, pinfo, tree, TRUE, ICEP_HEADER_SIZE, - get_icep_pdu_len, dissect_icep_pdu); + tcp_dissect_pdus(tvb, pinfo, tree, TRUE, ICEP_HEADER_SIZE, + get_icep_pdu_len, dissect_icep_pdu); - return TRUE; + return TRUE; } static gboolean dissect_icep_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - DBG0("triggered\n"); + DBG0("triggered\n"); - if ( tvb_memeql(tvb, 0, icep_magic, 4) == -1 ) { - /* Not a ICEP packet. */ - return FALSE; - } + if ( tvb_memeql(tvb, 0, icep_magic, 4) == -1 ) { + /* Not a ICEP packet. */ + return FALSE; + } - /* start dissecting */ - dissect_icep_pdu(tvb, pinfo, tree); - return TRUE; + /* start dissecting */ + dissect_icep_pdu(tvb, pinfo, tree); + return TRUE; } /* Register the protocol with Wireshark */ void proto_register_icep(void) { - module_t *icep_module; - expert_module_t* expert_icep; - - /* Setup list of header fields */ - - static hf_register_info hf[] = { - - { &hf_icep_protocol_major, - { - "Protocol Major", "icep.protocol_major", - FT_INT8, BASE_DEC, NULL, 0x0, - "The protocol major version number", HFILL - } - }, - - { &hf_icep_protocol_minor, - { - "Protocol Minor", "icep.protocol_minor", - FT_INT8, BASE_DEC, NULL, 0x0, - "The protocol minor version number", HFILL - } - }, - - { &hf_icep_encoding_major, - { - "Encoding Major", "icep.encoding_major", - FT_INT8, BASE_DEC, NULL, 0x0, - "The encoding major version number", HFILL - } - }, - - { &hf_icep_encoding_minor, - { - "Encoding Minor", "icep.encoding_minor", - FT_INT8, BASE_DEC, NULL, 0x0, - "The encoding minor version number", HFILL - } - }, - - { &hf_icep_message_type, - { - "Message Type", "icep.message_type", - FT_INT8, BASE_DEC, VALS(icep_msgtype_vals), 0x0, - "The message type", HFILL - } - }, - - { &hf_icep_compression_status, - { - "Compression Status", "icep.compression_status", - FT_INT8, BASE_DEC, VALS(icep_zipstatus_vals), 0x0, - "The compression status of the message", HFILL - } - }, - - { &hf_icep_message_size, - { - "Message Size", "icep.message_status", - FT_INT32, BASE_DEC, NULL, 0x0, - "The size of the message in bytes, including the header", - HFILL - } - }, - - { &hf_icep_request_id, - { - "Request Identifier", "icep.request_id", - FT_INT32, BASE_DEC, NULL, 0x0, - "The request identifier", - HFILL - } - }, - - { &hf_icep_reply_status, - { - "Reply Status", "icep.protocol_major", - FT_INT8, BASE_DEC, VALS(icep_replystatus_vals), 0x0, - "The reply status", HFILL - } - }, - - { &hf_icep_id_name, - { - "Object Identity Name", "icep.id.name", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "The object identity name", HFILL - } - }, - - { &hf_icep_id_category, - { - "Object Identity Content", "icep.id.content", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "The object identity content", HFILL - } - }, - - { &hf_icep_facet, - { - "Facet Name", "icep.facet", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "The facet name", HFILL - } - }, - - { &hf_icep_operation, - { - "Operation Name", "icep.operation", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "The operation name", HFILL - } - }, - - { &hf_icep_mode, - { - "Ice::OperationMode", "icep.operation_mode", - FT_INT8, BASE_DEC, VALS(icep_mode_vals), 0x0, - "A byte representing Ice::OperationMode", HFILL - } - }, - - { &hf_icep_context, - { - "Invocation Context", "icep.context", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "The invocation context", HFILL - } - }, - - { &hf_icep_params_size, - { - "Input Parameters Size", "icep.params.size", - FT_INT32, BASE_DEC, NULL, 0x0, - "The encapsulated input parameters size", - HFILL - } - }, - - { &hf_icep_params_major, - { - "Input Parameters Encoding Major", - "icep.params.major", - FT_INT8, BASE_DEC, NULL, 0x0, - "The major encoding version of encapsulated parameters", - HFILL - } - }, - - { &hf_icep_params_minor, - { - "Input Parameters Encoding Minor", - "icep.params.minor", - FT_INT8, BASE_DEC, NULL, 0x0, - "The minor encoding version of encapsulated parameters", - HFILL - } - }, - - { &hf_icep_params_encapsulated, - { - "Encapsulated parameters", - "icep.params.encapsulated", - FT_BYTES, BASE_NONE, NULL, 0x0, - "Remaining encapsulated parameters", - HFILL - } - }, - - { &hf_icep_reply_data, - { - "Reported reply data", - "icep.params.reply_data", - FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL - } - }, - - { &hf_icep_invocation_key, - { - "Key", - "icep.invocation_key", - FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL - } - }, - - { &hf_icep_invocation_value, - { - "Value", - "icep.invocation_value", - FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL - } - }, - }; - - /* Setup protocol subtree array */ - - static gint *ett[] = { - &ett_icep, - &ett_icep_msg, - }; - - static ei_register_info ei[] = { - { &ei_icep_string_malformed, { "icep.string.malformed", PI_MALFORMED, PI_ERROR, "String malformed", EXPFILL }}, - { &ei_icep_string_too_long, { "icep.string.too_long", PI_PROTOCOL, PI_WARN, "string too long", EXPFILL }}, - { &ei_icep_facet_missing, { "icep.facet.missing", PI_MALFORMED, PI_ERROR, "facet field missing", EXPFILL }}, - { &ei_icep_facet_max_one_element, { "icep.facet.max_one_element", PI_PROTOCOL, PI_WARN, "facet can be max one element", EXPFILL }}, - { &ei_icep_context_missing, { "icep.context.missing", PI_MALFORMED, PI_ERROR, "context missing", EXPFILL }}, - { &ei_icep_context_too_long, { "icep.context.too_long", PI_PROTOCOL, PI_WARN, "too long context", EXPFILL }}, - { &ei_icep_params_missing, { "icep.params.missing", PI_MALFORMED, PI_ERROR, "params missing", EXPFILL }}, - { &ei_icep_params_size, { "icep.params.size.invalid", PI_PROTOCOL, PI_WARN, "params size too small", EXPFILL }}, - { &ei_icep_params_encapsulated, { "icep.params.encapsulated.missing", PI_PROTOCOL, PI_WARN, "missing encapsulated data (%d bytes)", EXPFILL }}, - { &ei_icep_length, { "icep.length_invalid", PI_MALFORMED, PI_ERROR, "Invalid length", EXPFILL }}, - { &ei_icep_mode_missing, { "icep.mode.missing", PI_MALFORMED, PI_ERROR, "mode field missing", EXPFILL }}, - { &ei_icep_batch_requests, { "icep.batch_requests.invalid", PI_PROTOCOL, PI_WARN, "too many batch requests", EXPFILL }}, - { &ei_icep_reply_data, { "icep.params.reply_data.missing", PI_MALFORMED, PI_ERROR, "Reply Data missing", EXPFILL }}, - { &ei_icep_message_type, { "icep.message_type.unknown", PI_PROTOCOL, PI_WARN, "Unknown Message Type", EXPFILL }}, - }; - - /* Register the protocol name and description */ - - proto_icep = - proto_register_protocol("Internet Communications Engine Protocol", - "ICEP", "icep"); - - /* Required function calls to register the header fields and subtrees used */ - - proto_register_field_array(proto_icep, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - expert_icep = expert_register_protocol(proto_icep); - expert_register_field_array(expert_icep, ei, array_length(ei)); - - icep_module = prefs_register_protocol(proto_icep, NULL); - - prefs_register_uint_preference(icep_module, "tcp.port", - "ICEP TCP Port", - "ICEP TCP port", - 10, - &icep_tcp_port); - - prefs_register_uint_preference(icep_module, "udp.port", - "ICEP UDP Port", - "ICEP UDP port", - 10, - &icep_udp_port); - - prefs_register_uint_preference(icep_module, "max_batch_requests", - "Maximum batch requests", - "Maximum number of batch requests allowed", - 10, &icep_max_batch_requests); - - prefs_register_uint_preference(icep_module, "max_ice_string_len", - "Maximum string length", - "Maximum length allowed of an ICEP string", - 10, &icep_max_ice_string_len); - - prefs_register_uint_preference(icep_module, "max_ice_context_pairs", - "Maximum context pairs", - "Maximum number of context pairs allowed", - 10, &icep_max_ice_context_pairs); + module_t *icep_module; + expert_module_t* expert_icep; + + /* Setup list of header fields */ + + static hf_register_info hf[] = { + + { &hf_icep_protocol_major, + { + "Protocol Major", "icep.protocol_major", + FT_INT8, BASE_DEC, NULL, 0x0, + "The protocol major version number", HFILL + } + }, + + { &hf_icep_protocol_minor, + { + "Protocol Minor", "icep.protocol_minor", + FT_INT8, BASE_DEC, NULL, 0x0, + "The protocol minor version number", HFILL + } + }, + + { &hf_icep_encoding_major, + { + "Encoding Major", "icep.encoding_major", + FT_INT8, BASE_DEC, NULL, 0x0, + "The encoding major version number", HFILL + } + }, + + { &hf_icep_encoding_minor, + { + "Encoding Minor", "icep.encoding_minor", + FT_INT8, BASE_DEC, NULL, 0x0, + "The encoding minor version number", HFILL + } + }, + + { &hf_icep_message_type, + { + "Message Type", "icep.message_type", + FT_INT8, BASE_DEC, VALS(icep_msgtype_vals), 0x0, + "The message type", HFILL + } + }, + + { &hf_icep_compression_status, + { + "Compression Status", "icep.compression_status", + FT_INT8, BASE_DEC, VALS(icep_zipstatus_vals), 0x0, + "The compression status of the message", HFILL + } + }, + + { &hf_icep_message_size, + { + "Message Size", "icep.message_status", + FT_INT32, BASE_DEC, NULL, 0x0, + "The size of the message in bytes, including the header", + HFILL + } + }, + + { &hf_icep_request_id, + { + "Request Identifier", "icep.request_id", + FT_INT32, BASE_DEC, NULL, 0x0, + "The request identifier", + HFILL + } + }, + + { &hf_icep_reply_status, + { + "Reply Status", "icep.protocol_major", + FT_INT8, BASE_DEC, VALS(icep_replystatus_vals), 0x0, + "The reply status", HFILL + } + }, + + { &hf_icep_id_name, + { + "Object Identity Name", "icep.id.name", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "The object identity name", HFILL + } + }, + + { &hf_icep_id_category, + { + "Object Identity Content", "icep.id.content", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "The object identity content", HFILL + } + }, + + { &hf_icep_facet, + { + "Facet Name", "icep.facet", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "The facet name", HFILL + } + }, + + { &hf_icep_operation, + { + "Operation Name", "icep.operation", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "The operation name", HFILL + } + }, + + { &hf_icep_mode, + { + "Ice::OperationMode", "icep.operation_mode", + FT_INT8, BASE_DEC, VALS(icep_mode_vals), 0x0, + "A byte representing Ice::OperationMode", HFILL + } + }, + + { &hf_icep_context, + { + "Invocation Context", "icep.context", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "The invocation context", HFILL + } + }, + + { &hf_icep_params_size, + { + "Input Parameters Size", "icep.params.size", + FT_INT32, BASE_DEC, NULL, 0x0, + "The encapsulated input parameters size", + HFILL + } + }, + + { &hf_icep_params_major, + { + "Input Parameters Encoding Major", + "icep.params.major", + FT_INT8, BASE_DEC, NULL, 0x0, + "The major encoding version of encapsulated parameters", + HFILL + } + }, + + { &hf_icep_params_minor, + { + "Input Parameters Encoding Minor", + "icep.params.minor", + FT_INT8, BASE_DEC, NULL, 0x0, + "The minor encoding version of encapsulated parameters", + HFILL + } + }, + + { &hf_icep_params_encapsulated, + { + "Encapsulated parameters", + "icep.params.encapsulated", + FT_BYTES, BASE_NONE, NULL, 0x0, + "Remaining encapsulated parameters", + HFILL + } + }, + + { &hf_icep_reply_data, + { + "Reported reply data", + "icep.params.reply_data", + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL + } + }, + + { &hf_icep_invocation_key, + { + "Key", + "icep.invocation_key", + FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL + } + }, + + { &hf_icep_invocation_value, + { + "Value", + "icep.invocation_value", + FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL + } + }, + }; + + /* Setup protocol subtree array */ + + static gint *ett[] = { + &ett_icep, + &ett_icep_msg, + }; + + static ei_register_info ei[] = { + { &ei_icep_string_malformed, { "icep.string.malformed", PI_MALFORMED, PI_ERROR, "String malformed", EXPFILL }}, + { &ei_icep_string_too_long, { "icep.string.too_long", PI_PROTOCOL, PI_WARN, "string too long", EXPFILL }}, + { &ei_icep_facet_missing, { "icep.facet.missing", PI_MALFORMED, PI_ERROR, "facet field missing", EXPFILL }}, + { &ei_icep_facet_max_one_element, { "icep.facet.max_one_element", PI_PROTOCOL, PI_WARN, "facet can be max one element", EXPFILL }}, + { &ei_icep_context_missing, { "icep.context.missing", PI_MALFORMED, PI_ERROR, "context missing", EXPFILL }}, + { &ei_icep_context_too_long, { "icep.context.too_long", PI_PROTOCOL, PI_WARN, "too long context", EXPFILL }}, + { &ei_icep_params_missing, { "icep.params.missing", PI_MALFORMED, PI_ERROR, "params missing", EXPFILL }}, + { &ei_icep_params_size, { "icep.params.size.invalid", PI_PROTOCOL, PI_WARN, "params size too small", EXPFILL }}, + { &ei_icep_params_encapsulated, { "icep.params.encapsulated.missing", PI_PROTOCOL, PI_WARN, "missing encapsulated data (%d bytes)", EXPFILL }}, + { &ei_icep_length, { "icep.length_invalid", PI_MALFORMED, PI_ERROR, "Invalid length", EXPFILL }}, + { &ei_icep_mode_missing, { "icep.mode.missing", PI_MALFORMED, PI_ERROR, "mode field missing", EXPFILL }}, + { &ei_icep_batch_requests, { "icep.batch_requests.invalid", PI_PROTOCOL, PI_WARN, "too many batch requests", EXPFILL }}, + { &ei_icep_reply_data, { "icep.params.reply_data.missing", PI_MALFORMED, PI_ERROR, "Reply Data missing", EXPFILL }}, + { &ei_icep_message_type, { "icep.message_type.unknown", PI_PROTOCOL, PI_WARN, "Unknown Message Type", EXPFILL }}, + }; + + /* Register the protocol name and description */ + + proto_icep = + proto_register_protocol("Internet Communications Engine Protocol", + "ICEP", "icep"); + + /* Required function calls to register the header fields and subtrees used */ + + proto_register_field_array(proto_icep, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + expert_icep = expert_register_protocol(proto_icep); + expert_register_field_array(expert_icep, ei, array_length(ei)); + + icep_module = prefs_register_protocol(proto_icep, NULL); + + prefs_register_uint_preference(icep_module, "tcp.port", + "ICEP TCP Port", + "ICEP TCP port", + 10, + &icep_tcp_port); + + prefs_register_uint_preference(icep_module, "udp.port", + "ICEP UDP Port", + "ICEP UDP port", + 10, + &icep_udp_port); + + prefs_register_uint_preference(icep_module, "max_batch_requests", + "Maximum batch requests", + "Maximum number of batch requests allowed", + 10, &icep_max_batch_requests); + + prefs_register_uint_preference(icep_module, "max_ice_string_len", + "Maximum string length", + "Maximum length allowed of an ICEP string", + 10, &icep_max_ice_string_len); + + prefs_register_uint_preference(icep_module, "max_ice_context_pairs", + "Maximum context pairs", + "Maximum number of context pairs allowed", + 10, &icep_max_ice_context_pairs); } void proto_reg_handoff_icep(void) { - static gboolean icep_prefs_initialized = FALSE; - static dissector_handle_t icep_tcp_handle, icep_udp_handle; - static guint old_icep_tcp_port = 0; - static guint old_icep_udp_port = 0; + static gboolean icep_prefs_initialized = FALSE; + static dissector_handle_t icep_tcp_handle, icep_udp_handle; + static guint old_icep_tcp_port = 0; + static guint old_icep_udp_port = 0; - /* Register as a heuristic TCP/UDP dissector */ - if (icep_prefs_initialized == FALSE) { - icep_tcp_handle = new_create_dissector_handle(dissect_icep_tcp, proto_icep); - icep_udp_handle = new_create_dissector_handle(dissect_icep_udp, proto_icep); + /* Register as a heuristic TCP/UDP dissector */ + if (icep_prefs_initialized == FALSE) { + icep_tcp_handle = new_create_dissector_handle(dissect_icep_tcp, proto_icep); + icep_udp_handle = new_create_dissector_handle(dissect_icep_udp, proto_icep); - heur_dissector_add("tcp", dissect_icep_tcp, proto_icep); - heur_dissector_add("udp", dissect_icep_udp, proto_icep); + heur_dissector_add("tcp", dissect_icep_tcp, proto_icep); + heur_dissector_add("udp", dissect_icep_udp, proto_icep); - icep_prefs_initialized = TRUE; - } + icep_prefs_initialized = TRUE; + } - /* Register TCP port for dissection */ - if(old_icep_tcp_port != 0 && old_icep_tcp_port != icep_tcp_port){ - dissector_delete_uint("tcp.port", old_icep_tcp_port, icep_tcp_handle); - } + /* Register TCP port for dissection */ + if(old_icep_tcp_port != 0 && old_icep_tcp_port != icep_tcp_port){ + dissector_delete_uint("tcp.port", old_icep_tcp_port, icep_tcp_handle); + } - if(icep_tcp_port != 0 && old_icep_tcp_port != icep_tcp_port) { - dissector_add_uint("tcp.port", icep_tcp_port, icep_tcp_handle); - } + if(icep_tcp_port != 0 && old_icep_tcp_port != icep_tcp_port) { + dissector_add_uint("tcp.port", icep_tcp_port, icep_tcp_handle); + } - old_icep_tcp_port = icep_tcp_port; + old_icep_tcp_port = icep_tcp_port; - /* Register UDP port for dissection */ - if(old_icep_udp_port != 0 && old_icep_udp_port != icep_udp_port){ - dissector_delete_uint("udp.port", old_icep_udp_port, icep_udp_handle); - } + /* Register UDP port for dissection */ + if(old_icep_udp_port != 0 && old_icep_udp_port != icep_udp_port){ + dissector_delete_uint("udp.port", old_icep_udp_port, icep_udp_handle); + } - if(icep_udp_port != 0 && old_icep_udp_port != icep_udp_port) { - dissector_add_uint("udp.port", icep_udp_port, icep_udp_handle); - } + if(icep_udp_port != 0 && old_icep_udp_port != icep_udp_port) { + dissector_add_uint("udp.port", icep_udp_port, icep_udp_handle); + } - old_icep_udp_port = icep_udp_port; + old_icep_udp_port = icep_udp_port; } diff --git a/epan/dissectors/packet-icq.c b/epan/dissectors/packet-icq.c index 5b88b27d2c..96cc8a9152 100644 --- a/epan/dissectors/packet-icq.c +++ b/epan/dissectors/packet-icq.c @@ -972,7 +972,7 @@ icqv5_srv_meta_user(proto_tree* tree, /* Tree to put the data in */ user_timezone = tvb_get_guint8(tvb, offset); proto_tree_add_text(sstree, tvb, offset, 1, "Timezone: %u", user_timezone); - offset++; + offset++; /* Get the authorize setting */ auth = tvb_get_guint8(tvb, offset); proto_tree_add_text(sstree, tvb, offset, 1, @@ -984,7 +984,7 @@ icqv5_srv_meta_user(proto_tree* tree, /* Tree to put the data in */ proto_tree_add_text(sstree, tvb, offset, 1, "Webaware: (%u) %s", auth, (auth==0)?"No":"Yes"); - offset++; + offset++; /* Get the authorize setting */ auth = tvb_get_guint8(tvb, offset); proto_tree_add_text(sstree, tvb, offset, 1, diff --git a/epan/dissectors/packet-iec104.c b/epan/dissectors/packet-iec104.c index a09da43fd7..69571f6e40 100644 --- a/epan/dissectors/packet-iec104.c +++ b/epan/dissectors/packet-iec104.c @@ -608,7 +608,7 @@ static gint ett_cp56time = -1; static expert_field ei_iec104_short_asdu = EI_INIT; static expert_field ei_iec104_apdu_min_len = EI_INIT; - + /* Misc. functions for dissection of signal values */ /* ==================================================================== @@ -644,14 +644,14 @@ static void get_CP56Time(tvbuff_t *tvb, guint8 *offset, proto_tree *iec104_heade value = tvb_get_guint8(tvb, *offset); tm.tm_mday = value & 0x1F; (*offset)++; - + value = tvb_get_guint8(tvb, *offset); tm.tm_mon = (value & 0x0F) - 1; (*offset)++; - - value = tvb_get_guint8(tvb, *offset); + + value = tvb_get_guint8(tvb, *offset); tm.tm_year = value & 0x7F; - if (tm.tm_year < 70) + if (tm.tm_year < 70) tm.tm_year += 100; (*offset)++; @@ -714,7 +714,7 @@ static guint8 get_TypeIdLength(guint8 TypeId) { guint8 ret = 0; td_asdu_length *item; - + item = (td_asdu_length *)asdu_length; while (item->value) { @@ -825,7 +825,7 @@ static void get_NVA(tvbuff_t *tvb, guint8 *offset, proto_tree *iec104_header_tre { gint16 value; float fvalue; - + value = (gint16)tvb_get_letohs(tvb, *offset); fvalue = (float)value / 32768; @@ -839,7 +839,7 @@ static void get_NVAspt(tvbuff_t *tvb, guint8 *offset, proto_tree *iec104_header_ { gint16 value; float fvalue; - + value = (gint16)tvb_get_letohs(tvb, *offset); fvalue = (float)value / 32768; @@ -1068,14 +1068,14 @@ static void dissect_iec104asdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr asduh.TypeId = tvb_get_guint8(tvb, 0); proto_tree_add_item(it104tree, hf_typeid, tvb, 0, 1, ENC_LITTLE_ENDIAN); asduh.DataLength = get_TypeIdLength(asduh.TypeId); - + /* Variable structure qualifier */ Bytex = tvb_get_guint8(tvb, 1); asduh.SQ = Bytex & F_SQ; asduh.NumIx = Bytex & 0x7F; proto_tree_add_item(it104tree, hf_sq, tvb, 1, 1, ENC_LITTLE_ENDIAN); proto_tree_add_item(it104tree, hf_numix, tvb, 1, 1, ENC_LITTLE_ENDIAN); - + /* Cause of transmission */ asduh.TNCause = tvb_get_guint8(tvb, 2); proto_tree_add_item(it104tree, hf_causetx, tvb, 2, 1, ENC_LITTLE_ENDIAN); @@ -1378,7 +1378,7 @@ static void dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr proto_tree_add_text(it104tree, tvb, Off, 1, "START"); ti = proto_tree_add_item(it104tree, hf_apdulen, tvb, Off + 1, 1, ENC_LITTLE_ENDIAN); - + len = tvb_get_guint8(tvb, Off + 1); if (len < APDU_MIN_LEN) { expert_add_info_format(pinfo, ti, &ei_iec104_apdu_min_len, "APDU less than %d bytes", APDU_MIN_LEN); @@ -1563,7 +1563,7 @@ proto_register_iec104asdu(void) { &hf_cp56time_su, { "SU", "104asdu.cp56time.su", FT_BOOLEAN, 8, TFS(&tfs_local_dst), 0x80, "CP56Time summer time", HFILL }}, - + { &hf_cp56time_day, { "Day", "104asdu.cp56time.day", FT_UINT8, BASE_DEC, NULL, 0x1F, "CP56Time day", HFILL }}, diff --git a/epan/dissectors/packet-ieee1722.c b/epan/dissectors/packet-ieee1722.c index 16d905e85a..d93cf1e08f 100644 --- a/epan/dissectors/packet-ieee1722.c +++ b/epan/dissectors/packet-ieee1722.c @@ -150,7 +150,7 @@ dissect_1722(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(ieee1722_tree, hf_1722_svfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); proto_tree_add_item(ieee1722_tree, hf_1722_verfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); } - + /* Version field ends the common AVTPDU. Now parse the specfic packet type */ subtype = tvb_get_guint8(tvb, IEEE_1722_CD_OFFSET); @@ -163,7 +163,7 @@ dissect_1722(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(ieee1722_tree, hf_1722_mrfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); proto_tree_add_item(ieee1722_tree, hf_1722_gvfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); proto_tree_add_item(ieee1722_tree, hf_1722_tvfield, tvb, IEEE_1722_VERSION_OFFSET, 1, ENC_BIG_ENDIAN); - + /* Add the rest of the packet fields */ proto_tree_add_item(ieee1722_tree, hf_1722_seqnum, tvb, IEEE_1722_SEQ_NUM_OFFSET, 1, ENC_BIG_ENDIAN); @@ -388,7 +388,7 @@ void proto_register_1722(void) /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_1722, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - + /* Sub-dissector for 1772.1 */ avb_dissector_table = register_dissector_table("ieee1722.subtype", "IEEE1722 AVBTP Subtype", FT_UINT8, BASE_HEX); diff --git a/epan/dissectors/packet-ieee17221.c b/epan/dissectors/packet-ieee17221.c index 67d462a143..665c873070 100644 --- a/epan/dissectors/packet-ieee17221.c +++ b/epan/dissectors/packet-ieee17221.c @@ -1311,7 +1311,7 @@ #define AECP_U_FLAG_MASK 0x80 #define AECP_MSRP_MAPPINGS_COUNT_MASK 0x00 #define AECP_AS_CAPABLE_FLAG_MASK 0x01 -#define AECP_GPTP_ENABLED_FLAG_MASK 0x02 +#define AECP_GPTP_ENABLED_FLAG_MASK 0x02 #define AECP_SRP_ENABLED_FLAG_MASK 0x04 diff --git a/epan/dissectors/packet-ieee80211-radiotap-defs.h b/epan/dissectors/packet-ieee80211-radiotap-defs.h index e0b9a6a009..9fa3988be4 100644 --- a/epan/dissectors/packet-ieee80211-radiotap-defs.h +++ b/epan/dissectors/packet-ieee80211-radiotap-defs.h @@ -217,7 +217,7 @@ enum ieee80211_radiotap_type { }; /* not (yet) defined Radiotap present flag */ -/* Bit 22 to 28 are not defined (in binary : 0001 1111 1100 0000 0000 0000 0000 0000 */ +/* Bit 22 to 28 are not defined (in binary : 0001 1111 1100 0000 0000 0000 0000 0000 */ #define IEEE80211_RADIOTAP_NOTDEFINED 0x1FC00000 /* Channel flags. */ diff --git a/epan/dissectors/packet-image-jfif.c b/epan/dissectors/packet-image-jfif.c index 2065972ef5..3f3823f95b 100644 --- a/epan/dissectors/packet-image-jfif.c +++ b/epan/dissectors/packet-image-jfif.c @@ -810,7 +810,7 @@ dissect_jfif(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ if (start_marker != start_fill) proto_tree_add_text(subtree, tvb, start_fill, start_marker - start_fill, "Fill bytes"); - + marker = tvb_get_ntohs(tvb, start_marker); str = try_val_to_str(marker, vals_marker); if (str) { /* Known marker */ diff --git a/epan/dissectors/packet-imf.h b/epan/dissectors/packet-imf.h index 7f945ea00f..3bd67f89e2 100644 --- a/epan/dissectors/packet-imf.h +++ b/epan/dissectors/packet-imf.h @@ -24,9 +24,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* Find the end of the next IMF field in the tvb. +/* Find the end of the next IMF field in the tvb. * This is not necessarily the first \r\n as there may be continuation lines. - * + * * If we have found the last field (terminated by \r\n\r\n) we indicate this in last_field . */ diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c index 7016f24299..b100ba2ae7 100644 --- a/epan/dissectors/packet-ipsec.c +++ b/epan/dissectors/packet-ipsec.c @@ -867,7 +867,7 @@ export_ipsec_pdu(dissector_handle_t dissector_handle, packet_info *pinfo, tvbuff (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = tvb_length(tvb); + exp_pdu_data->tvb_length = tvb_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-ipsi-ctl.c b/epan/dissectors/packet-ipsi-ctl.c index 77b9099c40..884a961a3c 100644 --- a/epan/dissectors/packet-ipsi-ctl.c +++ b/epan/dissectors/packet-ipsi-ctl.c @@ -111,7 +111,7 @@ static void dissect_ipsictl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if (remaining_length>=2) { - field1 = tvb_get_ntohs(tvb, loffset); + field1 = tvb_get_ntohs(tvb, loffset); llength-=2; } diff --git a/epan/dissectors/packet-ipxwan.c b/epan/dissectors/packet-ipxwan.c index 9650dfb532..15e12c991e 100644 --- a/epan/dissectors/packet-ipxwan.c +++ b/epan/dissectors/packet-ipxwan.c @@ -302,15 +302,15 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be >= 3", option_data_len); } else { - proto_tree_add_item(option_tree, hf_ipxwan_compression_options, + proto_tree_add_item(option_tree, hf_ipxwan_compression_options, tvb, offset+1, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(option_tree, hf_ipxwan_compression_slots, + proto_tree_add_item(option_tree, hf_ipxwan_compression_slots, tvb, offset+2, 1, ENC_BIG_ENDIAN); } break; default: - proto_tree_add_item(option_tree, hf_ipxwan_compression_parameters, + proto_tree_add_item(option_tree, hf_ipxwan_compression_parameters, tvb, offset+1, option_data_len-1, ENC_NA); break; } @@ -318,12 +318,12 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case OPT_PAD: - proto_tree_add_item(option_tree, hf_ipxwan_padding, + proto_tree_add_item(option_tree, hf_ipxwan_padding, tvb, offset, option_data_len, ENC_NA); break; default: - proto_tree_add_item(option_tree, hf_ipxwan_option_value, + proto_tree_add_item(option_tree, hf_ipxwan_option_value, tvb, offset, option_data_len, ENC_NA); break; } diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index b7a582fda9..3072bc4dd8 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -4881,7 +4881,7 @@ static guint ikev2_key_hash_func(gconstpointer k) { } static gint ikev2_key_equal_func(gconstpointer k1, gconstpointer k2) { - const ikev2_uat_data_key_t *key1 = (const ikev2_uat_data_key_t *)k1; + const ikev2_uat_data_key_t *key1 = (const ikev2_uat_data_key_t *)k1; const ikev2_uat_data_key_t *key2 = (const ikev2_uat_data_key_t *)k2; if (key1->spii_len != key2->spii_len) return 0; if (key1->spir_len != key2->spir_len) return 0; diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index e66c762a72..a30d03d61f 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -876,7 +876,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off val_to_str (asyncEvent, iscsi_asyncevents, "0x%x")); } } - + /* In the interest of speed, if "tree" is NULL, don't do any work not necessary to generate protocol tree items. */ if (tree) { diff --git a/epan/dissectors/packet-isis-lsp.c b/epan/dissectors/packet-isis-lsp.c index ede2f3c972..73220d910d 100644 --- a/epan/dissectors/packet-isis-lsp.c +++ b/epan/dissectors/packet-isis-lsp.c @@ -2381,7 +2381,7 @@ dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb, proto_tree *tree, tvb_get_ntoh24(tvb, offset+13+i) ); break; case 29: - dissect_subclv_spb_link_metric(tvb, ntree, + dissect_subclv_spb_link_metric(tvb, ntree, offset+13+i, clv_code, clv_len); break; case 250: diff --git a/epan/dissectors/packet-isis-snp.c b/epan/dissectors/packet-isis-snp.c index 9f2f45fc3a..a5e073b08b 100644 --- a/epan/dissectors/packet-isis-snp.c +++ b/epan/dissectors/packet-isis-snp.c @@ -475,14 +475,14 @@ dissect_snp_checksum_clv(tvbuff_t *tvb, return; } - checksum = tvb_get_ntohs(tvb, offset); + checksum = tvb_get_ntohs(tvb, offset); /* the check_and_get_checksum() function needs to know how big * the packet is. we can either pass through the pdu-len through several layers * of dissectors and wrappers or extract the PDU length field from the PDU specific header * which is offseted 8 bytes (relative to the beginning of the IS-IS packet) in SNPs */ - pdu_length = tvb_get_ntohs(tvb, 8); + pdu_length = tvb_get_ntohs(tvb, 8); /* unlike the LSP checksum verification which starts at an offset of 12 we start at offset 0*/ switch (check_and_get_checksum(tvb, 0, pdu_length, checksum, offset, &cacl_checksum)) diff --git a/epan/dissectors/packet-iso7816.c b/epan/dissectors/packet-iso7816.c index a20e6f6819..8d2ac13ade 100644 --- a/epan/dissectors/packet-iso7816.c +++ b/epan/dissectors/packet-iso7816.c @@ -524,7 +524,7 @@ dissect_iso7816_cmd_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) iso7816_trans->cmd_frame, (void *)iso7816_trans); } } - + ret = dissect_iso7816_class(tvb, offset, pinfo, tree); if (ret==-1) { /* the class byte says that the remaining APDU is not @@ -611,7 +611,7 @@ dissect_iso7816_resp_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } } - + /* - 2 bytes SW1, SW2 */ body_len = tvb_reported_length_remaining(tvb, offset) - 2; diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c index 44db39b3d9..78013386fa 100644 --- a/epan/dissectors/packet-isup.c +++ b/epan/dissectors/packet-isup.c @@ -3853,7 +3853,7 @@ dissect_isup_range_and_status_parameter(tvbuff_t *parameter_tvb, proto_tree *par range_tree = proto_item_add_subtree(item, ett_isup_range); if(range<9){ proto_tree_add_text(range_tree, parameter_tvb , offset, 1, "Bit %u %s bit 1", - range, + range, decode_bits_in_field(8-range, range, tvb_get_guint8(parameter_tvb,offset))); } }else{ @@ -5795,7 +5795,7 @@ dissect_isup_generic_notification_indicator_parameter(tvbuff_t *parameter_tvb, p indicators = tvb_get_guint8(parameter_tvb, 0); proto_tree_add_item(parameter_tree, hf_isup_extension_ind, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); proto_tree_add_item(parameter_tree, hf_isup_notification_indicator, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); - proto_item_set_text(parameter_item,"Generic notification indicator: %s", + proto_item_set_text(parameter_item,"Generic notification indicator: %s", val_to_str((indicators&0x7f),q763_generic_notification_indicator_vals,"Reserved (0x%X)")); } /* ------------------------------------------------------------------ @@ -6716,7 +6716,7 @@ dissect_isup_uid_capability_indicators_parameter(tvbuff_t *parameter_tvb, proto_ */ static void dissect_isup_redirect_counter_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item, guint8 itu_isup_variant) -{ +{ guint length = tvb_length(parameter_tvb); switch(itu_isup_variant) { @@ -6727,7 +6727,7 @@ dissect_isup_redirect_counter_parameter(tvbuff_t *parameter_tvb, proto_tree *par proto_tree_add_text(parameter_tree, parameter_tvb, 0, length, "Redirect counter (format is a national matter)"); break; } - + proto_item_set_text(parameter_item, "Redirect counter (%u Byte%s)", length , plurality(length, "", "s")); } /* ------------------------------------------------------------------ diff --git a/epan/dissectors/packet-ixiatrailer.c b/epan/dissectors/packet-ixiatrailer.c index 05f5187c3f..b1ee84d699 100644 --- a/epan/dissectors/packet-ixiatrailer.c +++ b/epan/dissectors/packet-ixiatrailer.c @@ -24,7 +24,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - + #include "config.h" #include diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c index d72d2ea326..00882d529a 100644 --- a/epan/dissectors/packet-json.c +++ b/epan/dissectors/packet-json.c @@ -154,7 +154,7 @@ dissect_json(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tvb_length_remaining(tvb, offset) > 0) { int datalen, reported_datalen; tvbuff_t *next_tvb; - + datalen = tvb_length_remaining(tvb, offset); reported_datalen = tvb_reported_length_remaining(tvb, offset); @@ -362,7 +362,7 @@ static char *json_string_unescape(tvbparse_elem_t *tok) } } - } else + } else str[j++] = ch; } @@ -502,7 +502,7 @@ static void init_json_parser(void) { tvbparse_optional(-1, NULL, NULL, NULL, tvbparse_set_seq(-1, NULL, NULL, NULL, want_value, - tvbparse_some(-1, 0, G_MAXINT, NULL, NULL, NULL, + tvbparse_some(-1, 0, G_MAXINT, NULL, NULL, NULL, tvbparse_set_seq(-1, NULL, NULL, NULL, want_value_separator, want_value, @@ -526,7 +526,7 @@ static void init_json_parser(void) { tvbparse_optional(-1, NULL, NULL, NULL, tvbparse_set_seq(-1, NULL, NULL, NULL, want_member, - tvbparse_some(-1, 0, G_MAXINT, NULL, NULL, NULL, + tvbparse_some(-1, 0, G_MAXINT, NULL, NULL, NULL, tvbparse_set_seq(-1, NULL, NULL, NULL, want_value_separator, want_member, diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index cf4370dee4..99d49bab53 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -1050,7 +1050,7 @@ static int dissect_jxta_message_framing(tvbuff_t * tvb, packet_info * pinfo, pro /* Disable speed optimization because of use of append_text */ proto_tree_set_visible(tree, TRUE); - + framing_tree_item = proto_tree_add_none_format(tree, hf_jxta_framing, tvb, tree_offset, -1, "JXTA Message Framing Headers"); framing_tree = proto_item_add_subtree(framing_tree_item, ett_jxta_framing); diff --git a/epan/dissectors/packet-kdsp.c b/epan/dissectors/packet-kdsp.c index 3647980e93..ab5ff5afed 100644 --- a/epan/dissectors/packet-kdsp.c +++ b/epan/dissectors/packet-kdsp.c @@ -309,7 +309,7 @@ dissect_kdsp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (bitmap & FCS_FLAG) { sub_item = proto_tree_add_item(kdsp_tree, hf_kdsp_fcs, tvb, offset, 4, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_sub_fcs); - + proto_tree_add_item(sub_tree, hf_kdsp_fcs_data, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; } @@ -380,7 +380,7 @@ dissect_kdsp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 8; proto_tree_add_item(sub_tree, hf_kdsp_cpt_dlt, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; - + ieee80211_len = (length + FRAME_HEADER_LEN) - offset; ieee80211_tvb = tvb_new_subset(tvb, offset, ieee80211_len, reported_ieee80211_len); call_dissector(ieee80211_handle, ieee80211_tvb, pinfo, tree); diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c index b9ba012a09..81d44128c8 100644 --- a/epan/dissectors/packet-lapd.c +++ b/epan/dissectors/packet-lapd.c @@ -317,7 +317,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) data_len = 0; state = OUT_OF_SYNC; bit_offset++; - + lapd_log_abort(tvb, pinfo, tree, offset, "Abort! 7 ones!"); } else { bit_offset++; diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c index be0c1fc52a..87aa4ca065 100644 --- a/epan/dissectors/packet-lmp.c +++ b/epan/dissectors/packet-lmp.c @@ -742,7 +742,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) if (lmp_checksum_config) { cksum = tvb_get_ntohs(tvb, offset+6); - ti = proto_tree_add_item(lmp_header_tree, hf_lmp_filter[LMPF_CHECKSUM], tvb, + ti = proto_tree_add_item(lmp_header_tree, hf_lmp_filter[LMPF_CHECKSUM], tvb, offset+6, 2, ENC_BIG_ENDIAN); if (!pinfo->fragmented && (int) tvb_length(tvb) >= msg_length) { /* The packet isn't part of a fragmented datagram and isn't truncated, so we can checksum it. */ diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index c20e29eb7d..2ab0beb8a9 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -1210,7 +1210,7 @@ typedef struct drx_running_state_t guint64 RTT[8]; guint64 retransmissionTimer[8]; guint64 shortCycleTimer; - + } drx_running_state_t; /* Have 2 states for each PDU. One for before the PDU/event, and one after. @@ -1284,7 +1284,7 @@ static void mac_lte_drx_start_timer(drx_state_t *p_state, drx_timer_type_t timer } /* Set timer */ - *pTimer = currentTime + timerLength; + *pTimer = currentTime + timerLength; } /* Stop the specified timer. */ @@ -1324,7 +1324,7 @@ static gboolean mac_lte_drx_has_timer_expired(drx_state_t *p_state, drx_timer_ty switch (timer_type) { case drx_onduration_timer: pTimer = &(p_state->state_before.onDurationTimer); - break; + break; case drx_inactivity_timer: pTimer = &(p_state->state_before.inactivityTimer); break; @@ -1375,7 +1375,7 @@ static void mac_lte_drx_new_dlsch_data(guint16 ueid) /* Start retransmission timer */ if (ue_state != NULL) { mac_lte_drx_start_timer(ue_state, drx_inactivity_timer, 0); - } + } } static void mac_lte_drx_dl_crc_error(guint16 ueid) @@ -1401,7 +1401,7 @@ static void mac_lte_drx_control_element_received(guint16 ueid) if (ue_state != NULL) { mac_lte_drx_stop_timer(ue_state, drx_onduration_timer, 0); mac_lte_drx_stop_timer(ue_state, drx_inactivity_timer, 0); - } + } } @@ -1415,7 +1415,7 @@ static void update_drx_info(packet_info *pinfo, mac_lte_info *p_mac_lte_info) /* Look up state of this UE */ drx_state_t *ue_state = (drx_state_t *)g_hash_table_lookup(mac_lte_drx_ue_state, GUINT_TO_POINTER((guint)p_mac_lte_info->ueid)); - + if (ue_state != NULL) { guint16 SFN = p_mac_lte_info->sysframeNumber; guint16 SF = p_mac_lte_info->subframeNumber; @@ -1423,7 +1423,7 @@ static void update_drx_info(packet_info *pinfo, mac_lte_info *p_mac_lte_info) /* Make sure the first time reference has been set */ if (!ue_state->state_before.firstCycleStartSet) { guint16 subframes = SFN*10 + SF; - + /* Set firstCycleStart to be the previous SFN=0, SF=0 */ if (pinfo->fd->abs_ts.nsecs > ((subframes % 1000)*1000)) { ue_state->state_before.firstCycleStart.secs = pinfo->fd->abs_ts.secs - (subframes/1000); @@ -1434,25 +1434,25 @@ static void update_drx_info(packet_info *pinfo, mac_lte_info *p_mac_lte_info) ue_state->state_before.firstCycleStart.nsecs = 1000000 + pinfo->fd->abs_ts.nsecs - (subframes*1000); } ue_state->state_before.firstCycleStartSet = TRUE; - + /* Set current time to now */ ue_state->state_before.currentTime = pinfo->fd->abs_ts; ue_state->state_before.currentSFN = SFN; ue_state->state_before.currentSF = SF; } - + /* Will loop around these checks, once for each subframe between previous currentTime for this UE, and the time now!!! */ /* It *should* be possible to just deal with the elapsed time all at once, but much harder to get right, so loop. */ - + /* TODO: what to do if there is a huge gap between previous frame and now?? */ - + /* TODO: add a test that ensures we are still in the correct SFN cycle! */ while ((ue_state->state_before.currentSFN != SFN) || (ue_state->state_before.currentSF != SF)) { - + /* TODO check for timers that have expired and change state accordingly */ - + /* See if onDuration timer should be started */ guint16 subframes = SFN*10 + SF; if (!ue_state->state_before.inShortCycle) { @@ -1465,7 +1465,7 @@ static void update_drx_info(packet_info *pinfo, mac_lte_info *p_mac_lte_info) if ((subframes % ue_state->config.shortCycle) == (ue_state->config.onDurationTimer % ue_state->config.shortCycle)) { mac_lte_drx_start_timer(ue_state, drx_onduration_timer, 0); ue_state->state_before.inOnDuration = TRUE; - } + } } /* See if onDuration has expired */ @@ -1481,9 +1481,9 @@ static void update_drx_info(packet_info *pinfo, mac_lte_info *p_mac_lte_info) mac_lte_drx_start_timer(ue_state, drx_retx_timer, harq_id); } } - + /* Reception of DRX command is dealt with separately at the moment... */ - + /* Inactivity timer expired */ if (mac_lte_drx_has_timer_expired(ue_state, drx_inactivity_timer, 0, &time_until_expires)) { if (ue_state->config.shortCycleConfigured) { @@ -1507,7 +1507,7 @@ static void update_drx_info(packet_info *pinfo, mac_lte_info *p_mac_lte_info) ue_state->state_before.currentSF++; } } - + /* Set current time to now */ ue_state->state_before.currentTime = pinfo->fd->abs_ts; } @@ -1624,7 +1624,7 @@ static void show_drx_info(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, ti = proto_tree_add_boolean(drx_state_tree, hf_mac_lte_drx_state_long_cycle_on, tvb, 0, 0, frame_state->state_before.inOnDuration); PROTO_ITEM_SET_GENERATED(ti); - + proto_item_append_text(drx_state_ti, " (Offset-into-Long=%u, Long-cycle-on=%s)", offset_into_long_cycle, frame_state->state_before.inOnDuration ? "True" : "False"); } @@ -1641,7 +1641,7 @@ static void show_drx_info(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, ti = proto_tree_add_boolean(drx_state_tree, hf_mac_lte_drx_state_short_cycle_on, tvb, 0, 0, frame_state->state_before.inOnDuration); PROTO_ITEM_SET_GENERATED(ti); - + proto_item_append_text(drx_state_ti, " (Offset-into-Short=%u, Long-cycle-on=%s)", offset_into_short_cycle, frame_state->state_before.inOnDuration ? "True" : "False"); } @@ -3247,7 +3247,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* Store 'before' snapshot of UE state for this frame */ set_drx_info(pinfo, p_mac_lte_info); - + /* Changes of state caused by events */ if (p_mac_lte_info->direction == DIRECTION_UPLINK) { mac_lte_drx_new_ulsch_data(p_mac_lte_info->ueid); diff --git a/epan/dissectors/packet-mac-lte.h b/epan/dissectors/packet-mac-lte.h index 41bd4408df..5774055550 100644 --- a/epan/dissectors/packet-mac-lte.h +++ b/epan/dissectors/packet-mac-lte.h @@ -23,9 +23,9 @@ * * This header file may also be distributed under * the terms of the BSD Licence as follows: - * + * * Copyright (C) 2009 Martin Mathieson. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,7 +34,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -136,7 +136,7 @@ typedef struct mac_lte_info /* Carrier ID */ mac_lte_carrier_id carrierId; - + /* DL only. Is this known to be a retransmission? */ mac_lte_dl_retx dl_retx; @@ -235,7 +235,7 @@ int is_mac_lte_frame_retx(packet_info *pinfo, guint8 direction); /* Fixed fields. This is followed by the following 3 mandatory fields: - radioType (1 byte) - - direction (1 byte) + - direction (1 byte) - rntiType (1 byte) (where the allowed values are defined above */ diff --git a/epan/dissectors/packet-mgcp.h b/epan/dissectors/packet-mgcp.h index 1ca113a9d4..4f1c2970f9 100644 --- a/epan/dissectors/packet-mgcp.h +++ b/epan/dissectors/packet-mgcp.h @@ -24,7 +24,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - + /* A simple MGCP type that is occasionally handy */ typedef enum _mgcp_type { diff --git a/epan/dissectors/packet-mime-encap.c b/epan/dissectors/packet-mime-encap.c index fe3556ddd4..dac1683b77 100644 --- a/epan/dissectors/packet-mime-encap.c +++ b/epan/dissectors/packet-mime-encap.c @@ -81,7 +81,7 @@ dissect_mime_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* End of file? */ if (!len && whole_tvb) { - /* + /* * Here we're doing some trick. * * We don't want to call dissectors with composite tvb, cause dissectors can create subsets or real data child diff --git a/epan/dissectors/packet-mojito.c b/epan/dissectors/packet-mojito.c index 041b4641f8..48199ae30a 100644 --- a/epan/dissectors/packet-mojito.c +++ b/epan/dissectors/packet-mojito.c @@ -201,7 +201,7 @@ dissect_mojito_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree_add_item(socket_tree, hf_mojito_socketaddress_version, tvb, offset, 1, ENC_NA); offset += 1; - + switch (socket_address_version) { case FT_IPv4_LEN: /* IPv4 */ @@ -262,7 +262,7 @@ dissect_mojito_contact(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset += 20; offset = dissect_mojito_address(tvb, pinfo, contact_tree, offset, "Socket Address"); - + if (offset == 0) { return 0; diff --git a/epan/dissectors/packet-mount.h b/epan/dissectors/packet-mount.h index 3d1f2f497d..b536df89e7 100644 --- a/epan/dissectors/packet-mount.h +++ b/epan/dissectors/packet-mount.h @@ -1,5 +1,5 @@ /* packet-mount.h */ -/* $Id$ +/* $Id$ * * Wireshark - Network traffic analyzer * By Gerald Combs diff --git a/epan/dissectors/packet-mp4ves.h b/epan/dissectors/packet-mp4ves.h index 4f0c5c909a..e25cc8b34e 100644 --- a/epan/dissectors/packet-mp4ves.h +++ b/epan/dissectors/packet-mp4ves.h @@ -26,7 +26,7 @@ #ifndef PACKET_MP4VES_H #define PACKET_MP4VES_H -extern const value_string mp4ves_level_indication_vals[]; +extern const value_string mp4ves_level_indication_vals[]; void dissect_mp4ves_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); #endif /* PACKET_MP4VES_H */ diff --git a/epan/dissectors/packet-mq-pcf.c b/epan/dissectors/packet-mq-pcf.c index e1b0951972..30b35f0876 100644 --- a/epan/dissectors/packet-mq-pcf.c +++ b/epan/dissectors/packet-mq-pcf.c @@ -477,7 +477,7 @@ void proto_register_mqpcf(void) &ett_mqpcf_prm, &ett_mqpcf_cfh, }; - static ei_register_info ei[] = + static ei_register_info ei[] = { { &ei_mq_pcf_prmln0, { "mqpcf.parm.len0", PI_MALFORMED, PI_ERROR, "MQPCF Parameter length is 0", EXPFILL }}, { &ei_mq_pcf_MaxInt, { "mqpcf.parm.IntList", PI_UNDECODED, PI_WARN, "MQPCF Parameter Integer list exhausted", EXPFILL }}, diff --git a/epan/dissectors/packet-mrcpv2.c b/epan/dissectors/packet-mrcpv2.c index dfe9f224eb..17a326b885 100644 --- a/epan/dissectors/packet-mrcpv2.c +++ b/epan/dissectors/packet-mrcpv2.c @@ -380,7 +380,7 @@ static gint ett_Event_Line = -1; static gint ett_Status_Code = -1; /* format status code description */ -static const string_string status_code_vals[] = { +static const string_string status_code_vals[] = { { "200", "Success" }, { "201", "Success with some optional header fields ignored" }, { "401", "Client Failure: Method not allowed" }, diff --git a/epan/dissectors/packet-mtp2.c b/epan/dissectors/packet-mtp2.c index 7e035ed9ec..8c3662984d 100644 --- a/epan/dissectors/packet-mtp2.c +++ b/epan/dissectors/packet-mtp2.c @@ -184,7 +184,7 @@ mtp2_decode_crc16(tvbuff_t *tvb, proto_tree *fh_tree, packet_info *pinfo) len -= 2; reported_len -= 2; next_tvb = tvb_new_subset(tvb, proto_offset, len, reported_len); - + /* * Compute the FCS and put it into the tree. */ @@ -246,7 +246,7 @@ dissect_mtp2_lssu(tvbuff_t *su_tvb, packet_info *pinfo, proto_item *mtp2_tree) { guint8 sf = 0xFF; guint8 sf_offset, sf_extra_offset; - + if (use_extended_sequence_numbers) { sf_offset = EXTENDED_SF_OFFSET; sf_extra_offset = EXTENDED_SF_EXTRA_OFFSET; @@ -299,8 +299,8 @@ dissect_mtp2_su(tvbuff_t *su_tvb, packet_info *pinfo, proto_item *mtp2_item, pro guint16 li; tvbuff_t *next_tvb = NULL; - dissect_mtp2_header(su_tvb, mtp2_tree); - if (validate_crc) + dissect_mtp2_header(su_tvb, mtp2_tree); + if (validate_crc) next_tvb = mtp2_decode_crc16(su_tvb, mtp2_tree, pinfo); if (use_extended_sequence_numbers) @@ -312,8 +312,8 @@ dissect_mtp2_su(tvbuff_t *su_tvb, packet_info *pinfo, proto_item *mtp2_item, pro dissect_mtp2_fisu(pinfo); break; case 1: - case 2: - if (validate_crc) + case 2: + if (validate_crc) dissect_mtp2_lssu(next_tvb, pinfo, mtp2_tree); else dissect_mtp2_lssu(su_tvb, pinfo, mtp2_tree); @@ -321,9 +321,9 @@ dissect_mtp2_su(tvbuff_t *su_tvb, packet_info *pinfo, proto_item *mtp2_item, pro default: /* In some capture files (like .rf5), CRC are not present */ /* So, to avoid trouble, give the complete buffer if CRC validation is disabled */ - if (validate_crc) + if (validate_crc) dissect_mtp2_msu(next_tvb, pinfo, mtp2_item, tree); - else + else dissect_mtp2_msu(su_tvb, pinfo, mtp2_item, tree); break; } @@ -339,9 +339,9 @@ dissect_mtp2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea use_extended_sequence_numbers = use_extended_sequence_numbers_default; else use_extended_sequence_numbers = (pinfo->annex_a_used == MTP2_ANNEX_A_USED); - + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP2"); - + if (tree) { mtp2_item = proto_tree_add_item(tree, proto_mtp2, tvb, 0, -1, ENC_NA); mtp2_tree = proto_item_add_subtree(mtp2_item, ett_mtp2); @@ -403,9 +403,9 @@ proto_register_mtp2(void) proto_register_subtree_array(ett, array_length(ett)); expert_mtp2 = expert_register_protocol(proto_mtp2); expert_register_field_array(expert_mtp2, ei, array_length(ei)); - + mtp2_module = prefs_register_protocol(proto_mtp2, NULL); - prefs_register_bool_preference(mtp2_module, + prefs_register_bool_preference(mtp2_module, "use_extended_sequence_numbers", "Use extended sequence numbers", "Whether the MTP2 dissector should use extended sequence numbers as described in Q.703, Annex A as a default.", diff --git a/epan/dissectors/packet-mux27010.c b/epan/dissectors/packet-mux27010.c index 5a7fa68cf5..6736499fa8 100644 --- a/epan/dissectors/packet-mux27010.c +++ b/epan/dissectors/packet-mux27010.c @@ -663,7 +663,7 @@ getControlChannelValues(tvbuff_t *tvb, proto_tree *field_tree_ctr, int offset, case MUX27010_COMMAND_TEST_COMMAND: proto_tree_add_item(field_tree_ctr, hf_mux27010_controlchanneldetailedvaluetestcommandversion, tvb, offset, 1, ENC_BIG_ENDIAN); controlchannel_iei = tvb_get_guint8(tvb, offset); - if ((controlchannel_iei == MUX27010_VALUE_CONTROLCHANNEL_TEST_IEI_TE) || + if ((controlchannel_iei == MUX27010_VALUE_CONTROLCHANNEL_TEST_IEI_TE) || (controlchannel_iei == MUX27010_VALUE_CONTROLCHANNEL_TEST_IEI_MS)) { proto_tree_add_item(field_tree_ctr, hf_mux27010_controlchannel_iei_coding, tvb, offset, 1, ENC_BIG_ENDIAN); } @@ -817,7 +817,7 @@ dissect_mux27010(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) length_info = 0; /*Check the frame type because in RR, RNR and REJ are no info and no lenght fields*/ - if ((frame_type != MUX27010_FRAMETYPE_CONTROL_FLAG_RR) && (frame_type != MUX27010_FRAMETYPE_CONTROL_FLAG_RNR) && + if ((frame_type != MUX27010_FRAMETYPE_CONTROL_FLAG_RR) && (frame_type != MUX27010_FRAMETYPE_CONTROL_FLAG_RNR) && (frame_type != MUX27010_FRAMETYPE_CONTROL_FLAG_REJ)){ /*Add a subtree (=item) to the child node => in this subtree will be the details of length field*/ tf = proto_tree_add_item(mux27010_tree, hf_mux27010_length, tvb, offset, 1, ENC_BIG_ENDIAN); diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c index b37500ad6c..e2b8ec0818 100644 --- a/epan/dissectors/packet-nas_eps.c +++ b/epan/dissectors/packet-nas_eps.c @@ -1831,7 +1831,7 @@ de_emm_ue_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, /* NF capability (octet 7, bit 1) */ proto_tree_add_item(tree, hf_nas_eps_emm_nf_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN); curr_offset++; - + while ((curr_offset - offset) < len) { proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN); curr_offset++; diff --git a/epan/dissectors/packet-nat-pmp.c b/epan/dissectors/packet-nat-pmp.c index ab7cf60f2c..4f5e24e538 100644 --- a/epan/dissectors/packet-nat-pmp.c +++ b/epan/dissectors/packet-nat-pmp.c @@ -5,7 +5,7 @@ * * Copyright 2009, Stig Bjorlykke * - * Routines for Port Control Protocol packet disassembly + * Routines for Port Control Protocol packet disassembly * (backwards compatible with NAT Port Mapping protocol) * http://tools.ietf.org/html/draft-ietf-pcp-base-24 * RFC6887: Port Control Protocol (PCP) http://tools.ietf.org/html/rfc6887 @@ -248,7 +248,7 @@ dissect_nat_pmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data proto_tree_add_item (nat_pmp_tree, hf_internal_port, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - + proto_tree_add_item (nat_pmp_tree, hf_external_port_requested, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; @@ -266,7 +266,7 @@ dissect_nat_pmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data proto_tree_add_item (nat_pmp_tree, hf_internal_port, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - + proto_tree_add_item (nat_pmp_tree, hf_external_port_mapped, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; @@ -459,15 +459,15 @@ dissect_portcontrol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui if (option_length > 0) { switch(option) { - + case OPT_THIRD_PARTY: proto_tree_add_item (option_sub_tree, hf_option_third_party_internal_ip, tvb, offset, 16, ENC_NA); break; - + case OPT_PREFER_FAILURE: /* No data */ break; - + case OPT_FILTER: proto_tree_add_item (option_sub_tree, hf_option_filter_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item (option_sub_tree, hf_option_filter_prefix_length, tvb, offset+1, 1, ENC_BIG_ENDIAN); @@ -696,14 +696,14 @@ void proto_register_nat_pmp (void) expert_module_t* expert_pcp; proto_nat_pmp = proto_register_protocol ("NAT Port Mapping Protocol", "NAT-PMP", "nat-pmp"); - + proto_register_field_array (proto_nat_pmp, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); expert_nat_pmp = expert_register_protocol(proto_nat_pmp); expert_register_field_array(expert_nat_pmp, natpmp_ei, array_length(natpmp_ei)); proto_pcp = proto_register_protocol ("Port Control Protocol", "Port Control", "portcontrol"); - + proto_register_field_array (proto_pcp, pcp_hf, array_length (pcp_hf)); proto_register_subtree_array (pcp_ett, array_length (pcp_ett)); expert_pcp = expert_register_protocol(proto_pcp); @@ -722,7 +722,7 @@ void proto_reg_handoff_nat_pmp (void) dissector_add_uint ("udp.port", PCP_PORT, pcp_handle); nat_pmp_handle = new_create_dissector_handle(dissect_nat_pmp, proto_nat_pmp); - /* Port Control Protocol (packet-portcontrol.c) shares the same UDP ports as + /* Port Control Protocol (packet-portcontrol.c) shares the same UDP ports as NAT-PMP, but it backwards compatible. However, still let NAT-PMP use Decode As */ diff --git a/epan/dissectors/packet-ndps.h b/epan/dissectors/packet-ndps.h index 9441210926..a4e352b88e 100644 --- a/epan/dissectors/packet-ndps.h +++ b/epan/dissectors/packet-ndps.h @@ -36,8 +36,8 @@ /* * The following value strings are definitions of NDPS - * Object ID's defined by Novell. Third parties are able - * to define their own undocumented OID's. These cannot be + * Object ID's defined by Novell. Third parties are able + * to define their own undocumented OID's. These cannot be * listed and the NDPS dissector will list these as unknown. */ @@ -48,7 +48,7 @@ static const value_string object_ids_7[] = { /* 0607 (LENGTH 7)*/ { 0x0, NULL }, }; -static const value_string object_ids_8[] = { /* 0608 (LENGTH 8)*/ +static const value_string object_ids_8[] = { /* 0608 (LENGTH 8)*/ /* These values are 0x28CF3F01+(defined number)*/ { 0x00000600, "STATE" }, { 0x00000601, "AVAILABILITY" }, @@ -508,7 +508,7 @@ static const value_string object_ids_9[] = { /* 060928 (LENGTH 9)*/ { 0x0, NULL }, }; -static const value_string object_ids_10[] = { +static const value_string object_ids_10[] = { /* These values are 0x3F010000+(defined number)*/ { 0x06328105, "MEDIUM NORTH AMERICA 9X12 ENVELOPE" }, { 0x06328106, "MEDIUM MONARCH ENVELOPE" }, @@ -567,7 +567,7 @@ static const value_string object_ids_10[] = { { 0x0, NULL }, }; -static const value_string object_ids_11[] = { +static const value_string object_ids_11[] = { /* These values are 0x0186F837+(defined number)*/ { 0x01040000, "(Novell) Object Class GENERIC" }, { 0x01040001, "(Novell) Object Class JOB" }, @@ -1629,7 +1629,7 @@ static const value_string object_ids_14[] = { /* 060E6086 480186F8 (LENGTH 14)*/ { 0x17028E13, "(Novell) Attribute ALERT GATEWAY WITHOUT CONFIGURATION FILE" }, { 0x17028E14, "(Novell) Attribute ALERT PRINTER STATE CHANGED" }, { 0x17028E15, "(Novell) Attribute ALERT PRINTER STOPPED" }, - { 0x0, NULL }, + { 0x0, NULL }, }; static const value_string object_ids_15[] = { /* 060F6086 480186F837 (LENGTH 15)*/ diff --git a/epan/dissectors/packet-nlm.h b/epan/dissectors/packet-nlm.h index ef384e4132..bad31adcc7 100644 --- a/epan/dissectors/packet-nlm.h +++ b/epan/dissectors/packet-nlm.h @@ -1,5 +1,5 @@ /* packet-nlm.h (c) 1999 Uwe Girlich */ -/* $Id$ +/* $Id$ * * Wireshark - Network traffic analyzer * By Gerald Combs diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c index 07ccdc3e28..78884a3af4 100644 --- a/epan/dissectors/packet-opensafety.c +++ b/epan/dissectors/packet-opensafety.c @@ -844,15 +844,15 @@ static guint8 findSafetyFrame ( tvbuff_t * message_tvb, guint u_Offset, gboolean } else { - /* There exist frames, where the last openSAFETY frame is sitting in the - * very last bytes of the frame, and the complete frame itself contains + /* There exist frames, where the last openSAFETY frame is sitting in the + * very last bytes of the frame, and the complete frame itself contains * more than one openSAFETY frame. It so happens that in such a case, the - * last openSAFETY frame will miss detection. - * + * last openSAFETY frame will miss detection. + * * If so we look at the transported length, calculate the frame length, * and take a look if the calculated frame length, might be a fit for the - * remaining length. If such is the case, we increment ctr and increment - * rem_length (to hit the while loop one more time) and the frame will be + * remaining length. If such is the case, we increment ctr and increment + * rem_length (to hit the while loop one more time) and the frame will be * detected correctly. */ if ( rem_length == OSS_MINIMUM_LENGTH ) { diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c index 7c8243c9df..583b4d9f43 100644 --- a/epan/dissectors/packet-ospf.c +++ b/epan/dissectors/packet-ospf.c @@ -57,7 +57,7 @@ * - (c) 2011 Salil Kanitkar , North Carolina State University * * Added support for Type Classification of Experimental and Reserved sub-TLVs (RFC3630) - * - (c) 2013 Kaushal Shah , North Carolina State University + * - (c) 2013 Kaushal Shah , North Carolina State University */ #include "config.h" @@ -202,7 +202,7 @@ static const value_string auth_vals[] = { /* Known opaque LSAs */ #define OSPF_LSA_MPLS_TE 1 #define OSPF_LSA_GRACE 3 -/* The type field "4" indicates the Opaque RI LSA with Optional Router Capabilites +/* The type field "4" indicates the Opaque RI LSA with Optional Router Capabilites advertized in the first TLV. (RFC4970) */ #define OSPF_LSA_OPAQUE_RI 4 #define OSPF_LSA_UNKNOWN 11 @@ -425,7 +425,7 @@ static const true_false_string tfs_v2_options_dn = { }; /* The Options field in the first TLV of the Opaque RI LSA with type field set to "4" for OSPFv2 - and type field set to "12" in OSPFv3, is interpreted as advertizing optional router capabilties. + and type field set to "12" in OSPFv3, is interpreted as advertizing optional router capabilties. (RFC4970) */ static const true_false_string tfs_ri_options_grc = { "OSPF Graceful Restart Capable", @@ -2469,7 +2469,7 @@ dissect_ospf_lsa_opaque_ri(tvbuff_t *tvb, int offset, proto_tree *tree, switch(tlv_type) { case OPT_RI_TLV: - ti = proto_tree_add_text(ri_tree, tvb, offset, tlv_length+4, + ti = proto_tree_add_text(ri_tree, tvb, offset, tlv_length+4, "RI TLV"); tlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_ri_tlv); @@ -2478,7 +2478,7 @@ dissect_ospf_lsa_opaque_ri(tvbuff_t *tvb, int offset, proto_tree *tree, proto_tree_add_text(tlv_tree, tvb, offset + 2, 2, "TLV Length: %u", tlv_length); - dissect_ospf_bitfield(tlv_tree, tvb, offset + 4, &bfinfo_ri_options); + dissect_ospf_bitfield(tlv_tree, tvb, offset + 4, &bfinfo_ri_options); break; case DYN_HOSTNAME_TLV: @@ -2495,7 +2495,7 @@ dissect_ospf_lsa_opaque_ri(tvbuff_t *tvb, int offset, proto_tree *tree, break; default: - ti = proto_tree_add_text(ri_tree, tvb, offset, tlv_length+4, + ti = proto_tree_add_text(ri_tree, tvb, offset, tlv_length+4, "Unknown Opaque RI LSA TLV"); tlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_unknown_tlv); @@ -2619,11 +2619,11 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, break; case OSPF_LSA_OPAQUE_RI: - ls_ri_opaque_field = tvb_get_guint8(tvb, offset + 5); - if ( ls_ri_opaque_field != 0 ) + ls_ri_opaque_field = tvb_get_guint8(tvb, offset + 5); + if ( ls_ri_opaque_field != 0 ) ls_id_type = OSPF_LSA_UNKNOWN; else - proto_tree_add_item(ospf_lsa_tree, hf_ospf_filter[OSPFF_OPAQUE_LSA_MBZ], + proto_tree_add_item(ospf_lsa_tree, hf_ospf_filter[OSPFF_OPAQUE_LSA_MBZ], tvb, offset + 5, 3, ENC_BIG_ENDIAN); break; @@ -3511,7 +3511,7 @@ proto_register_ospf(void) /* An MBZ field for the 24-bits of type field of Opaque RI LSA */ {&hf_ospf_filter[OSPFF_OPAQUE_LSA_MBZ], - { "MBZ", "ospf.ri.mbz", FT_UINT16, BASE_HEX, + { "MBZ", "ospf.ri.mbz", FT_UINT16, BASE_HEX, NULL, 0x0, "OSPF Opaque RI LSA - 24 bits of Type Field Must be Zero", HFILL }}, {&hf_ospf_filter[OSPFF_V3_OPTIONS], diff --git a/epan/dissectors/packet-ouch.c b/epan/dissectors/packet-ouch.c index ed1b9a1feb..3148772c70 100644 --- a/epan/dissectors/packet-ouch.c +++ b/epan/dissectors/packet-ouch.c @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the + * along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. @@ -194,7 +194,7 @@ static const value_string ouch_liquidity_flag_val[] = { { 'r', "Retail Order removes RPI liquidity" }, { 't', "Retail Order removes price improving non-displayed liquidity " "other than RPI liquidity" }, - { '6', "Liquidity Removing Order in designated securities" }, + { '6', "Liquidity Removing Order in designated securities" }, { 0, NULL } }; @@ -238,7 +238,7 @@ static const value_string ouch_reject_reason_val[] = { { 'k', "On Close order restriction" }, { 'l', "Two sided quote reject" }, { 'm', "Exceeded shares limit" }, - { 'n', "Exceeded dollar value limit" }, + { 'n', "Exceeded dollar value limit" }, { 0, NULL} }; @@ -318,7 +318,7 @@ ouch_tree_add_timestamp( proto_tree_add_string(tree, hf, tvb, offset, 8, buf); } - + /** BASE_CUSTOM formatter for BBO weight indicator code * diff --git a/epan/dissectors/packet-packetlogger.c b/epan/dissectors/packet-packetlogger.c index 7cf303cd7e..accb5993dd 100644 --- a/epan/dissectors/packet-packetlogger.c +++ b/epan/dissectors/packet-packetlogger.c @@ -152,7 +152,7 @@ void proto_register_packetlogger (void) proto_packetlogger = proto_register_protocol (PNAME, PSNAME, PFNAME); packetlogger_handle = register_dissector (PFNAME, dissect_packetlogger, proto_packetlogger); - + proto_register_field_array (proto_packetlogger, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); } diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index f3c4c61d33..404b2ae934 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -1711,7 +1711,7 @@ DEBUG_ENTRY("dissect_per_choice"); PER_NOT_DECODED_YET("unknown extension root index in choice"); } else { offset += ext_length * 8; - proto_tree_add_expert_format(tree, actx->pinfo, &ei_per_choice_extension_unknown, + proto_tree_add_expert_format(tree, actx->pinfo, &ei_per_choice_extension_unknown, tvb, old_offset>>3, BLEN(old_offset, offset), "Choice no. %d in extension", choice_index); } diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c index 93364b1183..d0acaa83d5 100644 --- a/epan/dissectors/packet-pim.c +++ b/epan/dissectors/packet-pim.c @@ -1011,7 +1011,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset += 2; for (i = 0; i < ngroup; i++) { - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), &tigroup, hf_pim_group_ip4, hf_pim_group_ip6, &advance)) goto breakbreak3; @@ -1073,7 +1073,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset += advance; for (i = 0; tvb_reported_length_remaining(tvb, offset) > 0; i++) { - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), &tigroup, hf_pim_group_ip4, hf_pim_group_ip6, &advance)) goto breakbreak4; @@ -1088,7 +1088,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset += 3; for (j = 0; j < frpcnt; j++) { - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, wmem_strdup_printf(wmem_packet_scope(), "RP %d", j), NULL, hf_pim_rp_ip4, hf_pim_rp_ip6, &advance)) @@ -1114,13 +1114,13 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { { int advance; - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, NULL, NULL, hf_pim_group_ip4, hf_pim_group_ip6, &advance)) break; offset += advance; - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, NULL, NULL, hf_pim_source_ip4, hf_pim_source_ip6, &advance)) break; @@ -1155,14 +1155,14 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { holdtime == 0xffff ? "(infinity)": ""); offset += 2; - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, NULL, NULL, hf_pim_rp_ip4, hf_pim_rp_ip6, &advance)) break; offset += advance; for (i = 0; i < pfxcnt; i++) { - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), NULL, hf_pim_group_ip4, hf_pim_group_ip6, &advance)) goto breakbreak8; @@ -1176,19 +1176,19 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { { int advance; - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group, NULL, NULL, hf_pim_group_ip4, hf_pim_group_ip6, &advance)) break; offset += advance; - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, NULL, NULL, hf_pim_source_ip4, hf_pim_source_ip6, &advance)) break; offset += advance; - if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, + if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast, NULL, NULL, hf_pim_originator_ip4, hf_pim_originator_ip6, &advance)) break; diff --git a/epan/dissectors/packet-ppcap.c b/epan/dissectors/packet-ppcap.c index ac5711564b..2ed6b06b02 100644 --- a/epan/dissectors/packet-ppcap.c +++ b/epan/dissectors/packet-ppcap.c @@ -242,7 +242,7 @@ dissect_ppcap_source_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree * ppc /*src_addr1 = (guint32 )tvb_get_ntoh24(tvb, offset);*/ mtp3_addr_opc = wmem_new0(wmem_packet_scope(), mtp3_addr_pc_t); mtp3_addr_opc->pc = (guint32 )tvb_get_ntoh24(tvb, offset); - mtp3_addr_opc->type = ITU_STANDARD; + mtp3_addr_opc->type = ITU_STANDARD; mtp3_addr_opc->ni = 0; /*SET_ADDRESS(&pinfo->net_src, AT_SS7PC, sizeof(mtp3_addr_pc_t), (guint8 *) mtp3_addr_opc);*/ SET_ADDRESS(&pinfo->src, AT_SS7PC, sizeof(mtp3_addr_pc_t), (guint8 *) mtp3_addr_opc); diff --git a/epan/dissectors/packet-ptp.c b/epan/dissectors/packet-ptp.c index 3587b0e7ac..3c3f25e39f 100644 --- a/epan/dissectors/packet-ptp.c +++ b/epan/dissectors/packet-ptp.c @@ -2890,7 +2890,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint16 tlv_length; proto_item *tlv_ti, *sig_tlv_flags_ti; proto_tree *ptp_tlv_tree, *sig_tlv_flags_tree; - + proto_tree_add_item(ptp_tree, hf_ptp_v2_sig_targetportidentity, tvb, PTP_V2_SIG_TARGETPORTIDENTITY_OFFSET, 8, ENC_BIG_ENDIAN); @@ -2993,119 +2993,119 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gdouble period = 0.0f; gdouble rate = 0.0f; guint32 duration_field; - + proto_item *ptp_tlv_period; proto_tree *ptp_tlv_period_tree; - + proto_len = tvb_length(tvb); tlv_offset = PTP_V2_SIG_TLV_START; - + while (tlv_offset < proto_len) { - + /* 14.1.1 tlvType */ tlv_type = tvb_get_ntohs(tvb, tlv_offset + PTP_V2_SIG_TLV_TYPE_OFFSET); tlv_ti = proto_tree_add_item(ptp_tree, hf_ptp_v2_sig_tlv_tlvType, tvb, tlv_offset + PTP_V2_SIG_TLV_TYPE_OFFSET, PTP_V2_SIG_TLV_TYPE_LEN, ENC_BIG_ENDIAN); - + ptp_tlv_tree = proto_item_add_subtree(tlv_ti, ett_ptp_v2_tlv); - + /* 14.1.2 lengthField */ tlv_length = tvb_get_ntohs(tvb, tlv_offset + PTP_V2_SIG_TLV_LENGTH_OFFSET); proto_tree_add_uint(ptp_tlv_tree, hf_ptp_v2_sig_tlv_lengthField, tvb, tlv_offset + PTP_V2_SIG_TLV_LENGTH_OFFSET, PTP_V2_SIG_TLV_LENGTH_LEN, tlv_length); - + switch (tlv_type) { - + /* Request Unicast Transmission */ case PTP_V2_TLV_TYPE_REQUEST_UNICAST_TRANSMISSION: - + /* 16.1.4.1.3 messageType */ proto_tree_add_item(ptp_tlv_tree, hf_ptp_v2_sig_tlv_messageType, tvb, tlv_offset + PTP_V2_SIG_TLV_MESSAGE_TYPE_OFFSET, PTP_V2_SIG_TLV_MESSAGE_TYPE_LEN, ENC_BIG_ENDIAN); - + /* 16.1.4.1.4 logInterMessagePeriod */ log_inter_message_period = tvb_get_guint8(tvb, tlv_offset + PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_OFFSET); period = pow(2, log_inter_message_period); rate = 1/period; - + ptp_tlv_period = proto_tree_add_item(ptp_tlv_tree, hf_ptp_v2_sig_tlv_logInterMessagePeriod, tvb, tlv_offset + PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_OFFSET, PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_LEN, ENC_BIG_ENDIAN); - + ptp_tlv_period_tree = proto_item_add_subtree(ptp_tlv_period, ett_ptp_v2_tlv_log_period); - + proto_tree_add_int_format_value(ptp_tlv_period_tree, hf_ptp_v2_sig_tlv_logInterMessagePeriod_period, tvb, tlv_offset + PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_OFFSET, PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_LEN, log_inter_message_period, "every %lg seconds", period); - + proto_tree_add_int_format_value(ptp_tlv_period_tree, hf_ptp_v2_sig_tlv_logInterMessagePeriod_rate, tvb, tlv_offset + PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_OFFSET, PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_LEN, log_inter_message_period, "%lg packets/sec", rate); - + /* 16.1.4.1.5 durationField */ duration_field = tvb_get_ntohl(tvb, tlv_offset + PTP_V2_SIG_TLV_DURATION_FIELD_OFFSET); - + proto_tree_add_uint_format_value(ptp_tlv_tree, hf_ptp_v2_sig_tlv_durationField, tvb, tlv_offset + PTP_V2_SIG_TLV_DURATION_FIELD_OFFSET, PTP_V2_SIG_TLV_DURATION_FIELD_LEN, duration_field, "%u seconds", duration_field); - + break; - + /* Grant Unicast Transmission */ case PTP_V2_TLV_TYPE_GRANT_UNICAST_TRANSMISSION: - + /* 16.1.4.2.3 messageType */ proto_tree_add_item(ptp_tlv_tree, hf_ptp_v2_sig_tlv_messageType, tvb, tlv_offset + PTP_V2_SIG_TLV_MESSAGE_TYPE_OFFSET, PTP_V2_SIG_TLV_MESSAGE_TYPE_LEN, ENC_BIG_ENDIAN); - + /* 16.1.4.2.4 logInterMessagePeriod */ log_inter_message_period = tvb_get_guint8(tvb, tlv_offset + PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_OFFSET); period = pow(2, log_inter_message_period); rate = 1/period; - + ptp_tlv_period = proto_tree_add_item(ptp_tlv_tree, hf_ptp_v2_sig_tlv_logInterMessagePeriod, tvb, tlv_offset + PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_OFFSET, PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_LEN, ENC_BIG_ENDIAN); - + ptp_tlv_period_tree = proto_item_add_subtree(ptp_tlv_period, ett_ptp_v2_tlv_log_period); - + proto_tree_add_int_format_value(ptp_tlv_period_tree, hf_ptp_v2_sig_tlv_logInterMessagePeriod_period, tvb, tlv_offset + PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_OFFSET, PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_LEN, log_inter_message_period, "every %lg seconds", period); - + proto_tree_add_int_format_value(ptp_tlv_period_tree, hf_ptp_v2_sig_tlv_logInterMessagePeriod_rate, tvb, tlv_offset + PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_OFFSET, PTP_V2_SIG_TLV_LOG_INTER_MESSAGE_PERIOD_LEN, log_inter_message_period, "%lg packets/sec", rate); - + /* 16.1.4.2.5 durationField */ duration_field = tvb_get_ntohl(tvb, tlv_offset + PTP_V2_SIG_TLV_DURATION_FIELD_OFFSET); - + proto_tree_add_uint_format_value(ptp_tlv_tree, hf_ptp_v2_sig_tlv_durationField, tvb, tlv_offset + PTP_V2_SIG_TLV_DURATION_FIELD_OFFSET, PTP_V2_SIG_TLV_DURATION_FIELD_LEN, duration_field, "%u seconds", duration_field); - + /* 16.1.4.2.6 renewalInvited */ proto_tree_add_item(ptp_tlv_tree, hf_ptp_v2_sig_tlv_renewalInvited, tvb, tlv_offset + PTP_V2_SIG_TLV_RENEWAL_INVITED_OFFSET, PTP_V2_SIG_TLV_RENEWAL_INVITED_LEN, ENC_BIG_ENDIAN); - + break; - + /* Cancel Unicast Transmission */ case PTP_V2_TLV_TYPE_CANCEL_UNICAST_TRANSMISSION: - + /* 16.1.4.3.3 messageType */ proto_tree_add_item(ptp_tlv_tree, hf_ptp_v2_sig_tlv_messageType, tvb, tlv_offset + PTP_V2_SIG_TLV_MESSAGE_TYPE_OFFSET, PTP_V2_SIG_TLV_MESSAGE_TYPE_LEN, ENC_BIG_ENDIAN); - + break; - + /* Acknowledge Cancel Unicast Transmission */ case PTP_V2_TLV_TYPE_ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION: - + /* 16.1.4.4.3 messageType */ proto_tree_add_item(ptp_tlv_tree, hf_ptp_v2_sig_tlv_messageType, tvb, tlv_offset + PTP_V2_SIG_TLV_MESSAGE_TYPE_OFFSET, PTP_V2_SIG_TLV_MESSAGE_TYPE_LEN, ENC_BIG_ENDIAN); - + break; - + default: /* TODO: Add dissector for other TLVs */ proto_tree_add_item(ptp_tlv_tree, hf_ptp_v2_sig_tlv_data, tvb, tlv_offset + PTP_V2_SIG_TLV_VALUE_OFFSET, tlv_length, ENC_NA); } - + tlv_offset += PTP_V2_SIG_TLV_TYPE_LEN + PTP_V2_SIG_TLV_LENGTH_LEN + tlv_length; @@ -5252,7 +5252,7 @@ proto_register_ptp(void) FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL } }, - + /*Fields for PTP_Signalling (=sig) TLVs */ { &hf_ptp_as_sig_tlv_tlvtype, { "tlvType", "ptp.as.sig.tlvType", diff --git a/epan/dissectors/packet-pw-atm.h b/epan/dissectors/packet-pw-atm.h index c049d36d46..b932761211 100644 --- a/epan/dissectors/packet-pw-atm.h +++ b/epan/dissectors/packet-pw-atm.h @@ -55,7 +55,7 @@ typedef struct { * across all the cells in the pw packet. Values are filled * by sub-dissectors and read by upper-level dissector. * Meanings of values: - * (-1) - value is unknown + * (-1) - value is unknown * (-2) - value is different among cells * positive - value is the same in all cells * Machinery is implemented in the UPDATE_CUMULATIVE_VALUE macro. @@ -69,12 +69,12 @@ typedef struct { gint32 vci; /*-1 if unknown*/ gint32 pti; /*-1 if unknown*/ struct { - /* + /* * Some fields from 3rd byte of CW. Filled by cell_header dissector. * In in AAL5 PDU mode, this allows control_word dissector to print * these values in the CW heading line in the tree. * Meanings of values: - * (-1) - value is unknown + * (-1) - value is unknown */ gint32 m; gint32 v; @@ -82,7 +82,7 @@ typedef struct { gint32 u; gint32 e; gint32 clp; - } cwb3; + } cwb3; gboolean aal5_sdu_frame_relay_cr_bit; /*see rfc4717 10.1*/ gboolean cell_mode_oam; /*atm admin cell*/ gboolean enable_fill_columns_by_atm_dissector; diff --git a/epan/dissectors/packet-q2931.c b/epan/dissectors/packet-q2931.c index 5577f8764c..cc4bab79c3 100644 --- a/epan/dissectors/packet-q2931.c +++ b/epan/dissectors/packet-q2931.c @@ -251,7 +251,7 @@ static const value_string q2931_codeset_vals[] = { { 0x00, NULL }, }; -static const true_false_string tfs_q2931_handling_instructions = { "Follow explicit error handling instructions", +static const true_false_string tfs_q2931_handling_instructions = { "Follow explicit error handling instructions", "Regular error handling procedures apply" }; static void diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index 7844143024..344ba4ce33 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -525,7 +525,7 @@ dissect_radius_3gpp_ms_tmime_zone(proto_tree* tree, tvbuff_t* tvb, packet_info* daylight_saving_time = tvb_get_guint8(tvb, offset) & 0x3; proto_tree_add_text(tree, tvb, offset, 1, "%s", val_to_str_const(daylight_saving_time, daylight_saving_time_vals, "Unknown")); - return wmem_strdup_printf(wmem_packet_scope(), "Timezone: GMT %c%d hours %d minutes %s ", + return wmem_strdup_printf(wmem_packet_scope(), "Timezone: GMT %c%d hours %d minutes %s ", sign, oct / 4, oct % 4 * 15, val_to_str_const(daylight_saving_time, daylight_saving_time_vals, "Unknown")); } diff --git a/epan/dissectors/packet-reload-framing.c b/epan/dissectors/packet-reload-framing.c index ff31e86802..e2842f4c31 100644 --- a/epan/dissectors/packet-reload-framing.c +++ b/epan/dissectors/packet-reload-framing.c @@ -179,7 +179,7 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = effective_length; + exp_pdu_data->tvb_length = effective_length; exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-rfid-felica.c b/epan/dissectors/packet-rfid-felica.c index 8fc3fab339..52d61781d5 100644 --- a/epan/dissectors/packet-rfid-felica.c +++ b/epan/dissectors/packet-rfid-felica.c @@ -5,7 +5,7 @@ * http://www.sony.net/Products/felica/business/tech-support/data/fl_usmnl_1.2.pdf * http://www.sony.net/Products/felica/business/tech-support/data/fp_usmnl_1.11.pdf * http://www.sony.net/Products/felica/business/tech-support/data/format_sequence_guidelines_1.1.pdf - * http://www.sony.net/Products/felica/business/tech-support/data/card_usersmanual_2.0.pdf + * http://www.sony.net/Products/felica/business/tech-support/data/card_usersmanual_2.0.pdf * http://code.google.com/u/101410204121169118393/updates * https://github.com/codebutler/farebot/wiki/Suica * @@ -147,7 +147,7 @@ static int hf_felica_status_flag2 = -1; #define SC_DOUBLE_WILDCARD 0xffff static const value_string felica_opcodes[] = { - /* Commands */ + /* Commands */ {CMD_POLLING, "Polling"}, {CMD_REQ_SVC, "Request Service"}, {CMD_REQ_RES, "Request Response"}, @@ -155,7 +155,7 @@ static const value_string felica_opcodes[] = { {CMD_WRITE_WO_ENCRYPTION, "Write Without Encryption"}, {CMD_SEARCH_SVC_CODE, "Search Service Code"}, {CMD_REQ_SYS_CODE, "Request System Code"}, - {CMD_AUTH_1, "Authentication1"}, + {CMD_AUTH_1, "Authentication1"}, {CMD_AUTH_2, "Authentication2"}, {CMD_READ, "Read"}, {CMD_WRITE, "Write"}, @@ -169,16 +169,16 @@ static const value_string felica_opcodes[] = { {CMD_WRITE_V2, "Write v2"}, {CMD_REQ_UPDATE_RAND_ID, "Update Random ID"}, /* End of commands */ - + /* Responses */ {RES_POLLING, "Polling (Response)"}, {RES_REQ_SVC, "Request Service (Response)"}, - {RES_REQ_RES, "Request Response (Response)"}, + {RES_REQ_RES, "Request Response (Response)"}, {RES_READ_WO_ENCRYPTION, "Read Without Encryption (Response)"}, {RES_WRITE_WO_ENCRYPTION, "Write Without Encryption (Response)"}, {RES_SEARCH_SVC_CODE, "Search Service Code (Response)"}, {RES_REQ_SYS_CODE, "Request System Code (Response)"}, - {RES_AUTH_1, "Authentication1 (Response)"}, + {RES_AUTH_1, "Authentication1 (Response)"}, {RES_AUTH_2, "Authentication2 (Response)"}, {RES_READ, "Read (Response)"}, {RES_WRITE, "Write (Response)"}, @@ -192,7 +192,7 @@ static const value_string felica_opcodes[] = { {RES_WRITE_V2, "Write v2 (Response)"}, {RES_REQ_UPDATE_RAND_ID, "Update Random ID"}, /* End of responses */ - + {0x00, NULL} }; @@ -251,7 +251,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } switch (opcode) { - + case CMD_POLLING: if (tree) { proto_tree_add_item(felica_tree, hf_felica_sys_code, tvb, 1, 2, ENC_BIG_ENDIAN); @@ -371,7 +371,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case RES_READ: /* TODO */ break; - + case CMD_WRITE: /* TODO */ break; @@ -379,7 +379,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case RES_WRITE: /* TODO */ break; - + case CMD_REQ_SVC_V2: /* TODO */ break; @@ -387,7 +387,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case RES_REQ_SVC_V2: /* TODO */ break; - + case CMD_REQ_SYS_STATUS: /* TODO */ break; @@ -395,7 +395,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case RES_REQ_SYS_STATUS: /* TODO */ break; - + case CMD_REQ_SPEC_VER: /* TODO */ break; @@ -403,7 +403,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case RES_REQ_SPEC_VER: /* TODO */ break; - + case CMD_RESET_MODE: /* TODO */ break; @@ -411,7 +411,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case RES_RESET_MODE: /* TODO */ break; - + case CMD_AUTH1_V2: /* TODO */ break; @@ -451,7 +451,7 @@ static void dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case RES_REQ_UPDATE_RAND_ID: /* TODO */ break; - + default: break; } diff --git a/epan/dissectors/packet-rfid-pn532.c b/epan/dissectors/packet-rfid-pn532.c index b39a5e8da1..0aa267dcfd 100644 --- a/epan/dissectors/packet-rfid-pn532.c +++ b/epan/dissectors/packet-rfid-pn532.c @@ -1642,7 +1642,7 @@ void proto_register_pn532(void) NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443a_ats_length, {"ISO/IEC 14443-A ATS Length", "pn532.iso.14443a.ats.length", FT_INT8, BASE_DEC, - NULL, 0x0, NULL, HFILL}}, + NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443a_ats, {"ISO/IEC 14443-A ATS", "pn532.iso.14443a.ats", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}}, diff --git a/epan/dissectors/packet-rmcp.c b/epan/dissectors/packet-rmcp.c index 8c8c443b12..dc4d5ac30d 100644 --- a/epan/dissectors/packet-rmcp.c +++ b/epan/dissectors/packet-rmcp.c @@ -140,7 +140,7 @@ dissect_rmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ tree)) { len = call_dissector(data_handle, next_tvb, pinfo, tree); if (len < tvb_length(next_tvb)) { - proto_tree_add_text(tree, tvb, 4 + len, -1, + proto_tree_add_text(tree, tvb, 4 + len, -1, "RSP Trailer (%d bytes):", tvb_length(next_tvb) - len); } } @@ -156,7 +156,7 @@ dissect_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) proto_item *ti/*, *tf*/; tvbuff_t *next_tvb; int offset = 0; - + if (tree) { ti = proto_tree_add_protocol_format(tree, proto_rsp, tvb, offset, 8, "RMCP Security-extension Protocol"); @@ -167,8 +167,8 @@ dissect_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) proto_tree_add_item(rsp_tree, hf_rsp_sequence, tvb, offset, 4, ENC_BIG_ENDIAN); /*offset += 4;*/ } - - /* XXX determination of RCMP message length needs to + + /* XXX determination of RCMP message length needs to * be done according to 3.2.3.3.3 of the specification. * This is only valid for session ID equals 0 */ diff --git a/epan/dissectors/packet-rmt-alc.c b/epan/dissectors/packet-rmt-alc.c index d3c104db63..8bf559b337 100644 --- a/epan/dissectors/packet-rmt-alc.c +++ b/epan/dissectors/packet-rmt-alc.c @@ -173,7 +173,7 @@ void proto_reg_handoff_alc(void) xml_handle = find_dissector("xml"); rmt_lct_handle = find_dissector("rmt-lct"); rmt_fec_handle = find_dissector("rmt-fec"); - } + } /* Register UDP port for dissection */ if(old_udp_port != 0 && old_udp_port != g_default_udp_port){ diff --git a/epan/dissectors/packet-rmt-fec.c b/epan/dissectors/packet-rmt-fec.c index f50abda540..8ef3904203 100644 --- a/epan/dissectors/packet-rmt-fec.c +++ b/epan/dissectors/packet-rmt-fec.c @@ -240,7 +240,7 @@ dissect_fec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) case 4: proto_tree_add_item(fec_tree, hf_sbn_with_mask, tvb, offset, 4, ENC_BIG_ENDIAN); proto_tree_add_item(fec_tree, hf_esi_with_mask, tvb, offset, 4, ENC_BIG_ENDIAN); - + col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "SBN: %u", tvb_get_ntohl(tvb, offset) >> 20); col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "ESI: 0x%X", tvb_get_ntohl(tvb, offset) & 0xfffff); diff --git a/epan/dissectors/packet-rohc.h b/epan/dissectors/packet-rohc.h index 4134715648..d4a878a024 100644 --- a/epan/dissectors/packet-rohc.h +++ b/epan/dissectors/packet-rohc.h @@ -57,7 +57,7 @@ typedef struct rohc_info enum rohc_mode mode; gboolean rnd; gboolean udp_checksum_present; - guint16 profile; + guint16 profile; proto_item *last_created_item; } rohc_info; diff --git a/epan/dissectors/packet-rpc.h b/epan/dissectors/packet-rpc.h index 25c502833b..7087cf9932 100644 --- a/epan/dissectors/packet-rpc.h +++ b/epan/dissectors/packet-rpc.h @@ -42,7 +42,7 @@ #define AUTH_RSA 5 #define RPCSEC_GSS 6 #define AUTH_GSSAPI 300001 -/* Pseudo-flavors used for security mechanisms while using +/* Pseudo-flavors used for security mechanisms while using * RPCSEC_GSS */ #define RPCSEC_GSS_KRB5 390003 @@ -196,7 +196,7 @@ typedef struct _rpc_prog_info_value { GArray *procedure_hfs; } rpc_prog_info_value; -/* rpc_progs is also used in tap. With MSVC and a +/* rpc_progs is also used in tap. With MSVC and a * libwireshark.dll, we need a special declaration. */ WS_DLL_PUBLIC GHashTable *rpc_progs; @@ -213,7 +213,7 @@ typedef struct _rpc_proc_info_value { dissect_function_t *dissect_reply; } rpc_proc_info_value; -/* rpc_procs is also used in tap. With MSVC and a +/* rpc_procs is also used in tap. With MSVC and a * libwireshark.dll, we need a special declaration. */ WS_DLL_PUBLIC GHashTable *rpc_procs; diff --git a/epan/dissectors/packet-rtcdc.c b/epan/dissectors/packet-rtcdc.c index e1c053ead7..26debe844e 100644 --- a/epan/dissectors/packet-rtcdc.c +++ b/epan/dissectors/packet-rtcdc.c @@ -1,11 +1,11 @@ /* * packet-rtcdc.c * Routines for the RTCWeb Data Channel Protocol dissection - * as specified in + * as specified in * http://tools.ietf.org/html/draft-jesup-rtcweb-data-protocol-03 - * and the upcoming version specified in + * and the upcoming version specified in * http://tools.ietf.org/html/draft-ietf-rtcweb-data-protocol-00 - * We might want to remove the support of + * We might want to remove the support of * http://tools.ietf.org/html/draft-jesup-rtcweb-data-protocol-03 * in the future, but I'll leave it in for now. * Copyright 2012 - 2013, Michael Tuexen diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 9a79b70176..5d72c09cd6 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -2283,8 +2283,8 @@ dissect_rtcp_avb( tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree /* Name (ASCII) */ proto_tree_add_item( tree, hf_rtcp_name_ascii, tvb, offset, 4, ENC_ASCII ); offset += 4; - -/* 32 bit wide + +/* 32 bit wide gmTimeBaseIndicator | gmIdentity - low 16 bit gmIdentity - mid 32 bit gmIdentity - high 32 bit @@ -2323,9 +2323,9 @@ dissect_rtcp_rsi( tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree item = proto_tree_add_item(tree, hf_rtcp_ntp, tvb, offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN); PROTO_ITEM_SET_GENERATED(item); offset += 8; - + /* Sub report blocks */ - + return offset + (packet_length - 16); } diff --git a/epan/dissectors/packet-rtp.h b/epan/dissectors/packet-rtp.h index a950675eb5..ec95019dd9 100644 --- a/epan/dissectors/packet-rtp.h +++ b/epan/dissectors/packet-rtp.h @@ -128,7 +128,7 @@ WS_DLL_PUBLIC void rtp_add_address(packet_info *pinfo, address *addr, int port, int other_port, - const gchar *setup_method, + const gchar *setup_method, guint32 setup_frame_number, gboolean is_video, GHashTable *rtp_dyn_payload); @@ -138,7 +138,7 @@ WS_DLL_PUBLIC void srtp_add_address(packet_info *pinfo, address *addr, int port, int other_port, - const gchar *setup_method, + const gchar *setup_method, guint32 setup_frame_number, gboolean is_video, GHashTable *rtp_dyn_payload, diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c index cb45a9c780..dadd9cc7c6 100644 --- a/epan/dissectors/packet-rtps.c +++ b/epan/dissectors/packet-rtps.c @@ -2560,7 +2560,7 @@ static gboolean dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, p */ case PID_OWNERSHIP_STRENGTH: ENSURE_LENGTH(4); - proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_strength, tvb, offset, 4, + proto_tree_add_item(rtps_parameter_tree, hf_rtps_param_strength, tvb, offset, 4, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); break; @@ -3153,7 +3153,7 @@ static gboolean dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, p guint32 prev_offset, temp_offset, prop_size; guint8 *propName, *propValue; guint32 seq_size = NEXT_guint32(tvb, offset, little_endian); - proto_item_append_text( parameter_item, " (%d properties)", seq_size ); + proto_item_append_text( parameter_item, " (%d properties)", seq_size ); if (seq_size > 0) { proto_tree_add_text(rtps_parameter_tree, tvb, offset, 0, /* 123456789012345678901234567890|123456789012345678901234567890 */ @@ -3219,7 +3219,7 @@ static gboolean dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, p ENSURE_LENGTH(8); /* Dissect filter bitmap */ - temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset, + temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset, hf_rtps_filter_bitmap, little_endian, param_length, "filterBitmap"); /* Dissect sequence of FILTER_SIGNATURE */ @@ -3320,7 +3320,7 @@ static gboolean dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, p case PID_PARTICIPANT_ENTITY_ID: ENSURE_LENGTH(4); rtps_util_add_generic_entity_id(rtps_parameter_tree, tvb, offset, "Participant entity ID", - hf_rtps_param_entity, hf_rtps_param_entity_key, + hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_hf_entity_kind, ett_rtps_entity); break; @@ -3362,7 +3362,7 @@ static gboolean dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, p case PID_GROUP_ENTITY_ID: ENSURE_LENGTH(4); rtps_util_add_generic_entity_id(rtps_parameter_tree, tvb, offset, "Group entity ID", - hf_rtps_param_entity, hf_rtps_param_entity_key, + hf_rtps_param_entity, hf_rtps_param_entity_key, hf_rtps_param_hf_entity_kind, ett_rtps_entity); break; @@ -3563,7 +3563,7 @@ static gboolean dissect_parameter_sequence_v2(proto_tree *rtps_parameter_tree, p ENSURE_LENGTH(8); /* Dissect filter bitmap */ - temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset, + temp_offset = rtps_util_add_seq_ulong(rtps_parameter_tree, tvb, offset, hf_rtps_filter_bitmap, little_endian, param_length, "filterBitmap"); /* Dissect sequence of FILTER_SIGNATURE */ @@ -3914,7 +3914,7 @@ static gint dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvb expert_add_info_format(pinfo, (param_len_item == NULL) ? ti : param_len_item, &ei_rtps_parameter_value_invalid, "ERROR: not enough bytes to read the next parameter"); return 0; } - original_offset = offset; + original_offset = offset; /* Reads parameter and create the sub tree. At this point we don't know * the final string that will identify the node or its length. It will @@ -3959,7 +3959,7 @@ static gint dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvb if (!dissect_parameter_sequence_v1(rtps_parameter_tree, pinfo, tvb, param_item, param_len_item, offset, little_endian, size, param_length, parameter, version)) { - if ((version < 0x0200) || + if ((version < 0x0200) || !dissect_parameter_sequence_v2(rtps_parameter_tree, pinfo, tvb, param_item, param_len_item, offset, little_endian, param_length, parameter, pStatusInfo, vendor_id)) { @@ -4514,7 +4514,7 @@ static void dissect_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu /* * N O K E Y _ D A T A * */ /* *********************************************************************** */ static void dissect_NOKEY_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, - gboolean little_endian, int octets_to_next_header, proto_tree *tree, + gboolean little_endian, int octets_to_next_header, proto_tree *tree, guint16 version, guint16 vendor_id) { /* RTPS 1.0/1.1: * 0...2...........7...............15.............23...............31 @@ -4630,7 +4630,7 @@ static void dissect_NOKEY_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, g /* Issue Data */ if ((version < 0x0200) && (flags & FLAG_NOKEY_DATA_D) == 0) { - proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset, + proto_tree_add_item(tree, hf_rtps_issue_data, tvb, offset, octets_to_next_header - (offset - old_offset) + 4, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); } @@ -6293,12 +6293,12 @@ static gboolean dissect_rtps_submessage_v2(tvbuff_t *tvb, packet_info *pinfo, gi break; case SUBMESSAGE_RTPS_DATA_FRAG: - dissect_RTPS_DATA_FRAG(tvb, pinfo, offset, flags, little_endian, octets_to_next_header, + dissect_RTPS_DATA_FRAG(tvb, pinfo, offset, flags, little_endian, octets_to_next_header, rtps_submessage_tree, vendor_id); break; case SUBMESSAGE_RTPS_DATA_BATCH: - dissect_RTPS_DATA_BATCH(tvb, pinfo, offset, flags, little_endian, octets_to_next_header, + dissect_RTPS_DATA_BATCH(tvb, pinfo, offset, flags, little_endian, octets_to_next_header, rtps_submessage_tree, vendor_id); break; @@ -6328,7 +6328,7 @@ static gboolean dissect_rtps_submessage_v1(tvbuff_t *tvb, packet_info *pinfo, gi break; case SUBMESSAGE_NOKEY_DATA: - dissect_NOKEY_DATA(tvb, pinfo, offset, flags, little_endian, octets_to_next_header, rtps_submessage_tree, + dissect_NOKEY_DATA(tvb, pinfo, offset, flags, little_endian, octets_to_next_header, rtps_submessage_tree, version, vendor_id); break; @@ -6574,7 +6574,7 @@ static gboolean dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree if (!dissect_rtps_submessage_v1(tvb, pinfo, offset, flags, little_endian, submessageId, version, vendor_id, octets_to_next_header, rtps_submessage_tree, ti)) { - if ((version < 0x0200) || + if ((version < 0x0200) || !dissect_rtps_submessage_v2(tvb, pinfo, offset, flags, little_endian, submessageId, vendor_id, octets_to_next_header, rtps_submessage_tree, ti)) { proto_tree_add_uint(rtps_submessage_tree, hf_rtps_sm_flags, @@ -7116,247 +7116,247 @@ void proto_register_rtps(void) { HFILL } }, - { &hf_rtps_durability_service_cleanup_delay, + { &hf_rtps_durability_service_cleanup_delay, { "Service Cleanup Delay", "rtps.durability.service_cleanup_delay", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_liveliness_lease_duration, + { &hf_rtps_liveliness_lease_duration, { "Lease Duration", "rtps.liveliness.lease_duration", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_participant_lease_duration, + { &hf_rtps_participant_lease_duration, { "Duration", "rtps.participant_lease_duration", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_time_based_filter_minimum_separation, + { &hf_rtps_time_based_filter_minimum_separation, { "Minimum Separation", "rtps.time_based_filter.minimum_separation", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_reliability_max_blocking_time, + { &hf_rtps_reliability_max_blocking_time, { "Max Blocking Time", "rtps.reliability.max_blocking_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_deadline_period, + { &hf_rtps_deadline_period, { "Period", "rtps.deadline_period", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_latency_budget_duration, + { &hf_rtps_latency_budget_duration, { "Duration", "rtps.latency_budget.duration", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_lifespan_duration, + { &hf_rtps_lifespan_duration, { "Duration", "rtps.lifespan", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_persistence, + { &hf_rtps_persistence, { "Persistence", "rtps.persistence", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_info_ts_timestamp, + { &hf_rtps_info_ts_timestamp, { "Timestamp", "rtps.info_ts.timestamp", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } }, - { &hf_rtps_locator_kind, + { &hf_rtps_locator_kind, { "Kind", "rtps.locator.kind", FT_UINT32, BASE_HEX, VALS(rtps_locator_kind_vals), 0, NULL, HFILL } }, - { &hf_rtps_locator_port, + { &hf_rtps_locator_port, { "Port", "rtps.locator.port", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_locator_ipv4, + { &hf_rtps_locator_ipv4, { "Address", "rtps.locator.ipv4", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL } }, - { &hf_rtps_locator_ipv6, + { &hf_rtps_locator_ipv6, { "Address", "rtps.locator.ipv6", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL } }, - { &hf_rtps_participant_builtin_endpoints, + { &hf_rtps_participant_builtin_endpoints, { "BuiltIn Endpoint", "rtps.participant_builtin_endpoints", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, - { &hf_rtps_participant_manual_liveliness_count, + { &hf_rtps_participant_manual_liveliness_count, { "Manual Liveliness Count", "rtps.participant_manual_liveliness_count", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, - { &hf_rtps_history_depth, + { &hf_rtps_history_depth, { "Depth", "rtps.history_depth", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_resource_limit_max_samples, + { &hf_rtps_resource_limit_max_samples, { "Max Samples", "rtps.resource_limit.max_samples", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_resource_limit_max_instances, + { &hf_rtps_resource_limit_max_instances, { "Max Instances", "rtps.resource_limit.max_instances", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_resource_limit_max_samples_per_instances, + { &hf_rtps_resource_limit_max_samples_per_instances, { "Max Samples Per Instance", "rtps.resource_limit.max_samples_per_instance", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_filter_bitmap, + { &hf_rtps_filter_bitmap, { "Filter Bitmap", "rtps.filter_bitmap", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, - { &hf_rtps_type_checksum, + { &hf_rtps_type_checksum, { "Checksum", "rtps.type_checksum", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, - { &hf_rtps_queue_size, + { &hf_rtps_queue_size, { "queueSize", "rtps.queue_size", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, - { &hf_rtps_acknack_counter, + { &hf_rtps_acknack_counter, { "Counter", "rtps.acknack.counter", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_durability_service_history_kind, + { &hf_rtps_durability_service_history_kind, { "History Kind", "rtps.durability_service.history_kind", FT_UINT32, BASE_HEX, VALS(history_qos_vals), 0, NULL, HFILL } }, - { &hf_rtps_durability_service_history_depth, + { &hf_rtps_durability_service_history_depth, { "History Depth", "rtps.durability_service.history_depth", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_durability_service_max_samples, + { &hf_rtps_durability_service_max_samples, { "Max Samples", "rtps.durability_service.max_samples", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_durability_service_max_instances, + { &hf_rtps_durability_service_max_instances, { "Max Instances", "rtps.durability_service.max_instances", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_durability_service_max_samples_per_instances, + { &hf_rtps_durability_service_max_samples_per_instances, { "Max Samples Per Instance", "rtps.durability_service.max_samples_per_instance", FT_INT32, BASE_DEC, NULL, 0, NULL, HFILL } }, - { &hf_rtps_liveliness_kind, + { &hf_rtps_liveliness_kind, { "Kind", "rtps.liveliness.kind", FT_UINT32, BASE_HEX, VALS(liveliness_qos_vals), 0, NULL, HFILL } }, - { &hf_rtps_manager_key, + { &hf_rtps_manager_key, { "Key", "rtps.manager_key", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, - { &hf_rtps_locator_udp_v4, + { &hf_rtps_locator_udp_v4, { "Address", "rtps.locator_udp_v4.ip", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL } }, - { &hf_rtps_locator_udp_v4_port, + { &hf_rtps_locator_udp_v4_port, { "Port", "rtps.locator_udp_v4.port", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, - { &hf_param_ip_address, + { &hf_param_ip_address, { "Address", "rtps.param.ip_address", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL } }, - { &hf_rtps_param_port, + { &hf_rtps_param_port, { "Port", "rtps.param.port", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, - { &hf_rtps_expects_inline_qos, + { &hf_rtps_expects_inline_qos, { "Inline QoS", "rtps.expects_inline_qos", FT_BOOLEAN, 8, TFS(&tfs_true_false), 0, NULL, HFILL } }, - { &hf_rtps_presentation_coherent_access, + { &hf_rtps_presentation_coherent_access, { "Coherent Access", "rtps.presentation.coherent_access", FT_BOOLEAN, 8, TFS(&tfs_true_false), 0, NULL, HFILL } }, - { &hf_rtps_presentation_ordered_access, + { &hf_rtps_presentation_ordered_access, { "Ordered Access", "rtps.presentation.ordered_access", FT_BOOLEAN, 8, TFS(&tfs_true_false), 0, NULL, HFILL } }, - { &hf_rtps_expects_ack, + { &hf_rtps_expects_ack, { "expectsAck", "rtps.expects_ack", FT_BOOLEAN, 8, TFS(&tfs_true_false), 0, NULL, HFILL } }, - { &hf_rtps_reliability_kind, + { &hf_rtps_reliability_kind, { "Kind", "rtps.reliability_kind", FT_UINT32, BASE_HEX, VALS(reliability_qos_vals), 0, NULL, HFILL } }, - { &hf_rtps_durability, + { &hf_rtps_durability, { "Durability", "rtps.durability", FT_UINT32, BASE_HEX, VALS(durability_qos_vals), 0, NULL, HFILL } @@ -7430,7 +7430,7 @@ void proto_register_rtps(void) { HFILL } }, - { &hf_rtps_disable_positive_ack, + { &hf_rtps_disable_positive_ack, { "disablePositiveAcks", "rtps.disable_positive_ack", FT_BOOLEAN, 8, TFS(&tfs_true_false), 0, NULL, HFILL } @@ -7574,7 +7574,7 @@ void proto_register_rtps(void) { NULL, HFILL } }, - { &hf_rtps_data_batch_timestamp, + { &hf_rtps_data_batch_timestamp, { "Timestamp", "rtps.data_batch.timestamp", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, "Time using the NTP standard format", HFILL } diff --git a/epan/dissectors/packet-rtps.h b/epan/dissectors/packet-rtps.h index c926365752..de1b26fa4f 100644 --- a/epan/dissectors/packet-rtps.h +++ b/epan/dissectors/packet-rtps.h @@ -11,11 +11,11 @@ * Copyright 2003, LUKAS POKORNY * PETR SMOLIK * ZDENEK SEBEK - * - * Czech Technical University in Prague + * + * Czech Technical University in Prague * Faculty of Electrical Engineering - * Department of Control Engineering - * + * Department of Control Engineering + * * $Id$ * * Wireshark - Network traffic analyzer @@ -26,12 +26,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -40,16 +40,16 @@ * * The following file is part of the RTPS packet dissector for Wireshark. * - * RTPS protocol was developed by Real-Time Innovations, Inc. as wire + * RTPS protocol was developed by Real-Time Innovations, Inc. as wire * protocol for Data Distribution System. * Additional information at: - * Full OMG DDS Standard Specification: + * Full OMG DDS Standard Specification: * http://www.omg.org/cgi-bin/doc?ptc/2003-07-07 - * + * * NDDS and RTPS information: http://www.rti.com/resources.html * */ - + #ifndef _TYPEDEFS_DEFINES_RTPS_H #define _TYPEDEFS_DEFINES_RTPS_H @@ -299,7 +299,7 @@ typedef enum { #define SUBMESSAGE_HEARTBEAT_SESSION (0x1b) /* RTPS 2.1 only */ -/* An invalid IP Address: +/* An invalid IP Address: * Make sure the _STRING macro is bigger than a normal IP */ #define IPADDRESS_INVALID (0) @@ -432,7 +432,7 @@ extern gint rtps_util_add_seq_ulong(proto_tree *tree, tvbuff_t * tvb, gint offse extern gboolean rtps_is_ping(tvbuff_t *tvb, packet_info *pinfo, gint offset); /* Shared submessage dissection */ -extern void dissect_PAD(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, +extern void dissect_PAD(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, gboolean little_endian, int octects_to_next_header, proto_tree *tree); extern void dissect_INFO_SRC(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, gboolean little_endian, int octets_to_next_header, proto_tree *tree, guint16 rtps_version); @@ -443,5 +443,5 @@ extern void dissect_INFO_TS(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin #ifdef __cplusplus } /* extern "C"*/ #endif - + #endif /* _TYPEDEFS_DEFINES_RTPS_H */ diff --git a/epan/dissectors/packet-rtsp.h b/epan/dissectors/packet-rtsp.h index 924c0c66b7..e82fe8b0ef 100644 --- a/epan/dissectors/packet-rtsp.h +++ b/epan/dissectors/packet-rtsp.h @@ -1,7 +1,7 @@ /* packet-rtsp.h * * $Id$ - * Liberally copied from packet-http.h, + * Liberally copied from packet-http.h, * by Stephane GORSE (Orange Labs / France Telecom) * * Wireshark - Network traffic analyzer diff --git a/epan/dissectors/packet-sap.c b/epan/dissectors/packet-sap.c index 6d388f4fb4..922f9ce961 100644 --- a/epan/dissectors/packet-sap.c +++ b/epan/dissectors/packet-sap.c @@ -347,7 +347,7 @@ void proto_register_sap(void) { &hf_sap_auth_data_padding, { "Authentication data padding", "sap.auth.data_padding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_sap_auth_data_padding_len, { "Authentication data pad count (bytes)", "sap.auth.data_padding.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_sap_payload_type, { "Payload type", "sap.payload_type", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + }; static gint *ett[] = { &ett_sap, diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c index e6fe874c07..38c7641b37 100644 --- a/epan/dissectors/packet-sccp.c +++ b/epan/dissectors/packet-sccp.c @@ -3961,7 +3961,7 @@ proto_register_sccp(void) static ei_register_info ei[] = { { &ei_sccp_wrong_length, { "sccp.wrong_length", PI_MALFORMED, PI_ERROR, "Wrong length indicated.", EXPFILL }}, - { &ei_sccp_international_standard_address, { "sccp.international_standard_address", PI_MALFORMED, PI_WARN, + { &ei_sccp_international_standard_address, { "sccp.international_standard_address", PI_MALFORMED, PI_WARN, "Address is coded to international standards. This doesn't normally happen in ANSI networks.", EXPFILL }}, { &ei_sccp_no_ssn_present, { "sccp.ssn.not_present", PI_PROTOCOL, PI_WARN, "Message is routed on SSN, but SSN is not present", EXPFILL }}, { &ei_sccp_ssn_zero, { "sccp.ssn.is_zero", PI_PROTOCOL, PI_WARN, "Message is routed on SSN, but SSN is zero (unspecified)", EXPFILL }}, diff --git a/epan/dissectors/packet-sccp.h b/epan/dissectors/packet-sccp.h index 6cf6461791..7ba3621af8 100644 --- a/epan/dissectors/packet-sccp.h +++ b/epan/dissectors/packet-sccp.h @@ -21,8 +21,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - -#ifndef __PACKET_SCCP_H + +#ifndef __PACKET_SCCP_H #define __PACKET_SCCP_H #include "ws_symbol_export.h" @@ -69,7 +69,7 @@ typedef struct _sccp_msg_info_t { guint framenum; guint offset; guint type; - + union { struct { gchar* label; @@ -96,7 +96,7 @@ typedef struct _sccp_assoc_info_t { gboolean has_bw_key; sccp_msg_info_t* msgs; sccp_msg_info_t* curr_msg; - + sccp_payload_t payload; gchar* calling_party; gchar* called_party; diff --git a/epan/dissectors/packet-scsi-osd.c b/epan/dissectors/packet-scsi-osd.c index c8adfb548d..36896cb2ee 100644 --- a/epan/dissectors/packet-scsi-osd.c +++ b/epan/dissectors/packet-scsi-osd.c @@ -938,7 +938,7 @@ static void dissect_osd2_query_list_descriptor(packet_info *pinfo, tvbuff_t *tvb /* test if min and max values are equal */ if (max_value_length==min_value_length) { - unsigned int i; + unsigned int i; for (i=0; itvb_length = tvb_length(tvb); + exp_pdu_data->tvb_length = tvb_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); @@ -1712,7 +1712,7 @@ dissect_sip_reason_header(tvbuff_t *tvb, proto_tree *tree, gint start_offset, gi current_offset = start_offset; semi_colon_offset = tvb_find_guint8(tvb, current_offset, line_end_offset-current_offset, ';'); - + if(semi_colon_offset == -1) return; @@ -2157,7 +2157,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr * Otherwise, SIP heuristics are expensive... * */ - if (!dissect_other_as_continuation && + if (!dissect_other_as_continuation && ((tvb_reported_length_remaining(tvb, offset) < 1) || !isprint(tvb_get_guint8(tvb, offset)))) { return -2; @@ -3172,7 +3172,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr */ proto_item_set_end(th, tvb, offset); if(content_encoding_parameter_str != NULL && - (!strncmp(content_encoding_parameter_str, "gzip", 4) || + (!strncmp(content_encoding_parameter_str, "gzip", 4) || !strncmp(content_encoding_parameter_str,"deflate",7))){ /* The body is gzip:ed */ next_tvb = tvb_uncompress(tvb, offset, datalen); diff --git a/epan/dissectors/packet-sip.h b/epan/dissectors/packet-sip.h index 51a6bd9616..30aff71cb6 100644 --- a/epan/dissectors/packet-sip.h +++ b/epan/dissectors/packet-sip.h @@ -40,7 +40,7 @@ typedef struct _sip_info_value_t gchar *reason_phrase; } sip_info_value_t; -extern void dfilter_store_sip_from_addr(tvbuff_t *tvb,proto_tree *tree,guint parameter_offset, +extern void dfilter_store_sip_from_addr(tvbuff_t *tvb,proto_tree *tree,guint parameter_offset, guint parameter_len); #endif diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c index 58a7540e97..f08788c6f7 100644 --- a/epan/dissectors/packet-skinny.c +++ b/epan/dissectors/packet-skinny.c @@ -1510,7 +1510,7 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_activeStreams, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_phoneFeatures, tvb, offset+52, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_IPVersion, tvb, offset+56, 4, ENC_LITTLE_ENDIAN); - } + } if (hdr_data_length > 100) { proto_tree_add_item(skinny_tree, hf_skinny_unknown, tvb, offset+60, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_macAddress, tvb, offset+64, 12, ENC_ASCII|ENC_NA); @@ -3201,7 +3201,7 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_maxBitRate, tvb, offset+24, 4, ENC_LITTLE_ENDIAN); break; - + case 0x0143: /* DynDisplayNotifyMessage */ proto_tree_add_item(skinny_tree, hf_skinny_messageTimeOutValue, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+16, hdr_data_length-8, ENC_ASCII|ENC_NA); @@ -3234,7 +3234,7 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_lineDirNumber, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_lineFullyQualifiedDisplayName, tvb, offset+16+StationMaxDirnumSize, StationMaxNameSize, ENC_ASCII|ENC_NA); proto_tree_add_item(skinny_tree, hf_skinny_lineDisplayName, tvb, offset+16+StationMaxDirnumSize+StationMaxNameSize, StationMaxDisplayNameSize, ENC_ASCII|ENC_NA); - break; + break; case 0x0148: /* DynServiceURLStatMessage */ proto_tree_add_item(skinny_tree, hf_skinny_serviceURLIndex, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); @@ -3379,7 +3379,7 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(skinny_tree, hf_skinny_startMediaTransmissionStatus, tvb, offset+48, 4, ENC_LITTLE_ENDIAN); } break; - + case 0x0155: /* StartMultiMediaTransmissionAck */ proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+12, 4, ENC_LITTLE_ENDIAN); proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN); diff --git a/epan/dissectors/packet-slimp3.c b/epan/dissectors/packet-slimp3.c index 1f413e44cf..0554b8515a 100644 --- a/epan/dissectors/packet-slimp3.c +++ b/epan/dissectors/packet-slimp3.c @@ -304,7 +304,7 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ */ if (tree) { i1 = tvb_get_ntohl(tvb, offset+2); - proto_tree_add_uint_format_value(slimp3_tree, hf_slimp3_uptime, tvb, offset+2, 4, i1, + proto_tree_add_uint_format_value(slimp3_tree, hf_slimp3_uptime, tvb, offset+2, 4, i1, "%u sec (%u ticks)", i1/625000, i1); proto_tree_add_item(slimp3_tree, hf_slimp3_code_id, tvb, offset+6, 1, ENC_BIG_ENDIAN); @@ -444,7 +444,7 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ proto_tree_add_text(slimp3_tree, tvb, offset, 1, "Hello Response (Client --> Server)"); proto_tree_add_item(slimp3_tree, hf_slimp3_device_id, tvb, offset+1, 1, ENC_BIG_ENDIAN); fw_ver = tvb_get_guint8(tvb, offset+2); - proto_tree_add_uint_format_value(slimp3_tree, hf_slimp3_fw_rev, tvb, offset+2, 1, fw_ver, + proto_tree_add_uint_format_value(slimp3_tree, hf_slimp3_fw_rev, tvb, offset+2, 1, fw_ver, "%u.%u (0x%0x)", fw_ver>>4, fw_ver & 0xf, fw_ver); } else { /* Hello request; server->client */ @@ -522,7 +522,7 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ guint8 fw_ver; proto_tree_add_item(slimp3_tree, hf_slimp3_device_id, tvb, offset+1, 1, ENC_BIG_ENDIAN); fw_ver = tvb_get_guint8(tvb, offset+2); - proto_tree_add_uint_format_value(slimp3_tree, hf_slimp3_fw_rev, tvb, offset+2, 1, fw_ver, + proto_tree_add_uint_format_value(slimp3_tree, hf_slimp3_fw_rev, tvb, offset+2, 1, fw_ver, "%u.%u (0x%0x)", fw_ver>>4, fw_ver & 0xf, fw_ver); col_append_fstr(pinfo->cinfo, COL_INFO, ", Device ID: %u. Firmware: %u.%u", tvb_get_guint8(tvb, offset+1), fw_ver>>4, fw_ver & 0xf); diff --git a/epan/dissectors/packet-smb-browse.h b/epan/dissectors/packet-smb-browse.h index 985d40726f..5b173b5d57 100644 --- a/epan/dissectors/packet-smb-browse.h +++ b/epan/dissectors/packet-smb-browse.h @@ -28,7 +28,7 @@ int dissect_smb_server_type_flags(tvbuff_t *tvb, int offset, packet_info *pinfo, - proto_tree *parent_tree, guint8 *drep, + proto_tree *parent_tree, guint8 *drep, gboolean infoflag); #endif diff --git a/epan/dissectors/packet-smb-sidsnooping.h b/epan/dissectors/packet-smb-sidsnooping.h index bf37a837eb..482ac4617c 100644 --- a/epan/dissectors/packet-smb-sidsnooping.h +++ b/epan/dissectors/packet-smb-sidsnooping.h @@ -28,7 +28,7 @@ #include "ws_symbol_export.h" -/* With MSVC and a libwireshark.dll, we need a +/* With MSVC and a libwireshark.dll, we need a * special declaration for sid_name_table. */ WS_DLL_PUBLIC GHashTable *sid_name_table; diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index d8418a0e77..84d0b6b022 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -14506,10 +14506,10 @@ dissect_4_3_4_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, } /* - * According to MS-CIFS 2.2.8.1.3 this is like the function above with the + * According to MS-CIFS 2.2.8.1.3 this is like the function above with the * addition of the list of EA name value pairs before the file name. * - * The EAs are formatted as an SMB_FEA as in 2.2.1.2.2. We will deal with + * The EAs are formatted as an SMB_FEA as in 2.2.1.2.2. We will deal with * this soon. */ static int @@ -15476,7 +15476,7 @@ dissect_ff2_response_data(tvbuff_t * tvb, packet_info * pinfo, trunc); break; case 3: /* Info Query EAs From List same as - * InfoQueryEASize. + * InfoQueryEASize. * Not according to MS-CIFS 2.2.8.1.3. RJS */ offset = dissect_4_3_4_3(tvb, pinfo, tree, offset, bcp, diff --git a/epan/dissectors/packet-smb.h b/epan/dissectors/packet-smb.h index 0972c87c37..90e674b6c1 100644 --- a/epan/dissectors/packet-smb.h +++ b/epan/dissectors/packet-smb.h @@ -228,7 +228,7 @@ typedef enum { SMB_EI_FILEDATA, /* fid tracking */ SMB_EI_FILENAME, /* filename tracking */ SMB_EI_UID, /* smb_uid_t */ - SMB_EI_RWINFO, /* read/write offset/count info */ + SMB_EI_RWINFO, /* read/write offset/count info */ SMB_EI_LOCKDATA, /* locking and x data */ SMB_EI_RENAMEDATA, /* rename data */ SMB_EI_DIALECTS /* negprot dialects */ diff --git a/epan/dissectors/packet-smpp.h b/epan/dissectors/packet-smpp.h index 2b4b225a8d..02072ee701 100644 --- a/epan/dissectors/packet-smpp.h +++ b/epan/dissectors/packet-smpp.h @@ -39,7 +39,7 @@ #ifndef __PACKET_SMPP_H_ #define __PACKET_SMPP_H_ - + /* * Export dissection of some parameters */ diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c index 492b49e53d..5e72370a76 100644 --- a/epan/dissectors/packet-smtp.c +++ b/epan/dissectors/packet-smtp.c @@ -307,7 +307,7 @@ dissect_ntlm_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } static void -decode_plain_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, +decode_plain_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint a_offset, int a_linelen) { gint returncode; diff --git a/epan/dissectors/packet-soupbintcp.c b/epan/dissectors/packet-soupbintcp.c index cdbd6d1c48..ebc31f867f 100644 --- a/epan/dissectors/packet-soupbintcp.c +++ b/epan/dissectors/packet-soupbintcp.c @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the + * along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. @@ -170,7 +170,7 @@ format_reject_code( } -/** Dissector for SoupBinTCP messages */ +/** Dissector for SoupBinTCP messages */ static void dissect_soupbintcp_common( tvbuff_t *tvb, @@ -311,7 +311,7 @@ dissect_soupbintcp_common( hf_soupbintcp_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - + /* Type */ proto_tree_add_item(soupbintcp_tree, hf_soupbintcp_packet_type, @@ -477,7 +477,7 @@ dissect_soupbintcp_tcp( packet_info *pinfo, proto_tree *tree) { - tcp_dissect_pdus(tvb, pinfo, tree, + tcp_dissect_pdus(tvb, pinfo, tree, soupbintcp_desegment, 2, get_soupbintcp_pdu_len, dissect_soupbintcp_tcp_pdu); diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c index 31dbadaba3..02f23ef64b 100644 --- a/epan/dissectors/packet-ssl.c +++ b/epan/dissectors/packet-ssl.c @@ -1409,7 +1409,7 @@ process_ssl_payload(tvbuff_t *tvb, volatile int offset, packet_info *pinfo, (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = tvb_length(next_tvb); + exp_pdu_data->tvb_length = tvb_length(next_tvb); exp_pdu_data->pdu_tvb = next_tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); @@ -2537,7 +2537,7 @@ dissect_ssl3_hnd_hello_ext_sig_hash_algs(tvbuff_t *tvb, ret = dissect_ssl_hash_alg_list(tvb, tree, offset, sh_alg_length); if (ret >=0) offset += ret; - + return offset; } @@ -5424,7 +5424,7 @@ proto_register_ssl(void) }, { &hf_ssl_handshake_extension_alpn_str, { "ALPN Next Protocol", "ssl.handshake.extensions_alpn_str", - FT_STRING, BASE_NONE, NULL, 0x00, + FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_ssl_handshake_extension_npn_str_len, diff --git a/epan/dissectors/packet-ssl.h b/epan/dissectors/packet-ssl.h index 217ed778de..2e4881ceeb 100644 --- a/epan/dissectors/packet-ssl.h +++ b/epan/dissectors/packet-ssl.h @@ -32,7 +32,7 @@ WS_DLL_PUBLIC GHashTable *ssl_session_hash; WS_DLL_PUBLIC void ssl_dissector_add(guint port, const gchar *protocol, gboolean tcp); WS_DLL_PUBLIC void ssl_dissector_delete(guint port, const gchar *protocol, gboolean tcp); -WS_DLL_PUBLIC void ssl_set_master_secret(guint32 frame_num, address *addr_srv, address *addr_cli, +WS_DLL_PUBLIC void ssl_set_master_secret(guint32 frame_num, address *addr_srv, address *addr_cli, port_type ptype, guint32 port_srv, guint32 port_cli, guint32 version, gint cipher, const guchar *_master_secret, const guchar *_client_random, const guchar *_server_random, diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c index d9a97e0e9f..cd4373acca 100644 --- a/epan/dissectors/packet-stun.c +++ b/epan/dissectors/packet-stun.c @@ -678,7 +678,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole proto_item_append_text(att_tree, " (Deprecated): %s:%d", tvb_ip_to_str(tvb, offset+4),tvb_get_ntohs(tvb,offset+2)); break; - + case 2: if (att_length < 20) break; diff --git a/epan/dissectors/packet-symantec.c b/epan/dissectors/packet-symantec.c index 7c0c1743ec..c463d471ab 100644 --- a/epan/dissectors/packet-symantec.c +++ b/epan/dissectors/packet-symantec.c @@ -71,13 +71,13 @@ dissect_symantec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) etypev2 = tvb_get_ntohs(tvb, 6); etypev3 = tvb_get_ntohs(tvb, 10); - + /* a valid packet can't be both v2 and v3 or neither v2 nor v3, */ if ((etypev2 == 0) == (etypev3 == 0)) return; - + col_set_str(pinfo->cinfo, COL_PROTOCOL, "Symantec"); - + if (etypev3 == 0) { /* SEF and SGS v2 processing */ col_set_str(pinfo->cinfo, COL_INFO, "Symantec Enterprise Firewall"); if (tree) { diff --git a/epan/dissectors/packet-tacacs.h b/epan/dissectors/packet-tacacs.h index 629e5e7f6b..8a6277b635 100644 --- a/epan/dissectors/packet-tacacs.h +++ b/epan/dissectors/packet-tacacs.h @@ -17,7 +17,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -45,7 +45,7 @@ enum }; /* Flags */ -#define TAC_PLUS_ENCRYPTED 0x0 +#define TAC_PLUS_ENCRYPTED 0x0 #define TAC_PLUS_CLEAR 0x1 /* Authentication action to perform */ @@ -228,9 +228,9 @@ typedef struct { u_char type; u_char seq_no; u_char flags; - guint32 session_id; - guint32 length; -} tacplus_pkt_hdr; + guint32 session_id; + guint32 length; +} tacplus_pkt_hdr; /* Authentication START packet */ typedef struct { diff --git a/epan/dissectors/packet-tcp.h b/epan/dissectors/packet-tcp.h index 52f84b6343..eb1c8f0a47 100644 --- a/epan/dissectors/packet-tcp.h +++ b/epan/dissectors/packet-tcp.h @@ -248,7 +248,7 @@ struct tcp_analysis { nstime_t ts_prev; /* Keep track of tcp stream numbers instead of using the conversation - * index (as how it was done before). This prevents gaps in the + * index (as how it was done before). This prevents gaps in the * stream index numbering */ guint32 stream; diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index b964f87238..4ca6ce6460 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -1396,7 +1396,7 @@ dissect_tipc_v2_internal_msg(tvbuff_t *tipc_tvb, proto_tree *tipc_tree, packet_i frag_msg = fragment_add_seq_check(&tipc_msg_reassembly_table, tipc_tvb, offset, - pinfo, + pinfo, frag_msg_no, /* ID for fragments belonging together */ NULL, /* TODO: make sure that fragments are on the same LINK */ diff --git a/epan/dissectors/packet-tn5250.c b/epan/dissectors/packet-tn5250.c index c9913d1b88..75c5ee9cee 100644 --- a/epan/dissectors/packet-tn5250.c +++ b/epan/dissectors/packet-tn5250.c @@ -4608,7 +4608,7 @@ dissect_write_structured_field(proto_tree *tn5250_tree, tvbuff_t *tvb, gint offs case DEFINE_SCALE_LINE: offset += tn5250_add_hf_items(tn5250_tree, tvb, offset, dsl_fields); while ((offset - start) < sf_length) { - /* XXX length unused + /* XXX length unused length = tvb_get_guint8(tvb,offset); */ offset += tn5250_add_hf_items(tn5250_tree, tvb, offset, dsl_fields2); } diff --git a/epan/dissectors/packet-tnef.c b/epan/dissectors/packet-tnef.c index 14242a4a1c..6de1a4e0cc 100644 --- a/epan/dissectors/packet-tnef.c +++ b/epan/dissectors/packet-tnef.c @@ -526,7 +526,7 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* check the signature */ if(signature != TNEF_SIGNATURE) { - expert_add_info_format(pinfo, item, &ei_tnef_incorrect_signature, + expert_add_info_format(pinfo, item, &ei_tnef_incorrect_signature, " [Incorrect, should be 0x%x. No further dissection possible. Check any Content-Transfer-Encoding has been removed.]", TNEF_SIGNATURE); return; diff --git a/epan/dissectors/packet-tte.h b/epan/dissectors/packet-tte.h index efdf82582e..1ec1d798f2 100644 --- a/epan/dissectors/packet-tte.h +++ b/epan/dissectors/packet-tte.h @@ -33,7 +33,7 @@ #ifndef _PACKET_TTE_H_ #define _PACKET_TTE_H_ -/* in bytes, at least MAC dest/source and EthernetType must be there +/* in bytes, at least MAC dest/source and EthernetType must be there to look for TTE */ #define TTE_HEADER_LENGTH 14 diff --git a/epan/dissectors/packet-udt.c b/epan/dissectors/packet-udt.c index c99d7976d4..74c2dfaf6e 100644 --- a/epan/dissectors/packet-udt.c +++ b/epan/dissectors/packet-udt.c @@ -1,9 +1,9 @@ /* packet-udt.c - * + * * Routines for UDT packet dissection * * Copyright 2013 (c) chas williams - * + * * $Id$ * * Wireshark - Network traffic analyzer @@ -281,7 +281,7 @@ dissect_udt_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data if ((tvb_get_ntohl(tvb, 20) != UDT_HANDSHAKE_TYPE_DGRAM) && (tvb_get_ntohl(tvb, 20) != UDT_HANDSHAKE_TYPE_STREAM)) return FALSE; - + conv = find_or_create_conversation(pinfo); conversation_set_dissector(conv, udt_handle); dissect_udt(tvb, pinfo, tree, data); diff --git a/epan/dissectors/packet-umts_fp.h b/epan/dissectors/packet-umts_fp.h index 46035fb913..e95ad4326b 100644 --- a/epan/dissectors/packet-umts_fp.h +++ b/epan/dissectors/packet-umts_fp.h @@ -104,9 +104,9 @@ typedef struct fp_info gint no_ddi_entries; guint8 edch_ddi[MAX_EDCH_DDIS]; guint edch_macd_pdu_size[MAX_EDCH_DDIS]; - + guint edch_lchId[MAX_EDCH_DDIS]; /* Logical Channel Id for E-DCH*/ - + guint8 edch_type; /* 1 means T2 */ gint cur_tb; /* current transport block (required for dissecting of single TBs */ @@ -121,7 +121,7 @@ typedef struct fp_info gboolean hsdhsch_macfdlow_is_mux[MAX_NUM_HSDHSCH_MACDFLOW]; enum fp_link_type link_type; guint urnti; /*Used for tracking a "sequence" over diffrent transport channels*/ - + gboolean reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/ } fp_info; @@ -176,10 +176,10 @@ typedef struct guint8 hsdsch_macdflow_id; guint8 hsdsch_num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW]; - + /*HSDSCH Common related data*/ guint8 common_macdflow_id; - + guint urnti; /*Used for tracking a "sequence" over diffrent transport channels*/ guint hrnti; /*Used for tracking a HS-DSCH flow*/ gboolean reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/ diff --git a/epan/dissectors/packet-usb-audio.c b/epan/dissectors/packet-usb-audio.c index a25da141d0..9ad19b6b27 100644 --- a/epan/dissectors/packet-usb-audio.c +++ b/epan/dissectors/packet-usb-audio.c @@ -271,7 +271,7 @@ dissect_usb_audio_descriptor(tvbuff_t *tvb, packet_info *pinfo _U_, return descriptor_len; } - + /* dissector for usb midi bulk data */ static void dissect_usb_audio_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) diff --git a/epan/dissectors/packet-usb-ccid.c b/epan/dissectors/packet-usb-ccid.c index 70ab30d2ef..4098283cd5 100644 --- a/epan/dissectors/packet-usb-ccid.c +++ b/epan/dissectors/packet-usb-ccid.c @@ -310,7 +310,7 @@ dissect_usb_ccid_descriptor(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree_add_item(desc_tree, hf_ccid_dwMechanical, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; - + proto_tree_add_item(desc_tree, hf_ccid_dwFeatures, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; @@ -490,9 +490,9 @@ dissect_ccid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* If the user has opted to use the PN532 dissector for PC -> Reader comms, then use it here */ if (sub_selected == SUB_PN532_ACS_PSEUDO_APDU && tvb_get_guint8(tvb, 10) == 0xD5) { - + /* Strip the ISO 7816 status word at the end, like we do in the PN532 dissector for FeliCa payloads... */ - next_tvb= tvb_new_subset(tvb, 10, (tvb_get_guint8(tvb, 1) - 2), (tvb_get_guint8(tvb, 1) - 2)); + next_tvb= tvb_new_subset(tvb, 10, (tvb_get_guint8(tvb, 1) - 2), (tvb_get_guint8(tvb, 1) - 2)); call_dissector(sub_handles[SUB_PN532_ACS_PSEUDO_APDU], next_tvb, pinfo, tree); } diff --git a/epan/dissectors/packet-usb-hub.c b/epan/dissectors/packet-usb-hub.c index ebe10e1ae6..2424963b74 100644 --- a/epan/dissectors/packet-usb-hub.c +++ b/epan/dissectors/packet-usb-hub.c @@ -159,7 +159,7 @@ dissect_usb_hub_clear_hub_feature(packet_info *pinfo, proto_tree *tree, tvbuff_t proto_tree *subtree = NULL; const gchar* feature_name; - feature_name = val_to_str(usb_trans_info->setup.wValue, + feature_name = val_to_str(usb_trans_info->setup.wValue, hub_class_feature_selectors_recipient_hub_vals, "UNKNOWN (0x%x)"); col_append_fstr(pinfo->cinfo, COL_INFO, " [Hub: %s]", feature_name); @@ -191,7 +191,7 @@ dissect_usb_hub_clear_port_feature(packet_info *pinfo, proto_tree *tree, tvbuff_ proto_tree *subtree = NULL; const gchar* feature_name; - feature_name = val_to_str(usb_trans_info->setup.wValue, + feature_name = val_to_str(usb_trans_info->setup.wValue, hub_class_feature_selectors_recipient_port_vals, "UNKNOWN (0x%x)"); col_append_fstr(pinfo->cinfo, COL_INFO, " [Port %u: %s]", usb_trans_info->setup.wIndex, feature_name); @@ -469,7 +469,7 @@ dissect_usb_hub_set_hub_feature(packet_info *pinfo, proto_tree *tree, tvbuff_t * proto_item *item = NULL; proto_tree *subtree = NULL; const gchar* feature_name; - feature_name = val_to_str(usb_trans_info->setup.wValue, + feature_name = val_to_str(usb_trans_info->setup.wValue, hub_class_feature_selectors_recipient_hub_vals, "UNKNOWN (0x%x)"); col_append_fstr(pinfo->cinfo, COL_INFO, " [Hub: %s]", feature_name); @@ -501,7 +501,7 @@ dissect_usb_hub_set_port_feature(packet_info *pinfo, proto_tree *tree, tvbuff_t proto_tree *subtree = NULL; const gchar* feature_name; - feature_name = val_to_str(usb_trans_info->setup.wValue, + feature_name = val_to_str(usb_trans_info->setup.wValue, hub_class_feature_selectors_recipient_port_vals, "UNKNOWN (0x%x)"); col_append_fstr(pinfo->cinfo, COL_INFO, " [Port %u: %s]", usb_trans_info->setup.wIndex, diff --git a/epan/dissectors/packet-usb-video.c b/epan/dissectors/packet-usb-video.c index 49117a6509..355db03619 100644 --- a/epan/dissectors/packet-usb-video.c +++ b/epan/dissectors/packet-usb-video.c @@ -1003,7 +1003,7 @@ dissect_usb_video_control_interface_descriptor(proto_tree *parent_tree, tvbuff_t { /* @todo UVC 1.5 */ } - else + else { expert_add_info_format(pinfo, subtype_item, &ei_usb_vid_subtype_unknown, "Unknown VC subtype %u", subtype); @@ -1210,7 +1210,7 @@ dissect_usb_video_format(proto_tree *tree, tvbuff_t *tvb, int offset, #endif proto_tree_add_bitmask_text(tree, tvb, offset, 1, "bmInterlaceFlags", NULL, - ett_interlace_flags, interlace_bits, ENC_NA, + ett_interlace_flags, interlace_bits, ENC_NA, BMT_NO_APPEND); offset++; @@ -1261,7 +1261,7 @@ dissect_usb_video_frame(proto_tree *tree, tvbuff_t *tvb, int offset, ett_frame_capability_flags, capability_bits, ENC_NA); offset++; - proto_tree_add_item(tree, hf_usb_vid_frame_width, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_usb_vid_frame_width, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(tree, hf_usb_vid_frame_height, tvb, offset+2, 2, ENC_LITTLE_ENDIAN); /* Augment the descriptor root item with useful information */ @@ -1751,7 +1751,7 @@ dissect_usb_vid_control_value(proto_tree *tree, tvbuff_t *tvb, int offset, guint fallback_name = "Current Value"; break; - /* @todo UVC 1.5 USB_SETUP_x_ALL? + /* @todo UVC 1.5 USB_SETUP_x_ALL? * They are poorly specified. */ @@ -1799,7 +1799,7 @@ dissect_usb_vid_control_value(proto_tree *tree, tvbuff_t *tvb, int offset, guint */ static int dissect_usb_vid_get_set(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, - int offset, gboolean is_request, + int offset, gboolean is_request, usb_trans_info_t *usb_trans_info, usb_conv_info_t *usb_conv_info) { @@ -1863,7 +1863,7 @@ dissect_usb_vid_get_set(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, { proto_item *ti; - ti = proto_tree_add_uint(tree, hf_usb_vid_control_interface, tvb, 0, 0, + ti = proto_tree_add_uint(tree, hf_usb_vid_control_interface, tvb, 0, 0, usb_trans_info->setup.wIndex & 0xFF); PROTO_ITEM_SET_GENERATED(ti); @@ -1981,7 +1981,7 @@ static const value_string setup_request_names_vals[] = { {USB_SETUP_GET_RES_ALL, "GET RES ALL"}, {USB_SETUP_GET_DEF_ALL, "GET DEF ALL"}, {0, NULL} -}; +}; /* Registered dissector for video class-specific control requests. * Dispatch to an appropriate dissector function. @@ -2238,7 +2238,7 @@ proto_register_usb_vid(void) { &hf_usb_vid_control_min, { "Minimum value", "usbvideo.control.value.min", FT_UINT32, BASE_DEC_HEX, NULL, 0, - NULL, HFILL } + NULL, HFILL } }, { &hf_usb_vid_control_max, @@ -2287,19 +2287,19 @@ proto_register_usb_vid(void) /***** Camera Terminal Descriptor *****/ { &hf_usb_vid_cam_objective_focal_len_min, - { "wObjectiveFocalLengthMin", "usbvideo.camera.objectiveFocalLengthMin", + { "wObjectiveFocalLengthMin", "usbvideo.camera.objectiveFocalLengthMin", FT_UINT16, BASE_DEC, NULL, 0, "Minimum Focal Length for Optical Zoom", HFILL } }, { &hf_usb_vid_cam_objective_focal_len_max, - { "wObjectiveFocalLengthMax", "usbvideo.camera.objectiveFocalLengthMax", + { "wObjectiveFocalLengthMax", "usbvideo.camera.objectiveFocalLengthMax", FT_UINT16, BASE_DEC, NULL, 0, "Minimum Focal Length for Optical Zoom", HFILL } }, { &hf_usb_vid_cam_ocular_focal_len, - { "wOcularFocalLength", "usbvideo.camera.ocularFocalLength", + { "wOcularFocalLength", "usbvideo.camera.ocularFocalLength", FT_UINT16, BASE_DEC, NULL, 0, "Ocular Focal Length for Optical Zoom", HFILL } }, @@ -2489,7 +2489,7 @@ proto_register_usb_vid(void) { &hf_usb_vid_num_inputs, { "bNrInPins", "usbvideo.unit.numInputs", - FT_UINT8, BASE_DEC, NULL, 0, + FT_UINT8, BASE_DEC, NULL, 0, "Number of input pins", HFILL } }, @@ -2685,13 +2685,13 @@ proto_register_usb_vid(void) { &hf_usb_vid_exten_guid, { "guid", "usbvideo.extension.guid", - FT_GUID, BASE_NONE, NULL, 0, + FT_GUID, BASE_NONE, NULL, 0, "Identifier", HFILL } }, { &hf_usb_vid_exten_num_controls, { "bNumControls", "usbvideo.extension.numControls", - FT_UINT8, BASE_DEC, NULL, 0, + FT_UINT8, BASE_DEC, NULL, 0, "Number of controls", HFILL } }, @@ -2807,7 +2807,7 @@ proto_register_usb_vid(void) }, { &hf_usb_vid_control_ifdesc_dwClockFrequency, - { "dwClockFrequency", "usbvideo.probe.clockFrequency", + { "dwClockFrequency", "usbvideo.probe.clockFrequency", FT_UINT32, BASE_DEC, NULL, 0, "Device clock frequency (Hz) for selected format", HFILL } }, @@ -2821,37 +2821,37 @@ proto_register_usb_vid(void) }, { &hf_usb_vid_format_num_frame_descriptors, - { "bNumFrameDescriptors", "usbvideo.format.numFrameDescriptors", + { "bNumFrameDescriptors", "usbvideo.format.numFrameDescriptors", FT_UINT8, BASE_DEC, NULL, 0, "Number of frame descriptors for this format", HFILL } }, { &hf_usb_vid_format_guid, { "guidFormat", "usbvideo.format.guid", - FT_GUID, BASE_NONE, NULL, 0, + FT_GUID, BASE_NONE, NULL, 0, "Stream encoding format", HFILL } }, { &hf_usb_vid_format_bits_per_pixel, - { "bBitsPerPixel", "usbvideo.format.bitsPerPixel", + { "bBitsPerPixel", "usbvideo.format.bitsPerPixel", FT_UINT8, BASE_DEC, NULL, 0, "Bits per pixel", HFILL } }, { &hf_usb_vid_default_frame_index, - { "bDefaultFrameIndex", "usbvideo.format.defaultFrameIndex", + { "bDefaultFrameIndex", "usbvideo.format.defaultFrameIndex", FT_UINT8, BASE_DEC, NULL, 0, "Optimum frame index for this stream", HFILL } }, { &hf_usb_vid_aspect_ratio_x, - { "bAspectRatioX", "usbvideo.format.aspectRatioX", + { "bAspectRatioX", "usbvideo.format.aspectRatioX", FT_UINT8, BASE_DEC, NULL, 0, "X dimension of picture aspect ratio", HFILL } }, { &hf_usb_vid_aspect_ratio_y, - { "bAspectRatioY", "usbvideo.format.aspectRatioY", + { "bAspectRatioY", "usbvideo.format.aspectRatioY", FT_UINT8, BASE_DEC, NULL, 0, "Y dimension of picture aspect ratio", HFILL } }, @@ -2910,7 +2910,7 @@ proto_register_usb_vid(void) /***** Frame Descriptors *****/ { &hf_usb_vid_frame_index, - { "bFrameIndex", "usbvideo.frame.index", + { "bFrameIndex", "usbvideo.frame.index", FT_UINT8, BASE_DEC, NULL, 0, "Index of this frame descriptor", HFILL } }, @@ -2939,33 +2939,33 @@ proto_register_usb_vid(void) NULL, HFILL } }, { &hf_usb_vid_frame_width, - { "wWidth", "usbvideo.frame.width", + { "wWidth", "usbvideo.frame.width", FT_UINT16, BASE_DEC, NULL, 0, "Width of frame in pixels", HFILL } }, { &hf_usb_vid_frame_height, - { "wHeight", "usbvideo.frame.height", + { "wHeight", "usbvideo.frame.height", FT_UINT16, BASE_DEC, NULL, 0, "Height of frame in pixels", HFILL } }, { &hf_usb_vid_frame_min_bit_rate, - { "dwMinBitRate", "usbvideo.frame.minBitRate", + { "dwMinBitRate", "usbvideo.frame.minBitRate", FT_UINT32, BASE_DEC, NULL, 0, "Minimum bit rate in bps", HFILL } }, { &hf_usb_vid_frame_max_bit_rate, - { "dwMaxBitRate", "usbvideo.frame.maxBitRate", + { "dwMaxBitRate", "usbvideo.frame.maxBitRate", FT_UINT32, BASE_DEC, NULL, 0, "Maximum bit rate in bps", HFILL } }, { &hf_usb_vid_frame_max_frame_sz, - { "dwMaxVideoFrameBufferSize", "usbvideo.frame.maxBuffer", + { "dwMaxVideoFrameBufferSize", "usbvideo.frame.maxBuffer", FT_UINT32, BASE_DEC, NULL, 0, "Maximum bytes per frame", HFILL } }, { &hf_usb_vid_frame_default_interval, - { "dwDefaultFrameInterval", "usbvideo.frame.interval.default", + { "dwDefaultFrameInterval", "usbvideo.frame.interval.default", FT_UINT32, BASE_DEC, NULL, 0, "Suggested default", HFILL } }, @@ -3025,13 +3025,13 @@ proto_register_usb_vid(void) /***** Video Control Header Descriptor *****/ { &hf_usb_vid_control_ifdesc_bcdUVC, - { "bcdUVC", "usbvideo.bcdUVC", + { "bcdUVC", "usbvideo.bcdUVC", FT_UINT16, BASE_HEX, NULL, 0, "Video Device Class Specification release number", HFILL } }, - + { &hf_usb_vid_control_ifdesc_bInCollection, - { "bInCollection", "usbvideo.numStreamingInterfaces", + { "bInCollection", "usbvideo.numStreamingInterfaces", FT_UINT8, BASE_DEC, NULL, 0, "Number of VideoStreaming interfaces", HFILL } }, @@ -3044,7 +3044,7 @@ proto_register_usb_vid(void) /***** Video Streaming Input Header Descriptor *****/ { &hf_usb_vid_streaming_ifdesc_bNumFormats, - { "bNumFormats", "usbvideo.streaming.numFormats", + { "bNumFormats", "usbvideo.streaming.numFormats", FT_UINT8, BASE_DEC, NULL, 0, "Number of video payload format descriptors", HFILL } }, @@ -3157,20 +3157,20 @@ proto_register_usb_vid(void) }, { &hf_usb_vid_epdesc_max_transfer_sz, - { "wMaxTransferSize", "usbvideo.ep.maxInterruptSize", FT_UINT16, + { "wMaxTransferSize", "usbvideo.ep.maxInterruptSize", FT_UINT16, BASE_DEC, NULL, 0x0, "Max interrupt structure size", HFILL } }, /***** Fields used in multiple contexts *****/ { &hf_usb_vid_ifdesc_wTotalLength, - { "wTotalLength", "usbvideo.totalLength", + { "wTotalLength", "usbvideo.totalLength", FT_UINT16, BASE_DEC, NULL, 0, "Video interface descriptor size", HFILL } }, { &hf_usb_vid_bControlSize, - { "bControlSize", "usbvideo.bmcontrolSize", + { "bControlSize", "usbvideo.bmcontrolSize", FT_UINT8, BASE_DEC, NULL, 0, "Size of bmControls field", HFILL } }, diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index dfa4642405..56ccbb3c21 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -480,7 +480,7 @@ extern value_string_ext ext_usb_products_vals; /* * Standard descriptor types. - * + * * all class specific descriptor types were removed from this list * a descriptor type is not globally unique * dissectors for the USB classes should provide their own value string @@ -1495,7 +1495,7 @@ dissect_usb_interface_descriptor(packet_info *pinfo, proto_tree *parent_tree, /* Register conversation for this interface in case CONTROL messages are sent to it */ usb_trans_info->interface_info = get_usb_iface_conv_info(pinfo, interface_num); usb_trans_info->interface_info->interfaceClass = tvb_get_guint8(tvb, offset); - /* save information useful to class-specific dissectors */ + /* save information useful to class-specific dissectors */ usb_trans_info->interface_info->interfaceSubclass = tvb_get_guint8(tvb, offset+1); usb_trans_info->interface_info->interfaceProtocol = tvb_get_guint8(tvb, offset+2); usb_trans_info->interface_info->deviceVendor = usb_conv_info->deviceVendor; diff --git a/epan/dissectors/packet-usb.h b/epan/dissectors/packet-usb.h index 4fd31aff40..16d52148be 100644 --- a/epan/dissectors/packet-usb.h +++ b/epan/dissectors/packet-usb.h @@ -76,7 +76,7 @@ typedef struct _usb_trans_info_t { usb_conv_info_t *interface_info; } usb_trans_info_t; -/* Conversation Structure +/* Conversation Structure * there is one such structure for each device/endpoint conversation */ struct _usb_conv_info_t { guint16 interfaceClass; /* Interface Descriptor - class */ diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c index d9fb9c352b..6587a2d72d 100644 --- a/epan/dissectors/packet-vines.c +++ b/epan/dissectors/packet-vines.c @@ -532,7 +532,7 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) vip_proto = tvb_get_guint8(tvb, offset+4); col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)", - val_to_str_const(vip_tctl, proto_vals, "Unknown VIP protocol"), + val_to_str_const(vip_tctl, proto_vals, "Unknown VIP protocol"), vip_tctl); src_addr = tvb_get_ptr(tvb, offset+12, VINES_ADDR_LEN); @@ -1378,7 +1378,7 @@ rtp_show_gateway_info(proto_tree *tree, tvbuff_t *tvb, int offset, guint8 link_addr_length, guint8 source_route_length) { if (link_addr_length != 0) { - proto_tree_add_item(tree, + proto_tree_add_item(tree, link_addr_length == 6 ? hf_vines_rtp_preferred_gateway_data_link_address_ether : hf_vines_rtp_preferred_gateway_data_link_address_bytes, tvb, offset, link_addr_length, ENC_NA); offset += link_addr_length; diff --git a/epan/dissectors/packet-wccp.c b/epan/dissectors/packet-wccp.c index 86d4c04d4f..3a0e91dd11 100644 --- a/epan/dissectors/packet-wccp.c +++ b/epan/dissectors/packet-wccp.c @@ -2324,7 +2324,7 @@ dissect_wccp2_capability_element(tvbuff_t *tvb, int offset, gint length, val_to_str(capability_type, capability_type_vals, "Unknown (0x%08X)")); if (capability_val_len < 4) { - expert_add_info_format(pinfo, tf, &ei_wccp_capability_element_length, + expert_add_info_format(pinfo, tf, &ei_wccp_capability_element_length, "Value Length: %u (illegal, must be >= 4)", capability_val_len); return -length; } diff --git a/epan/dissectors/packet-websocket.c b/epan/dissectors/packet-websocket.c index d4743ec11a..750d5508f1 100644 --- a/epan/dissectors/packet-websocket.c +++ b/epan/dissectors/packet-websocket.c @@ -589,7 +589,7 @@ proto_register_websocket(void) proto_websocket = proto_register_protocol("WebSocket", "WebSocket", "websocket"); - + /* * Heuristic dissectors SHOULD register themselves in * this table using the standard heur_dissector_add() diff --git a/epan/dissectors/packet-windows-common.h b/epan/dissectors/packet-windows-common.h index cfbbcc0253..e7aade4d7e 100644 --- a/epan/dissectors/packet-windows-common.h +++ b/epan/dissectors/packet-windows-common.h @@ -225,11 +225,11 @@ typedef struct _sid_strings { */ WS_DLL_PUBLIC -int dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree, +int dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree, const char *name, char **sid_str, int hf_sid); -/* - * Stuff for dissecting NT access masks +/* + * Stuff for dissecting NT access masks */ /* diff --git a/epan/dissectors/packet-wps.h b/epan/dissectors/packet-wps.h index 8896b771f5..cd3ba0d5f3 100644 --- a/epan/dissectors/packet-wps.h +++ b/epan/dissectors/packet-wps.h @@ -2,7 +2,7 @@ * * Wifi Simple Config aka Wifi Protected Setup * - * Written by Jens Braeuer using WiFi-Alliance Spec 1.0h and + * Written by Jens Braeuer using WiFi-Alliance Spec 1.0h and * parts of a patch by JP Jiang and Philippe Teuwen. November 2007 * * Spec: diff --git a/epan/dissectors/packet-x11-keysymdef.h b/epan/dissectors/packet-x11-keysymdef.h index 727b80ca0b..0f69b9468b 100644 --- a/epan/dissectors/packet-x11-keysymdef.h +++ b/epan/dissectors/packet-x11-keysymdef.h @@ -13,12 +13,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -1525,11 +1525,11 @@ SOFTWARE. #define XK_Thai_khokhuat 0xda3 #define XK_Thai_khokhwai 0xda4 #define XK_Thai_khokhon 0xda5 -#define XK_Thai_khorakhang 0xda6 -#define XK_Thai_ngongu 0xda7 -#define XK_Thai_chochan 0xda8 -#define XK_Thai_choching 0xda9 -#define XK_Thai_chochang 0xdaa +#define XK_Thai_khorakhang 0xda6 +#define XK_Thai_ngongu 0xda7 +#define XK_Thai_chochan 0xda8 +#define XK_Thai_choching 0xda9 +#define XK_Thai_chochang 0xdaa #define XK_Thai_soso 0xdab #define XK_Thai_chochoe 0xdac #define XK_Thai_yoying 0xdad @@ -1571,39 +1571,39 @@ SOFTWARE. #define XK_Thai_maihanakat 0xdd1 #define XK_Thai_saraaa 0xdd2 #define XK_Thai_saraam 0xdd3 -#define XK_Thai_sarai 0xdd4 -#define XK_Thai_saraii 0xdd5 -#define XK_Thai_saraue 0xdd6 -#define XK_Thai_sarauee 0xdd7 -#define XK_Thai_sarau 0xdd8 -#define XK_Thai_sarauu 0xdd9 +#define XK_Thai_sarai 0xdd4 +#define XK_Thai_saraii 0xdd5 +#define XK_Thai_saraue 0xdd6 +#define XK_Thai_sarauee 0xdd7 +#define XK_Thai_sarau 0xdd8 +#define XK_Thai_sarauu 0xdd9 #define XK_Thai_phinthu 0xdda #define XK_Thai_maihanakat_maitho 0xdde #define XK_Thai_baht 0xddf -#define XK_Thai_sarae 0xde0 +#define XK_Thai_sarae 0xde0 #define XK_Thai_saraae 0xde1 #define XK_Thai_sarao 0xde2 -#define XK_Thai_saraaimaimuan 0xde3 -#define XK_Thai_saraaimaimalai 0xde4 +#define XK_Thai_saraaimaimuan 0xde3 +#define XK_Thai_saraaimaimalai 0xde4 #define XK_Thai_lakkhangyao 0xde5 #define XK_Thai_maiyamok 0xde6 #define XK_Thai_maitaikhu 0xde7 -#define XK_Thai_maiek 0xde8 +#define XK_Thai_maiek 0xde8 #define XK_Thai_maitho 0xde9 #define XK_Thai_maitri 0xdea #define XK_Thai_maichattawa 0xdeb #define XK_Thai_thanthakhat 0xdec #define XK_Thai_nikhahit 0xded -#define XK_Thai_leksun 0xdf0 -#define XK_Thai_leknung 0xdf1 -#define XK_Thai_leksong 0xdf2 +#define XK_Thai_leksun 0xdf0 +#define XK_Thai_leknung 0xdf1 +#define XK_Thai_leksong 0xdf2 #define XK_Thai_leksam 0xdf3 -#define XK_Thai_leksi 0xdf4 -#define XK_Thai_lekha 0xdf5 -#define XK_Thai_lekhok 0xdf6 -#define XK_Thai_lekchet 0xdf7 -#define XK_Thai_lekpaet 0xdf8 -#define XK_Thai_lekkao 0xdf9 +#define XK_Thai_leksi 0xdf4 +#define XK_Thai_lekha 0xdf5 +#define XK_Thai_lekhok 0xdf6 +#define XK_Thai_lekchet 0xdf7 +#define XK_Thai_lekpaet 0xdf8 +#define XK_Thai_lekkao 0xdf9 #endif /* XK_THAI */ /* @@ -1942,7 +1942,7 @@ SOFTWARE. * Vietnamese * Byte 3 = 0x1e */ - + #define XK_VIETNAMESE #ifdef XK_VIETNAMESE #define XK_Abelowdot 0x1ea0 diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c index 5278d7a384..6c15c9ce63 100644 --- a/epan/dissectors/packet-x25.c +++ b/epan/dissectors/packet-x25.c @@ -877,7 +877,7 @@ dump_facilities(proto_tree *tree, int *offset, tvbuff_t *tvb, packet_info *pinfo } byte2 = tvb_get_guint8(tvb, *offset+2); if ((byte2 & 0xC0) == 0xC0) { - proto_tree_add_uint_format_value(facility_tree, hf_x25_facility_call_transfer_reason, tvb, + proto_tree_add_uint_format_value(facility_tree, hf_x25_facility_call_transfer_reason, tvb, *offset+2, 1, byte2, "call deflection by the originally called DTE address"); } else { @@ -2419,7 +2419,7 @@ proto_register_x25(void) &ett_x25, &ett_x25_gfi, &ett_x25_facilities, - &ett_x25_facility, + &ett_x25_facility, &ett_x25_user_data, &ett_x25_segment, &ett_x25_segments diff --git a/epan/dissectors/packet-xdmcp.c b/epan/dissectors/packet-xdmcp.c index 930e27756d..6b99014f39 100644 --- a/epan/dissectors/packet-xdmcp.c +++ b/epan/dissectors/packet-xdmcp.c @@ -358,7 +358,7 @@ static int dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo offset += xdmcp_add_string(xdmcp_tree, hf_xdmcp_authentication_name, tvb, offset); - offset += xdmcp_add_bytes(xdmcp_tree, hf_xdmcp_authentication_data, hf_xdmcp_authentication_data_len, + offset += xdmcp_add_bytes(xdmcp_tree, hf_xdmcp_authentication_data, hf_xdmcp_authentication_data_len, tvb, offset); offset += xdmcp_add_authorization_names(xdmcp_tree, tvb, offset); @@ -374,11 +374,11 @@ static int dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo offset += 4; offset += xdmcp_add_string(xdmcp_tree, hf_xdmcp_authentication_name, tvb, offset); - offset += xdmcp_add_bytes(xdmcp_tree, hf_xdmcp_authentication_data, hf_xdmcp_authentication_data_len, + offset += xdmcp_add_bytes(xdmcp_tree, hf_xdmcp_authentication_data, hf_xdmcp_authentication_data_len, tvb, offset); offset += xdmcp_add_string(xdmcp_tree, hf_xdmcp_authorization_name, tvb, offset); - offset += xdmcp_add_bytes(xdmcp_tree, hf_xdmcp_authorization_data, hf_xdmcp_authorization_data_len, + offset += xdmcp_add_bytes(xdmcp_tree, hf_xdmcp_authorization_data, hf_xdmcp_authorization_data_len, tvb, offset); break; @@ -387,7 +387,7 @@ static int dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo tvb, offset); offset += xdmcp_add_string(xdmcp_tree, hf_xdmcp_authentication_name, tvb, offset); - offset += xdmcp_add_bytes(xdmcp_tree, hf_xdmcp_authentication_data, hf_xdmcp_authentication_data_len, + offset += xdmcp_add_bytes(xdmcp_tree, hf_xdmcp_authentication_data, hf_xdmcp_authentication_data_len, tvb, offset); break; diff --git a/epan/dissectors/packet-xot.c b/epan/dissectors/packet-xot.c index 3a79e4e30e..78ecb741be 100644 --- a/epan/dissectors/packet-xot.c +++ b/epan/dissectors/packet-xot.c @@ -158,7 +158,7 @@ static guint get_xot_pdu_len_mult(packet_info *pinfo _U_, tvbuff_t *tvb, int off /* If this is the first packet and it is not data, no sequence needed */ if (offset == offset_before && !PACKET_IS_DATA(pkt_type)) { - return offset_next-offset_before; + return offset_next-offset_before; } /* Check for data, there can be X25 control packets in the X25 data */ @@ -311,14 +311,14 @@ static int dissect_xot_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t if (!x25_desegment || !xot_desegment){ tcp_dissect_pdus(tvb, pinfo, tree, xot_desegment, XOT_HEADER_LENGTH, - get_xot_pdu_len, + get_xot_pdu_len, dissect_xot_pdu); len=get_xot_pdu_len(pinfo, tvb, 0); } else { /* Use length version that "peeks" into X25, possibly several XOT packets */ tcp_dissect_pdus(tvb, pinfo, tree, xot_desegment, XOT_HEADER_LENGTH, - get_xot_pdu_len_mult, + get_xot_pdu_len_mult, dissect_xot_mult); len=get_xot_pdu_len_mult(pinfo, tvb, 0); } diff --git a/epan/dissectors/packet-zbee-zcl-meas-sensing.c b/epan/dissectors/packet-zbee-zcl-meas-sensing.c index 8ce10c0802..e349bfe34d 100644 --- a/epan/dissectors/packet-zbee-zcl-meas-sensing.c +++ b/epan/dissectors/packet-zbee-zcl-meas-sensing.c @@ -1307,7 +1307,7 @@ decode_relhum_meas_value(gchar *s, guint16 value) { if (value == ZBEE_ZCL_ATTR_ID_RELHUM_MEAS_INVALID_VALUE) g_snprintf(s, ITEM_LABEL_LENGTH, "Invalid value"); - else + else g_snprintf(s, ITEM_LABEL_LENGTH, "%d.%d [%c]", value/100, value%100, '%'); return; diff --git a/epan/dissectors/packet-zbee-zcl.c b/epan/dissectors/packet-zbee-zcl.c index 91f52482f7..0afde81eb8 100644 --- a/epan/dissectors/packet-zbee-zcl.c +++ b/epan/dissectors/packet-zbee-zcl.c @@ -809,7 +809,7 @@ static void dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree packet.cmd_id); } offset += (int)1; - } + } else { /* Cluster Specific */ payload_tvb = tvb_new_subset_remaining(tvb, offset); @@ -949,7 +949,7 @@ void dissect_zcl_read_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre guint tvb_len; guint i = 0; guint16 attr_id; - + tvb_len = tvb_length(tvb); while ( *offset < tvb_len && i < ZBEE_ZCL_NUM_ATTR_ETT ) { @@ -996,7 +996,7 @@ void dissect_zcl_write_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t guint tvb_len; guint i = 0; guint16 attr_id; - + tvb_len = tvb_length(tvb); while ( *offset < tvb_len && i < ZBEE_ZCL_NUM_ATTR_ETT ) { @@ -1396,20 +1396,20 @@ static void dissect_zcl_discover_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_ */ static void dissect_zcl_attr_id(tvbuff_t *tvb, proto_tree *tree, guint *offset) { - guint16 attr_id; - zbee_zcl_cluster_desc *desc; + guint16 attr_id; + zbee_zcl_cluster_desc *desc; - attr_id = tvb_get_letohs(tvb, *offset); + attr_id = tvb_get_letohs(tvb, *offset); desc = zbee_zcl_get_cluster_desc(zcl_cluster_id); - if ((desc != NULL) && (desc->fn_attr_id != NULL)) { + if ((desc != NULL) && (desc->fn_attr_id != NULL)) { desc->fn_attr_id(tree, tvb, offset, attr_id); } else { /* Add the identifier */ - proto_tree_add_uint(tree, - hf_zbee_zcl_attr_id, - tvb, - *offset, + proto_tree_add_uint(tree, + hf_zbee_zcl_attr_id, + tvb, + *offset, (int)2, attr_id); } @@ -1438,11 +1438,11 @@ static void dissect_zcl_attr_data_type_val(tvbuff_t *tvb, proto_tree *tree, guin desc = zbee_zcl_get_cluster_desc(zcl_cluster_id); if ((desc != NULL) && (desc->fn_attr_data != NULL)) { - desc->fn_attr_data(tree, tvb, offset, attr_id, + desc->fn_attr_data(tree, tvb, offset, attr_id, dissect_zcl_attr_uint8(tvb, tree, offset, &hf_zbee_zcl_attr_data_type)); } else { - dissect_zcl_attr_data(tvb, tree, offset, + dissect_zcl_attr_data(tvb, tree, offset, dissect_zcl_attr_uint8(tvb, tree, offset, &hf_zbee_zcl_attr_data_type) ); } diff --git a/epan/dissectors/packet-zbee.h b/epan/dissectors/packet-zbee.h index 91bc037509..dac46677e6 100644 --- a/epan/dissectors/packet-zbee.h +++ b/epan/dissectors/packet-zbee.h @@ -743,7 +743,7 @@ /**/ #define ZBEE_MFG_HOME_AUTO "Home Automation Inc." /**/ -#define ZBEE_MFG_SUNRISE "Sunrise Technologies" +#define ZBEE_MFG_SUNRISE "Sunrise Technologies" #define ZBEE_MFG_MEMTEC "Memtec Corp" /**/ #define ZBEE_MFG_BRITISH_GAS "British Gas" @@ -768,7 +768,7 @@ #define ZBEE_MFG_SAMSUNG "Samsung Electronics Co., Ltd." /**/ #define ZBEE_MFG_MAINSTREAM "Mainstream Engineering" -#define ZBEE_MFG_INDESIT_C "Indesit Company" +#define ZBEE_MFG_INDESIT_C "Indesit Company" /**/ #define ZBEE_MFG_RADIOCRAFTS "Radiocrafts AS" /**/ diff --git a/epan/dissectors/packet-ziop.h b/epan/dissectors/packet-ziop.h index e584f52617..9dc3ba701a 100644 --- a/epan/dissectors/packet-ziop.h +++ b/epan/dissectors/packet-ziop.h @@ -34,7 +34,7 @@ * Useful visible data/structs */ -#define ZIOP_HEADER_SIZE 12 +#define ZIOP_HEADER_SIZE 12 #define ZIOP_MAGIC "ZIOP" -- cgit v1.2.3