Use consistent indentation; Whitesapce & formatting cleanup.

svn path=/trunk/; revision=32755
This commit is contained in:
Bill Meier 2010-05-11 16:54:55 +00:00
parent 1a474d8264
commit 0fc9115705
5 changed files with 13281 additions and 13257 deletions

View File

@ -574,13 +574,13 @@ mp_addr_to_str (guint16 afi, guint8 safi, tvbuff_t *tvb, gint offset, emem_strbu
length = 0 ;
ep_strbuf_printf(strbuf, "Unknown (0x%04x) labeled VPN IPv4 address format",rd_type);
break;
}
} /* switch (rd_type) */
break;
default:
length = 0 ;
ep_strbuf_printf(strbuf, "Unknown SAFI (%u) for AFI %u", safi, afi);
break;
}
} /* switch (safi) */
break;
case AFNUM_INET6:
switch (safi) {
@ -619,13 +619,13 @@ mp_addr_to_str (guint16 afi, guint8 safi, tvbuff_t *tvb, gint offset, emem_strbu
length = 0 ;
ep_strbuf_printf(strbuf, "Unknown (0x%04x) labeled VPN IPv6 address format",rd_type);
break;
}
} /* switch (rd_type) */
break;
default:
length = 0 ;
ep_strbuf_printf(strbuf, "Unknown SAFI (%u) for AFI %u", safi, afi);
break;
}
} /* switch (safi) */
break;
case AFNUM_L2VPN:
case AFNUM_L2VPN_OLD:
@ -643,13 +643,13 @@ mp_addr_to_str (guint16 afi, guint8 safi, tvbuff_t *tvb, gint offset, emem_strbu
length = 0 ;
ep_strbuf_printf(strbuf, "Unknown SAFI (%u) for AFI %u", safi, afi);
break;
}
} /* switch (safi) */
break;
default:
length = 0 ;
ep_strbuf_printf(strbuf, "Unknown AFI (%u) value", afi);
break;
}
} /* switch (afi) */
return(length) ;
}
@ -875,14 +875,14 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6,
(offset - start_offset) + 2,
"Unknown labeled VPN IPv4 address format %u", rd_type);
return -1;
}
} /* switch (rd_type) */
break;
default:
proto_tree_add_text(tree, tvb, start_offset, 0,
"Unknown SAFI (%u) for AFI %u", safi, afi);
return -1;
}
} /* switch (safi) */
break;
case AFNUM_INET6:
@ -1020,14 +1020,14 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6,
proto_tree_add_text(tree, tvb, start_offset, 0,
"Unknown labeled VPN IPv6 address format %u", rd_type);
return -1;
}
} /* switch (rd_type) */
break;
default:
proto_tree_add_text(tree, tvb, start_offset, 0,
"Unknown SAFI (%u) for AFI %u", safi, afi);
return -1;
}
} /* switch (safi) */
break;
case AFNUM_L2VPN:
@ -1081,7 +1081,7 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6,
(offset - start_offset) + 2,
"Unknown labeled VPN address format %u", rd_type);
return -1;
}
} /* switch (rd_type) */
/* FIXME there are subTLVs left to decode ... for now lets omit them */
total_length = plen+2;
break;
@ -1090,14 +1090,14 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6,
proto_tree_add_text(tree, tvb, start_offset, 0,
"Unknown SAFI (%u) for AFI %u", safi, afi);
return -1;
}
} /* switch (safi) */
break;
default:
proto_tree_add_text(tree, tvb, start_offset, 0,
"Unknown AFI (%u) value", afi);
return -1;
}
} /* switch (afi) */
return(total_length);
}
@ -1330,7 +1330,7 @@ dissect_bgp_capability_item(tvbuff_t *tvb, int *p, proto_tree *tree, int ctype,
}
*p += clen;
break;
}
} /* switch (ctype) */
}
@ -1441,7 +1441,7 @@ dissect_bgp_open(tvbuff_t *tvb, proto_tree *tree)
proto_tree_add_text(subtree, tvb, p - 2, 2 + plen,
"Unknown optional parameter");
break;
}
} /* switch (ptype) */
}
}
}
@ -1804,7 +1804,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
"%s (%u byte%s)",
val_to_str(bgpa.bgpa_type, bgpattr_type, "Unknown"),
tlen + aoff, plurality(tlen + aoff, "", "s"));
} /* end of first switch */
} /* switch (bgpa.bgpa_type) */ /* end of first switch */
subtree2 = proto_item_add_subtree(ti, ett_bgp_attr);
/* figure out flags */
@ -2139,7 +2139,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
j += advance;
}
break;
}
} /* switch (af) */
aoff_save = aoff;
tlen -= nexthop_len + 4;
@ -2325,7 +2325,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
tvb_get_guint8(tvb,q+2),tvb_get_guint8(tvb,q+3),tvb_get_guint8(tvb,q+4),
tvb_get_guint8(tvb,q+5),tvb_get_guint8(tvb,q+6),tvb_get_guint8(tvb,q+7));
break;
}
} /* switch (ext_com8) */
if (!is_regular_type) {
ep_strbuf_append(junk_emstr, val_to_str(ext_com,bgpext_com_type,"Unknown"));
@ -2404,7 +2404,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
tvb_get_ntohs(tvb,q+4),
plurality(tvb_get_ntohs(tvb,q+4), "", "s"));
break;
}
} /* switch (ext_com) */
}
if (!is_regular_type && !is_extended_type)
proto_tree_add_text(subtree3,tvb,q,8, "%s","Unknown");
@ -2440,7 +2440,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
proto_tree_add_item(subtree3, hf_bgp_ssa_len, tvb,
q + 2, 2, FALSE);
switch(ssa_type){
switch (ssa_type) {
case BGP_SSA_L2TPv3:
proto_tree_add_item(subtree3, hf_bgp_ssa_l2tpv3_pref, tvb,
q + 4, 2, FALSE);
@ -2482,7 +2482,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
/* These contain BGP_SSA_IPSec and BGP_SSA_L2TPv3/BGP_SSA_mGRE */
q += 4; /* 4 from type and length */
break;
}
} /* switch (bgpa.bgpa_type) */
}
break;
@ -2490,7 +2490,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
proto_tree_add_text(subtree2, tvb, o + i + aoff, tlen,
"Unknown (%u byte%s)", tlen, plurality(tlen, "", "s"));
break;
} /* end of second switch */
} /* switch (bgpa.bgpa_type) */ /* end of second switch */
i += alen + aoff;
}

View File

@ -616,9 +616,11 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto
}
msgtype = match_strval(type, bittorrent_messages);
/* if (msgtype == NULL && isamp) {
#if 0
if (msgtype == NULL && isamp) {
msgtype = match_strval(type, azureus_messages);
} */
}
#endif
if (msgtype == NULL) {
proto_tree_add_text(tree, tvb, offset, -1, "Continuation data");
col_set_str(pinfo->cinfo, COL_INFO, "Continuation data");
@ -946,7 +948,6 @@ proto_register_bittorrent(void)
void
proto_reg_handoff_bittorrent(void)
{
/* dissector_handle = create_dissector_handle(dissect_bittorrent, proto_bittorrent); */
dissector_handle = find_dissector("bittorrent.tcp");
#if 0
dissector_add("tcp.port", 6881, dissector_handle);
@ -961,3 +962,16 @@ proto_reg_handoff_bittorrent(void)
#endif
heur_dissector_add("tcp", test_bittorrent_packet, proto_bittorrent);
}
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 3
* tab-width: 3
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=3 tabstop=3 expandtab
* :indentSize=3:tabSize=3:noTabs=true:
*/

View File

@ -100,6 +100,7 @@ static void printnbyte(const guint8* tab _U_,int nb _U_,const char* txt _U_,cons
#define NETLOGON_FLAG_4 0x4
#define NETLOGON_FLAG_2 0x2
#define NETLOGON_FLAG_1 0x1
static GHashTable *netlogon_auths=NULL;
static GHashTable *schannel_auths;
@ -655,14 +656,14 @@ dissect_ndr_lm_nt_hash_cb(tvbuff_t *tvb, int offset,
if (di->conformant_run)
return offset;
/*
#if 0
struct {
short len;
short size;
[size_is(size/2), length_is(len/2), ptr] unsigned short *string;
} HASH;
*/
#endif
offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
hf_nt_cs_len, &len);
@ -1241,7 +1242,6 @@ netlogon_dissect_NETWORK_INFO(tvbuff_t *tvb, int offset,
offset = dissect_ndr_counted_byte_array_cb(
tvb, offset, pinfo, tree, drep, hf_netlogon_nt_chal_resp,
dissect_nt_chal_resp_cb,GINT_TO_POINTER(2));
hf_netlogon_nt_chal_resp, 0);
offset = dissect_ndr_counted_byte_array(tvb, offset, pinfo, tree, drep,
hf_netlogon_lm_chal_resp, 0);
@ -1924,7 +1924,7 @@ netlogon_dissect_VALIDATION_SAM_INFO4(tvbuff_t *tvb, int offset,
* IDL [unique] SID_AND_ATTRIBS;
* IDL [unique] SID resourcegroupdomainsid;
* IDL long resourcegroupcount;
qqq
qqq
* IDL } PAC_LOGON_INFO;
*/
int
@ -2078,7 +2078,8 @@ netlogon_dissect_PAC_CONSTRAINED_DELEGATION(tvbuff_t *tvb, int offset,
return offset;
}
/*
#if 0
static int
netlogon_dissect_PAC(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
@ -2124,7 +2125,8 @@ netlogon_dissect_AUTH(tvbuff_t *tvb, int offset,
return offset;
}
*/
#endif
static int
netlogon_dissect_VALIDATION_GENERIC_INFO2 (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
@ -2158,7 +2160,7 @@ netlogon_dissect_VALIDATION_GENERIC_INFO2 (tvbuff_t *tvb, int offset,
* IDL UNICODESTRING dummy4;
* IDL } VALIDATION_PAC_INFO;
*/
/* Not used (anymore ?)
#if 0 /* Not used (anymore ?) */
static int
netlogon_dissect_VALIDATION_PAC_INFO(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
@ -2216,7 +2218,8 @@ netlogon_dissect_VALIDATION_PAC_INFO(tvbuff_t *tvb, int offset,
return offset;
}
*/
#endif
/*
* IDL typedef [switch_type(short)] union {
* IDL [case(1)][unique] VALIDATION_UAS *uas;
@ -3950,6 +3953,7 @@ netlogon_dissect_MODIFIED_COUNT(tvbuff_t *tvb, int offset,
#define DT_DELTA_DELETE_GROUP2 20
#define DT_DELTA_DELETE_USER2 21
#define DT_MODIFIED_COUNT 22
static const value_string delta_type_vals[] = {
{ DT_DELTA_DOMAIN, "Domain" },
{ DT_DELTA_GROUP, "Group" },
@ -5153,6 +5157,7 @@ static const value_string trust_type_vals[] = {
#define DS_INET_ADDRESS 1
#define DS_NETBIOS_ADDRESS 2
static const value_string dc_address_types[] = {
{ DS_INET_ADDRESS, "IP/DNS name" },
{ DS_NETBIOS_ADDRESS, "NetBIOS name" },
@ -5171,6 +5176,7 @@ static const value_string dc_address_types[] = {
#define DS_DOMAIN_PRIMARY 0x0008
#define DS_DOMAIN_NATIVE_MODE 0x0010
#define DS_DOMAIN_DIRECT_INBOUND 0x0020
static const true_false_string trust_inbound = {
"There is a DIRECT INBOUND trust for the servers domain",
"There is NO direct inbound trust for the servers domain"
@ -5329,6 +5335,7 @@ netlogon_dissect_DOMAIN_TRUST_ATTRIBS(tvbuff_t *tvb, int offset,
#define DS_IS_DNS_NAME 0x00020000
#define DS_RETURN_DNS_NAME 0x40000000
#define DS_RETURN_FLAT_NAME 0x80000000
static const true_false_string get_dcname_request_flags_force_rediscovery = {
"FORCE REDISCOVERY of any cached data",
"You may return cached data"
@ -5474,6 +5481,7 @@ netlogon_dissect_GET_DCNAME_REQUEST_FLAGS(tvbuff_t *tvb, int offset,
#define DS_DNS_CONTROLLER_FLAG 0x20000000
#define DS_DNS_DOMAIN_FLAG 0x40000000
#define DS_DNS_FOREST_FLAG 0x80000000
static const true_false_string dc_flags_pdc_flag = {
"this is the PDC of the domain",
"this is NOT the pdc of the domain"
@ -5594,7 +5602,8 @@ netlogon_dissect_pointer_long(tvbuff_t *tvb, int offset,
di->hf_index, NULL);
return offset;
}
/*
#if 0
static int
netlogon_dissect_pointer_char(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
@ -5607,7 +5616,8 @@ netlogon_dissect_pointer_char(tvbuff_t *tvb, int offset,
di->hf_index, NULL);
return offset;
}
*/
#endif
static int
netlogon_dissect_UNICODE_MULTI_byte(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
@ -6348,7 +6358,7 @@ netlogon_dissect_TYPE_44(tvbuff_t *tvb, int offset,
return offset;
}
static int
static int
netlogon_dissect_WORKSTATION_BUFFER(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
guint8 *drep)
@ -8101,7 +8111,7 @@ void
proto_register_dcerpc_netlogon(void)
{
static hf_register_info hf[] = {
static hf_register_info hf[] = {
{ &hf_netlogon_opnum,
{ "Operation", "netlogon.opnum", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},

View File

@ -120,7 +120,7 @@ static const value_string authn_protocol_vals[] = {
"Distributed Password Authentication SSP"},
{ DCE_C_RPC_AUTHN_PROTOCOL_MSN, "MSN SSP"},
{ DCE_C_RPC_AUTHN_PROTOCOL_DIGEST, "Digest SSP"},
{ DCE_C_RPC_AUTHN_PROTOCOL_SEC_CHAN,"NETLOGON Secure Channel" },
{ DCE_C_RPC_AUTHN_PROTOCOL_SEC_CHAN, "NETLOGON Secure Channel" },
{ DCE_C_RPC_AUTHN_PROTOCOL_MQ, "MSMQ SSP"},
{ 0, NULL }
};
@ -761,7 +761,7 @@ value_string *value_string_from_subdissectors(dcerpc_sub_dissector *sd)
value_string *vs = NULL;
int i, num_sd = 0;
again:
again:
for (i = 0; sd[i].name; i++) {
if (vs) {
vs[i].value = sd[i].num;

View File

@ -320,10 +320,10 @@ static const value_string gsm_a_be_cell_id_disc_vals[] = {
};
static const value_string gsm_a_rr_channel_needed_vals[] = {
{ 0x00, "Any channel"},
{ 0x01, "SDCCH"},
{ 0x02, "TCH/F (Full rate)"},
{ 0x03, "TCH/H or TCH/F (Dual rate)"},
{ 0x00, "Any channel"},
{ 0x01, "SDCCH"},
{ 0x02, "TCH/F (Full rate)"},
{ 0x03, "TCH/H or TCH/F (Dual rate)"},
{ 0, NULL }
};
@ -528,7 +528,7 @@ static guint8 cell_discriminator = 0x0f; /* tracks whether handover is to UMTS
static guint16
be_field_element_dissect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_);
/*
#if 0
This enum has been moved to packet-gsm_a_common to
make it possible to use element dissecton from this dissector
in other dissectors.
@ -631,7 +631,7 @@ typedef enum
BE_TALKER_PRI, /. Talker Priority ./
BE_EMRG_SET_IND, /. Emergency Set Indication ./
BE_TALKER_ID, /. Talker Identity ./
BE_CELL_ID_LIST_SEG,/. Cell Identifier List Segment ./
BE_CELL_ID_LIST_SEG, /. Cell Identifier List Segment ./
BE_SMS_TO_VGCS, /. SMS to VGCS ./
BE_VGCS_TALKER_MOD, /. VGCS Talker Mode ./
BE_VGS_VBS_CELL_STAT, /. VGCS/VBS Cell Status ./
@ -654,7 +654,7 @@ typedef enum
BE_NONE /. NONE ./
}
bssmap_elem_idx_t;
*/
#endif
#define NUM_GSM_BSSMAP_ELEM (sizeof(gsm_bssmap_elem_strings)/sizeof(value_string))
gint ett_gsm_bssmap_elem[NUM_GSM_BSSMAP_ELEM];
@ -3828,7 +3828,7 @@ guint16 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, gu
be_talker_id, /* Talker Identity */
be_cell_id_list_seg, /* Cell Identifier List Segment */
be_sms_to_vgcs, /* SMS to VGCS */
be_vgcs_talker_mode, /* VGCS Talker Mode */
be_vgcs_talker_mode,/* VGCS Talker Mode */
NULL, /* VGCS/VBS Cell Status */
be_cell_id_lst_seg_f_est_cells, /* Cell Identifier List Segment for established cells */
be_cell_id_lst_seg_f_cell_tb_est, /* Cell Identifier List Segment for cells to be established */
@ -3842,7 +3842,7 @@ guint16 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, gu
be_app_data_inf, /* Application Data Information */
NULL, /* MSISDN */
be_aoip_trans_lay_add, /* AoIP Transport Layer Address */
be_speech_codec_lst, /* Speech Codec List */
be_speech_codec_lst,/* Speech Codec List */
be_speech_codec, /* Speech Codec */
be_call_id, /* Call Identifier */
be_call_id_lst, /* Call Identifier List */