diff options
author | Bill Meier <wmeier@newsguy.com> | 2014-10-02 17:47:19 -0400 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2014-10-02 22:30:52 +0000 |
commit | 482e8e565125cc8f595aa80e8ba08299f9c410fe (patch) | |
tree | c2e3ce7ba52055ee59a6fa15fbb8520493b1f962 /epan/dissectors/packet-smb-logon.c | |
parent | 70abd39bb756c6d2567188691c29ededa6aa714e (diff) |
Add editor modelines & adjust indentation/whitespace as needed.
Change-Id: Ice2d93632cd42dfcef3bfbf0e15f2a8a147278fc
Reviewed-on: https://code.wireshark.org/review/4433
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/packet-smb-logon.c')
-rw-r--r-- | epan/dissectors/packet-smb-logon.c | 131 |
1 files changed, 72 insertions, 59 deletions
diff --git a/epan/dissectors/packet-smb-logon.c b/epan/dissectors/packet-smb-logon.c index f3cd09f9dd..6e7db17af4 100644 --- a/epan/dissectors/packet-smb-logon.c +++ b/epan/dissectors/packet-smb-logon.c @@ -249,7 +249,7 @@ dissect_smb_logon_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre offset += 1; /* NT version */ - proto_tree_add_item(tree, hf_nt_version, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_nt_version, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; /* LM token */ @@ -290,7 +290,7 @@ dissect_smb_logon_2(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset = display_ms_string(tvb, tree, offset, hf_mailslot_name, NULL); /* NT version */ - proto_tree_add_item(tree, hf_nt_version, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_nt_version, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; /* LM token */ @@ -397,7 +397,7 @@ dissect_smb_pdc_startup(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, } /* NT version */ - proto_tree_add_item(tree, hf_nt_version, tvb, offset, 4, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_nt_version, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; /* LMNT token */ @@ -834,62 +834,62 @@ dissect_smb_unknown(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int #define LOGON_LAST_CMD 0x19 static const value_string commands[] = { - {LOGON_LM10_LOGON_REQUEST, "LM1.0/LM2.0 LOGON Request"}, - {LOGON_LM10_LOGON_RESPONSE, "LM1.0 LOGON Response"}, - {LOGON_LM10_QUERY_CI, "LM1.0 Query - Centralized Initialization"}, - {LOGON_LM10_QUERY_DI, "LM1.0 Query - Distributed Initialization"}, - {LOGON_LM10_RESPONSE_CI, "LM1.0 Response - Centralized Query"}, - {LOGON_LM10_RESPONSE_DI, "LM1.0 Response - Distributed Initialization"}, - {LOGON_LM20_LOGON_RESPONSE, "LM2.0 Response to LOGON Request"}, - {LOGON_PDC_QUERY, "Query for PDC"}, - {LOGON_PDC_STARTUP, "Announce Startup of PDC"}, - {LOGON_PDC_FAILED, "Announce Failed PDC"}, - {LOGON_UAS_SAM, "Announce Change to UAS or SAM"}, - {LOGON_NO_USER, "Announce no user on machine"}, - {LOGON_PDC_RESPONSE, "Response from PDC"}, - {LOGON_RELOGON_RESPONSE, "LM1.0/LM2.0 Response to re-LOGON Request"}, - {LOGON_INTERROGATE_RESPONSE, "LM1.0/LM2.0 Response to Interrogate Request"}, - {LOGON_LM20_RESPONSE_DURING_LOGON,"LM2.0 Response during LOGON pause"}, - {LOGON_LM20_USER_UNKNOWN, "LM2.0 Response - user unknown"}, - {LOGON_LM20_ACCOUNT_UPDATE, "LM2.0 Announce account updates"}, - {LOGON_SAM_LOGON_REQUEST, "SAM LOGON request from client"}, - {LOGON_SAM_LOGON_RESPONSE, "Response to SAM LOGON request"}, - {LOGON_SAM_RESPONSE_DURING_LOGON,"SAM Response during LOGON pause"}, - {LOGON_SAM_USER_UNKNOWN, "SAM Response - user unknown"}, - {LOGON_SAM_INTERROGATE_RESPONSE,"SAM Response to Interrogate Request"}, - {LOGON_SAM_AD_USER_UNKNOWN, "SAM Active Directory Response - user unknown"}, - {LOGON_SAM_UNKNOWN_18, "SAM unknown command 0x18"}, - {LOGON_SAM_AD_LOGON_RESPONSE, "Active Directory Response to SAM LOGON request"}, + {LOGON_LM10_LOGON_REQUEST, "LM1.0/LM2.0 LOGON Request"}, + {LOGON_LM10_LOGON_RESPONSE, "LM1.0 LOGON Response"}, + {LOGON_LM10_QUERY_CI, "LM1.0 Query - Centralized Initialization"}, + {LOGON_LM10_QUERY_DI, "LM1.0 Query - Distributed Initialization"}, + {LOGON_LM10_RESPONSE_CI, "LM1.0 Response - Centralized Query"}, + {LOGON_LM10_RESPONSE_DI, "LM1.0 Response - Distributed Initialization"}, + {LOGON_LM20_LOGON_RESPONSE, "LM2.0 Response to LOGON Request"}, + {LOGON_PDC_QUERY, "Query for PDC"}, + {LOGON_PDC_STARTUP, "Announce Startup of PDC"}, + {LOGON_PDC_FAILED, "Announce Failed PDC"}, + {LOGON_UAS_SAM, "Announce Change to UAS or SAM"}, + {LOGON_NO_USER, "Announce no user on machine"}, + {LOGON_PDC_RESPONSE, "Response from PDC"}, + {LOGON_RELOGON_RESPONSE, "LM1.0/LM2.0 Response to re-LOGON Request"}, + {LOGON_INTERROGATE_RESPONSE, "LM1.0/LM2.0 Response to Interrogate Request"}, + {LOGON_LM20_RESPONSE_DURING_LOGON, "LM2.0 Response during LOGON pause"}, + {LOGON_LM20_USER_UNKNOWN, "LM2.0 Response - user unknown"}, + {LOGON_LM20_ACCOUNT_UPDATE, "LM2.0 Announce account updates"}, + {LOGON_SAM_LOGON_REQUEST, "SAM LOGON request from client"}, + {LOGON_SAM_LOGON_RESPONSE, "Response to SAM LOGON request"}, + {LOGON_SAM_RESPONSE_DURING_LOGON, "SAM Response during LOGON pause"}, + {LOGON_SAM_USER_UNKNOWN, "SAM Response - user unknown"}, + {LOGON_SAM_INTERROGATE_RESPONSE, "SAM Response to Interrogate Request"}, + {LOGON_SAM_AD_USER_UNKNOWN, "SAM Active Directory Response - user unknown"}, + {LOGON_SAM_UNKNOWN_18, "SAM unknown command 0x18"}, + {LOGON_SAM_AD_LOGON_RESPONSE, "Active Directory Response to SAM LOGON request"}, {0, NULL} }; static int (*dissect_smb_logon_cmds[])(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) = { - dissect_smb_logon_request, /* 0x00 (LM1.0/LM2.0 LOGON Request) */ - dissect_smb_logon_LM10_resp,/* 0x01 (LM1.0 LOGON Response) */ - dissect_smb_logon_2, /* 0x02 (LM1.0 Query Centralized Init.)*/ - dissect_smb_logon_2, /* 0x03 (LM1.0 Query Distributed Init.)*/ - dissect_smb_logon_2, /* 0x04 (LM1.0 Centralized Query Resp.)*/ - dissect_smb_logon_2, /* 0x05 (LM1.0 Distributed Query Resp.) */ - dissect_smb_logon_LM20_resp,/* 0x06 (LM2.0 LOGON Response) */ - dissect_smb_pdc_query, /* 0x07 (Query for PDC) */ - dissect_smb_pdc_startup, /* 0x08 (Announce PDC startup) */ - dissect_smb_pdc_failure, /* 0x09 (Announce Failed PDC) */ - dissect_announce_change, /* 0x0A (Announce Change to UAS or SAM)*/ - dissect_smb_no_user, /* 0x0B (Announce no user on machine)*/ - dissect_smb_pdc_startup, /* 0x0C (Response from PDC) */ - dissect_smb_relogon_resp, /* 0x0D (Relogon response) */ - dissect_smb_inter_resp, /* 0x0E (Interrogate response) */ - dissect_smb_pdc_failure, /* 0x0F (LM2.0 Resp. during LOGON pause*/ - dissect_smb_pdc_failure, /* 0x10 (LM 2.0 Unknown user response)*/ - dissect_smb_acc_update, /* 0x11 (LM2.1 Announce Acc updates)*/ - dissect_smb_sam_logon_req, /* 0x12 (SAM LOGON request ) */ - dissect_smb_sam_logon_resp, /* 0x13 (SAM LOGON response) */ - dissect_smb_unknown, /* 0x14 (SAM Response during LOGON Pause) */ - dissect_smb_sam_logon_resp, /* 0x15 (SAM Response User Unknown) */ - dissect_smb_unknown, /* 0x16 (SAM Response to Interrogate)*/ - dissect_smb_pdc_response_ads, /* 0x17 (SAM AD response User Unknown*/ - dissect_smb_unknown, /* 0x18 (Unknown command) */ - dissect_smb_pdc_response_ads /* 0x19 (SAM LOGON AD response) */ + dissect_smb_logon_request, /* 0x00 (LM1.0/LM2.0 LOGON Request) */ + dissect_smb_logon_LM10_resp, /* 0x01 (LM1.0 LOGON Response) */ + dissect_smb_logon_2, /* 0x02 (LM1.0 Query Centralized Init.)*/ + dissect_smb_logon_2, /* 0x03 (LM1.0 Query Distributed Init.)*/ + dissect_smb_logon_2, /* 0x04 (LM1.0 Centralized Query Resp.)*/ + dissect_smb_logon_2, /* 0x05 (LM1.0 Distributed Query Resp.) */ + dissect_smb_logon_LM20_resp, /* 0x06 (LM2.0 LOGON Response) */ + dissect_smb_pdc_query, /* 0x07 (Query for PDC) */ + dissect_smb_pdc_startup, /* 0x08 (Announce PDC startup) */ + dissect_smb_pdc_failure, /* 0x09 (Announce Failed PDC) */ + dissect_announce_change, /* 0x0A (Announce Change to UAS or SAM)*/ + dissect_smb_no_user, /* 0x0B (Announce no user on machine)*/ + dissect_smb_pdc_startup, /* 0x0C (Response from PDC) */ + dissect_smb_relogon_resp, /* 0x0D (Relogon response) */ + dissect_smb_inter_resp, /* 0x0E (Interrogate response) */ + dissect_smb_pdc_failure, /* 0x0F (LM2.0 Resp. during LOGON pause*/ + dissect_smb_pdc_failure, /* 0x10 (LM 2.0 Unknown user response)*/ + dissect_smb_acc_update, /* 0x11 (LM2.1 Announce Acc updates)*/ + dissect_smb_sam_logon_req, /* 0x12 (SAM LOGON request ) */ + dissect_smb_sam_logon_resp, /* 0x13 (SAM LOGON response) */ + dissect_smb_unknown, /* 0x14 (SAM Response during LOGON Pause) */ + dissect_smb_sam_logon_resp, /* 0x15 (SAM Response User Unknown) */ + dissect_smb_unknown, /* 0x16 (SAM Response to Interrogate)*/ + dissect_smb_pdc_response_ads, /* 0x17 (SAM AD response User Unknown*/ + dissect_smb_unknown, /* 0x18 (Unknown command) */ + dissect_smb_pdc_response_ads /* 0x19 (SAM LOGON AD response) */ }; @@ -905,11 +905,11 @@ dissect_smb_logon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); /* get the Command field */ - cmd = tvb_get_guint8(tvb, offset); + cmd = tvb_get_guint8(tvb, offset); col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown Command:%02x") ); - if (tree) { + if (tree) { item = proto_tree_add_item(tree, proto_smb_logon, tvb, offset, -1, ENC_NA); @@ -1146,11 +1146,24 @@ proto_register_smb_logon( void) &ett_smb_db_info }; - proto_smb_logon = proto_register_protocol( - "Microsoft Windows Logon Protocol (Old)", "SMB_NETLOGON", "smb_netlogon"); + proto_smb_logon = proto_register_protocol( + "Microsoft Windows Logon Protocol (Old)", "SMB_NETLOGON", "smb_netlogon"); proto_register_field_array(proto_smb_logon, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_dissector("smb_netlogon", dissect_smb_logon, proto_smb_logon); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ |