Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)

svn path=/trunk/; revision=32735
This commit is contained in:
Bill Meier 2010-05-10 15:54:57 +00:00
parent 33dc9a3eb4
commit 10ffd14b8f
68 changed files with 20116 additions and 20121 deletions

View File

@ -46,9 +46,9 @@ static gint ett_acap_reqresp = -1;
static void
dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
gboolean is_request;
proto_tree *acap_tree, *reqresp_tree;
proto_item *ti, *hidden_item;
gboolean is_request;
proto_tree *acap_tree, *reqresp_tree;
proto_item *ti, *hidden_item;
gint offset = 0;
const guchar *line;
gint next_offset;
@ -159,33 +159,33 @@ dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_acap(void)
{
static hf_register_info hf[] = {
{ &hf_acap_response,
{ "Response", "acap.response",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if ACAP response", HFILL }},
static hf_register_info hf[] = {
{ &hf_acap_response,
{ "Response", "acap.response",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if ACAP response", HFILL }},
{ &hf_acap_request,
{ "Request", "acap.request",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if ACAP request", HFILL }}
};
static gint *ett[] = {
&ett_acap,
&ett_acap_reqresp,
};
{ &hf_acap_request,
{ "Request", "acap.request",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if ACAP request", HFILL }}
};
static gint *ett[] = {
&ett_acap,
&ett_acap_reqresp,
};
proto_acap = proto_register_protocol("Application Configuration Access Protocol",
"ACAP", "acap");
proto_register_field_array(proto_acap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_acap = proto_register_protocol("Application Configuration Access Protocol",
"ACAP", "acap");
proto_register_field_array(proto_acap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_acap(void)
{
dissector_handle_t acap_handle;
dissector_handle_t acap_handle;
acap_handle = create_dissector_handle(dissect_acap, proto_acap);
dissector_add("tcp.port", TCP_PORT_ACAP, acap_handle);
acap_handle = create_dissector_handle(dissect_acap, proto_acap);
dissector_add("tcp.port", TCP_PORT_ACAP, acap_handle);
}

File diff suppressed because it is too large Load Diff

View File

@ -77,17 +77,17 @@ static dissector_handle_t lapd_handle;
#define ACTRACE_CAS_SOURCE_TABLE 2
static const value_string actrace_cas_source_vals[] = {
{ACTRACE_CAS_SOURCE_DSP, "DSP"},
{ACTRACE_CAS_SOURCE_USER, "User"},
{ACTRACE_CAS_SOURCE_TABLE, "Table"},
{0, NULL }
{ACTRACE_CAS_SOURCE_DSP, "DSP"},
{ACTRACE_CAS_SOURCE_USER, "User"},
{ACTRACE_CAS_SOURCE_TABLE, "Table"},
{0, NULL }
};
static const value_string actrace_cas_source_vals_short[] = {
{ACTRACE_CAS_SOURCE_DSP, "D"},
{ACTRACE_CAS_SOURCE_USER, "U"},
{ACTRACE_CAS_SOURCE_TABLE, "T"},
{0, NULL }
{ACTRACE_CAS_SOURCE_DSP, "D"},
{ACTRACE_CAS_SOURCE_USER, "U"},
{ACTRACE_CAS_SOURCE_TABLE, "T"},
{0, NULL }
};
#define ACTRACE_CAS_EV_11 17
@ -99,120 +99,120 @@ static const value_string actrace_cas_source_vals_short[] = {
#define ACTRACE_CAS_EV_FIRST_DIGIT 63
static const value_string actrace_cas_event_ab_vals[] = {
{ACTRACE_CAS_EV_11, "11"},
{ACTRACE_CAS_EV_10, "10"},
{ACTRACE_CAS_EV_01, "01"},
{ACTRACE_CAS_EV_00, "00"},
{0, NULL}
{ACTRACE_CAS_EV_11, "11"},
{ACTRACE_CAS_EV_10, "10"},
{ACTRACE_CAS_EV_01, "01"},
{ACTRACE_CAS_EV_00, "00"},
{0, NULL}
};
static const value_string actrace_cas_mf_vals[] = {
{32, "1"},
{33, "2"},
{34, "3"},
{35, "4"},
{36, "5"},
{37, "6"},
{38, "7"},
{39, "8"},
{40, "9"},
{41, "0"},
{42, "A"},
{43, "B"},
{44, "C"},
{45, "*"},
{46, "#"},
{0, NULL}
{32, "1"},
{33, "2"},
{34, "3"},
{35, "4"},
{36, "5"},
{37, "6"},
{38, "7"},
{39, "8"},
{40, "9"},
{41, "0"},
{42, "A"},
{43, "B"},
{44, "C"},
{45, "*"},
{46, "#"},
{0, NULL}
};
static const value_string actrace_cas_event_vals[] = {
{0, "FUNCTION0"},
{1, "FUNCTION1"},
{2, "FUNCTION2"},
{3, "FUNCTION3"},
{4, "EV_PLACE_CALL"},
{5, "EV_TIMER_EXPIRED1"},
{6, "EV_TIMER_EXPIRED2"},
{7, "EV_TIMER_EXPIRED3"},
{8, "EV_TIMER_EXPIRED4"},
{9, "EV_TIMER_EXPIRED5"},
{10, "EV_TIMER_EXPIRED6"},
{11, "EV_TIMER_EXPIRED7"},
{12, "EV_TIMER_EXPIRED8"},
{13, "EV_ANSWER"},
{14, "EV_DIAL_TONE_DETECTED"},
{15, "EV_DIAL_ENDED"},
{16, "EV_DISCONNECT"},
{ACTRACE_CAS_EV_11, "EV_CAS_1_1"},
{ACTRACE_CAS_EV_10, "EV_CAS_1_0"},
{ACTRACE_CAS_EV_01, "EV_CAS_0_1"},
{ACTRACE_CAS_EV_00, "EV_CAS_0_0"},
{21, "EV_RB_TONE_STARTED"},
{22, "EV_RB_TONE_STOPPED"},
{23, "EV_BUSY_TONE"},
{24, "EV_FAST_BUSY_TONE"},
{25, "EV_HELLO_DETECTED"},
{26, "EV_DIAL_TONE_STOPPED"},
{27, "EV_DISCONNECT_INCOMING"},
{28, "EV_RELEASE_CALL"},
{29, "EV_DIALED_NUM_DETECTED"},
{30, "EV_COUNTER1_EXPIRED"},
{31, "EV_COUNTER2_EXPIRED"},
{32, "EV_MFRn_1"},
{33, "EV_MFRn_2"},
{34, "EV_MFRn_3"},
{35, "EV_MFRn_4"},
{36, "EV_MFRn_5"},
{37, "EV_MFRn_6"},
{38, "EV_MFRn_7"},
{39, "EV_MFRn_8"},
{40, "EV_MFRn_9"},
{41, "EV_MFRn_10"},
{42, "EV_MFRn_11"},
{43, "EV_MFRn_12"},
{44, "EV_MFRn_13"},
{45, "EV_MFRn_14"},
{46, "EV_MFRn_15"},
{47, "EV_MFRn_1_STOPED"},
{48, "EV_MFRn_2_STOPED"},
{49, "EV_MFRn_3_STOPED"},
{50, "EV_MFRn_4_STOPED"},
{51, "EV_MFRn_5_STOPED"},
{52, "EV_MFRn_6_STOPED"},
{53, "EV_MFRn_7_STOPED"},
{54, "EV_MFRn_8_STOPED"},
{55, "EV_MFRn_9_STOPED"},
{56, "EV_MFRn_10_STOPED"},
{57, "EV_MFRn_11_STOPED"},
{58, "EV_MFRn_12_STOPED"},
{59, "EV_MFRn_13_STOPED"},
{60, "EV_MFRn_14_STOPED"},
{61, "EV_MFRn_15_STOPED"},
{62, "EV_ANI_NUM_DETECTED"},
{ACTRACE_CAS_EV_FIRST_DIGIT, "EV_FIRST_DIGIT"},
{64, "EV_END_OF_MF_DIGIT"},
{65, "EV_ACCEPT"},
{66, "EV_REJECT_BUSY"},
{67, "EV_REJECT_CONGESTION"},
{68, "EV_REJECT_UNALLOCATED"},
{69, "EV_REJECT_RESERVE1"},
{70, "EV_REJECT_RESERVE2"},
{71, "EV_NO_ANI"},
{1010, "EV_TIMER_EXPIRED10"},
{1020, "EV_DEBOUNCE_TIMER_EXPIRED"},
{1030, "EV_INTER_DIGIT_TIMER_EXPIRED"},
{100, "EV_INIT_CHANNEL"},
{101, "EV_BUSY_TONE_STOPPED"},
{102, "EV_FAST_BUSY_TONE_STOPPED"},
{103, "EV_TO_USER"},
{104, "SEND_FIRST_DIGIT"},
{110, "EV_CLOSE_CHANNEL"},
{111, "EV_OPEN_CHANNEL"},
{112, "EV_FAIL_DIAL"},
{113, "EV_FAIL_SEND_CAS"},
{114, "EV_ALARM"},
{ACTRACE_CAS_EV_DTMF, "EV_DTMF"},
{0, NULL}
{0, "FUNCTION0"},
{1, "FUNCTION1"},
{2, "FUNCTION2"},
{3, "FUNCTION3"},
{4, "EV_PLACE_CALL"},
{5, "EV_TIMER_EXPIRED1"},
{6, "EV_TIMER_EXPIRED2"},
{7, "EV_TIMER_EXPIRED3"},
{8, "EV_TIMER_EXPIRED4"},
{9, "EV_TIMER_EXPIRED5"},
{10, "EV_TIMER_EXPIRED6"},
{11, "EV_TIMER_EXPIRED7"},
{12, "EV_TIMER_EXPIRED8"},
{13, "EV_ANSWER"},
{14, "EV_DIAL_TONE_DETECTED"},
{15, "EV_DIAL_ENDED"},
{16, "EV_DISCONNECT"},
{ACTRACE_CAS_EV_11, "EV_CAS_1_1"},
{ACTRACE_CAS_EV_10, "EV_CAS_1_0"},
{ACTRACE_CAS_EV_01, "EV_CAS_0_1"},
{ACTRACE_CAS_EV_00, "EV_CAS_0_0"},
{21, "EV_RB_TONE_STARTED"},
{22, "EV_RB_TONE_STOPPED"},
{23, "EV_BUSY_TONE"},
{24, "EV_FAST_BUSY_TONE"},
{25, "EV_HELLO_DETECTED"},
{26, "EV_DIAL_TONE_STOPPED"},
{27, "EV_DISCONNECT_INCOMING"},
{28, "EV_RELEASE_CALL"},
{29, "EV_DIALED_NUM_DETECTED"},
{30, "EV_COUNTER1_EXPIRED"},
{31, "EV_COUNTER2_EXPIRED"},
{32, "EV_MFRn_1"},
{33, "EV_MFRn_2"},
{34, "EV_MFRn_3"},
{35, "EV_MFRn_4"},
{36, "EV_MFRn_5"},
{37, "EV_MFRn_6"},
{38, "EV_MFRn_7"},
{39, "EV_MFRn_8"},
{40, "EV_MFRn_9"},
{41, "EV_MFRn_10"},
{42, "EV_MFRn_11"},
{43, "EV_MFRn_12"},
{44, "EV_MFRn_13"},
{45, "EV_MFRn_14"},
{46, "EV_MFRn_15"},
{47, "EV_MFRn_1_STOPED"},
{48, "EV_MFRn_2_STOPED"},
{49, "EV_MFRn_3_STOPED"},
{50, "EV_MFRn_4_STOPED"},
{51, "EV_MFRn_5_STOPED"},
{52, "EV_MFRn_6_STOPED"},
{53, "EV_MFRn_7_STOPED"},
{54, "EV_MFRn_8_STOPED"},
{55, "EV_MFRn_9_STOPED"},
{56, "EV_MFRn_10_STOPED"},
{57, "EV_MFRn_11_STOPED"},
{58, "EV_MFRn_12_STOPED"},
{59, "EV_MFRn_13_STOPED"},
{60, "EV_MFRn_14_STOPED"},
{61, "EV_MFRn_15_STOPED"},
{62, "EV_ANI_NUM_DETECTED"},
{ACTRACE_CAS_EV_FIRST_DIGIT, "EV_FIRST_DIGIT"},
{64, "EV_END_OF_MF_DIGIT"},
{65, "EV_ACCEPT"},
{66, "EV_REJECT_BUSY"},
{67, "EV_REJECT_CONGESTION"},
{68, "EV_REJECT_UNALLOCATED"},
{69, "EV_REJECT_RESERVE1"},
{70, "EV_REJECT_RESERVE2"},
{71, "EV_NO_ANI"},
{1010, "EV_TIMER_EXPIRED10"},
{1020, "EV_DEBOUNCE_TIMER_EXPIRED"},
{1030, "EV_INTER_DIGIT_TIMER_EXPIRED"},
{100, "EV_INIT_CHANNEL"},
{101, "EV_BUSY_TONE_STOPPED"},
{102, "EV_FAST_BUSY_TONE_STOPPED"},
{103, "EV_TO_USER"},
{104, "SEND_FIRST_DIGIT"},
{110, "EV_CLOSE_CHANNEL"},
{111, "EV_OPEN_CHANNEL"},
{112, "EV_FAIL_DIAL"},
{113, "EV_FAIL_SEND_CAS"},
{114, "EV_ALARM"},
{ACTRACE_CAS_EV_DTMF, "EV_DTMF"},
{0, NULL}
};
#define SEND_CAS 2
@ -222,56 +222,56 @@ static const value_string actrace_cas_event_vals[] = {
#define SEND_DEST_NUM 4
static const value_string actrace_cas_function_vals[] = {
{0, "NILL"},
{1, "SET_TIMER"},
{SEND_CAS, "SEND_CAS"},
{SEND_EVENT, "SEND_EVENT"},
{SEND_DEST_NUM, "SEND_DEST_NUM"},
{5, "DEL_TIMER"},
{6, "START_COLLECT"},
{7, "STOP_COLLECT"},
{SEND_MF, "SEND_MF"},
{9, "STOP_DIAL_MF"},
{10, "SET_COUNTER"},
{11, "DEC_COUNTER"},
{12, "SEND_PROG_TON"},
{CHANGE_COLLECT_TYPE, "CHANGE_COLLECT_TYPE"},
{14, "GENERATE_CAS_EV"},
{0, NULL}
{0, "NILL"},
{1, "SET_TIMER"},
{SEND_CAS, "SEND_CAS"},
{SEND_EVENT, "SEND_EVENT"},
{SEND_DEST_NUM, "SEND_DEST_NUM"},
{5, "DEL_TIMER"},
{6, "START_COLLECT"},
{7, "STOP_COLLECT"},
{SEND_MF, "SEND_MF"},
{9, "STOP_DIAL_MF"},
{10, "SET_COUNTER"},
{11, "DEC_COUNTER"},
{12, "SEND_PROG_TON"},
{CHANGE_COLLECT_TYPE, "CHANGE_COLLECT_TYPE"},
{14, "GENERATE_CAS_EV"},
{0, NULL}
};
static const value_string actrace_cas_pstn_event_vals[] = {
{64, "acEV_PSTN_INTERNAL_ERROR"},
{65, "acEV_PSTN_CALL_CONNECTED"},
{66, "acEV_PSTN_INCOMING_CALL_DETECTED"},
{67, "acEV_PSTN_CALL_DISCONNECTED"},
{68, "acEV_PSTN_CALL_RELEASED"},
{69, "acEV_PSTN_REMOTE_ALERTING"},
{70, "acEV_PSTN_STARTED"},
{71, "acEV_PSTN_WARNING"},
{72, "acEV_ISDN_PROGRESS_INDICATION"},
{73, "acEV_PSTN_PROCEEDING_INDICATION"},
{74, "acEV_PSTN_ALARM"},
{75, "acEV_RESERVED"},
{76, "acEV_PSTN_LINE_INFO"},
{77, "acEV_PSTN_LOOP_CONFIRM"},
{78, "acEV_PSTN_RESTART_CONFIRM"},
{84, "acEV_ISDN_SETUP_ACK_IN"},
{85, "acEV_PSTN_CALL_INFORMATION"},
{128, "acEV_CAS_SEIZURE_DETECTED"},
{129, "acEV_CAS_CHANNEL_BLOCKED"},
{130, "acEV_CAS_PROTOCOL_STARTED"},
{131, "acEV_PSTN_CALL_STATE_RESPONSE"},
{132, "acEV_CAS_SEIZURE_ACK"},
{0, NULL}
{64, "acEV_PSTN_INTERNAL_ERROR"},
{65, "acEV_PSTN_CALL_CONNECTED"},
{66, "acEV_PSTN_INCOMING_CALL_DETECTED"},
{67, "acEV_PSTN_CALL_DISCONNECTED"},
{68, "acEV_PSTN_CALL_RELEASED"},
{69, "acEV_PSTN_REMOTE_ALERTING"},
{70, "acEV_PSTN_STARTED"},
{71, "acEV_PSTN_WARNING"},
{72, "acEV_ISDN_PROGRESS_INDICATION"},
{73, "acEV_PSTN_PROCEEDING_INDICATION"},
{74, "acEV_PSTN_ALARM"},
{75, "acEV_RESERVED"},
{76, "acEV_PSTN_LINE_INFO"},
{77, "acEV_PSTN_LOOP_CONFIRM"},
{78, "acEV_PSTN_RESTART_CONFIRM"},
{84, "acEV_ISDN_SETUP_ACK_IN"},
{85, "acEV_PSTN_CALL_INFORMATION"},
{128, "acEV_CAS_SEIZURE_DETECTED"},
{129, "acEV_CAS_CHANNEL_BLOCKED"},
{130, "acEV_CAS_PROTOCOL_STARTED"},
{131, "acEV_PSTN_CALL_STATE_RESPONSE"},
{132, "acEV_CAS_SEIZURE_ACK"},
{0, NULL}
};
static const value_string actrace_cas_collect_type_vals[] = {
{0, "COLLECT_TYPE_ADDRESS"},
{1, "COLLECT_TYPE_ANI"},
{2, "COLLECT_TYPE_SOURCE_CATEGORY"},
{3, "COLLECT_TYPE_LINE_CATEGORY"},
{0, NULL}
{0, "COLLECT_TYPE_ADDRESS"},
{1, "COLLECT_TYPE_ANI"},
{2, "COLLECT_TYPE_SOURCE_CATEGORY"},
{3, "COLLECT_TYPE_LINE_CATEGORY"},
{0, NULL}
};
#define SEND_TYPE_ADDRESS 1
@ -282,126 +282,126 @@ static const value_string actrace_cas_collect_type_vals[] = {
#define SEND_TYPE_TRANSFER_CAPABILITY 6
static const value_string actrace_cas_send_type_vals[] = {
{SEND_TYPE_ADDRESS, "ADDRESS"},
{SEND_TYPE_SPECIFIC, "SPECIFIC"},
{SEND_TYPE_INTER_EXCHANGE_SWITCH, "INTER_EXCHANGE_SWITCH"},
{SEND_TYPE_ANI, "ANI"},
{SEND_TYPE_SOURCE_CATEGORY, "SOURCE_CATEGORY"},
{SEND_TYPE_TRANSFER_CAPABILITY, "TRANSFER_CAPABILITY"},
{0, NULL}
{SEND_TYPE_ADDRESS, "ADDRESS"},
{SEND_TYPE_SPECIFIC, "SPECIFIC"},
{SEND_TYPE_INTER_EXCHANGE_SWITCH, "INTER_EXCHANGE_SWITCH"},
{SEND_TYPE_ANI, "ANI"},
{SEND_TYPE_SOURCE_CATEGORY, "SOURCE_CATEGORY"},
{SEND_TYPE_TRANSFER_CAPABILITY, "TRANSFER_CAPABILITY"},
{0, NULL}
};
static const value_string actrace_cas_cause_vals[] = {
{1, "UNASSIGNED_NUMBER"},
{2, "NO_ROUTE_TO_TRANSIT_NET"},
{3, "NO_ROUTE_TO_DESTINATION"},
{6, "CHANNEL_UNACCEPTABLE"},
{7, "CALL_AWARDED_AND"},
{8, "PREEMPTION"},
{16, "NORMAL_CALL_CLEAR"},
{17, "USER_BUSY"},
{18, "NO_USER_RESPONDING"},
{19, "NO_ANSWER_FROM_USER_ALERTED"},
{20, "ACCEPT_DONE"},
{21, "CALL_REJECTED"},
{22, "NUMBER_CHANGED"},
{26, "NON_SELECTED_USER_CLEARING"},
{27, "DEST_OUT_OF_ORDER"},
{28, "INVALID_NUMBER_FORMAT"},
{29, "FACILITY_REJECT"},
{30, "RESPONSE_TO_STATUS_ENQUIRY"},
{31, "NORMAL_UNSPECIFIED"},
{32, "CIRCUIT_CONGESTION"},
{33, "USER_CONGESTION"},
{34, "NO_CIRCUIT_AVAILABLE"},
{38, "NETWORK_OUT_OF_ORDER"},
{41, "NETWORK_TEMPORARY_FAILURE"},
{42, "NETWORK_CONGESTION"},
{43, "ACCESS_INFORMATION_DISCARDED"},
{44, "REQUESTED_CIRCUIT_NOT_AVAILABLE"},
{47, "RESOURCE_UNAVAILABLE_UNSPECIFIED"},
{39, "PERM_FR_MODE_CONN_OUT_OF_S"},
{40, "PERM_FR_MODE_CONN_OPERATIONAL"},
{46, "PRECEDENCE_CALL_BLOCKED"},
{49, "QUALITY_OF_SERVICE_UNAVAILABLE"},
{50, "REQUESTED_FAC_NOT_SUBSCRIBED"},
{57, "BC_NOT_AUTHORIZED"},
{58, "BC_NOT_PRESENTLY_AVAILABLE"},
{63, "SERVICE_NOT_AVAILABLE"},
{53, "CUG_OUT_CALLS_BARRED"},
{55, "CUG_INC_CALLS_BARRED"},
{62, "ACCES_INFO_SUBS_CLASS_INCONS"},
{65, "BC_NOT_IMPLEMENTED"},
{66, "CHANNEL_TYPE_NOT_IMPLEMENTED"},
{69, "REQUESTED_FAC_NOT_IMPLEMENTED"},
{70, "ONLY_RESTRICTED_INFO_BEARER"},
{79, "SERVICE_NOT_IMPLEMENTED_UNSPECIFIED"},
{81, "INVALID_CALL_REF"},
{82, "IDENTIFIED_CHANNEL_NOT_EXIST"},
{83, "SUSPENDED_CALL_BUT_CALL_ID_NOT_EXIST"},
{84, "CALL_ID_IN_USE"},
{85, "NO_CALL_SUSPENDED"},
{86, "CALL_HAVING_CALL_ID_CLEARED"},
{88, "INCOMPATIBLE_DESTINATION"},
{91, "INVALID_TRANSIT_NETWORK_SELECTION"},
{95, "INVALID_MESSAGE_UNSPECIFIED"},
{87, "NOT_CUG_MEMBER"},
{90, "CUG_NON_EXISTENT"},
{96, "MANDATORY_IE_MISSING"},
{97, "MESSAGE_TYPE_NON_EXISTENT"},
{98, "MESSAGE_STATE_INCONSISTENCY"},
{99, "NON_EXISTENT_IE"},
{100, "INVALID_IE_CONTENT"},
{101, "MESSAGE_NOT_COMPATIBLE"},
{102, "RECOVERY_ON_TIMER_EXPIRY"},
{111, "PROTOCOL_ERROR_UNSPECIFIED"},
{127, "INTERWORKING_UNSPECIFIED"},
{128, "ACU_CAUSE_ACU_BAD_ADDRESS"},
{129, "ACU_CAUSE_ACU_BAD_SERVICE"},
{130, "ACU_CAUSE_ACU_COLLISION"},
{131, "ACU_CAUSE_ACU_FAC_REJECTED"},
{255, "ACU_NETWORK_CAUSE_NIL"},
{200, "C_ALREADY_BLOCKED"},
{201, "C_CHANNEL_BLOCKED"},
{202, "C_BLOCKING_DONE"},
{203, "C_ALREADY_UNBLOCKED"},
{204, "C_UNBLOCKING_DONE"},
{260, "CLRN_MFRn_A4"},
{261, "CLRN_MFRn_B1"},
{262, "CLRN_MFRn_B2"},
{263, "CLRN_MFRn_B3"},
{264, "CLRN_MFRn_B4"},
{265, "CLRN_MFRn_B5"},
{266, "CLRN_MFRn_B6"},
{267, "CLRN_MFRn_B7"},
{268, "CLRN_MFRn_B8"},
{269, "CLRN_MFRn_B9"},
{270, "CLRN_MFRn_B10"},
{271, "CLRN_MFRn_B11"},
{272, "CLRN_MFRn_B12"},
{273, "CLRN_MFRn_B13"},
{274, "CLRN_MFRn_B14"},
{275, "CLRN_MFRn_B15"},
{300, "ACURC_BUSY"},
{301, "ACURC_NOPROCEED"},
{302, "ACURC_NOANSWER"},
{303, "ACURC_NOAUTOANSWER"},
{304, "ACURC_CONGESTED"},
{305, "ACURC_INCOMING"},
{306, "ACURC_NOLINE"},
{307, "ACURC_ERRNUM"},
{308, "ACURC_INHNUM"},
{309, "ACURC_2MNUM"},
{310, "ACURC_HUNGUP"},
{311, "ACURC_NETWORK_ERROR"},
{312, "ACURC_TIMEOUT"},
{313, "ACURC_BAD_SERVICE"},
{314, "ACURC_INTERNAL"},
{315, "ACURC_OK"},
{316, "ACURC_BL_TIMEOUT"},
{317, "ACURC_IN_CALL"},
{318, "ACURC_CLEAR_RQ"},
{0, NULL}
{1, "UNASSIGNED_NUMBER"},
{2, "NO_ROUTE_TO_TRANSIT_NET"},
{3, "NO_ROUTE_TO_DESTINATION"},
{6, "CHANNEL_UNACCEPTABLE"},
{7, "CALL_AWARDED_AND"},
{8, "PREEMPTION"},
{16, "NORMAL_CALL_CLEAR"},
{17, "USER_BUSY"},
{18, "NO_USER_RESPONDING"},
{19, "NO_ANSWER_FROM_USER_ALERTED"},
{20, "ACCEPT_DONE"},
{21, "CALL_REJECTED"},
{22, "NUMBER_CHANGED"},
{26, "NON_SELECTED_USER_CLEARING"},
{27, "DEST_OUT_OF_ORDER"},
{28, "INVALID_NUMBER_FORMAT"},
{29, "FACILITY_REJECT"},
{30, "RESPONSE_TO_STATUS_ENQUIRY"},
{31, "NORMAL_UNSPECIFIED"},
{32, "CIRCUIT_CONGESTION"},
{33, "USER_CONGESTION"},
{34, "NO_CIRCUIT_AVAILABLE"},
{38, "NETWORK_OUT_OF_ORDER"},
{41, "NETWORK_TEMPORARY_FAILURE"},
{42, "NETWORK_CONGESTION"},
{43, "ACCESS_INFORMATION_DISCARDED"},
{44, "REQUESTED_CIRCUIT_NOT_AVAILABLE"},
{47, "RESOURCE_UNAVAILABLE_UNSPECIFIED"},
{39, "PERM_FR_MODE_CONN_OUT_OF_S"},
{40, "PERM_FR_MODE_CONN_OPERATIONAL"},
{46, "PRECEDENCE_CALL_BLOCKED"},
{49, "QUALITY_OF_SERVICE_UNAVAILABLE"},
{50, "REQUESTED_FAC_NOT_SUBSCRIBED"},
{57, "BC_NOT_AUTHORIZED"},
{58, "BC_NOT_PRESENTLY_AVAILABLE"},
{63, "SERVICE_NOT_AVAILABLE"},
{53, "CUG_OUT_CALLS_BARRED"},
{55, "CUG_INC_CALLS_BARRED"},
{62, "ACCES_INFO_SUBS_CLASS_INCONS"},
{65, "BC_NOT_IMPLEMENTED"},
{66, "CHANNEL_TYPE_NOT_IMPLEMENTED"},
{69, "REQUESTED_FAC_NOT_IMPLEMENTED"},
{70, "ONLY_RESTRICTED_INFO_BEARER"},
{79, "SERVICE_NOT_IMPLEMENTED_UNSPECIFIED"},
{81, "INVALID_CALL_REF"},
{82, "IDENTIFIED_CHANNEL_NOT_EXIST"},
{83, "SUSPENDED_CALL_BUT_CALL_ID_NOT_EXIST"},
{84, "CALL_ID_IN_USE"},
{85, "NO_CALL_SUSPENDED"},
{86, "CALL_HAVING_CALL_ID_CLEARED"},
{88, "INCOMPATIBLE_DESTINATION"},
{91, "INVALID_TRANSIT_NETWORK_SELECTION"},
{95, "INVALID_MESSAGE_UNSPECIFIED"},
{87, "NOT_CUG_MEMBER"},
{90, "CUG_NON_EXISTENT"},
{96, "MANDATORY_IE_MISSING"},
{97, "MESSAGE_TYPE_NON_EXISTENT"},
{98, "MESSAGE_STATE_INCONSISTENCY"},
{99, "NON_EXISTENT_IE"},
{100, "INVALID_IE_CONTENT"},
{101, "MESSAGE_NOT_COMPATIBLE"},
{102, "RECOVERY_ON_TIMER_EXPIRY"},
{111, "PROTOCOL_ERROR_UNSPECIFIED"},
{127, "INTERWORKING_UNSPECIFIED"},
{128, "ACU_CAUSE_ACU_BAD_ADDRESS"},
{129, "ACU_CAUSE_ACU_BAD_SERVICE"},
{130, "ACU_CAUSE_ACU_COLLISION"},
{131, "ACU_CAUSE_ACU_FAC_REJECTED"},
{255, "ACU_NETWORK_CAUSE_NIL"},
{200, "C_ALREADY_BLOCKED"},
{201, "C_CHANNEL_BLOCKED"},
{202, "C_BLOCKING_DONE"},
{203, "C_ALREADY_UNBLOCKED"},
{204, "C_UNBLOCKING_DONE"},
{260, "CLRN_MFRn_A4"},
{261, "CLRN_MFRn_B1"},
{262, "CLRN_MFRn_B2"},
{263, "CLRN_MFRn_B3"},
{264, "CLRN_MFRn_B4"},
{265, "CLRN_MFRn_B5"},
{266, "CLRN_MFRn_B6"},
{267, "CLRN_MFRn_B7"},
{268, "CLRN_MFRn_B8"},
{269, "CLRN_MFRn_B9"},
{270, "CLRN_MFRn_B10"},
{271, "CLRN_MFRn_B11"},
{272, "CLRN_MFRn_B12"},
{273, "CLRN_MFRn_B13"},
{274, "CLRN_MFRn_B14"},
{275, "CLRN_MFRn_B15"},
{300, "ACURC_BUSY"},
{301, "ACURC_NOPROCEED"},
{302, "ACURC_NOANSWER"},
{303, "ACURC_NOAUTOANSWER"},
{304, "ACURC_CONGESTED"},
{305, "ACURC_INCOMING"},
{306, "ACURC_NOLINE"},
{307, "ACURC_ERRNUM"},
{308, "ACURC_INHNUM"},
{309, "ACURC_2MNUM"},
{310, "ACURC_HUNGUP"},
{311, "ACURC_NETWORK_ERROR"},
{312, "ACURC_TIMEOUT"},
{313, "ACURC_BAD_SERVICE"},
{314, "ACURC_INTERNAL"},
{315, "ACURC_OK"},
{316, "ACURC_BL_TIMEOUT"},
{317, "ACURC_IN_CALL"},
{318, "ACURC_CLEAR_RQ"},
{0, NULL}
};
/* ISDN */
@ -409,9 +409,9 @@ static const value_string actrace_cas_cause_vals[] = {
#define BLADE_TO_PSTN 0x49644443
static const value_string actrace_isdn_direction_vals[] = {
{PSTN_TO_BLADE, "Blade <-- PSTN"},
{BLADE_TO_PSTN, "Blade --> PSTN"},
{0, NULL}
{PSTN_TO_BLADE, "Blade <-- PSTN"},
{BLADE_TO_PSTN, "Blade --> PSTN"},
{0, NULL}
};
/*
@ -439,7 +439,7 @@ static int is_actrace(tvbuff_t *tvb, gint offset);
*/
static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *actrace_tree);
static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *actrace_tree);
proto_tree *actrace_tree);
/************************************************************************
* dissect_actrace - The dissector for the AudioCodes Trace prtocol
@ -526,7 +526,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
proto_tree_add_int(actrace_tree, hf_actrace_cas_function, tvb, offset, 4, function);
offset += 4;
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|%d|%s|%d|%s|",
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|%d|%s|%d|%s|",
val_to_str(source, actrace_cas_source_vals_short, "ukn"),
curr_state,
val_to_str(event, actrace_cas_event_vals, "%d"),
@ -538,24 +538,24 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
{
case SEND_EVENT:
proto_tree_add_text(actrace_tree, tvb, offset, 4,
"Parameter 0: %s", val_to_str(par0,
"Parameter 0: %s", val_to_str(par0,
actrace_cas_pstn_event_vals, "Unknown (%d)"));
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
val_to_str(par0, actrace_cas_pstn_event_vals, "%d"));
break;
case CHANGE_COLLECT_TYPE:
proto_tree_add_text(actrace_tree, tvb, offset, 4,
"Parameter 0: %s", val_to_str(par0,
"Parameter 0: %s", val_to_str(par0,
actrace_cas_collect_type_vals, "Unknown (%d)"));
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
val_to_str(par0, actrace_cas_collect_type_vals, "%d"));
break;
case SEND_MF:
case SEND_DEST_NUM:
proto_tree_add_text(actrace_tree, tvb, offset, 4,
"Parameter 0: %s", val_to_str(par0,
"Parameter 0: %s", val_to_str(par0,
actrace_cas_send_type_vals, "Unknown (%d)"));
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
val_to_str(par0, actrace_cas_send_type_vals, "%d"));
break;
default:
@ -568,7 +568,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
if (function == SEND_EVENT) {
proto_tree_add_text(actrace_tree, tvb, offset, 4,
"Parameter 1: %s", val_to_str(par1, actrace_cas_cause_vals, "Unknown (%d)"));
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
val_to_str(par1, actrace_cas_cause_vals, "%d"));
} else {
proto_tree_add_int(actrace_tree, hf_actrace_cas_par1, tvb, offset, 4, par1);
@ -628,7 +628,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
frame_label = ep_strdup("DTMF/MF: sending DNIS");
} else if (par0 == SEND_TYPE_ANI ) {
frame_label = ep_strdup("DTMF/MF: sending ANI");
}
}
}
}
@ -648,7 +648,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
/* Dissect an individual actrace ISDN message */
static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *actrace_tree)
proto_tree *actrace_tree)
{
/* Declare variables */
gint len;
@ -668,7 +668,7 @@ static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
offset = 44;
proto_tree_add_int(actrace_tree, hf_actrace_isdn_length, tvb, offset, 2, len);
/* if it is a q931 packet (we don't want LAPD packets for Voip Graph) add tap info */
if (len > 4) {
/* Initialise packet info for passing to tap */
@ -694,7 +694,7 @@ static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
/*
* is_actrace - A function for determining whether there is a
* AudioCodes packet at offset in tvb. The packet could be
* AudioCodes packet at offset in tvb. The packet could be
* a CAS, ISDN or other Trunk protocol. Here we are only
* trying to decode CAS or ISDN protocols
*
@ -712,14 +712,14 @@ static int is_actrace(tvbuff_t *tvb, gint offset)
gint32 source, isdn_header;
tvb_len = tvb_reported_length(tvb);
/* is a CAS packet?
* the CAS messages are 48 byte fixed and the source should be 0,1 or 2 (DSP, User or Table)
/* is a CAS packet?
* the CAS messages are 48 byte fixed and the source should be 0,1 or 2 (DSP, User or Table)
*/
source = tvb_get_ntohl(tvb, offset+4);
if ( (tvb_len == 48) && ((source > -1) && (source <3)) )
return ACTRACE_CAS;
/* is ISDN packet?
/* is ISDN packet?
* the ISDN packets have 0x49446463 for packets from PSTN to the Blade and
* 0x49644443 for packets from the Blade to the PSTN at offset 4
*/
@ -732,82 +732,82 @@ static int is_actrace(tvbuff_t *tvb, gint offset)
/* Register all the bits needed with the filtering engine */
void proto_register_actrace(void)
{
static hf_register_info hf[] =
{
/* CAS */
{ &hf_actrace_cas_time,
{ "Time", "actrace.cas.time", FT_INT32, BASE_DEC, NULL, 0x0,
"Capture Time", HFILL }},
{ &hf_actrace_cas_source,
{ "Source", "actrace.cas.source", FT_INT32, BASE_DEC, VALS(actrace_cas_source_vals), 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_current_state,
{ "Current State", "actrace.cas.curr_state", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_event,
{ "Event", "actrace.cas.event", FT_INT32, BASE_DEC, VALS(actrace_cas_event_vals), 0x0,
"New Event", HFILL }},
{ &hf_actrace_cas_next_state,
{ "Next State", "actrace.cas.next_state", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_function,
{ "Function", "actrace.cas.function", FT_INT32, BASE_DEC, VALS(actrace_cas_function_vals), 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_par0,
{ "Parameter 0", "actrace.cas.par0", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_par1,
{ "Parameter 1", "actrace.cas.par1", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_par2,
{ "Parameter 2", "actrace.cas.par2", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_trunk,
{ "Trunk Number", "actrace.cas.trunk", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_bchannel,
{ "BChannel", "actrace.cas.bchannel", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_connection_id,
{ "Connection ID", "actrace.cas.conn_id", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
static hf_register_info hf[] =
{
/* CAS */
{ &hf_actrace_cas_time,
{ "Time", "actrace.cas.time", FT_INT32, BASE_DEC, NULL, 0x0,
"Capture Time", HFILL }},
{ &hf_actrace_cas_source,
{ "Source", "actrace.cas.source", FT_INT32, BASE_DEC, VALS(actrace_cas_source_vals), 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_current_state,
{ "Current State", "actrace.cas.curr_state", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_event,
{ "Event", "actrace.cas.event", FT_INT32, BASE_DEC, VALS(actrace_cas_event_vals), 0x0,
"New Event", HFILL }},
{ &hf_actrace_cas_next_state,
{ "Next State", "actrace.cas.next_state", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_function,
{ "Function", "actrace.cas.function", FT_INT32, BASE_DEC, VALS(actrace_cas_function_vals), 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_par0,
{ "Parameter 0", "actrace.cas.par0", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_par1,
{ "Parameter 1", "actrace.cas.par1", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_par2,
{ "Parameter 2", "actrace.cas.par2", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_trunk,
{ "Trunk Number", "actrace.cas.trunk", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_bchannel,
{ "BChannel", "actrace.cas.bchannel", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_cas_connection_id,
{ "Connection ID", "actrace.cas.conn_id", FT_INT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
/* ISDN */
{ &hf_actrace_isdn_trunk,
{ "Trunk Number", "actrace.isdn.trunk", FT_INT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_isdn_direction,
{ "Direction", "actrace.isdn.dir", FT_INT32, BASE_DEC, VALS(actrace_isdn_direction_vals), 0x0,
NULL, HFILL }},
{ &hf_actrace_isdn_length,
{ "Length", "actrace.isdn.length", FT_INT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
};
/* ISDN */
{ &hf_actrace_isdn_trunk,
{ "Trunk Number", "actrace.isdn.trunk", FT_INT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_actrace_isdn_direction,
{ "Direction", "actrace.isdn.dir", FT_INT32, BASE_DEC, VALS(actrace_isdn_direction_vals), 0x0,
NULL, HFILL }},
{ &hf_actrace_isdn_length,
{ "Length", "actrace.isdn.length", FT_INT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
};
static gint *ett[] =
{
&ett_actrace,
};
static gint *ett[] =
{
&ett_actrace,
};
module_t *actrace_module;
module_t *actrace_module;
/* Register protocol */
proto_actrace = proto_register_protocol("AudioCodes Trunk Trace", "ACtrace", "actrace");
proto_register_field_array(proto_actrace, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
/* Register protocol */
proto_actrace = proto_register_protocol("AudioCodes Trunk Trace", "ACtrace", "actrace");
proto_register_field_array(proto_actrace, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
/* Register our configuration options */
actrace_module = prefs_register_protocol(proto_actrace, proto_reg_handoff_actrace);
/* Register our configuration options */
actrace_module = prefs_register_protocol(proto_actrace, proto_reg_handoff_actrace);
prefs_register_uint_preference(actrace_module, "udp_port",
"AudioCodes Trunk Trace UDP port",
"Set the UDP port for AudioCodes Trunk Traces."
"Use http://x.x.x.x/TrunkTraces to enable the traces in the Blade",
10, &global_actrace_udp_port);
prefs_register_uint_preference(actrace_module, "udp_port",
"AudioCodes Trunk Trace UDP port",
"Set the UDP port for AudioCodes Trunk Traces."
"Use http://x.x.x.x/TrunkTraces to enable the traces in the Blade",
10, &global_actrace_udp_port);
prefs_register_obsolete_preference(actrace_module, "display_dissect_tree");
prefs_register_obsolete_preference(actrace_module, "display_dissect_tree");
actrace_tap = register_tap("actrace");
actrace_tap = register_tap("actrace");
}
/* The registration hand-off routine */

View File

@ -1362,18 +1362,18 @@ static void dissect_backup_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
static gint
afs_equal(gconstpointer v, gconstpointer w)
{
const struct afs_request_key *v1 = (const struct afs_request_key *)v;
const struct afs_request_key *v2 = (const struct afs_request_key *)w;
const struct afs_request_key *v1 = (const struct afs_request_key *)v;
const struct afs_request_key *v2 = (const struct afs_request_key *)w;
if (v1 -> conversation == v2 -> conversation &&
v1 -> epoch == v2 -> epoch &&
v1 -> cid == v2 -> cid &&
v1 -> callnumber == v2 -> callnumber ) {
if (v1 -> conversation == v2 -> conversation &&
v1 -> epoch == v2 -> epoch &&
v1 -> cid == v2 -> cid &&
v1 -> callnumber == v2 -> callnumber ) {
return 1;
}
return 1;
}
return 0;
return 0;
}
static guint

View File

@ -128,25 +128,25 @@ static gint ett_remcap = -1;
static const value_string type_values [] = {
{ AGENTX_OPEN_PDU, "Open-PDU" },
{ AGENTX_CLOSE_PDU, "Close-PDU" },
{ AGENTX_REGISTER_PDU, "Register-PDU" },
{ AGENTX_UNREGISTER_PDU, "Unregister-PDU" },
{ AGENTX_GET_PDU, "Get-PDU" },
{ AGENTX_GETNEXT_PDU, "GetNext-PDU" },
{ AGENTX_GETBULK_PDU, "GetBulk-PDU" },
{ AGENTX_TESTSET_PDU, "TestSet-PDU" },
{ AGENTX_COMMITSET_PDU, "CommitSet-PDU" },
{ AGENTX_UNDOSET_PDU, "UndoSet-PDU" },
{ AGENTX_CLEANUPSET_PDU, "CleanupSet-PDU" },
{ AGENTX_NOTIFY_PDU, "Notify-PDU" },
{ AGENTX_PING_PDU, "Ping-PDU" },
{ AGENTX_INDEX_ALLOC_PDU, "IndexAllocate-PDU" },
{ AGENTX_INDEX_DEALLOC_PDU, "IndexDeallocate-PDU" },
{ AGENTX_ADD_AGENT_CAPS_PDU, "AddAgentCaps-PDU" },
{ AGENTX_REM_AGENT_CAPS_PDU, "RemoveAgentCaps-PDU" },
{ AGENTX_RESPONSE_PDU, "Response-PDU" },
{ 0, NULL }
{ AGENTX_OPEN_PDU, "Open-PDU" },
{ AGENTX_CLOSE_PDU, "Close-PDU" },
{ AGENTX_REGISTER_PDU, "Register-PDU" },
{ AGENTX_UNREGISTER_PDU, "Unregister-PDU" },
{ AGENTX_GET_PDU, "Get-PDU" },
{ AGENTX_GETNEXT_PDU, "GetNext-PDU" },
{ AGENTX_GETBULK_PDU, "GetBulk-PDU" },
{ AGENTX_TESTSET_PDU, "TestSet-PDU" },
{ AGENTX_COMMITSET_PDU, "CommitSet-PDU" },
{ AGENTX_UNDOSET_PDU, "UndoSet-PDU" },
{ AGENTX_CLEANUPSET_PDU, "CleanupSet-PDU" },
{ AGENTX_NOTIFY_PDU, "Notify-PDU" },
{ AGENTX_PING_PDU, "Ping-PDU" },
{ AGENTX_INDEX_ALLOC_PDU, "IndexAllocate-PDU" },
{ AGENTX_INDEX_DEALLOC_PDU, "IndexDeallocate-PDU" },
{ AGENTX_ADD_AGENT_CAPS_PDU, "AddAgentCaps-PDU" },
{ AGENTX_REM_AGENT_CAPS_PDU, "RemoveAgentCaps-PDU" },
{ AGENTX_RESPONSE_PDU, "Response-PDU" },
{ 0, NULL }
};
@ -420,32 +420,32 @@ static int dissect_varbind(tvbuff_t *tvb, proto_tree *tree, int offset, int len,
switch(vtag)
{
case VB_OID:
case VB_OID:
tlen += dissect_object_id(tvb, subtree, offset + tlen + 4, flags);
break;
break;
case VB_OPAQUE:
case VB_OSTR:
case VB_IPADDR:
case VB_OPAQUE:
case VB_OSTR:
case VB_IPADDR:
tlen += dissect_octet_string(tvb, subtree,offset + tlen + 4,flags);
break;
break;
case VB_TIMETICK:
case VB_COUNTER32:
case VB_INT:
case VB_GAUGE32:
case VB_TIMETICK:
case VB_COUNTER32:
case VB_INT:
case VB_GAUGE32:
tlen += dissect_val32(tvb, subtree,offset + tlen + 4, flags);
break;
break;
case VB_COUNTER64:
case VB_COUNTER64:
tlen += dissect_val64(tvb, subtree,offset + tlen + 4, flags);
break;
break;
case VB_NULL:
case VB_NOSUCHOBJ:
case VB_NOSUCHINST:
case VB_ENDOFMIB:
break;
case VB_NULL:
case VB_NOSUCHOBJ:
case VB_NOSUCHINST:
case VB_ENDOFMIB:
break;
}
return tlen + 4;
}
@ -453,7 +453,7 @@ static int dissect_varbind(tvbuff_t *tvb, proto_tree *tree, int offset, int len,
static void dissect_response_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
gboolean little_endian = !(flags & NETWORK_BYTE_ORDER);
guint32 r_uptime;
@ -495,42 +495,42 @@ static void dissect_getnext_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int l
static void dissect_get_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
item = proto_tree_add_text(tree, tvb, offset, len, "Get-PDU");
subtree = proto_item_add_subtree(item, ett_get);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
while(len >= offset) {
offset += dissect_search_range(tvb, subtree, offset, flags);
offset += dissect_search_range(tvb, subtree, offset, flags);
offset += 4; /* skip 0 end dword */
}
}
}
static void dissect_getbulk_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
gboolean little_endian = !(flags & NETWORK_BYTE_ORDER);
item = proto_tree_add_text(tree, tvb, offset, len, "GetBulk-PDU");
subtree = proto_item_add_subtree(item, ett_getbulk);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
proto_tree_add_item(subtree, hf_gbulk_nrepeat, tvb, offset, 2, little_endian);
proto_tree_add_item(subtree, hf_gbulk_mrepeat, tvb, offset + 2, 2, little_endian);
proto_tree_add_item(subtree, hf_gbulk_nrepeat, tvb, offset, 2, little_endian);
proto_tree_add_item(subtree, hf_gbulk_mrepeat, tvb, offset + 2, 2, little_endian);
offset+=4;
while(len >= offset) {
offset += dissect_search_range(tvb, subtree, offset, flags);
offset += dissect_search_range(tvb, subtree, offset, flags);
}
}
@ -559,7 +559,7 @@ static void dissect_open_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len,
static void dissect_close_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
guint8 reason;
item = proto_tree_add_text(tree, tvb, offset, len, "Close-PDU");
@ -575,17 +575,18 @@ static void dissect_close_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len
static void dissect_register_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
gboolean little_endian = !(flags & NETWORK_BYTE_ORDER);
item = proto_tree_add_text(tree, tvb, offset, len, "Register-PDU");
subtree = proto_item_add_subtree(item, ett_register);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
proto_tree_add_item(subtree, hf_reg_timeout, tvb, offset, 1, FALSE);
proto_tree_add_item(subtree, hf_reg_prio, tvb, offset+1, 1, FALSE);
@ -607,44 +608,44 @@ static void dissect_register_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int
static void dissect_unregister_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
gboolean little_endian = !(flags & NETWORK_BYTE_ORDER);
item = proto_tree_add_text(tree, tvb, offset, len, "Unregister-PDU");
subtree = proto_item_add_subtree(item, ett_unregister);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
proto_tree_add_item(subtree, hf_unreg_timeout, tvb, offset, 1, FALSE);
proto_tree_add_item(subtree, hf_unreg_prio, tvb, offset+1, 1, FALSE);
proto_tree_add_item(subtree, hf_unreg_rsid, tvb, offset+2, 1, FALSE);
offset+=4;
proto_tree_add_item(subtree, hf_unreg_timeout, tvb, offset, 1, FALSE);
proto_tree_add_item(subtree, hf_unreg_prio, tvb, offset+1, 1, FALSE);
proto_tree_add_item(subtree, hf_unreg_rsid, tvb, offset+2, 1, FALSE);
offset+=4;
/* Region */
offset += dissect_object_id(tvb, subtree, offset, flags);
/* Region */
offset += dissect_object_id(tvb, subtree, offset, flags);
if(len > offset) {
/* Upper bound (opt) */
proto_tree_add_item(subtree, hf_unreg_ubound, tvb, offset, 4, little_endian);
offset += 4;
}
if(len > offset) {
/* Upper bound (opt) */
proto_tree_add_item(subtree, hf_unreg_ubound, tvb, offset, 4, little_endian);
offset += 4;
}
}
static void dissect_testset_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
item = proto_tree_add_text(tree, tvb, offset, len, "Testset-PDU");
subtree = proto_item_add_subtree(item, ett_testset);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
while(len > offset) {
offset += dissect_varbind(tvb, subtree, offset, len, flags);
@ -654,47 +655,47 @@ static void dissect_testset_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int l
static void dissect_notify_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
item = proto_tree_add_text(tree, tvb, offset, len, "Notify-PDU");
subtree = proto_item_add_subtree(item, ett_notify);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
while(len > offset) {
offset += dissect_varbind(tvb, subtree, offset, len, flags);
}
offset += dissect_varbind(tvb, subtree, offset, len, flags);
}
}
static void dissect_ping_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
item = proto_tree_add_text(tree, tvb, offset, len, "Ping-PDU");
subtree = proto_item_add_subtree(item, ett_ping);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
}
static void dissect_idx_alloc_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
item = proto_tree_add_text(tree, tvb, offset, len, "IndexAllocate-PDU");
subtree = proto_item_add_subtree(item, ett_idxalloc);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
while(len > offset) {
offset += dissect_varbind(tvb, subtree, offset, len, flags);
@ -704,34 +705,34 @@ static void dissect_idx_alloc_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int
static void dissect_idx_dealloc_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_item* item;
proto_tree* subtree;
item = proto_tree_add_text(tree, tvb, offset, len, "IndexDeallocate-PDU");
subtree = proto_item_add_subtree(item, ett_idxdalloc);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
while(len > offset) {
offset += dissect_varbind(tvb, subtree, offset, len, flags);
}
while(len > offset) {
offset += dissect_varbind(tvb, subtree, offset, len, flags);
}
}
static void dissect_add_caps_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_tree* subtree;
item = proto_tree_add_text(tree, tvb, offset, len, "AddAgentCaps-PDU");
subtree = proto_item_add_subtree(item, ett_addcap);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
offset += dissect_object_id(tvb, subtree, offset, flags);
@ -740,18 +741,18 @@ static void dissect_add_caps_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int
static void dissect_rem_caps_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
{
proto_item* item;
proto_tree* subtree;
proto_item* item;
proto_tree* subtree;
item = proto_tree_add_text(tree, tvb, offset, len, "RemoveAgentCaps-PDU");
subtree = proto_item_add_subtree(item, ett_remcap);
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
offset += dissect_object_id(tvb, subtree, offset, flags);
offset += dissect_object_id(tvb, subtree, offset, flags);
}
@ -779,8 +780,7 @@ static guint get_agentx_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offse
return plen + 20;
}
static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree)
static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0;
proto_tree* agentx_tree ,*pdu_hdr_tree;
@ -804,11 +804,11 @@ static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo,
NORLEL(flags, packet_id, tvb, 12); offset+=4;
NORLEL(flags, payload_len, tvb, 16); offset+=4;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AgentX");
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AgentX");
col_add_fstr(pinfo->cinfo, COL_INFO, "%s: sid=%d, tid=%d, packid=%d, plen=%d",
val_to_str(type,type_values,"unknown"),
session_id,trans_id,packet_id,payload_len);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s: sid=%d, tid=%d, packid=%d, plen=%d",
val_to_str(type,type_values,"unknown"),
session_id,trans_id,packet_id,payload_len);
if(!tree)
@ -816,7 +816,7 @@ static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo,
/*t_item = proto_tree_add_item(tree, proto_agentx, tvb, 0, -1, FALSE);*/
t_item = proto_tree_add_protocol_format(tree, proto_agentx, tvb, 0, -1,
"Agent Extensibility (AgentX) Protocol: %s, sid=%d, tid=%d, packid=%d, plen=%d",
"Agent Extensibility (AgentX) Protocol: %s, sid=%d, tid=%d, packid=%d, plen=%d",
val_to_str(type,type_values,"unknown"),
session_id,trans_id,packet_id,payload_len);
agentx_tree = proto_item_add_subtree(t_item, ett_agentx);
@ -839,65 +839,65 @@ static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo,
dissect_open_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_CLOSE_PDU:
case AGENTX_CLOSE_PDU:
dissect_close_pdu(tvb, pdu_hdr_tree, offset,payload_len);
break;
case AGENTX_REGISTER_PDU:
case AGENTX_REGISTER_PDU:
dissect_register_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_UNREGISTER_PDU:
case AGENTX_UNREGISTER_PDU:
dissect_unregister_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_GET_PDU:
case AGENTX_GET_PDU:
dissect_get_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_GETNEXT_PDU:
case AGENTX_GETNEXT_PDU:
dissect_getnext_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_GETBULK_PDU:
case AGENTX_GETBULK_PDU:
dissect_getbulk_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_TESTSET_PDU:
case AGENTX_TESTSET_PDU:
dissect_testset_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_COMMITSET_PDU:
case AGENTX_UNDOSET_PDU:
case AGENTX_CLEANUPSET_PDU:
case AGENTX_COMMITSET_PDU:
case AGENTX_UNDOSET_PDU:
case AGENTX_CLEANUPSET_PDU:
/* there is no parameters */
break;
case AGENTX_NOTIFY_PDU:
case AGENTX_NOTIFY_PDU:
dissect_notify_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_PING_PDU:
case AGENTX_PING_PDU:
dissect_ping_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_INDEX_ALLOC_PDU:
case AGENTX_INDEX_ALLOC_PDU:
dissect_idx_alloc_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_INDEX_DEALLOC_PDU:
case AGENTX_INDEX_DEALLOC_PDU:
dissect_idx_dealloc_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_ADD_AGENT_CAPS_PDU:
case AGENTX_ADD_AGENT_CAPS_PDU:
dissect_add_caps_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_REM_AGENT_CAPS_PDU:
case AGENTX_REM_AGENT_CAPS_PDU:
dissect_rem_caps_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
break;
case AGENTX_RESPONSE_PDU:
case AGENTX_RESPONSE_PDU:
dissect_response_pdu(tvb, pdu_hdr_tree, offset, payload_len, flags);
break;
}
@ -912,179 +912,179 @@ static void dissect_agentx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_agentx(void)
{
static hf_register_info hf[] = {
static hf_register_info hf[] = {
{ &hf_version,
{ "Version", "agentx.version", FT_UINT8, BASE_DEC, NULL, 0x0,
"header version", HFILL }},
{ &hf_version,
{ "Version", "agentx.version", FT_UINT8, BASE_DEC, NULL, 0x0,
"header version", HFILL }},
{ &hf_type,
{ "Type", "agentx.type", FT_UINT8, BASE_DEC, VALS(type_values), 0x0,
"header type", HFILL }},
{ &hf_type,
{ "Type", "agentx.type", FT_UINT8, BASE_DEC, VALS(type_values), 0x0,
"header type", HFILL }},
{ &hf_flags,
{ "Flags", "agentx.flags", FT_UINT8, BASE_DEC, NULL, 0x0,
"header type", HFILL }},
{ &hf_flags,
{ "Flags", "agentx.flags", FT_UINT8, BASE_DEC, NULL, 0x0,
"header type", HFILL }},
{ &hf_session_id,
{ "sessionID", "agentx.session_id", FT_UINT32, BASE_DEC, NULL, 0x0,
"Session ID", HFILL }},
{ &hf_session_id,
{ "sessionID", "agentx.session_id", FT_UINT32, BASE_DEC, NULL, 0x0,
"Session ID", HFILL }},
{ &hf_trans_id,
{ "TransactionID", "agentx.transaction_id", FT_UINT32, BASE_DEC, NULL, 0x0,
"Transaction ID", HFILL }},
{ &hf_trans_id,
{ "TransactionID", "agentx.transaction_id", FT_UINT32, BASE_DEC, NULL, 0x0,
"Transaction ID", HFILL }},
{ &hf_packet_id,
{ "PacketID", "agentx.packet_id", FT_UINT32, BASE_DEC, NULL, 0x0,
"Packet ID", HFILL }},
{ &hf_packet_id,
{ "PacketID", "agentx.packet_id", FT_UINT32, BASE_DEC, NULL, 0x0,
"Packet ID", HFILL }},
{ &hf_payload_len,
{ "Payload length", "agentx.payload_len", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_payload_len,
{ "Payload length", "agentx.payload_len", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_ostring,
{ "Octet String", "agentx.ostring", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_ostring,
{ "Octet String", "agentx.ostring", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_ostring_len,
{ "OString len", "agentx.ostring_len", FT_UINT32, BASE_DEC, NULL, 0x0,
"Octet String Length", HFILL }},
{ &hf_ostring_len,
{ "OString len", "agentx.ostring_len", FT_UINT32, BASE_DEC, NULL, 0x0,
"Octet String Length", HFILL }},
{ &hf_oid_sub,
{ "Number subids", "agentx.n_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_oid_sub,
{ "Number subids", "agentx.n_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_oid_prefix,
{ "OID prefix", "agentx.oid_prefix", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_oid_prefix,
{ "OID prefix", "agentx.oid_prefix", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_oid_include,
{ "OID include", "agentx.oid_include", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_oid_include,
{ "OID include", "agentx.oid_include", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_oid_str,
{ "OID", "agentx.oid", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_oid_str,
{ "OID", "agentx.oid", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_resp_uptime,
{ "sysUpTime", "agentx.r.uptime", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_resp_uptime,
{ "sysUpTime", "agentx.r.uptime", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_resp_error,
{ "Resp. error", "agentx.r.error", FT_UINT16, BASE_DEC, VALS(resp_errors), 0x0,
"response error", HFILL }},
{ &hf_resp_error,
{ "Resp. error", "agentx.r.error", FT_UINT16, BASE_DEC, VALS(resp_errors), 0x0,
"response error", HFILL }},
{ &hf_resp_index,
{ "Resp. index", "agentx.r.index", FT_UINT16, BASE_DEC, NULL, 0x0,
"response index", HFILL }},
{ &hf_resp_index,
{ "Resp. index", "agentx.r.index", FT_UINT16, BASE_DEC, NULL, 0x0,
"response index", HFILL }},
{ &hf_vtag,
{ "Variable type", "agentx.v.tag", FT_UINT16, BASE_DEC, VALS(vtag_values), 0x0,
"vtag", HFILL }},
{ &hf_vtag,
{ "Variable type", "agentx.v.tag", FT_UINT16, BASE_DEC, VALS(vtag_values), 0x0,
"vtag", HFILL }},
{ &hf_val32,
{ "Value(32)", "agentx.v.val32", FT_UINT32, BASE_DEC, NULL, 0x0,
"val32", HFILL }},
{ &hf_val32,
{ "Value(32)", "agentx.v.val32", FT_UINT32, BASE_DEC, NULL, 0x0,
"val32", HFILL }},
{ &hf_val64,
{ "Value(64)", "agentx.v.val64", FT_UINT64, BASE_DEC, NULL, 0x0,
"val64", HFILL }},
{ &hf_val64,
{ "Value(64)", "agentx.v.val64", FT_UINT64, BASE_DEC, NULL, 0x0,
"val64", HFILL }},
{ &hf_open_timeout,
{ "Timeout", "agentx.o.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
"open timeout", HFILL }},
{ &hf_open_timeout,
{ "Timeout", "agentx.o.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
"open timeout", HFILL }},
{ &hf_close_reason,
{ "Reason", "agentx.c.reason", FT_UINT8, BASE_DEC, VALS(close_reasons), 0x0,
"close reason", HFILL }},
{ &hf_close_reason,
{ "Reason", "agentx.c.reason", FT_UINT8, BASE_DEC, VALS(close_reasons), 0x0,
"close reason", HFILL }},
{ &hf_reg_timeout,
{ "Timeout", "agentx.r.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
"Register timeout", HFILL }},
{ &hf_reg_timeout,
{ "Timeout", "agentx.r.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
"Register timeout", HFILL }},
{ &hf_reg_prio,
{ "Priority", "agentx.r.priority", FT_UINT8, BASE_DEC, NULL, 0x0,
"Register Priority", HFILL }},
{ &hf_reg_prio,
{ "Priority", "agentx.r.priority", FT_UINT8, BASE_DEC, NULL, 0x0,
"Register Priority", HFILL }},
{ &hf_reg_rsid,
{ "Range_subid", "agentx.r.range_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
"Register range_subid", HFILL }},
{ &hf_reg_rsid,
{ "Range_subid", "agentx.r.range_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
"Register range_subid", HFILL }},
{ &hf_reg_ubound,
{ "Upper bound", "agentx.r.upper_bound", FT_UINT32, BASE_DEC, NULL, 0x0,
"Register upper bound", HFILL }},
{ &hf_reg_ubound,
{ "Upper bound", "agentx.r.upper_bound", FT_UINT32, BASE_DEC, NULL, 0x0,
"Register upper bound", HFILL }},
{ &hf_unreg_timeout,
{ "Timeout", "agentx.u.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
"Unregister timeout", HFILL }},
{ &hf_unreg_timeout,
{ "Timeout", "agentx.u.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
"Unregister timeout", HFILL }},
{ &hf_unreg_prio,
{ "Priority", "agentx.u.priority", FT_UINT8, BASE_DEC, NULL, 0x0,
"Unregister Priority", HFILL }},
{ &hf_unreg_prio,
{ "Priority", "agentx.u.priority", FT_UINT8, BASE_DEC, NULL, 0x0,
"Unregister Priority", HFILL }},
{ &hf_unreg_rsid,
{ "Range_subid", "agentx.u.range_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
"Unregister range_subid", HFILL }},
{ &hf_unreg_rsid,
{ "Range_subid", "agentx.u.range_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
"Unregister range_subid", HFILL }},
{ &hf_unreg_ubound,
{ "Upper bound", "agentx.u.upper_bound", FT_UINT32, BASE_DEC, NULL, 0x0,
"Register upper bound", HFILL }},
{ &hf_unreg_ubound,
{ "Upper bound", "agentx.u.upper_bound", FT_UINT32, BASE_DEC, NULL, 0x0,
"Register upper bound", HFILL }},
{ &hf_gbulk_nrepeat,
{ "Repeaters", "agentx.gb.nrepeat", FT_UINT16, BASE_DEC, NULL, 0x0,
"getBulk Num. repeaters", HFILL }},
{ &hf_gbulk_nrepeat,
{ "Repeaters", "agentx.gb.nrepeat", FT_UINT16, BASE_DEC, NULL, 0x0,
"getBulk Num. repeaters", HFILL }},
{ &hf_gbulk_mrepeat,
{ "Max Repetition", "agentx.gb.mrepeat", FT_UINT16, BASE_DEC, NULL, 0x0,
"getBulk Max repetition", HFILL }},
{ &hf_gbulk_mrepeat,
{ "Max Repetition", "agentx.gb.mrepeat", FT_UINT16, BASE_DEC, NULL, 0x0,
"getBulk Max repetition", HFILL }},
/* Add more fields here */
/* Add more fields here */
};
};
static gint *ett[] = {
&ett_agentx,
&ett_pdu_hdr,
&ett_get,
&ett_getnext,
&ett_search_range,
&ett_obj_ident,
&ett_response,
&ett_valrep,
&ett_open,
&ett_close,
&ett_register,
&ett_unregister,
&ett_getbulk,
&ett_testset,
&ett_commitset,
&ett_undoset,
&ett_cleanupset,
&ett_notify,
&ett_ping,
&ett_idxalloc,
&ett_idxdalloc,
&ett_addcap,
&ett_remcap,
};
static gint *ett[] = {
&ett_agentx,
&ett_pdu_hdr,
&ett_get,
&ett_getnext,
&ett_search_range,
&ett_obj_ident,
&ett_response,
&ett_valrep,
&ett_open,
&ett_close,
&ett_register,
&ett_unregister,
&ett_getbulk,
&ett_testset,
&ett_commitset,
&ett_undoset,
&ett_cleanupset,
&ett_notify,
&ett_ping,
&ett_idxalloc,
&ett_idxdalloc,
&ett_addcap,
&ett_remcap,
};
module_t *agentx_module;
module_t *agentx_module;
proto_agentx = proto_register_protocol("AgentX",
"AgentX", "agentx");
proto_agentx = proto_register_protocol("AgentX",
"AgentX", "agentx");
proto_register_field_array(proto_agentx, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(proto_agentx, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
agentx_module = prefs_register_protocol(proto_agentx, proto_reg_handoff_agentx);
agentx_module = prefs_register_protocol(proto_agentx, proto_reg_handoff_agentx);
prefs_register_uint_preference(agentx_module, "tcp.agentx_port",
"AgentX listener TCP Port",
"Set the TCP port for AgentX"
"(if other than the default of 705)",
10, &global_agentx_tcp_port);
prefs_register_uint_preference(agentx_module, "tcp.agentx_port",
"AgentX listener TCP Port",
"Set the TCP port for AgentX"
"(if other than the default of 705)",
10, &global_agentx_tcp_port);
}
/* The registration hand-off routine */
@ -1096,13 +1096,13 @@ proto_reg_handoff_agentx(void)
static guint agentx_tcp_port;
if(!agentx_prefs_initialized) {
agentx_handle = create_dissector_handle(dissect_agentx, proto_agentx);
agentx_prefs_initialized = TRUE;
}
else {
dissector_delete("tcp.port", agentx_tcp_port, agentx_handle);
}
agentx_handle = create_dissector_handle(dissect_agentx, proto_agentx);
agentx_prefs_initialized = TRUE;
}
else {
dissector_delete("tcp.port", agentx_tcp_port, agentx_handle);
}
agentx_tcp_port = global_agentx_tcp_port;
agentx_tcp_port = global_agentx_tcp_port;
dissector_add("tcp.port", agentx_tcp_port, agentx_handle);
}

View File

@ -59,41 +59,41 @@ static int hf_admin_confirm_status = -1;
/* Initialize the subtree pointers */
static gint ett_aim_admin = -1;
static int dissect_aim_admin_accnt_info_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *admin_tree)
static int dissect_aim_admin_accnt_info_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *admin_tree)
{
proto_tree_add_item(admin_tree, hf_admin_acctinfo_code, tvb, 0, 2, tvb_get_ntohs(tvb, 0));
proto_tree_add_item(admin_tree, hf_admin_acctinfo_code, tvb, 0, 2, tvb_get_ntohs(tvb, 0));
proto_tree_add_text(admin_tree, tvb, 2, 2, "Unknown");
return 4;
}
static int dissect_aim_admin_accnt_info_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
static int dissect_aim_admin_accnt_info_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
{
int offset = 0;
proto_tree_add_uint(admin_tree, hf_admin_acctinfo_permissions, tvb, offset, 2, tvb_get_ntohs(tvb, offset)); offset+=2;
return dissect_aim_tlv_list(tvb, pinfo, offset, admin_tree, client_tlvs);
}
static int dissect_aim_admin_info_change_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
static int dissect_aim_admin_info_change_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
{
return dissect_aim_tlv_sequence(tvb, pinfo, 0, admin_tree, client_tlvs);
}
static int dissect_aim_admin_cfrm_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
static int dissect_aim_admin_cfrm_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
{
int offset = 0;
int offset = 0;
proto_tree_add_uint(admin_tree, hf_admin_confirm_status, tvb, offset, 2, tvb_get_ntohs(tvb, offset)); offset+=2;
return dissect_aim_tlv_sequence(tvb, pinfo, offset, admin_tree, client_tlvs);
}
static const aim_subtype aim_fnac_family_admin[] = {
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Request Account Information", dissect_aim_admin_accnt_info_req },
{ 0x0003, "Requested Account Information", dissect_aim_admin_accnt_info_repl },
{ 0x0004, "Infochange Request", dissect_aim_admin_info_change_req },
{ 0x0005, "Infochange Reply", dissect_aim_admin_accnt_info_repl },
{ 0x0006, "Account Confirm Request", NULL },
{ 0x0007, "Account Confirm Reply", dissect_aim_admin_cfrm_repl},
{ 0, NULL, NULL }
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Request Account Information", dissect_aim_admin_accnt_info_req },
{ 0x0003, "Requested Account Information", dissect_aim_admin_accnt_info_repl },
{ 0x0004, "Infochange Request", dissect_aim_admin_info_change_req },
{ 0x0005, "Infochange Reply", dissect_aim_admin_accnt_info_repl },
{ 0x0006, "Account Confirm Request", NULL },
{ 0x0007, "Account Confirm Reply", dissect_aim_admin_cfrm_repl},
{ 0, NULL, NULL }
};
/* Register the protocol with Wireshark */
@ -102,33 +102,33 @@ proto_register_aim_admin(void)
{
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_admin_acctinfo_code,
static hf_register_info hf[] = {
{ &hf_admin_acctinfo_code,
{ "Account Information Request Code", "aim_admin.acctinfo.code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
},
{ &hf_admin_acctinfo_permissions,
},
{ &hf_admin_acctinfo_permissions,
{ "Account Permissions", "aim_admin.acctinfo.permissions", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
},
{ &hf_admin_confirm_status,
},
{ &hf_admin_confirm_status,
{ "Confirmation status", "aim_admin.confirm_status", FT_UINT16, BASE_HEX, VALS(confirm_statusses), 0x0, NULL, HFILL },
},
};
},
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_admin,
};
static gint *ett[] = {
&ett_aim_admin,
};
/* Register the protocol name and description */
proto_aim_admin = proto_register_protocol("AIM Administrative", "AIM Administration", "aim_admin");
proto_aim_admin = proto_register_protocol("AIM Administrative", "AIM Administration", "aim_admin");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_aim_admin, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(proto_aim_admin, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_aim_admin(void)
{
aim_init_family(proto_aim_admin, ett_aim_admin, FAMILY_ADMIN, aim_fnac_family_admin);
aim_init_family(proto_aim_admin, ett_aim_admin, FAMILY_ADMIN, aim_fnac_family_admin);
}

View File

@ -40,14 +40,14 @@
#define FAMILY_ADVERTS 0x0005
static const aim_subtype aim_fnac_family_adverts[] = {
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Request", NULL },
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Request", NULL },
/* FIXME: */
/* From other sources, I understand this response contains
/* From other sources, I understand this response contains
* a GIF file, haven't actually seen one though. And this
* family appears to be deprecated, so we might never find out.. */
{ 0x0003, "Data (GIF)", NULL },
{ 0, NULL, NULL }
{ 0x0003, "Data (GIF)", NULL },
{ 0, NULL, NULL }
};
/* Initialize the protocol and registered fields */
@ -62,26 +62,27 @@ proto_register_aim_adverts(void)
{
/* Setup list of header fields */
/*FIXME
static hf_register_info hf[] = {
};*/
#if 0 /*FIXME*/
static hf_register_info hf[] = {
};
#endif
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_adverts,
};
static gint *ett[] = {
&ett_aim_adverts,
};
/* Register the protocol name and description */
proto_aim_adverts = proto_register_protocol("AIM Advertisements", "AIM Advertisements", "aim_adverts");
proto_aim_adverts = proto_register_protocol("AIM Advertisements", "AIM Advertisements", "aim_adverts");
/* Required function calls to register the header fields and subtrees used */
/*FIXME
proto_register_field_array(proto_aim_adverts, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_aim_adverts(void)
{
aim_init_family(proto_aim_adverts, ett_aim_adverts, FAMILY_ADVERTS, aim_fnac_family_adverts);
aim_init_family(proto_aim_adverts, ett_aim_adverts, FAMILY_ADVERTS, aim_fnac_family_adverts);
}

View File

@ -92,11 +92,11 @@ static int dissect_aim_chat_outgoing_msg(tvbuff_t *tvb, packet_info *pinfo, prot
buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 );
/* channel message from client */
aim_get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb)
aim_get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb)
- 40 - buddyname_length );
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
return tvb_length(tvb);
}
@ -107,19 +107,19 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot
guchar *msg;
/* channel message to client */
int buddyname_length;
buddyname=ep_alloc(MAX_BUDDYNAME_LENGTH+1);
msg=ep_alloc(1000);
buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 );
aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb)
aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb)
- 36 - buddyname_length );
col_append_fstr(pinfo->cinfo, COL_INFO, "from: %s", buddyname);
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
if(chat_tree) {
proto_tree_add_text(chat_tree, tvb, 31, buddyname_length,
proto_tree_add_text(chat_tree, tvb, 31, buddyname_length,
"Screen Name: %s",
format_text(buddyname, buddyname_length));
}
@ -127,15 +127,15 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot
}
static const aim_subtype aim_fnac_family_chat[] = {
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Room Info Update", NULL },
{ 0x0003, "User Join", dissect_aim_chat_userinfo_list },
{ 0x0004, "User Leave", dissect_aim_chat_userinfo_list },
{ 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg },
{ 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg },
{ 0x0007, "Evil Request", NULL },
{ 0x0008, "Evil Reply", NULL },
{ 0, NULL, NULL }
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Room Info Update", NULL },
{ 0x0003, "User Join", dissect_aim_chat_userinfo_list },
{ 0x0004, "User Leave", dissect_aim_chat_userinfo_list },
{ 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg },
{ 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg },
{ 0x0007, "Evil Request", NULL },
{ 0x0008, "Evil Reply", NULL },
{ 0, NULL, NULL }
};
/* Register the protocol with Wireshark */
@ -144,26 +144,27 @@ proto_register_aim_chat(void)
{
/* Setup list of header fields */
/*FIXME
static hf_register_info hf[] = {
};*/
#if 0 /* FIXME */
static hf_register_info hf[] = {
};
#endif
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_chat,
};
static gint *ett[] = {
&ett_aim_chat,
};
/* Register the protocol name and description */
proto_aim_chat = proto_register_protocol("AIM Chat Service", "AIM Chat", "aim_chat");
proto_aim_chat = proto_register_protocol("AIM Chat Service", "AIM Chat", "aim_chat");
/* Required function calls to register the header fields and subtrees used */
/*FIXME
proto_register_field_array(proto_aim_chat, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_aim_chat(void)
{
aim_init_family(proto_aim_chat, ett_aim_chat, FAMILY_CHAT, aim_fnac_family_chat);
aim_init_family(proto_aim_chat, ett_aim_chat, FAMILY_CHAT, aim_fnac_family_chat);
}

View File

@ -40,16 +40,16 @@
#define FAMILY_CHAT_NAV 0x000D
static const aim_subtype aim_fnac_family_chatnav[] = {
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Request Limits", NULL },
{ 0x0003, "Request Exchange", NULL },
{ 0x0004, "Request Room Information", NULL },
{ 0x0005, "Request Extended Room Information", NULL },
{ 0x0006, "Request Member List", NULL },
{ 0x0007, "Search Room", NULL },
{ 0x0008, "Create", NULL },
{ 0x0009, "Info", NULL },
{ 0, NULL, NULL }
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Request Limits", NULL },
{ 0x0003, "Request Exchange", NULL },
{ 0x0004, "Request Room Information", NULL },
{ 0x0005, "Request Extended Room Information", NULL },
{ 0x0006, "Request Member List", NULL },
{ 0x0007, "Search Room", NULL },
{ 0x0008, "Create", NULL },
{ 0x0009, "Info", NULL },
{ 0, NULL, NULL }
};
/* Initialize the protocol and registered fields */
@ -63,21 +63,22 @@ proto_register_aim_chatnav(void)
{
/* Setup list of header fields */
/*FIXME
static hf_register_info hf[] = {
};*/
#if 0 /*FIXME*/
static hf_register_info hf[] = {
};
#endif
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_chatnav,
};
static gint *ett[] = {
&ett_aim_chatnav,
};
/* Register the protocol name and description */
proto_aim_chatnav = proto_register_protocol("AIM Chat Navigation", "AIM ChatNav", "aim_chatnav");
proto_aim_chatnav = proto_register_protocol("AIM Chat Navigation", "AIM ChatNav", "aim_chatnav");
/* Required function calls to register the header fields and subtrees used */
/*FIXME
proto_register_field_array(proto_aim_chatnav, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
proto_register_subtree_array(ett, array_length(ett));
}
void

View File

@ -41,20 +41,20 @@
#define ICQ_CLI_OFFLINE_MESSAGE_REQ 0x003c
#define ICQ_CLI_DELETE_OFFLINE_MSGS 0x003e
#define ICQ_SRV_OFFLINE_MSGS 0x0041
#define ICQ_SRV_END_OF_OFFLINE_MSGS 0x0042
#define ICQ_CLI_META_INFO_REQ 0x07d0
#define ICQ_SRV_META_INFO_REPL 0x07da
#define ICQ_CLI_DELETE_OFFLINE_MSGS 0x003e
#define ICQ_SRV_OFFLINE_MSGS 0x0041
#define ICQ_SRV_END_OF_OFFLINE_MSGS 0x0042
#define ICQ_CLI_META_INFO_REQ 0x07d0
#define ICQ_SRV_META_INFO_REPL 0x07da
static const value_string aim_icq_data_types[] = {
{ ICQ_CLI_OFFLINE_MESSAGE_REQ, "Offline Message Request" },
{ ICQ_SRV_OFFLINE_MSGS, "Offline Messages Reply" },
{ ICQ_SRV_END_OF_OFFLINE_MSGS, "End Of Offline Messages Reply" },
{ ICQ_CLI_DELETE_OFFLINE_MSGS, "Delete Offline Messages Request" },
{ ICQ_CLI_META_INFO_REQ, "Metainfo Request" },
{ ICQ_SRV_META_INFO_REPL, "Metainfo Reply" },
{ 0, NULL }
{ ICQ_CLI_OFFLINE_MESSAGE_REQ, "Offline Message Request" },
{ ICQ_SRV_OFFLINE_MSGS, "Offline Messages Reply" },
{ ICQ_SRV_END_OF_OFFLINE_MSGS, "End Of Offline Messages Reply" },
{ ICQ_CLI_DELETE_OFFLINE_MSGS, "Delete Offline Messages Request" },
{ ICQ_CLI_META_INFO_REQ, "Metainfo Request" },
{ ICQ_SRV_META_INFO_REPL, "Metainfo Reply" },
{ 0, NULL }
};
@ -63,8 +63,8 @@ static int dissect_aim_tlv_value_icq(proto_item *ti, guint16 subtype, tvbuff_t *
#define TLV_ICQ_META_DATA 0x0001
static const aim_tlv icq_tlv[] = {
{ TLV_ICQ_META_DATA, "Encapsulated ICQ Meta Data", dissect_aim_tlv_value_icq },
{ 0, NULL, NULL },
{ TLV_ICQ_META_DATA, "Encapsulated ICQ Meta Data", dissect_aim_tlv_value_icq },
{ 0, NULL, NULL },
};
/* Initialize the protocol and registered fields */
@ -202,12 +202,12 @@ static int dissect_aim_icq_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
}
static const aim_subtype aim_fnac_family_icq[] = {
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "ICQ Request", dissect_aim_icq_tlv },
{ 0x0003, "ICQ Response", dissect_aim_icq_tlv },
{ 0x0006, "Auth Request", NULL },
{ 0x0007, "Auth Response", NULL },
{ 0, NULL, NULL }
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "ICQ Request", dissect_aim_icq_tlv },
{ 0x0003, "ICQ Response", dissect_aim_icq_tlv },
{ 0x0006, "Auth Request", NULL },
{ 0x0007, "Auth Response", NULL },
{ 0, NULL, NULL }
};
@ -217,43 +217,43 @@ proto_register_aim_icq(void)
{
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_icq_tlv_data_chunk_size,
{ "Data chunk size", "aim_icq.chunk_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
},
{ &hf_icq_tlv_request_owner_uid,
{ "Owner UID", "aim_icq.owner_uid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL},
},
{ &hf_icq_tlv_request_type,
{"Request Type", "aim_icq.request_type", FT_UINT16, BASE_DEC, VALS(aim_icq_data_types), 0x0, NULL, HFILL},
},
{ &hf_icq_tlv_request_seq_num,
{"Request Sequence Number", "aim_icq.request_seq_number", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL},
},
{ &hf_icq_dropped_msg_flag,
{"Dropped messages flag", "aim_icq.offline_msgs.dropped_flag", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL },
},
{ &hf_icq_meta_subtype,
{"Meta Request Subtype", "aim_icq.subtype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
},
};
static hf_register_info hf[] = {
{ &hf_icq_tlv_data_chunk_size,
{ "Data chunk size", "aim_icq.chunk_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
},
{ &hf_icq_tlv_request_owner_uid,
{ "Owner UID", "aim_icq.owner_uid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL},
},
{ &hf_icq_tlv_request_type,
{"Request Type", "aim_icq.request_type", FT_UINT16, BASE_DEC, VALS(aim_icq_data_types), 0x0, NULL, HFILL},
},
{ &hf_icq_tlv_request_seq_num,
{"Request Sequence Number", "aim_icq.request_seq_number", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL},
},
{ &hf_icq_dropped_msg_flag,
{"Dropped messages flag", "aim_icq.offline_msgs.dropped_flag", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL },
},
{ &hf_icq_meta_subtype,
{"Meta Request Subtype", "aim_icq.subtype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
},
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_icq,
&ett_aim_icq_tlv
};
static gint *ett[] = {
&ett_aim_icq,
&ett_aim_icq_tlv
};
/* Register the protocol name and description */
proto_aim_icq = proto_register_protocol("AIM ICQ", "AIM ICQ", "aim_icq");
proto_aim_icq = proto_register_protocol("AIM ICQ", "AIM ICQ", "aim_icq");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_aim_icq, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(proto_aim_icq, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_aim_icq(void)
{
aim_init_family(proto_aim_icq, ett_aim_icq, FAMILY_ICQ, aim_fnac_family_icq);
aim_init_family(proto_aim_icq, ett_aim_icq, FAMILY_ICQ, aim_fnac_family_icq);
}

View File

@ -64,19 +64,19 @@ proto_register_aim_invitation(void)
{
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_invitation,
};
static gint *ett[] = {
&ett_aim_invitation,
};
/* Register the protocol name and description */
proto_aim_invitation = proto_register_protocol("AIM Invitation Service", "AIM Invitation", "aim_invitation");
proto_aim_invitation = proto_register_protocol("AIM Invitation Service", "AIM Invitation", "aim_invitation");
/* Required function calls to register the header fields and subtrees used */
proto_register_subtree_array(ett, array_length(ett));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_aim_invitation(void)
{
aim_init_family(proto_aim_invitation, ett_aim_invitation, FAMILY_INVITATION, aim_fnac_family_invitation);
aim_init_family(proto_aim_invitation, ett_aim_invitation, FAMILY_INVITATION, aim_fnac_family_invitation);
}

View File

@ -68,9 +68,9 @@ static int dissect_aim_popup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *popu
}
static const aim_subtype aim_fnac_family_popup[] = {
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Display Popup Message Server Command" , dissect_aim_popup },
{ 0, NULL, NULL }
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Display Popup Message Server Command" , dissect_aim_popup },
{ 0, NULL, NULL }
};
@ -80,19 +80,19 @@ proto_register_aim_popup(void)
{
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_popup,
};
static gint *ett[] = {
&ett_aim_popup,
};
/* Register the protocol name and description */
proto_aim_popup = proto_register_protocol("AIM Popup", "AIM Popup", "aim_popup");
proto_aim_popup = proto_register_protocol("AIM Popup", "AIM Popup", "aim_popup");
/* Required function calls to register the header fields and subtrees used */
proto_register_subtree_array(ett, array_length(ett));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_aim_popup(void)
{
aim_init_family(proto_aim_popup, ett_aim_popup, FAMILY_POPUP, aim_fnac_family_popup);
aim_init_family(proto_aim_popup, ett_aim_popup, FAMILY_POPUP, aim_fnac_family_popup);
}

View File

@ -51,7 +51,7 @@ static int hf_aim_signon_challenge = -1;
/* Initialize the subtree pointers */
static gint ett_aim_signon = -1;
static int dissect_aim_snac_signon_logon(tvbuff_t *tvb, packet_info *pinfo,
static int dissect_aim_snac_signon_logon(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree)
{
int offset = 0;
@ -61,19 +61,19 @@ static int dissect_aim_snac_signon_logon(tvbuff_t *tvb, packet_info *pinfo,
return offset;
}
static int dissect_aim_snac_signon_logon_reply(tvbuff_t *tvb,
packet_info *pinfo,
proto_tree *tree)
static int dissect_aim_snac_signon_logon_reply(tvbuff_t *tvb,
packet_info *pinfo,
proto_tree *tree)
{
int offset = 0;
while (tvb_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_tlv(tvb, pinfo, offset, tree, client_tlvs);
}
while (tvb_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_tlv(tvb, pinfo, offset, tree, client_tlvs);
}
return offset;
}
static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree)
static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree)
{
guint8 buddyname_length = 0;
int offset = 0;
@ -90,7 +90,7 @@ static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo,
buddyname_length = aim_get_buddyname( buddyname, tvb, offset, offset + 1 );
col_append_fstr(pinfo->cinfo, COL_INFO, " Username: %s",
format_text(buddyname, buddyname_length));
format_text(buddyname, buddyname_length));
if(tree) {
offset+=dissect_aim_buddyname(tvb, pinfo, offset, tree);
@ -99,9 +99,9 @@ static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo,
return offset;
}
static int dissect_aim_snac_signon_signon_reply(tvbuff_t *tvb,
packet_info *pinfo _U_,
proto_tree *tree)
static int dissect_aim_snac_signon_signon_reply(tvbuff_t *tvb,
packet_info *pinfo _U_,
proto_tree *tree)
{
int offset = 0;
guint16 challenge_length = 0;
@ -157,13 +157,13 @@ proto_register_aim_signon(void)
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_aim_infotype,
{ "Infotype", "aim_signon.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
{ "Infotype", "aim_signon.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
},
{ &hf_aim_signon_challenge_len,
{ "Signon challenge length", "aim_signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
{ "Signon challenge length", "aim_signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
},
{ &hf_aim_signon_challenge,
{ "Signon challenge", "aim_signon.challenge", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
{ "Signon challenge", "aim_signon.challenge", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
},
};

View File

@ -141,12 +141,12 @@ static int dissect_aim_sst_buddy_up_req (tvbuff_t *tvb, packet_info *pinfo _U_,
}
static const aim_subtype aim_fnac_family_sst[] = {
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Upload Buddy Icon Request", dissect_aim_sst_buddy_up_req },
{ 0x0003, "Upload Buddy Icon Reply", dissect_aim_sst_buddy_up_repl },
{ 0x0004, "Download Buddy Icon Request", dissect_aim_sst_buddy_down_req },
{ 0x0005, "Download Buddy Icon Reply", dissect_aim_sst_buddy_down_repl },
{ 0, NULL, NULL }
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Upload Buddy Icon Request", dissect_aim_sst_buddy_up_req },
{ 0x0003, "Upload Buddy Icon Reply", dissect_aim_sst_buddy_up_repl },
{ 0x0004, "Download Buddy Icon Request", dissect_aim_sst_buddy_down_req },
{ 0x0005, "Download Buddy Icon Reply", dissect_aim_sst_buddy_down_repl },
{ 0, NULL, NULL }
};
@ -156,42 +156,42 @@ proto_register_aim_sst(void)
{
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_aim_sst_md5_hash,
static hf_register_info hf[] = {
{ &hf_aim_sst_md5_hash,
{ "MD5 Hash", "aim_sst.md5", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
},
{ &hf_aim_sst_md5_hash_size,
},
{ &hf_aim_sst_md5_hash_size,
{ "MD5 Hash Size", "aim_sst.md5.size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL },
},
{ &hf_aim_sst_unknown,
},
{ &hf_aim_sst_unknown,
{ "Unknown Data", "aim_sst.unknown", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
},
{ &hf_aim_sst_ref_num,
},
{ &hf_aim_sst_ref_num,
{ "Reference Number", "aim_sst.ref_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
},
{ &hf_aim_sst_icon_size,
},
{ &hf_aim_sst_icon_size,
{ "Icon Size", "aim_sst.icon_size", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
},
{ &hf_aim_sst_icon,
},
{ &hf_aim_sst_icon,
{ "Icon", "aim_sst.icon", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
},
};
},
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_sst,
};
static gint *ett[] = {
&ett_aim_sst,
};
/* Register the protocol name and description */
proto_aim_sst = proto_register_protocol("AIM Server Side Themes", "AIM SST", "aim_sst");
proto_aim_sst = proto_register_protocol("AIM Server Side Themes", "AIM SST", "aim_sst");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_aim_sst, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(proto_aim_sst, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_aim_sst(void)
{
aim_init_family(proto_aim_sst, ett_aim_sst, FAMILY_SST, aim_fnac_family_sst);
aim_init_family(proto_aim_sst, ett_aim_sst, FAMILY_SST, aim_fnac_family_sst);
}

View File

@ -48,8 +48,8 @@ static gint ett_aim_userlookup = -1;
static int dissect_aim_userlookup_search(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *lookup_tree)
{
proto_tree_add_item(lookup_tree, hf_aim_userlookup_email, tvb, 0, tvb_length(tvb), FALSE);
return tvb_length(tvb);
proto_tree_add_item(lookup_tree, hf_aim_userlookup_email, tvb, 0, tvb_length(tvb), FALSE);
return tvb_length(tvb);
}
@ -59,10 +59,10 @@ static int dissect_aim_userlookup_result(tvbuff_t *tvb, packet_info *pinfo, prot
}
static const aim_subtype aim_fnac_family_userlookup[] = {
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Search for user by email address", dissect_aim_userlookup_search },
{ 0x0003, "Search results", dissect_aim_userlookup_result },
{ 0, NULL, NULL }
{ 0x0001, "Error", dissect_aim_snac_error },
{ 0x0002, "Search for user by email address", dissect_aim_userlookup_search },
{ 0x0003, "Search results", dissect_aim_userlookup_result },
{ 0, NULL, NULL }
};
/* Register the protocol with Wireshark */
@ -71,26 +71,26 @@ proto_register_aim_userlookup(void)
{
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_aim_userlookup_email,
static hf_register_info hf[] = {
{ &hf_aim_userlookup_email,
{ "Email address looked for", "aim_lookup.email", FT_STRING, BASE_NONE, NULL, 0, "Email address", HFILL }
},
};
},
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_aim_userlookup,
};
static gint *ett[] = {
&ett_aim_userlookup,
};
/* Register the protocol name and description */
proto_aim_userlookup = proto_register_protocol("AIM User Lookup", "AIM User Lookup", "aim_lookup");
proto_aim_userlookup = proto_register_protocol("AIM User Lookup", "AIM User Lookup", "aim_lookup");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_aim_userlookup, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(proto_aim_userlookup, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_aim_userlookup(void)
{
aim_init_family(proto_aim_userlookup, ett_aim_userlookup, FAMILY_USERLOOKUP, aim_fnac_family_userlookup);
aim_init_family(proto_aim_userlookup, ett_aim_userlookup, FAMILY_USERLOOKUP, aim_fnac_family_userlookup);
}

File diff suppressed because it is too large Load Diff

View File

@ -87,37 +87,37 @@ void
proto_register_airopeek(void)
{
static hf_register_info hf[] = {
{ &hf_airopeek_unknown1,
{ "Unknown1", "airopeek.unknown1", FT_BYTES, BASE_NONE, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown1,
{ "Unknown1", "airopeek.unknown1", FT_BYTES, BASE_NONE, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown2,
{ "caplength1", "airopeek.unknown2", FT_UINT16, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown2,
{ "caplength1", "airopeek.unknown2", FT_UINT16, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown3,
{ "caplength2", "airopeek.unknown3", FT_UINT16, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown3,
{ "caplength2", "airopeek.unknown3", FT_UINT16, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown4,
{ "Unknown4", "airopeek.unknown4", FT_BYTES, BASE_NONE, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown4,
{ "Unknown4", "airopeek.unknown4", FT_BYTES, BASE_NONE, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown5,
{ "Unknown5", "airopeek.unknown5", FT_BYTES, BASE_NONE, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown5,
{ "Unknown5", "airopeek.unknown5", FT_BYTES, BASE_NONE, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown6,
{ "Unknown6", "airopeek.unknown6", FT_BYTES, BASE_NONE, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_unknown6,
{ "Unknown6", "airopeek.unknown6", FT_BYTES, BASE_NONE, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_timestamp,
{ "Timestamp?", "airopeek.timestamp", FT_UINT32, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_timestamp,
{ "Timestamp?", "airopeek.timestamp", FT_UINT32, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_channel,
{ "Channel", "airopeek.channel", FT_UINT8, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_airopeek_channel,
{ "Channel", "airopeek.channel", FT_UINT8, BASE_DEC, NULL,
0x0, NULL, HFILL }},
};
static gint *ett[] = {
@ -125,7 +125,7 @@ proto_register_airopeek(void)
};
proto_airopeek = proto_register_protocol(
"Airopeek encapsulated IEEE 802.11", "AIROPEEK", "airopeek");
"Airopeek encapsulated IEEE 802.11", "AIROPEEK", "airopeek");
proto_register_field_array(proto_airopeek, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}

View File

@ -225,7 +225,7 @@ static gint ett_ajp13 = -1;
typedef struct ajp13_conv_data {
int content_length;
gboolean was_get_body_chunk; /* XXX - not used */
gboolean was_get_body_chunk; /* XXX - not used */
} ajp13_conv_data;
typedef struct ajp13_frame_data {
@ -388,13 +388,12 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree, ajp13_con
}
} else if (mcode == 6) {
guint16 rlen;
rlen = tvb_get_ntohs(tvb, pos);
cd->content_length = rlen;
guint16 rlen;
rlen = tvb_get_ntohs(tvb, pos);
cd->content_length = rlen;
if (ajp13_tree)
proto_tree_add_item(ajp13_tree, hf_ajp13_rlen, tvb, pos, 2, 0);
pos+=2;
} else if ( mcode == 9 ) {

View File

@ -273,7 +273,7 @@ char_def_alphabet_ext_decode(unsigned char value)
}
}
static gunichar
static gunichar
char_def_alphabet_decode(unsigned char value)
{
if (value < GN_CHAR_ALPHABET_SIZE)
@ -322,7 +322,7 @@ decode_7_bits(tvbuff_t *tvb, guint32 *offset, guint8 num_fields, guint8 *last_oc
if (num_fields == 0)
{
return 0;
return 0;
}
/* saved_offset = *offset; */
@ -395,7 +395,7 @@ decode_7_bits(tvbuff_t *tvb, guint32 *offset, guint8 num_fields, guint8 *last_oc
buf[i] = '\0';
*last_bit = bit;
*last_oct = (bit == 1) ? oct : oct2;
return i;
return i;
}
/* PARAM FUNCTIONS */
@ -453,13 +453,13 @@ tele_param_msg_status(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset
guint8 msg_status_code;
const gchar *str = NULL;
/* Chceck if the exact length */
/* Chceck if the exact length */
EXACT_DATA_CHECK(len, 1);
/* get the status octet? */
oct = tvb_get_guint8(tvb, offset);
/* error class filter */
proto_tree_add_item(tree, hf_ansi_637_tele_msg_status,tvb, offset, 1, FALSE);
@ -483,9 +483,9 @@ tele_param_msg_status(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset
"%s : Erorr Class: %s",
ansi_637_bigbuf,
str);
msg_status_code = (oct & 0x3f);
if (error_class == 0x00){
@ -517,9 +517,9 @@ tele_param_msg_status(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset
proto_tree_add_text(tree, tvb, offset, 1,
"%s : Message status code: %s",
ansi_637_bigbuf,
str);
str);
}
if (error_class == 0x03){
switch (msg_status_code)
{
@ -557,7 +557,7 @@ tele_param_user_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
guint32 i , out_len;
const gchar *str = NULL;
/*add more translation UCS , IA5 , latin , latin \ hebrew ,gsm 7BIT*/
/*add more translation UCS , IA5 , latin , latin \ hebrew ,gsm 7BIT*/
proto_item *ucs2_item;
gchar *utf8_text = NULL;
GIConv cd;
@ -700,32 +700,32 @@ tele_param_user_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
ansi_637_bigbuf);
}
}
else if (encoding == 0x03)/* IA5 */
{
i = (num_fields * 7) - 3;
required_octs = (i / 8) + ((i % 8) ? 1 : 0);
else if (encoding == 0x03)/* IA5 */
{
i = (num_fields * 7) - 3;
required_octs = (i / 8) + ((i % 8) ? 1 : 0);
if (required_octs + used > len)
{
proto_tree_add_text(tree, tvb, offset, 1,
"Missing %d octet(s) for number of fields",
(required_octs + used) - len);
if (required_octs + used > len)
{
proto_tree_add_text(tree, tvb, offset, 1,
"Missing %d octet(s) for number of fields",
(required_octs + used) - len);
return;
}
return;
}
bit = 3;
saved_offset = offset;
out_len = decode_7_bits(tvb, &offset, num_fields, &oct, &bit, ansi_637_bigbuf);
IA5_7BIT_decode(ia5_637_bigbuf, ansi_637_bigbuf, out_len);
bit = 3;
saved_offset = offset;
out_len = decode_7_bits(tvb, &offset, num_fields, &oct, &bit, ansi_637_bigbuf);
IA5_7BIT_decode(ia5_637_bigbuf, ansi_637_bigbuf, out_len);
proto_tree_add_text(tree, tvb, saved_offset, offset - saved_offset,
"Encoded user data: %s",
ia5_637_bigbuf);
}
/*TODO UCS else if (encoding == 0x04)
{
}*/
proto_tree_add_text(tree, tvb, saved_offset, offset - saved_offset,
"Encoded user data: %s",
ia5_637_bigbuf);
}
/*TODO UCS else if (encoding == 0x04)
{
}*/
else if (encoding == 0x07)/* Latin/Hebrew */
{
saved_offset = offset - 1;
@ -733,7 +733,7 @@ tele_param_user_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
{
oct = tvb_get_guint8(tvb, saved_offset);
oct2 = tvb_get_guint8(tvb, saved_offset + 1);;
ansi_637_bigbuf[i] = ((oct & 0x07) << 5) | ((oct2 & 0xf8) >> 3);
ansi_637_bigbuf[i] = ((oct & 0x07) << 5) | ((oct2 & 0xf8) >> 3);
saved_offset++;
}
@ -774,7 +774,7 @@ tele_param_user_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
else
{
ucs2_item = proto_tree_add_text(tree, tvb, offset, num_fields, "%s", "Failed on iso-8859-1 contact Wireshark developers");
}
}
if(utf8_text)
g_free(utf8_text);
g_iconv_close(cd);
@ -2336,10 +2336,10 @@ proto_reg_handoff_ansi_637(void)
ansi_637_tele_handle = create_dissector_handle(dissect_ansi_637_tele, proto_ansi_637_tele);
ansi_637_trans_handle = create_dissector_handle(dissect_ansi_637_trans, proto_ansi_637_trans);
ansi_637_trans_app_handle = create_dissector_handle(dissect_ansi_637_trans_app, proto_ansi_637_trans);
ansi_637_trans_app_handle = create_dissector_handle(dissect_ansi_637_trans_app, proto_ansi_637_trans);
/* Dissect messages embedded in SIP */
dissector_add_string("media_type","application/vnd.3gpp2.sms", ansi_637_trans_handle);
/* Dissect messages embedded in SIP */
dissector_add_string("media_type","application/vnd.3gpp2.sms", ansi_637_trans_handle);
/*
* register for all known teleservices
* '-1' is to stop before trailing '0' entry

View File

@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -213,7 +213,7 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
after it are padding. */
proto_tree_add_uint (arcnet_tree, hf_arcnet_exception_flag, tvb, offset, 1,
split_flag);
offset++;
offset++;
proto_tree_add_text (arcnet_tree, tvb, offset, 2, "Padding");
offset += 2;
@ -224,12 +224,12 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/* And after that comes the real split flag. */
split_flag = tvb_get_guint8 (tvb, offset);
}
}
proto_tree_add_uint (arcnet_tree, hf_arcnet_split_flag, tvb, offset, 1,
split_flag);
offset++;
proto_tree_add_item (arcnet_tree, hf_arcnet_sequence, tvb, offset, 2, FALSE);
offset += 2;
@ -238,7 +238,7 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/* Set the length of the ARCNET header protocol tree item. */
proto_item_set_len(ti, offset);
next_tvb = tvb_new_subset_remaining (tvb, offset);
if (!dissector_try_port (arcnet_dissector_table, protID,
@ -260,7 +260,7 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
static void
dissect_arcnet (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
dissect_arcnet_common (tvb, pinfo, tree, FALSE, TRUE);
dissect_arcnet_common (tvb, pinfo, tree, FALSE, TRUE);
}
/*
@ -271,7 +271,7 @@ dissect_arcnet (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
static void
dissect_arcnet_linux (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
dissect_arcnet_common (tvb, pinfo, tree, TRUE, FALSE);
dissect_arcnet_common (tvb, pinfo, tree, TRUE, FALSE);
}
static const value_string arcnet_prot_id_vals[] = {

View File

@ -790,7 +790,7 @@ dissect_artnet_output(tvbuff_t *tvb, guint offset, proto_tree *tree)
offset,
length,
FALSE);
si = proto_item_add_subtree(hi, ett_artnet);
row_count = (length/global_disp_col_count) + ((length%global_disp_col_count) == 0 ? 0 : 1);
@ -820,9 +820,9 @@ dissect_artnet_output(tvbuff_t *tvb, guint offset, proto_tree *tree)
ptr += g_snprintf(ptr, (gulong)(sizeof string - strlen(string)), chan_format[global_disp_chan_val_type], v);
}
}
proto_tree_add_none_format(si,hf_artnet_output_dmx_data, tvb,
offset+(r*global_disp_col_count), c,
offset+(r*global_disp_col_count), c,
string_format[global_disp_chan_nr_type], (r*global_disp_col_count)+1, string);
ptr = string;
}
@ -1256,16 +1256,16 @@ dissect_artnet_rdm(tvbuff_t *tvb, guint offset, proto_tree *tree, packet_info *
size = tvb_reported_length_remaining(tvb, offset);
save_info=col_get_writable(pinfo->cinfo);
save_info=col_get_writable(pinfo->cinfo);
col_set_writable(pinfo->cinfo, FALSE);
if (!next_tvb)
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(rdm_handle, next_tvb, pinfo, tree);
col_set_writable(pinfo->cinfo, save_info);
size = tvb_reported_length_remaining(tvb, offset) - size;
return offset + size;
@ -1484,8 +1484,8 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
size = dissect_artnet_address( tvb, offset, si );
size -= offset;
proto_item_set_len(si, size);
}
proto_item_set_len(si, size);
}
break;
case ARTNET_OP_INPUT:
@ -1498,7 +1498,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
FALSE);
si = proto_item_add_subtree(hi, ett_artnet);
size = dissect_artnet_input( tvb, offset, si );
size -= offset;
@ -1516,11 +1516,11 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
FALSE);
si = proto_item_add_subtree(hi, ett_artnet);
size = dissect_artnet_video_setup( tvb, offset, si );
size -= offset;
proto_item_set_len(si, size);
proto_item_set_len(si, size);
}
break;
@ -1595,7 +1595,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_item_set_len(si, size);
}
break;
case ARTNET_OP_TOD_REQUEST:
if (tree) {
hi = proto_tree_add_item(artnet_tree,
@ -2665,8 +2665,8 @@ proto_register_artnet(void) {
10,&global_udp_port_artnet);
prefs_register_enum_preference(artnet_module, "dmx_disp_chan_val_type",
"DMX Display channel value type",
"The way DMX values are displayed",
"DMX Display channel value type",
"The way DMX values are displayed",
&global_disp_chan_val_type,
disp_chan_val_types, FALSE);
@ -2700,6 +2700,6 @@ proto_reg_handoff_artnet(void) {
}
udp_port_artnet = global_udp_port_artnet;
dissector_add("udp.port",global_udp_port_artnet,artnet_handle);
}

View File

@ -149,7 +149,7 @@ proto_reg_handoff_aruba_erm(void)
initialized = TRUE;
} else {
range_foreach(aruba_erm_port_range, range_delete_callback);
g_free(aruba_erm_port_range);
g_free(aruba_erm_port_range);
}
aruba_erm_port_range = range_copy(global_aruba_erm_port_range);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -119,8 +119,8 @@ dissect_ayiya(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_bits_item(ayiya_tree, hf_auth_method, tvb, 16, 4, FALSE);
proto_tree_add_bits_item(ayiya_tree, hf_opcode, tvb, 20, 4, FALSE);
proto_tree_add_uint_format(ayiya_tree, hf_next_header, tvb,
3, 1, next_header,
"Next header: %s (0x%02x)",
3, 1, next_header,
"Next header: %s (0x%02x)",
ipprotostr(next_header), next_header);
tv.secs = tvb_get_ntohl(tvb, 4);
tv.nsecs = 0;
@ -140,76 +140,76 @@ dissect_ayiya(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_ayiya(void)
{
static hf_register_info hf[] = {
{ &hf_id_len,
{ "Identity field length", "ayiya.idlen", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_id_type,
{ "Identity field type", "ayiya.idtype", FT_UINT8,
BASE_HEX, VALS(identity_types), 0x0, NULL, HFILL
}
},
{ &hf_sig_len,
{ "Signature Length", "ayiya.siglen", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_hash_method,
{ "Hash method", "ayiya.hashmethod", FT_UINT8,
BASE_HEX, VALS(hash_methods), 0x0, NULL, HFILL
}
},
{ &hf_auth_method,
{ "Authentication method", "ayiya.authmethod", FT_UINT8,
BASE_HEX, VALS(auth_methods), 0x0, NULL, HFILL
}
},
{ &hf_opcode,
{ "Operation Code", "ayiya.opcode", FT_UINT8,
BASE_HEX, VALS(opcodes), 0x0, NULL, HFILL
}
},
{ &hf_next_header,
{ "Next Header", "ayiya.nextheader", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_epoch,
{ "Epoch", "ayiya.epoch", FT_ABSOLUTE_TIME,
ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL
}
},
{ &hf_identity,
{ "Identity", "ayiya.identity", FT_BYTES,
BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
{ &hf_signature,
{ "Signature", "ayiya.signature", FT_BYTES,
BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
};
static gint *ett[] = {
&ett_ayiya,
};
static hf_register_info hf[] = {
{ &hf_id_len,
{ "Identity field length", "ayiya.idlen", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_id_type,
{ "Identity field type", "ayiya.idtype", FT_UINT8,
BASE_HEX, VALS(identity_types), 0x0, NULL, HFILL
}
},
{ &hf_sig_len,
{ "Signature Length", "ayiya.siglen", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_hash_method,
{ "Hash method", "ayiya.hashmethod", FT_UINT8,
BASE_HEX, VALS(hash_methods), 0x0, NULL, HFILL
}
},
{ &hf_auth_method,
{ "Authentication method", "ayiya.authmethod", FT_UINT8,
BASE_HEX, VALS(auth_methods), 0x0, NULL, HFILL
}
},
{ &hf_opcode,
{ "Operation Code", "ayiya.opcode", FT_UINT8,
BASE_HEX, VALS(opcodes), 0x0, NULL, HFILL
}
},
{ &hf_next_header,
{ "Next Header", "ayiya.nextheader", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_epoch,
{ "Epoch", "ayiya.epoch", FT_ABSOLUTE_TIME,
ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL
}
},
{ &hf_identity,
{ "Identity", "ayiya.identity", FT_BYTES,
BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
{ &hf_signature,
{ "Signature", "ayiya.signature", FT_BYTES,
BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
};
static gint *ett[] = {
&ett_ayiya,
};
proto_ayiya = proto_register_protocol("Anything in Anything Protocol",
"AYIYA", "ayiya");
register_dissector("ayiya", dissect_ayiya, proto_ayiya);
proto_register_field_array(proto_ayiya, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_ayiya = proto_register_protocol("Anything in Anything Protocol",
"AYIYA", "ayiya");
register_dissector("ayiya", dissect_ayiya, proto_ayiya);
proto_register_field_array(proto_ayiya, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_ayiya(void)
{
dissector_handle_t ayiya_handle;
dissector_handle_t ayiya_handle;
ayiya_handle = find_dissector("ayiya");
dissector_add("udp.port", UDP_PORT_AYIYA, ayiya_handle);
ip_dissector_table = find_dissector_table("ip.proto");
ayiya_handle = find_dissector("ayiya");
dissector_add("udp.port", UDP_PORT_AYIYA, ayiya_handle);
ip_dissector_table = find_dissector_table("ip.proto");
}

View File

@ -3900,11 +3900,11 @@ static const fragment_items msg_frag_items = {
/* if BACnet uses the reserved values, then patch the corresponding values here, maximum 16 values are defined */
static const guint MaxAPDUSize [] = { 50,128,206,480,1024,1476 };
static guint
static guint
fGetMaxAPDUSize(guint8 idx)
{
/* only 16 values are defined, so use & 0x0f */
/* check the size of the Array, deliver either the entry
/* check the size of the Array, deliver either the entry
or the first entry if idx is outside of the array (bug 3736 comment#7) */
if ((idx & 0x0f) >= (gint)(sizeof(MaxAPDUSize)/sizeof(guint)))
return MaxAPDUSize[0];
@ -4384,9 +4384,9 @@ fWeekNDay (tvbuff_t *tvb, proto_tree *tree, guint offset)
weekOfMonth = tvb_get_guint8(tvb, offset+tag_len+1);
dayOfWeek = tvb_get_guint8(tvb, offset+tag_len+2);
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len, "%s %s, %s",
val_to_str(month, months, "month (%d) not found"),
val_to_str(weekOfMonth, weekofmonth, "week of month (%d) not found"),
val_to_str(dayOfWeek, day_of_week, "day of week (%d) not found"));
val_to_str(month, months, "month (%d) not found"),
val_to_str(weekOfMonth, weekofmonth, "week of month (%d) not found"),
val_to_str(dayOfWeek, day_of_week, "day of week (%d) not found"));
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
fTagHeaderTree(tvb, subtree, offset, &tag_no, &tag_info, &lvt);
@ -4505,17 +4505,17 @@ fTimeValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
static guint
fCalendaryEntry (tvbuff_t *tvb, proto_tree *tree, guint offset)
{
guint8 tag_no, tag_info;
guint32 lvt;
guint8 tag_no, tag_info;
guint32 lvt;
switch (fTagNo(tvb, offset)) {
case 0: /* Date */
offset = fDate (tvb, tree, offset, "Date: ");
break;
case 1: /* dateRange */
offset += fTagHeaderTree(tvb, tree, offset, &tag_no, &tag_info, &lvt);
offset += fTagHeaderTree(tvb, tree, offset, &tag_no, &tag_info, &lvt);
offset = fDateRange (tvb, tree, offset);
offset += fTagHeaderTree(tvb, tree, offset, &tag_no, &tag_info, &lvt);
offset += fTagHeaderTree(tvb, tree, offset, &tag_no, &tag_info, &lvt);
break;
case 2: /* BACnetWeekNDay */
offset = fWeekNDay (tvb, tree, offset);
@ -4559,10 +4559,10 @@ static guint fTimeStamp (tvbuff_t *tvb, proto_tree *tree,
static guint
fClientCOV (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
{
if (tvb_reported_length_remaining(tvb, offset) > 0) {
offset = fApplicationTypes(tvb,pinfo,tree,offset, "increment: ");
}
return offset;
if (tvb_reported_length_remaining(tvb, offset) > 0) {
offset = fApplicationTypes(tvb,pinfo,tree,offset, "increment: ");
}
return offset;
}
static const value_string
@ -4875,7 +4875,7 @@ fActionList (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
if (tag_is_opening(tag_info)) {
ti = proto_tree_add_text(tree, tvb, offset, 1, "Action List");
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
offset += fTagHeaderTree (tvb, subtree, offset,
offset += fTagHeaderTree (tvb, subtree, offset,
&tag_no, &tag_info, &lvt);
}
switch (tag_no) {
@ -5280,7 +5280,7 @@ fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
/* Application Tags */
switch (propertyIdentifier) {
case 2: /* action */
/* loop object is application tagged,
/* loop object is application tagged,
command object is context tagged */
if (tag_is_context_specific(tag_info)) {
/* BACnetActionList */
@ -5421,19 +5421,19 @@ fPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
guint32 lvt;
if (tag_is_opening(tag_info)) {
offset += fTagHeaderTree(tvb, tree, offset,
offset += fTagHeaderTree(tvb, tree, offset,
&tag_no, &tag_info, &lvt);
offset = fAbstractSyntaxNType (tvb, pinfo, tree, offset);
if (tvb_length_remaining(tvb, offset) > 0) {
offset += fTagHeaderTree(tvb, tree, offset,
offset += fTagHeaderTree(tvb, tree, offset,
&tag_no, &tag_info, &lvt);
}
} else {
proto_tree_add_text(tree, tvb, offset, tvb_length(tvb) - offset,
proto_tree_add_text(tree, tvb, offset, tvb_length(tvb) - offset,
"expected Opening Tag!"); \
offset = tvb_length(tvb);
}
return offset;
}
@ -5652,10 +5652,10 @@ fTimeSynchronizationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset)
static guint
fDateRange (tvbuff_t *tvb, proto_tree *tree, guint offset)
{
if (tvb_reported_length_remaining(tvb, offset) <= 0)
return offset;
offset = fDate (tvb,tree,offset,"Start Date: ");
return fDate (tvb, tree, offset, "End Date: ");
if (tvb_reported_length_remaining(tvb, offset) <= 0)
return offset;
offset = fDate (tvb,tree,offset,"Start Date: ");
return fDate (tvb, tree, offset, "End Date: ");
}
static guint
@ -6358,7 +6358,7 @@ fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset)
break;
case 1: /* change-of-state */
while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) { /* exit loop if nothing happens inside */
lastoffset = offset;
lastoffset = offset;
switch (fTagNo(tvb, offset)) {
case 0:
offset = fTimeSpan (tvb, tree, offset, "Time Delay");
@ -6374,7 +6374,7 @@ fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset)
break;
case 2: /* change-of-value */
while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) { /* exit loop if nothing happens inside */
lastoffset = offset;
lastoffset = offset;
switch (fTagNo(tvb, offset)) {
case 0:
offset = fTimeSpan (tvb, tree, offset, "Time Delay");
@ -6398,7 +6398,7 @@ fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset)
break;
case 3: /* command-failure */
while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) { /* exit loop if nothing happens inside */
lastoffset = offset;
lastoffset = offset;
switch (fTagNo(tvb, offset)) {
case 0:
offset = fTimeSpan (tvb, tree, offset, "Time Delay");
@ -6412,7 +6412,7 @@ fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset)
break;
case 4: /* floating-limit */
while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) { /* exit loop if nothing happens inside */
lastoffset = offset;
lastoffset = offset;
switch (fTagNo(tvb, offset)) {
case 0:
offset = fTimeSpan (tvb, tree, offset, "Time Delay");
@ -7461,12 +7461,12 @@ fSpecialEvent (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint off
switch (tag_no) {
case 0: /* calendaryEntry */
if (tag_is_opening(tag_info))
{
if (tag_is_opening(tag_info))
{
offset += fTagHeaderTree (tvb, subtree, offset, &tag_no, &tag_info, &lvt);
offset = fCalendaryEntry (tvb, subtree, offset);
offset = fCalendaryEntry (tvb, subtree, offset);
offset += fTagHeaderTree (tvb, subtree, offset, &tag_no, &tag_info, &lvt);
}
}
break;
case 1: /* calendarReference */
offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
@ -8323,12 +8323,12 @@ fSegmentAckPDU(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *bacapp_tree, g
static guint fContextTaggedError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
{
guint8 tag_info = 0;
guint8 parsed_tag = 0;
guint32 lvt = 0;
offset += fTagHeaderTree(tvb, tree, offset, &parsed_tag, &tag_info, &lvt);
offset = fError(tvb, pinfo, tree, offset);
return offset + fTagHeaderTree(tvb, tree, offset, &parsed_tag, &tag_info, &lvt);
guint8 tag_info = 0;
guint8 parsed_tag = 0;
guint32 lvt = 0;
offset += fTagHeaderTree(tvb, tree, offset, &parsed_tag, &tag_info, &lvt);
offset = fError(tvb, pinfo, tree, offset);
return offset + fTagHeaderTree(tvb, tree, offset, &parsed_tag, &tag_info, &lvt);
}
static guint
@ -8356,7 +8356,7 @@ fConfirmedPrivateTransferError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
break;
case 3: /* errorParameters */
if (tag_is_opening(tag_info)) {
tt = proto_tree_add_text(subtree, tvb, offset, 1,
tt = proto_tree_add_text(subtree, tvb, offset, 1,
"error Parameters");
subtree = proto_item_add_subtree(tt, ett_bacapp_value);
propertyIdentifier = -1;
@ -8457,36 +8457,36 @@ fWritePropertyMultipleError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static guint
fError (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
{
offset = fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
"error Class: ", BACnetErrorClass, 64);
return fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
"error Code: ", BACnetErrorCode, 256);
offset = fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
"error Class: ", BACnetErrorClass, 64);
return fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
"error Code: ", BACnetErrorCode, 256);
}
static guint
fBACnetError (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint service)
{
switch (service) {
case 8: /* no break here !!!! */
case 9:
offset = fChangeListError (tvb, pinfo, tree, offset);
break;
case 10:
offset = fCreateObjectError (tvb, pinfo, tree, offset);
break;
case 16:
offset = fWritePropertyMultipleError (tvb, pinfo, tree, offset);
break;
case 18:
offset = fConfirmedPrivateTransferError (tvb,pinfo,tree,offset);
break;
case 22:
offset = fVTCloseError (tvb, pinfo, tree, offset);
break;
default:
return fError (tvb, pinfo, tree, offset);
}
return offset;
switch (service) {
case 8: /* no break here !!!! */
case 9:
offset = fChangeListError (tvb, pinfo, tree, offset);
break;
case 10:
offset = fCreateObjectError (tvb, pinfo, tree, offset);
break;
case 16:
offset = fWritePropertyMultipleError (tvb, pinfo, tree, offset);
break;
case 18:
offset = fConfirmedPrivateTransferError (tvb,pinfo,tree,offset);
break;
case 22:
offset = fVTCloseError (tvb, pinfo, tree, offset);
break;
default:
return fError (tvb, pinfo, tree, offset);
}
return offset;
}
static guint
@ -8717,7 +8717,7 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tree, proto_bacapp, tvb, offset, -1, FALSE);
bacapp_tree = proto_item_add_subtree(ti, ett_bacapp);
if (!fragment)
offset = do_the_dissection(tvb,pinfo,bacapp_tree);
}
@ -9027,47 +9027,47 @@ fConvertXXXtoUTF8 (gchar *in, gsize *inbytesleft, gchar *out, gsize *outbyteslef
static void
uni_to_string(char * data, gsize str_length, char *dest_buf)
{
gint i;
guint16 c_char;
gsize length_remaining = 0;
gint i;
guint16 c_char;
gsize length_remaining = 0;
length_remaining = str_length;
dest_buf[0] = '\0';
if(str_length == 0)
{
return;
}
for ( i = 0; i < (gint) str_length; i++ )
{
c_char = data[i];
if (c_char<0x20 || c_char>0x7e)
{
if (c_char != 0x00)
{
c_char = '.';
dest_buf[i] = c_char & 0xff;
}
else
{
i--;
str_length--;
}
}
else
{
dest_buf[i] = c_char & 0xff;
}
length_remaining--;
length_remaining = str_length;
dest_buf[0] = '\0';
if(str_length == 0)
{
return;
}
for ( i = 0; i < (gint) str_length; i++ )
{
c_char = data[i];
if (c_char<0x20 || c_char>0x7e)
{
if (c_char != 0x00)
{
c_char = '.';
dest_buf[i] = c_char & 0xff;
}
else
{
i--;
str_length--;
}
}
else
{
dest_buf[i] = c_char & 0xff;
}
length_remaining--;
if(length_remaining==0)
{
dest_buf[i+1] = '\0';
return;
}
}
if (i < 0) {
i = 0;
}
dest_buf[i] = '\0';
return;
if(length_remaining==0)
{
dest_buf[i+1] = '\0';
return;
}
}
if (i < 0) {
i = 0;
}
dest_buf[i] = '\0';
return;
}

View File

@ -203,7 +203,7 @@ static gint ett_bfd_auth = -1;
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | ... |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
*
* The format for Keyed MD5 and Meticulous Keyed MD5 authentication is:
* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@ -230,27 +230,28 @@ static gint ett_bfd_auth = -1;
* | ... |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
*
*
*/
/* Given the type of authentication being used, return the required length of
* the authentication header
*/
static guint8 get_bfd_required_auth_len(guint8 auth_type)
static guint8 get_bfd_required_auth_len(guint8 auth_type)
{
guint8 auth_len = 0;
switch (auth_type) {
case BFD_AUTH_MD5:
case BFD_AUTH_MET_MD5:
auth_len = MD5_AUTH_LEN;
break;
case BFD_AUTH_SHA1:
case BFD_AUTH_MET_SHA1:
auth_len = SHA1_AUTH_LEN;
break;
default:
break;
case BFD_AUTH_MD5:
case BFD_AUTH_MET_MD5:
auth_len = MD5_AUTH_LEN;
break;
case BFD_AUTH_SHA1:
case BFD_AUTH_MET_SHA1:
auth_len = SHA1_AUTH_LEN;
break;
default:
break;
}
return auth_len;
}
@ -258,20 +259,20 @@ static guint8 get_bfd_required_auth_len(guint8 auth_type)
/* Given the type of authentication being used, return the length of
* checksum field
*/
static guint8 get_bfd_checksum_len(guint8 auth_type)
static guint8 get_bfd_checksum_len(guint8 auth_type)
{
guint8 checksum_len = 0;
switch (auth_type) {
case BFD_AUTH_MD5:
case BFD_AUTH_MET_MD5:
checksum_len = MD5_CHECKSUM_LEN;
break;
case BFD_AUTH_SHA1:
case BFD_AUTH_MET_SHA1:
checksum_len = SHA1_CHECKSUM_LEN;
break;
default:
break;
case BFD_AUTH_MD5:
case BFD_AUTH_MET_MD5:
checksum_len = MD5_CHECKSUM_LEN;
break;
case BFD_AUTH_SHA1:
case BFD_AUTH_MET_SHA1:
checksum_len = SHA1_CHECKSUM_LEN;
break;
default:
break;
}
return checksum_len;
}
@ -301,7 +302,7 @@ static void dissect_bfd_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_
proto_tree_add_item(auth_tree, hf_bfd_auth_key, tvb, offset + 2, 1, FALSE);
switch (auth_type) {
case BFD_AUTH_SIMPLE:
case BFD_AUTH_SIMPLE:
password = tvb_get_ephemeral_string(tvb, offset+3, auth_len-3);
proto_tree_add_string(auth_tree, hf_bfd_auth_password, tvb, offset+3,
auth_len-3, password);
@ -360,31 +361,31 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
proto_tree *bfd_flags_tree;
const char *sep;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BFD Control");
col_clear(pinfo->cinfo, COL_INFO);
bfd_version = ((tvb_get_guint8(tvb, 0) & 0xe0) >> 5);
bfd_diag = (tvb_get_guint8(tvb, 0) & 0x1f);
switch (bfd_version) {
case 0:
bfd_flags = tvb_get_guint8(tvb, 1 );
bfd_flags_h = (tvb_get_guint8(tvb, 1) & 0x80);
bfd_flags_d_v0 = (tvb_get_guint8(tvb, 1) & 0x40);
bfd_flags_p_v0 = (tvb_get_guint8(tvb, 1) & 0x20);
bfd_flags_f_v0 = (tvb_get_guint8(tvb, 1) & 0x10);
break;
case 1:
default:
bfd_sta = (tvb_get_guint8(tvb, 1) & 0xc0);
bfd_flags = (tvb_get_guint8(tvb, 1) & 0x3e);
bfd_flags_p = (tvb_get_guint8(tvb, 1) & 0x20);
bfd_flags_f = (tvb_get_guint8(tvb, 1) & 0x10);
bfd_flags_c = (tvb_get_guint8(tvb, 1) & 0x08);
bfd_flags_a = (tvb_get_guint8(tvb, 1) & 0x04);
bfd_flags_d = (tvb_get_guint8(tvb, 1) & 0x02);
bfd_flags_m = (tvb_get_guint8(tvb, 1) & 0x01);
break;
case 0:
bfd_flags = tvb_get_guint8(tvb, 1 );
bfd_flags_h = (tvb_get_guint8(tvb, 1) & 0x80);
bfd_flags_d_v0 = (tvb_get_guint8(tvb, 1) & 0x40);
bfd_flags_p_v0 = (tvb_get_guint8(tvb, 1) & 0x20);
bfd_flags_f_v0 = (tvb_get_guint8(tvb, 1) & 0x10);
break;
case 1:
default:
bfd_sta = (tvb_get_guint8(tvb, 1) & 0xc0);
bfd_flags = (tvb_get_guint8(tvb, 1) & 0x3e);
bfd_flags_p = (tvb_get_guint8(tvb, 1) & 0x20);
bfd_flags_f = (tvb_get_guint8(tvb, 1) & 0x10);
bfd_flags_c = (tvb_get_guint8(tvb, 1) & 0x08);
bfd_flags_a = (tvb_get_guint8(tvb, 1) & 0x04);
bfd_flags_d = (tvb_get_guint8(tvb, 1) & 0x02);
bfd_flags_m = (tvb_get_guint8(tvb, 1) & 0x01);
break;
}
bfd_detect_time_multiplier = tvb_get_guint8(tvb, 2);
bfd_length = tvb_get_guint8(tvb, 3);
@ -397,18 +398,18 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
if (check_col(pinfo->cinfo, COL_INFO)) {
switch (bfd_version) {
case 0:
col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, Flags: 0x%02x",
val_to_str(bfd_diag, bfd_control_v0_diag_values, "UNKNOWN"),
bfd_flags);
break;
case 1:
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, State: %s, Flags: 0x%02x",
val_to_str(bfd_diag, bfd_control_v1_diag_values, "UNKNOWN"),
val_to_str(bfd_sta >> 6 , bfd_control_sta_values, "UNKNOWN"),
bfd_flags);
break;
case 0:
col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, Flags: 0x%02x",
val_to_str(bfd_diag, bfd_control_v0_diag_values, "UNKNOWN"),
bfd_flags);
break;
case 1:
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, State: %s, Flags: 0x%02x",
val_to_str(bfd_diag, bfd_control_v1_diag_values, "UNKNOWN"),
val_to_str(bfd_sta >> 6 , bfd_control_sta_values, "UNKNOWN"),
bfd_flags);
break;
}
}
@ -425,57 +426,57 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
1, bfd_diag);
switch (bfd_version) {
case 0:
break;
case 1:
default:
proto_tree_add_uint(bfd_tree, hf_bfd_sta, tvb, 1,
1, bfd_sta);
break;
case 0:
break;
case 1:
default:
proto_tree_add_uint(bfd_tree, hf_bfd_sta, tvb, 1,
1, bfd_sta);
break;
}
switch (bfd_version) {
case 0:
ti = proto_tree_add_text ( bfd_tree, tvb, 1, 1, "Message Flags: 0x%02x",
bfd_flags);
bfd_flags_tree = proto_item_add_subtree(ti, ett_bfd_flags);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_h, tvb, 1, 1, bfd_flags_h);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_d_v0, tvb, 1, 1, bfd_flags_d_v0);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_p_v0, tvb, 1, 1, bfd_flags_p_v0);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_f_v0, tvb, 1, 1, bfd_flags_f_v0);
case 0:
ti = proto_tree_add_text ( bfd_tree, tvb, 1, 1, "Message Flags: 0x%02x",
bfd_flags);
bfd_flags_tree = proto_item_add_subtree(ti, ett_bfd_flags);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_h, tvb, 1, 1, bfd_flags_h);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_d_v0, tvb, 1, 1, bfd_flags_d_v0);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_p_v0, tvb, 1, 1, bfd_flags_p_v0);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_f_v0, tvb, 1, 1, bfd_flags_f_v0);
sep = initial_sep;
APPEND_BOOLEAN_FLAG(bfd_flags_h, ti, "%sH");
APPEND_BOOLEAN_FLAG(bfd_flags_d_v0, ti, "%sD");
APPEND_BOOLEAN_FLAG(bfd_flags_p_v0, ti, "%sP");
APPEND_BOOLEAN_FLAG(bfd_flags_f_v0, ti, "%sF");
if (sep != initial_sep) {
proto_item_append_text (ti, ")");
}
break;
case 1:
default:
ti = proto_tree_add_text ( bfd_tree, tvb, 1, 1, "Message Flags: 0x%02x",
bfd_flags);
bfd_flags_tree = proto_item_add_subtree(ti, ett_bfd_flags);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_p, tvb, 1, 1, bfd_flags_p);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_f, tvb, 1, 1, bfd_flags_f);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_c, tvb, 1, 1, bfd_flags_c);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_a, tvb, 1, 1, bfd_flags_a);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_d, tvb, 1, 1, bfd_flags_d);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_m, tvb, 1, 1, bfd_flags_m);
sep = initial_sep;
APPEND_BOOLEAN_FLAG(bfd_flags_h, ti, "%sH");
APPEND_BOOLEAN_FLAG(bfd_flags_d_v0, ti, "%sD");
APPEND_BOOLEAN_FLAG(bfd_flags_p_v0, ti, "%sP");
APPEND_BOOLEAN_FLAG(bfd_flags_f_v0, ti, "%sF");
if (sep != initial_sep) {
proto_item_append_text (ti, ")");
}
break;
case 1:
default:
ti = proto_tree_add_text ( bfd_tree, tvb, 1, 1, "Message Flags: 0x%02x",
bfd_flags);
bfd_flags_tree = proto_item_add_subtree(ti, ett_bfd_flags);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_p, tvb, 1, 1, bfd_flags_p);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_f, tvb, 1, 1, bfd_flags_f);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_c, tvb, 1, 1, bfd_flags_c);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_a, tvb, 1, 1, bfd_flags_a);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_d, tvb, 1, 1, bfd_flags_d);
proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_m, tvb, 1, 1, bfd_flags_m);
sep = initial_sep;
APPEND_BOOLEAN_FLAG(bfd_flags_p, ti, "%sP");
APPEND_BOOLEAN_FLAG(bfd_flags_f, ti, "%sF");
APPEND_BOOLEAN_FLAG(bfd_flags_c, ti, "%sC");
APPEND_BOOLEAN_FLAG(bfd_flags_a, ti, "%sA");
APPEND_BOOLEAN_FLAG(bfd_flags_d, ti, "%sD");
APPEND_BOOLEAN_FLAG(bfd_flags_m, ti, "%sM");
if (sep != initial_sep) {
proto_item_append_text (ti, ")");
}
break;
sep = initial_sep;
APPEND_BOOLEAN_FLAG(bfd_flags_p, ti, "%sP");
APPEND_BOOLEAN_FLAG(bfd_flags_f, ti, "%sF");
APPEND_BOOLEAN_FLAG(bfd_flags_c, ti, "%sC");
APPEND_BOOLEAN_FLAG(bfd_flags_a, ti, "%sA");
APPEND_BOOLEAN_FLAG(bfd_flags_d, ti, "%sD");
APPEND_BOOLEAN_FLAG(bfd_flags_m, ti, "%sM");
if (sep != initial_sep) {
proto_item_append_text (ti, ")");
}
break;
}
proto_tree_add_uint_format_value(bfd_tree, hf_bfd_detect_time_multiplier, tvb, 2,
@ -486,7 +487,7 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
proto_tree_add_uint_format_value(bfd_tree, hf_bfd_message_length, tvb, 3, 1, bfd_length,
"%u bytes", bfd_length);
proto_tree_add_uint(bfd_tree, hf_bfd_my_discriminator, tvb, 4,
4, bfd_my_discriminator);
@ -577,13 +578,13 @@ void proto_register_bfd(void)
{ &hf_bfd_flags_p,
{ "Poll", "bfd.flags.p",
FT_BOOLEAN, 6, TFS(&tfs_set_notset), 0x20,
"If set, the transmitting system is expecting a packet with the Final (F) bit in reply",
"If set, the transmitting system is expecting a packet with the Final (F) bit in reply",
HFILL }
},
{ &hf_bfd_flags_f,
{ "Final", "bfd.flags.f",
FT_BOOLEAN, 6, TFS(&tfs_set_notset), 0x10,
"If set, the transmitting system is replying to a packet with the Poll (P) bit set",
"If set, the transmitting system is replying to a packet with the Poll (P) bit set",
HFILL }
},
{ &hf_bfd_flags_c,

View File

@ -1342,7 +1342,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
/* otherwise, it's opaque data */
}
break;
case 97: /* Client Identifier (UUID) */
if (optlen > 0)
byte = tvb_get_guint8(tvb, optoff);
@ -2074,7 +2074,7 @@ bootp_dhcp_decode_agent_info(proto_tree *v_tree, tvbuff_t *tvb, int optoff,
proto_item *vti;
proto_tree *subtree = 0;
guint8 tag, tag_len;
subopt = tvb_get_guint8(tvb, optoff);
suboptoff++;
@ -2395,7 +2395,7 @@ rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fix
fixpoint->latitude = (((gint64)lci[0] & 3)<<32) | ((gint64)lci[1]<<24) |
((gint64)lci[2]<<16) | ((gint64)lci[3]<<8) |
(gint64)lci[4] | ((gint64)0x3FFFFFFF<<34);
} else {
/* Latitude is positive */
fixpoint->latitude = (((gint64)lci[0] & 3)<<32) | ((gint64)lci[1]<<24) |
@ -2408,7 +2408,7 @@ rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fix
fixpoint->longitude = (((gint64)lci[5] & 3)<<32) | ((gint64)lci[6]<<24) |
((gint64)lci[7]<<16) | ((gint64)lci[8]<<8) |
(gint64)lci[9] | ((gint64)0x3FFFFFFF<<34);
} else {
/* Longitude is positive */
fixpoint->longitude = (((gint64)lci[5] & 3)<<32) | ((gint64)lci[6]<<24) |
@ -2422,7 +2422,7 @@ rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fix
fixpoint->altitude = (((gint32)lci[11] & 0x3F)<<24) | ((gint32)lci[12]<<16) |
((gint32)lci[13]<<8) | ((gint32)lci[14]) |
((gint32)0x03<<30);
} else {
/* Altitudee is positive */
fixpoint->altitude = (((gint32)lci[11] & 0x3F)<<24) | ((gint32)lci[12]<<16) |
@ -2994,7 +2994,7 @@ dissect_vendor_cl_suboption(proto_tree *v_tree, tvbuff_t *tvb,
tvb_bytes_to_str(tvb, suboptoff, subopt_len),
subopt_len, plurality(subopt_len, "", "s"));
break;
case ipv4_list:
ti = proto_tree_add_text(v_tree, tvb, optoff, 2,
"Suboption %d %s", subopt, o125_cl_opt[subopt].text);
@ -4581,7 +4581,7 @@ proto_register_bootp(void)
/* register init routine to setup the custom bootp options */
register_init_routine(&bootp_init_protocol);
/* Allow dissector to find be found by name. */
register_dissector("bootp", dissect_bootp, proto_bootp);

View File

@ -160,8 +160,8 @@ static dissector_handle_t gmrp_handle;
static dissector_handle_t data_handle;
static const value_string protocol_id_vals[] = {
{ 0, "Spanning Tree Protocol" },
{ 0, NULL }
{ 0, "Spanning Tree Protocol" },
{ 0, NULL }
};
#define BPDU_TYPE_CONF 0x00 /* STP Configuration BPDU */
@ -169,10 +169,10 @@ static const value_string protocol_id_vals[] = {
#define BPDU_TYPE_TOPOLOGY_CHANGE 0x80 /* STP TCN (Topology change notify) BPDU */
static const value_string bpdu_type_vals[] = {
{ BPDU_TYPE_CONF, "Configuration" },
{ BPDU_TYPE_RST, "Rapid/Multiple Spanning Tree" },
{ BPDU_TYPE_TOPOLOGY_CHANGE, "Topology Change Notification" },
{ 0, NULL }
{ BPDU_TYPE_CONF, "Configuration" },
{ BPDU_TYPE_RST, "Rapid/Multiple Spanning Tree" },
{ BPDU_TYPE_TOPOLOGY_CHANGE, "Topology Change Notification" },
{ 0, NULL }
};
#define PROTO_VERSION_STP 0
@ -184,27 +184,27 @@ static const value_string bpdu_type_vals[] = {
#define MSTI_FORMAT_ALTERNATIVE 2
static const value_string version_id_vals[] = {
{ PROTO_VERSION_STP, "Spanning Tree" },
{ PROTO_VERSION_RSTP, "Rapid Spanning Tree" },
{ PROTO_VERSION_MSTP, "Multiple Spanning Tree" },
{ 0, NULL}
{ PROTO_VERSION_STP, "Spanning Tree" },
{ PROTO_VERSION_RSTP, "Rapid Spanning Tree" },
{ PROTO_VERSION_MSTP, "Multiple Spanning Tree" },
{ 0, NULL}
};
static const value_string role_vals[] = {
{ 1, "Alternate or Backup" },
{ 2, "Root" },
{ 3, "Designated" },
{ 0, NULL }
{ 1, "Alternate or Backup" },
{ 2, "Root" },
{ 3, "Designated" },
{ 0, NULL }
};
static const char initial_sep[] = " (";
static const char cont_sep[] = ", ";
#define APPEND_BOOLEAN_FLAG(flag, item, string) \
if(flag){ \
if(item) \
proto_item_append_text(item, string, sep); \
sep = cont_sep; \
}
#define APPEND_BOOLEAN_FLAG(flag, item, string) \
if(flag){ \
if(item) \
proto_item_append_text(item, string, sep); \
sep = cont_sep; \
}
static void
dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@ -241,7 +241,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 msti_bridge_identifier_priority, msti_port_identifier_priority;
const guint8 *msti_bridge_identifier_mac;
gchar *msti_bridge_identifier_mac_str;
int total_msti_length, offset, msti, msti_format;
int total_msti_length, offset, msti, msti_format;
proto_tree *bpdu_tree;
proto_tree *mstp_tree, *msti_tree;
@ -655,14 +655,14 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
msti_format = MSTI_FORMAT_UNKNOWN;
total_msti_length = 0;
}
}
set_actual_length(tvb, BPDU_MSTI + total_msti_length);
mstp_item = proto_tree_add_text(bpdu_tree, tvb, BPDU_VERSION_3_LENGTH,
-1, "MST Extension");
mstp_tree = proto_item_add_subtree(mstp_item, ett_mstp);
proto_tree_add_item(mstp_tree, hf_bpdu_mst_config_format_selector, tvb,
BPDU_MST_CONFIG_FORMAT_SELECTOR, 1, FALSE);
proto_tree_add_item(mstp_tree, hf_bpdu_mst_config_name, tvb,
@ -864,7 +864,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(msti_tree, hf_bpdu_msti_port_identifier_priority, tvb,
offset+MSTI_PORT_IDENTIFIER_PRIORITY, 1,
msti_port_identifier_priority);
proto_tree_add_item(msti_tree, hf_bpdu_msti_remaining_hops, tvb,
offset + MSTI_REMAINING_HOPS, 1, FALSE);
@ -957,7 +957,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
msti_port_identifier_priority = tvb_get_ntohs(tvb, offset+ALT_MSTI_PORT_IDENTIFIER);
proto_tree_add_uint(msti_tree, hf_bpdu_msti_port_id, tvb,
offset+ALT_MSTI_PORT_IDENTIFIER, 2, msti_port_identifier_priority);
proto_tree_add_item(msti_tree, hf_bpdu_msti_remaining_hops, tvb,
offset + ALT_MSTI_REMAINING_HOPS, 1, FALSE);

View File

@ -47,21 +47,21 @@
#define BRDWLK_HAS_PLEN 0x1
#define FCM_DELIM_SOFC1 0x01
#define FCM_DELIM_SOFI1 0x02
#define FCM_DELIM_SOFI2 0x04
#define FCM_DELIM_SOFI3 0x06
#define FCM_DELIM_SOFN1 0x03
#define FCM_DELIM_SOFN2 0x05
#define FCM_DELIM_SOFN3 0x07
#define FCM_DELIM_SOFF 0x08
#define FCM_DELIM_SOFI1 0x02
#define FCM_DELIM_SOFI2 0x04
#define FCM_DELIM_SOFI3 0x06
#define FCM_DELIM_SOFN1 0x03
#define FCM_DELIM_SOFN2 0x05
#define FCM_DELIM_SOFN3 0x07
#define FCM_DELIM_SOFF 0x08
#define FCM_DELIM_SOFC4 0x09
#define FCM_DELIM_SOFI4 0x0A
#define FCM_DELIM_SOFN4 0x0B
#define FCM_DELIM_EOFT 0x01
#define FCM_DELIM_EOFDT 0x02
#define FCM_DELIM_EOFN 0x03
#define FCM_DELIM_EOFA 0x04
#define FCM_DELIM_EOFT 0x01
#define FCM_DELIM_EOFDT 0x02
#define FCM_DELIM_EOFN 0x03
#define FCM_DELIM_EOFA 0x04
#define FCM_DELIM_EOFNI 0x07
#define FCM_DELIM_EOFDTI 0x06
#define FCM_DELIM_EOFRT 0x0A
@ -118,100 +118,100 @@ static dissector_handle_t fc_dissector_handle;
static const true_false_string tfs_error_plp = {
"Packet Length is PRESENT",
"Packet length is NOT present"
"Packet Length is PRESENT",
"Packet length is NOT present"
};
static const true_false_string tfs_error_ef = {
"This is an Empty Frame",
"Frame is NOT empty"
"This is an Empty Frame",
"Frame is NOT empty"
};
static const true_false_string tfs_error_nd = {
"This Frame has NO Data",
"This frame carries data"
"This Frame has NO Data",
"This frame carries data"
};
static const true_false_string tfs_error_tr = {
"This frame is TRUNCATED",
"This frame is NOT truncated"
"This frame is TRUNCATED",
"This frame is NOT truncated"
};
static const true_false_string tfs_error_crc = {
"This Frame has a BAD FC CRC",
"This frame has a valid crc"
"This Frame has a BAD FC CRC",
"This frame has a valid crc"
};
static const true_false_string tfs_error_ff = {
"Fifo is Full",
"Fifo is NOT full"
"Fifo is Full",
"Fifo is NOT full"
};
static const true_false_string tfs_error_jumbo = {
"This is a JUMBO FC Frame",
"This is a NORMAL FC Frame"
"This is a JUMBO FC Frame",
"This is a NORMAL FC Frame"
};
static const true_false_string tfs_error_ctrl = {
"Ctrl Characters inside the frame",
"No ctrl chars inside the frame"
"Ctrl Characters inside the frame",
"No ctrl chars inside the frame"
};
static void
dissect_brdwlk_err(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
guint8 flags;
proto_item *item=NULL;
proto_tree *tree=NULL;
guint8 flags;
flags = tvb_get_guint8 (tvb, offset);
if(parent_tree){
item=proto_tree_add_uint(parent_tree, hf_brdwlk_error,
tvb, offset, 1, flags);
tree=proto_item_add_subtree(item, ett_brdwlk_error);
}
flags = tvb_get_guint8 (tvb, offset);
if(parent_tree){
item=proto_tree_add_uint(parent_tree, hf_brdwlk_error,
tvb, offset, 1, flags);
tree=proto_item_add_subtree(item, ett_brdwlk_error);
}
proto_tree_add_boolean(tree, hf_brdwlk_error_plp, tvb, offset, 1, flags);
if (flags&0x01){
proto_item_append_text(item, " Packet Length Present");
}
flags&=(~( 0x01 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_plp, tvb, offset, 1, flags);
if (flags&0x01){
proto_item_append_text(item, " Packet Length Present");
}
flags&=(~( 0x01 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_ef, tvb, offset, 1, flags);
if (flags&0x02){
proto_item_append_text(item, " Empty Frame");
}
flags&=(~( 0x02 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_ef, tvb, offset, 1, flags);
if (flags&0x02){
proto_item_append_text(item, " Empty Frame");
}
flags&=(~( 0x02 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_nd, tvb, offset, 1, flags);
if (flags&0x04){
proto_item_append_text(item, " No Data");
}
flags&=(~( 0x04 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_nd, tvb, offset, 1, flags);
if (flags&0x04){
proto_item_append_text(item, " No Data");
}
flags&=(~( 0x04 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_tr, tvb, offset, 1, flags);
if (flags&0x08){
proto_item_append_text(item, " Truncated");
}
flags&=(~( 0x08 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_tr, tvb, offset, 1, flags);
if (flags&0x08){
proto_item_append_text(item, " Truncated");
}
flags&=(~( 0x08 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_badcrc, tvb, offset, 1, flags);
if (flags&0x10){
proto_item_append_text(item, " Bad FC CRC");
}
flags&=(~( 0x10 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_badcrc, tvb, offset, 1, flags);
if (flags&0x10){
proto_item_append_text(item, " Bad FC CRC");
}
flags&=(~( 0x10 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_ff, tvb, offset, 1, flags);
if (flags&0x20){
proto_item_append_text(item, " Fifo Full");
}
flags&=(~( 0x20 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_ff, tvb, offset, 1, flags);
if (flags&0x20){
proto_item_append_text(item, " Fifo Full");
}
flags&=(~( 0x20 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_jumbo, tvb, offset, 1, flags);
if (flags&0x40){
proto_item_append_text(item, " Jumbo FC Frame");
}
flags&=(~( 0x40 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_jumbo, tvb, offset, 1, flags);
if (flags&0x40){
proto_item_append_text(item, " Jumbo FC Frame");
}
flags&=(~( 0x40 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_ctrl, tvb, offset, 1, flags);
if (flags&0x80){
proto_item_append_text(item, " Ctrl Char Inside Frame");
}
flags&=(~( 0x80 ));
proto_tree_add_boolean(tree, hf_brdwlk_error_ctrl, tvb, offset, 1, flags);
if (flags&0x80){
proto_item_append_text(item, " Ctrl Char Inside Frame");
}
flags&=(~( 0x80 ));
}
/* Code to actually dissect the packets */
@ -337,8 +337,8 @@ dissect_brdwlk (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
packet_count = pkt_cnt;
error=tvb_get_guint8(tvb, offset+2);
dissect_brdwlk_err(brdwlk_tree, tvb, offset+2);
error=tvb_get_guint8(tvb, offset+2);
dissect_brdwlk_err(brdwlk_tree, tvb, offset+2);
eof = tvb_get_guint8 (tvb, offset+3);
if (eof != FCM_DELIM_EOFN) {

File diff suppressed because it is too large Load Diff

View File

@ -52,50 +52,50 @@ static guint16 ver_bossvr = 0;
static dcerpc_sub_dissector bossvr_dissectors[] = {
{ 0, "GetServerStatus", NULL, NULL},
{ 1, "CreateBnode", NULL, NULL},
{ 2, "DeleteBnode", NULL, NULL},
{ 3, "SetStatus", NULL, NULL},
{ 4, "GetStatus", NULL, NULL},
{ 5, "EnumerateInstance", NULL, NULL},
{ 6, "GetInstanceInfo", NULL, NULL},
{ 7, "GetInstanceParm", NULL, NULL},
{ 8, "AddSUser", NULL, NULL},
{ 9, "DeleteSUser", NULL, NULL},
{ 10, "ListSUsers", NULL, NULL},
{ 11, "ListKeys", NULL, NULL},
{ 12, "AddKey", NULL, NULL},
{ 13, "DeleteKey", NULL, NULL},
{ 14, "GenerateKey", NULL, NULL},
{ 15, "GarbageCollectKeys", NULL, NULL},
{ 16, "GetCellName", NULL, NULL},
{ 17, "SetTStatus", NULL, NULL},
{ 18, "ShutdownAll", NULL, NULL},
{ 19, "RestartAll", NULL, NULL},
{ 20, "StartupAll", NULL, NULL},
{ 21, "SetNoAuthFlag", NULL, NULL},
{ 22, "ReBossvr", NULL, NULL},
{ 23, "Restart", NULL, NULL},
{ 24, "Install", NULL, NULL},
{ 25, "UnInstall", NULL, NULL},
{ 26, "GetDates", NULL, NULL},
{ 27, "Prune", NULL, NULL},
{ 28, "SetRestartTime", NULL, NULL},
{ 29, "GetRestartTime", NULL, NULL},
{ 30, "GetLog", NULL, NULL},
{ 31, "WaitAll", NULL, NULL},
{ 32, "SetDebug", NULL, NULL},
{ 33, "GetServerInterfaces", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "GetServerStatus", NULL, NULL},
{ 1, "CreateBnode", NULL, NULL},
{ 2, "DeleteBnode", NULL, NULL},
{ 3, "SetStatus", NULL, NULL},
{ 4, "GetStatus", NULL, NULL},
{ 5, "EnumerateInstance", NULL, NULL},
{ 6, "GetInstanceInfo", NULL, NULL},
{ 7, "GetInstanceParm", NULL, NULL},
{ 8, "AddSUser", NULL, NULL},
{ 9, "DeleteSUser", NULL, NULL},
{ 10, "ListSUsers", NULL, NULL},
{ 11, "ListKeys", NULL, NULL},
{ 12, "AddKey", NULL, NULL},
{ 13, "DeleteKey", NULL, NULL},
{ 14, "GenerateKey", NULL, NULL},
{ 15, "GarbageCollectKeys", NULL, NULL},
{ 16, "GetCellName", NULL, NULL},
{ 17, "SetTStatus", NULL, NULL},
{ 18, "ShutdownAll", NULL, NULL},
{ 19, "RestartAll", NULL, NULL},
{ 20, "StartupAll", NULL, NULL},
{ 21, "SetNoAuthFlag", NULL, NULL},
{ 22, "ReBossvr", NULL, NULL},
{ 23, "Restart", NULL, NULL},
{ 24, "Install", NULL, NULL},
{ 25, "UnInstall", NULL, NULL},
{ 26, "GetDates", NULL, NULL},
{ 27, "Prune", NULL, NULL},
{ 28, "SetRestartTime", NULL, NULL},
{ 29, "GetRestartTime", NULL, NULL},
{ 30, "GetLog", NULL, NULL},
{ 31, "WaitAll", NULL, NULL},
{ 32, "SetDebug", NULL, NULL},
{ 33, "GetServerInterfaces", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void
proto_register_bossvr (void)
{
static hf_register_info hf[] = {
{ &hf_bossvr_opnum,
{ "Operation", "bossvr.opnum", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }}
{ &hf_bossvr_opnum,
{ "Operation", "bossvr.opnum", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }}
};
static gint *ett[] = {

View File

@ -54,34 +54,34 @@ static guint16 ver_cds_clerkserver = 1;
static dcerpc_sub_dissector cds_clerkserver_dissectors[] = {
{ 0, "AddReplica", NULL, NULL},
{ 1, "AllowClearinghouses", NULL, NULL},
{ 2, "Combine", NULL, NULL},
{ 3, "CreateChild", NULL, NULL},
{ 4, "CreateDirectory", NULL, NULL},
{ 5, "CreateSoftLink", NULL, NULL},
{ 6, "CreateObject", NULL, NULL},
{ 7, "DeleteChild", NULL, NULL},
{ 8, "DeleteObject", NULL, NULL},
{ 9, "DeleteSoftLink", NULL, NULL},
{ 10, "DeleteDirectory", NULL, NULL},
{ 11, "DisallowClearinghouses", NULL, NULL},
{ 12, "DoUpdate", NULL, NULL},
{ 13, "EnumerateAttributes", NULL, NULL},
{ 14, "EnumerateChildren", NULL, NULL},
{ 15, "EnumerateObjects", NULL, NULL},
{ 16, "EnumerateSoftLinks", NULL, NULL},
{ 17, "LinkReplica", NULL, NULL},
{ 18, "ModifyAttribute", NULL, NULL},
{ 19, "ModifyReplica", NULL, NULL},
{ 20, "NewEpoch", NULL, NULL},
{ 21, "ReadAttribute", NULL, NULL},
{ 22, "RemoveReplica", NULL, NULL},
{ 23, "ResolveName", NULL, NULL},
{ 24, "Skulk", NULL, NULL},
{ 25, "TestAttribute", NULL, NULL},
{ 26, "TestGroup", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "AddReplica", NULL, NULL},
{ 1, "AllowClearinghouses", NULL, NULL},
{ 2, "Combine", NULL, NULL},
{ 3, "CreateChild", NULL, NULL},
{ 4, "CreateDirectory", NULL, NULL},
{ 5, "CreateSoftLink", NULL, NULL},
{ 6, "CreateObject", NULL, NULL},
{ 7, "DeleteChild", NULL, NULL},
{ 8, "DeleteObject", NULL, NULL},
{ 9, "DeleteSoftLink", NULL, NULL},
{ 10, "DeleteDirectory", NULL, NULL},
{ 11, "DisallowClearinghouses", NULL, NULL},
{ 12, "DoUpdate", NULL, NULL},
{ 13, "EnumerateAttributes", NULL, NULL},
{ 14, "EnumerateChildren", NULL, NULL},
{ 15, "EnumerateObjects", NULL, NULL},
{ 16, "EnumerateSoftLinks", NULL, NULL},
{ 17, "LinkReplica", NULL, NULL},
{ 18, "ModifyAttribute", NULL, NULL},
{ 19, "ModifyReplica", NULL, NULL},
{ 20, "NewEpoch", NULL, NULL},
{ 21, "ReadAttribute", NULL, NULL},
{ 22, "RemoveReplica", NULL, NULL},
{ 23, "ResolveName", NULL, NULL},
{ 24, "Skulk", NULL, NULL},
{ 25, "TestAttribute", NULL, NULL},
{ 26, "TestGroup", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void

View File

@ -51,8 +51,8 @@ static guint16 ver_cprpc_server = 1;
static dcerpc_sub_dissector cprpc_server_dissectors[] = {
{ 0, "dnscp_server", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "dnscp_server", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void

View File

@ -52,9 +52,9 @@ static guint16 ver_dtsprovider = 1;
static dcerpc_sub_dissector dtsprovider_dissectors[] = {
{ 0, "ContactProvider", NULL, NULL},
{ 1, "ServerRequestProviderTime", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "ContactProvider", NULL, NULL},
{ 1, "ServerRequestProviderTime", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void

View File

@ -51,9 +51,9 @@ static guint16 ver_dtsstime_req = 1;
static dcerpc_sub_dissector dtsstime_req_dissectors[] = {
{ 0, "ClerkRequestTime", NULL, NULL},
{ 1, "ServerRequestTime", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "ClerkRequestTime", NULL, NULL},
{ 1, "ServerRequestTime", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void

View File

@ -80,11 +80,11 @@ static guint16 ver_epm4 = 4;
static const value_string ep_service[] = {
{ 0, "rpc_c_ep_all_elts" },
{ 1, "rpc_c_ep_match_by_if" },
{ 2, "rpc_c_ep_match_by_obj" },
{ 3, "rpc_c_ep_match_by_both" },
{ 0, NULL },
{ 0, "rpc_c_ep_all_elts" },
{ 1, "rpc_c_ep_match_by_if" },
{ 2, "rpc_c_ep_match_by_obj" },
{ 3, "rpc_c_ep_match_by_both" },
{ 0, NULL },
};
/* typedef struct {
@ -97,19 +97,19 @@ static int epm_dissect_tower (tvbuff_t *tvb, int offset, packet_info *pinfo, pro
static int
epm_dissect_pointer_IF_ID(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
guint8 *drep)
packet_info *pinfo, proto_tree *tree,
guint8 *drep)
{
dcerpc_info *di;
dcerpc_info *di;
di=pinfo->private_data;
offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
di->hf_index, NULL);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_epm_ver_maj, NULL);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_epm_ver_min, NULL);
return offset;
di=pinfo->private_data;
offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
di->hf_index, NULL);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_epm_ver_maj, NULL);
offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_epm_ver_min, NULL);
return offset;
}
static int
@ -117,12 +117,12 @@ epm_dissect_pointer_UUID(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
guint8 *drep)
{
dcerpc_info *di;
dcerpc_info *di;
di=pinfo->private_data;
offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
di->hf_index, NULL);
return offset;
di=pinfo->private_data;
offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
di->hf_index, NULL);
return offset;
}
static int
@ -165,7 +165,7 @@ epm_dissect_ept_entry_t(tvbuff_t *tvb, int offset,
gint slen;
dcerpc_info *di;
const char *str;
di=pinfo->private_data;
if(di->conformant_run){
return offset;
@ -250,71 +250,71 @@ epm_dissect_uuid (tvbuff_t *tvb, int offset,
return offset;
}
#define PROTO_ID_OSI_OID 0x00
#define PROTO_ID_DNA_SESSCTL 0x02
#define PROTO_ID_DNA_SESSCTL_V3 0x03
#define PROTO_ID_DNA_NSP 0x04
#define PROTO_ID_OSI_TP4 0x05
#define PROTO_ID_OSI_CLNS 0x06
#define PROTO_ID_TCP 0x07
#define PROTO_ID_UDP 0x08
#define PROTO_ID_IP 0x09
#define PROTO_ID_RPC_CL 0x0a
#define PROTO_ID_RPC_CO 0x0b
#define PROTO_ID_SPX 0x0c /* from DCOM spec (is this correct?) */
#define PROTO_ID_UUID 0x0d
#define PROTO_ID_IPX 0x0e /* from DCOM spec (is this correct?) */
#define PROTO_ID_NAMED_PIPES 0x0f
#define PROTO_ID_NAMED_PIPES_2 0x10
#define PROTO_ID_NETBIOS 0x11
#define PROTO_ID_NETBEUI 0x12
#define PROTO_ID_NETWARE_SPX 0x13
#define PROTO_ID_NETWARE_IPX 0x14
#define PROTO_ID_ATALK_STREAM 0x16
#define PROTO_ID_ATALK_DATAGRAM 0x17
#define PROTO_ID_ATALK 0x18
#define PROTO_ID_NETBIOS_2 0x19
#define PROTO_ID_VINES_SPP 0x1a
#define PROTO_ID_VINES_IPC 0x1b
#define PROTO_ID_STREETTALK 0x1c
#define PROTO_ID_HTTP 0x1f
#define PROTO_ID_UNIX_DOMAIN 0x20
#define PROTO_ID_NULL 0x21
#define PROTO_ID_NETBIOS_3 0x22
#define PROTO_ID_OSI_OID 0x00
#define PROTO_ID_DNA_SESSCTL 0x02
#define PROTO_ID_DNA_SESSCTL_V3 0x03
#define PROTO_ID_DNA_NSP 0x04
#define PROTO_ID_OSI_TP4 0x05
#define PROTO_ID_OSI_CLNS 0x06
#define PROTO_ID_TCP 0x07
#define PROTO_ID_UDP 0x08
#define PROTO_ID_IP 0x09
#define PROTO_ID_RPC_CL 0x0a
#define PROTO_ID_RPC_CO 0x0b
#define PROTO_ID_SPX 0x0c /* from DCOM spec (is this correct?) */
#define PROTO_ID_UUID 0x0d
#define PROTO_ID_IPX 0x0e /* from DCOM spec (is this correct?) */
#define PROTO_ID_NAMED_PIPES 0x0f
#define PROTO_ID_NAMED_PIPES_2 0x10
#define PROTO_ID_NETBIOS 0x11
#define PROTO_ID_NETBEUI 0x12
#define PROTO_ID_NETWARE_SPX 0x13
#define PROTO_ID_NETWARE_IPX 0x14
#define PROTO_ID_ATALK_STREAM 0x16
#define PROTO_ID_ATALK_DATAGRAM 0x17
#define PROTO_ID_ATALK 0x18
#define PROTO_ID_NETBIOS_2 0x19
#define PROTO_ID_VINES_SPP 0x1a
#define PROTO_ID_VINES_IPC 0x1b
#define PROTO_ID_STREETTALK 0x1c
#define PROTO_ID_HTTP 0x1f
#define PROTO_ID_UNIX_DOMAIN 0x20
#define PROTO_ID_NULL 0x21
#define PROTO_ID_NETBIOS_3 0x22
static const value_string proto_id_vals[] = {
{ PROTO_ID_OSI_OID, "OSI OID"},
{ PROTO_ID_DNA_SESSCTL, "DNA Session Control"},
{ PROTO_ID_DNA_SESSCTL_V3, "DNA Session Control V3"},
{ PROTO_ID_DNA_NSP, "DNA NSP Transport"},
{ PROTO_ID_OSI_TP4, "OSI TP4"},
{ PROTO_ID_OSI_CLNS, "OSI CLNS or DNA Routing"},
{ PROTO_ID_TCP, "DOD TCP"},
{ PROTO_ID_UDP, "DOD UDP"},
{ PROTO_ID_IP, "DOD IP"},
{ PROTO_ID_RPC_CL, "RPC connectionless protocol"},
{ PROTO_ID_RPC_CO, "RPC connection-oriented protocol"},
{ PROTO_ID_SPX, "SPX?"},
{ PROTO_ID_UUID, "UUID"},
{ PROTO_ID_IPX, "IPX?"},
{ PROTO_ID_NAMED_PIPES, "Named Pipes"},
{ PROTO_ID_NAMED_PIPES_2, "Named Pipes"},
{ PROTO_ID_NETBIOS, "NetBIOS"},
{ PROTO_ID_NETBEUI, "NetBEUI"},
{ PROTO_ID_NETWARE_SPX, "Netware SPX"},
{ PROTO_ID_NETWARE_IPX, "Netware IPX"},
{ PROTO_ID_ATALK_STREAM, "Appletalk Stream"},
{ PROTO_ID_ATALK_DATAGRAM, "Appletalk Datagram"},
{ PROTO_ID_ATALK, "Appletalk"},
{ PROTO_ID_NETBIOS_2, "NetBIOS"},
{ PROTO_ID_VINES_SPP, "Vines SPP"},
{ PROTO_ID_VINES_IPC, "Vines IPC"},
{ PROTO_ID_STREETTALK, "StreetTalk"},
{ PROTO_ID_HTTP, "RPC over HTTP"},
{ PROTO_ID_UNIX_DOMAIN, "Unix Domain Socket"},
{ PROTO_ID_NULL, "null"},
{ PROTO_ID_NETBIOS_3, "NetBIOS"},
{ 0, NULL},
{ PROTO_ID_OSI_OID, "OSI OID"},
{ PROTO_ID_DNA_SESSCTL, "DNA Session Control"},
{ PROTO_ID_DNA_SESSCTL_V3, "DNA Session Control V3"},
{ PROTO_ID_DNA_NSP, "DNA NSP Transport"},
{ PROTO_ID_OSI_TP4, "OSI TP4"},
{ PROTO_ID_OSI_CLNS, "OSI CLNS or DNA Routing"},
{ PROTO_ID_TCP, "DOD TCP"},
{ PROTO_ID_UDP, "DOD UDP"},
{ PROTO_ID_IP, "DOD IP"},
{ PROTO_ID_RPC_CL, "RPC connectionless protocol"},
{ PROTO_ID_RPC_CO, "RPC connection-oriented protocol"},
{ PROTO_ID_SPX, "SPX?"},
{ PROTO_ID_UUID, "UUID"},
{ PROTO_ID_IPX, "IPX?"},
{ PROTO_ID_NAMED_PIPES, "Named Pipes"},
{ PROTO_ID_NAMED_PIPES_2, "Named Pipes"},
{ PROTO_ID_NETBIOS, "NetBIOS"},
{ PROTO_ID_NETBEUI, "NetBEUI"},
{ PROTO_ID_NETWARE_SPX, "Netware SPX"},
{ PROTO_ID_NETWARE_IPX, "Netware IPX"},
{ PROTO_ID_ATALK_STREAM, "Appletalk Stream"},
{ PROTO_ID_ATALK_DATAGRAM, "Appletalk Datagram"},
{ PROTO_ID_ATALK, "Appletalk"},
{ PROTO_ID_NETBIOS_2, "NetBIOS"},
{ PROTO_ID_VINES_SPP, "Vines SPP"},
{ PROTO_ID_VINES_IPC, "Vines IPC"},
{ PROTO_ID_STREETTALK, "StreetTalk"},
{ PROTO_ID_HTTP, "RPC over HTTP"},
{ PROTO_ID_UNIX_DOMAIN, "Unix Domain Socket"},
{ PROTO_ID_NULL, "null"},
{ PROTO_ID_NETBIOS_3, "NetBIOS"},
{ 0, NULL},
};
@ -342,9 +342,9 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
for(i=1;i<=num_floors;i++){
proto_item *it = NULL;
proto_tree *tr = NULL;
int old_offset = offset;
int old_offset = offset;
guint16 len;
guint8 proto_id;
guint8 proto_id;
e_uuid_t uuid;
proto_item *pi;
@ -384,22 +384,22 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
}
proto_tree_add_text(tr, tvb, offset+17, 2, "Version %d.%d", tvb_get_guint8(tvb, offset+17), tvb_get_guint8(tvb, offset+18));
{
guint16 version = tvb_get_ntohs(tvb, offset+17);
const char *service = dcerpc_get_proto_name(&uuid, version);
if (service || uuid_name)
proto_item_append_text(tr, "UUID: %s", service ? service : uuid_name);
else
proto_item_append_text(tr, "UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x Version %d.%d", uuid.Data1, uuid.Data2, uuid.Data3,
uuid.Data4[0], uuid.Data4[1],
uuid.Data4[2], uuid.Data4[3],
uuid.Data4[4], uuid.Data4[5],
uuid.Data4[6], uuid.Data4[7],
tvb_get_guint8(tvb, offset+17),
tvb_get_guint8(tvb, offset+18));
}
break;
}
{
guint16 version = tvb_get_ntohs(tvb, offset+17);
const char *service = dcerpc_get_proto_name(&uuid, version);
if (service || uuid_name)
proto_item_append_text(tr, "UUID: %s", service ? service : uuid_name);
else
proto_item_append_text(tr, "UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x Version %d.%d", uuid.Data1, uuid.Data2, uuid.Data3,
uuid.Data4[0], uuid.Data4[1],
uuid.Data4[2], uuid.Data4[3],
uuid.Data4[4], uuid.Data4[5],
uuid.Data4[6], uuid.Data4[7],
tvb_get_guint8(tvb, offset+17),
tvb_get_guint8(tvb, offset+18));
}
break;
}
offset += len;
len = tvb_get_letohs(tvb, offset);
@ -427,43 +427,43 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
proto_item_append_text(tr, "IP:%s", ip_to_str(tvb_get_ptr(tvb, offset, 4)));
break;
case PROTO_ID_RPC_CO:
proto_item_append_text(tr, "RPC connection-oriented protocol");
break;
case PROTO_ID_RPC_CO:
proto_item_append_text(tr, "RPC connection-oriented protocol");
break;
case PROTO_ID_RPC_CL:
proto_item_append_text(tr, "RPC connectionless protocol");
case PROTO_ID_RPC_CL:
proto_item_append_text(tr, "RPC connectionless protocol");
/* XXX - is this big or little endian? */
proto_tree_add_item(tr, hf_epm_ver_min, tvb, offset, 2, FALSE);
break;
break;
case PROTO_ID_NAMED_PIPES: /* \\PIPE\xxx named pipe */
tvb_ensure_bytes_exist(tvb, offset, len);
tvb_ensure_bytes_exist(tvb, offset, len);
proto_tree_add_item(tr, hf_epm_proto_named_pipes, tvb, offset, len, TRUE);
proto_item_append_text(tr, "NamedPipe:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
proto_item_append_text(tr, "NamedPipe:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
break;
case PROTO_ID_NAMED_PIPES_2: /* PIPENAME named pipe */
tvb_ensure_bytes_exist(tvb, offset, len);
tvb_ensure_bytes_exist(tvb, offset, len);
proto_tree_add_item(tr, hf_epm_proto_named_pipes, tvb, offset, len, TRUE);
proto_item_append_text(tr, "PIPE:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
proto_item_append_text(tr, "PIPE:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
break;
case PROTO_ID_NETBIOS: /* \\NETBIOS netbios name */
tvb_ensure_bytes_exist(tvb, offset, len);
tvb_ensure_bytes_exist(tvb, offset, len);
proto_tree_add_item(tr, hf_epm_proto_netbios_name, tvb, offset, len, TRUE);
proto_item_append_text(tr, "NetBIOS:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
proto_item_append_text(tr, "NetBIOS:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
break;
case PROTO_ID_HTTP: /* RPC over HTTP */
proto_tree_add_item(tr, hf_epm_proto_http_port, tvb, offset, 2, FALSE);
proto_item_append_text(tr, "RPC over HTTP Port:%d", tvb_get_ntohs(tvb, offset));
break;
default:
if(len){
expert_add_info_format(pinfo, pi, PI_UNDECODED, PI_WARN, "RightHandSide not decoded yet for proto_id 0x%x",
expert_add_info_format(pinfo, pi, PI_UNDECODED, PI_WARN, "RightHandSide not decoded yet for proto_id 0x%x",
proto_id);
tvb_ensure_bytes_exist(tvb, offset, len);
tvb_ensure_bytes_exist(tvb, offset, len);
proto_tree_add_text(tr, tvb, offset, len, "RightHandSide not decoded yet for proto_id 0x%x", proto_id);
}
}
@ -678,21 +678,21 @@ epm_dissect_ept_lookup_handle_free_resp (tvbuff_t *tvb, int offset,
static dcerpc_sub_dissector epm_dissectors[] = {
{ 0, "Insert",
epm_dissect_ept_insert_rqst,
epm_dissect_ept_insert_resp },
{ 0, "Insert",
epm_dissect_ept_insert_rqst,
epm_dissect_ept_insert_resp },
{ 1, "Delete",
epm_dissect_ept_delete_rqst,
epm_dissect_ept_delete_resp },
epm_dissect_ept_delete_rqst,
epm_dissect_ept_delete_resp },
{ 2, "Lookup",
epm_dissect_ept_lookup_rqst,
epm_dissect_ept_lookup_resp },
epm_dissect_ept_lookup_rqst,
epm_dissect_ept_lookup_resp },
{ 3, "Map",
epm_dissect_ept_map_rqst,
epm_dissect_ept_map_resp },
epm_dissect_ept_map_rqst,
epm_dissect_ept_map_resp },
{ 4, "LookupHandleFree",
epm_dissect_ept_lookup_handle_free_rqst,
epm_dissect_ept_lookup_handle_free_resp },
epm_dissect_ept_lookup_handle_free_rqst,
epm_dissect_ept_lookup_handle_free_resp },
{ 5, "InqObject", NULL, NULL },
{ 6, "MgmtDelete", NULL, NULL },
{ 0, NULL, NULL, NULL }
@ -703,8 +703,8 @@ proto_register_epm (void)
{
static hf_register_info hf[] = {
{ &hf_epm_opnum,
{ "Operation", "epm.opnum", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ "Operation", "epm.opnum", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_epm_inquiry_type,
{ "Inquiry type", "epm.inq_type", FT_UINT32, BASE_DEC, VALS(ep_service), 0x0, NULL, HFILL }},
{ &hf_epm_object,
@ -754,7 +754,7 @@ proto_register_epm (void)
{ &hf_epm_proto_tcp_port,
{ "TCP Port", "epm.proto.tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, "TCP Port where this service can be found", HFILL }},
{ &hf_epm_proto_http_port,
{ "TCP Port", "epm.proto.http_port", FT_UINT16, BASE_DEC, NULL, 0x0, "TCP Port where this service can be found", HFILL }},
{ "TCP Port", "epm.proto.http_port", FT_UINT16, BASE_DEC, NULL, 0x0, "TCP Port where this service can be found", HFILL }},
{ &hf_epm_tower_rhs_len,
{ "RHS Length", "epm.tower.rhs.len", FT_UINT16, BASE_DEC, NULL, 0x0, "Length of RHS data", HFILL }},
{ &hf_epm_tower_lhs_len,
@ -769,14 +769,14 @@ proto_register_epm (void)
&ett_epm_tower_floor,
&ett_epm_entry
};
/* interface version 3 */
proto_epm3 = proto_register_protocol ("DCE/RPC Endpoint Mapper", "EPM", "epm");
proto_register_field_array (proto_epm3, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
/* interface version 4 */
proto_epm4 = proto_register_protocol ("DCE/RPC Endpoint Mapper v4", "EPMv4", "epm4");
proto_epm4 = proto_register_protocol ("DCE/RPC Endpoint Mapper v4", "EPMv4", "epm4");
}
void

View File

@ -43,12 +43,12 @@ static guint16 ver_mgmt = 1;
static dcerpc_sub_dissector mgmt_dissectors[] = {
{ 0, "rpc__mgmt_inq_if_ids", NULL, NULL },
{ 1, "rpc__mgmt_inq_stats", NULL, NULL },
{ 2, "rpc__mgmt_is_server_listening", NULL, NULL },
{ 3, "rpc__mgmt_stop_server_listening", NULL, NULL },
{ 4, "rpc__mgmt_inq_princ_name", NULL, NULL },
{ 0, NULL, NULL, NULL }
{ 0, "rpc__mgmt_inq_if_ids", NULL, NULL },
{ 1, "rpc__mgmt_inq_stats", NULL, NULL },
{ 2, "rpc__mgmt_is_server_listening", NULL, NULL },
{ 3, "rpc__mgmt_stop_server_listening", NULL, NULL },
{ 4, "rpc__mgmt_inq_princ_name", NULL, NULL },
{ 0, NULL, NULL, NULL }
};

View File

@ -52,17 +52,17 @@ static guint16 ver_rep_proc = 4;
static dcerpc_sub_dissector rep_proc_dissectors[] = {
{ 0, "CheckReplicationConfig", NULL, NULL },
{ 1, "AllCheckReplicationConfig", NULL, NULL },
{ 2, "KeepFilesAlive", NULL , NULL},
{ 3, "GetVolChangedFiles", NULL, NULL },
{ 4, "GetRepStatus", NULL, NULL},
{ 5, "GetRepServerStatus", NULL, NULL},
{ 6, "UpdateSelf", NULL, NULL},
{ 7, "Probe", NULL, NULL},
{ 8, "GetOneRepStatus", NULL, NULL },
{ 9, "GetServerInterfaces", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "CheckReplicationConfig", NULL, NULL },
{ 1, "AllCheckReplicationConfig", NULL, NULL },
{ 2, "KeepFilesAlive", NULL , NULL},
{ 3, "GetVolChangedFiles", NULL, NULL },
{ 4, "GetRepStatus", NULL, NULL},
{ 5, "GetRepServerStatus", NULL, NULL},
{ 6, "UpdateSelf", NULL, NULL},
{ 7, "Probe", NULL, NULL},
{ 8, "GetOneRepStatus", NULL, NULL },
{ 9, "GetServerInterfaces", NULL, NULL},
{ 0, NULL, NULL, NULL }
};

View File

@ -52,22 +52,22 @@ static guint16 ver_roverride = 1;
static dcerpc_sub_dissector roverride_dissectors[] = {
{ 0, "roverride_get_login_info", NULL, NULL},
{ 1, "roverride_check_passwd", NULL, NULL},
{ 2, "roverride_is_passwd_overridden", NULL, NULL},
{ 3, "roverride_get_by_unix_num", NULL, NULL},
{ 4, "roverride_get_group_info", NULL, NULL},
{ 5, "roverride_check_group_passwd", NULL, NULL},
{ 6, "roverride_is_grp_pwd_overridden", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "roverride_get_login_info", NULL, NULL},
{ 1, "roverride_check_passwd", NULL, NULL},
{ 2, "roverride_is_passwd_overridden", NULL, NULL},
{ 3, "roverride_get_by_unix_num", NULL, NULL},
{ 4, "roverride_get_group_info", NULL, NULL},
{ 5, "roverride_check_group_passwd", NULL, NULL},
{ 6, "roverride_is_grp_pwd_overridden", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void
proto_register_roverride (void)
{
static hf_register_info hf[] = {
{ &hf_roverride_opnum,
{ "Operation", "roverride.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_roverride_opnum,
{ "Operation", "roverride.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {

View File

@ -59,8 +59,8 @@ static guint16 ver_rpriv = 1;
static int
rpriv_dissect_get_eptgt_rqst (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
guint8 *drep)
packet_info *pinfo, proto_tree *tree,
guint8 *drep)
{
/* [in] handle_t handle,
* [in] unsigned32 authn_svc,
@ -71,66 +71,66 @@ rpriv_dissect_get_eptgt_rqst (tvbuff_t *tvb, int offset,
* byte bytes[];
*/
guint32 authn_svc, authz_svc, key_size, key_size2, var1;
const char *key_t1 = NULL;
const char *key_t2 = NULL;
guint32 authn_svc, authz_svc, key_size, key_size2, var1;
const char *key_t1 = NULL;
const char *key_t2 = NULL;
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_authn_svc, &authn_svc);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_authz_svc, &authz_svc);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_var1, &var1);
offset += 276;
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size);
/* advance to get size of cell, and princ */
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_authn_svc, &authn_svc);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_authz_svc, &authz_svc);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_var1, &var1);
offset += 276;
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size);
/* advance to get size of cell, and princ */
proto_tree_add_string (tree, hf_rpriv_get_eptgt_rqst_key_t, tvb, offset, hf_rpriv_get_eptgt_rqst_key_size, tvb_get_ptr (tvb, offset, key_size));
key_t1 = (const char *)tvb_get_ptr(tvb,offset,key_size);
offset += key_size;
proto_tree_add_string (tree, hf_rpriv_get_eptgt_rqst_key_t, tvb, offset, hf_rpriv_get_eptgt_rqst_key_size, tvb_get_ptr (tvb, offset, key_size));
key_t1 = (const char *)tvb_get_ptr(tvb,offset,key_size);
offset += key_size;
offset += 8;
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size2);
proto_tree_add_string (tree, hf_rpriv_get_eptgt_rqst_key_t2, tvb, offset, hf_rpriv_get_eptgt_rqst_key_size2, tvb_get_ptr (tvb, offset, key_size2));
key_t2 = (const char *)tvb_get_ptr(tvb,offset,key_size2);
offset += key_size2;
offset += 8;
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size2);
proto_tree_add_string (tree, hf_rpriv_get_eptgt_rqst_key_t2, tvb, offset, hf_rpriv_get_eptgt_rqst_key_size2, tvb_get_ptr (tvb, offset, key_size2));
key_t2 = (const char *)tvb_get_ptr(tvb,offset,key_size2);
offset += key_size2;
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO,
" Request for: %s in %s ", key_t2, key_t1);
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO,
" Request for: %s in %s ", key_t2, key_t1);
}
return offset;
return offset;
}
static dcerpc_sub_dissector rpriv_dissectors[] = {
{ 0, "get_ptgt", NULL,NULL},
{ 1, "become_delegate", NULL, NULL},
{ 2, "become_impersonator", NULL, NULL},
{ 3, "get_eptgt", rpriv_dissect_get_eptgt_rqst , NULL},
{ 0, NULL, NULL, NULL }
{ 0, "get_ptgt", NULL,NULL},
{ 1, "become_delegate", NULL, NULL},
{ 2, "become_impersonator", NULL, NULL},
{ 3, "get_eptgt", rpriv_dissect_get_eptgt_rqst , NULL},
{ 0, NULL, NULL, NULL }
};
void
proto_register_rpriv (void)
{
static hf_register_info hf[] = {
{ &hf_rpriv_opnum,
{ "Operation", "rpriv.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_authn_svc,
{ "Authn_Svc", "rpriv.get_eptgt_rqst_authn_svc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_authz_svc,
{ "Authz_Svc", "rpriv.get_eptgt_rqst_authz_svc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_key_size,
{ "Key_Size", "rpriv.get_eptgt_rqst_key_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_var1,
{ "Var1", "rpriv.get_eptgt_rqst_var1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_key_size2,
{ "Key_Size", "rpriv.get_eptgt_rqst_key_size2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_key_t,
{ "Key_t", "rpriv.get_eptgt_rqst_key_t", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_key_t2,
{ "Key_t2", "rpriv.get_eptgt_rqst_key_t2", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_opnum,
{ "Operation", "rpriv.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_authn_svc,
{ "Authn_Svc", "rpriv.get_eptgt_rqst_authn_svc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_authz_svc,
{ "Authz_Svc", "rpriv.get_eptgt_rqst_authz_svc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_key_size,
{ "Key_Size", "rpriv.get_eptgt_rqst_key_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_var1,
{ "Var1", "rpriv.get_eptgt_rqst_var1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_key_size2,
{ "Key_Size", "rpriv.get_eptgt_rqst_key_size2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_key_t,
{ "Key_t", "rpriv.get_eptgt_rqst_key_t", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_rpriv_get_eptgt_rqst_key_t2,
{ "Key_t2", "rpriv.get_eptgt_rqst_key_t2", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};

View File

@ -52,24 +52,24 @@ static guint16 ver_rs_attr = 0;
static dcerpc_sub_dissector rs_attr_dissectors[] = {
{ 0, "rs_attr_cursor_init", NULL, NULL},
{ 1, "rs_attr_lookup_by_id", NULL, NULL},
{ 2, "rs_attr_lookup_no_expand", NULL, NULL},
{ 3, "rs_attr_lookup_by_name", NULL, NULL},
{ 4, "rs_attr_update", NULL, NULL},
{ 5, "rs_attr_test_and_update", NULL, NULL},
{ 6, "rs_attr_delete", NULL, NULL},
{ 7, "rs_attr_get_referral", NULL, NULL},
{ 8, "rs_attr_get_effective", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "rs_attr_cursor_init", NULL, NULL},
{ 1, "rs_attr_lookup_by_id", NULL, NULL},
{ 2, "rs_attr_lookup_no_expand", NULL, NULL},
{ 3, "rs_attr_lookup_by_name", NULL, NULL},
{ 4, "rs_attr_update", NULL, NULL},
{ 5, "rs_attr_test_and_update", NULL, NULL},
{ 6, "rs_attr_delete", NULL, NULL},
{ 7, "rs_attr_get_referral", NULL, NULL},
{ 8, "rs_attr_get_effective", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void
proto_register_rs_attr (void)
{
static hf_register_info hf[] = {
{ &hf_rs_attr_opnum,
{ "Operation", "rs_attr.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_rs_attr_opnum,
{ "Operation", "rs_attr.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {

View File

@ -39,7 +39,7 @@
#include <epan/packet.h>
#include "packet-dcerpc.h"
#include "packet-dcerpc-dce122.h"
/*
/*
delete
dissect_rgy_acct_user_flags_t
*/
@ -331,9 +331,9 @@ dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
const unsigned32 sec_rgy_pgo_flags_none = 0;
*/
#define sec_rgy_pgo_is_an_alias 0x1
#define sec_rgy_pgo_is_required 0x2
#define sec_rgy_pgo_projlist_ok 0x4
#define sec_rgy_pgo_flags_none 0
#define sec_rgy_pgo_is_required 0x2
#define sec_rgy_pgo_projlist_ok 0x4
#define sec_rgy_pgo_flags_none 0
col_append_str (pinfo->cinfo, COL_INFO, " PgoFlags=");
@ -618,7 +618,7 @@ dissect_sec_rgy_cursor_t (tvbuff_t * tvb, int offset,
boolean32 valid;
} sec_rgy_cursor_t;
*/
proto_item *item = NULL;
@ -1142,7 +1142,7 @@ rs_pgo_dissect_delete_resp (tvbuff_t * tvb, int offset,
buff_remain = tvb_length_remaining(tvb, offset);
/* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
if (buff_remain > 8) {
offset =
dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
@ -1202,7 +1202,7 @@ rs_pgo_dissect_replace_resp (tvbuff_t * tvb, int offset,
/*
[out] rs_cache_data_t *cache_info,
[out] error_status_t *status
*/
offset =
@ -1636,7 +1636,7 @@ rs_pgo_dissect_delete_member_resp (tvbuff_t * tvb, int offset,
/*
[out] rs_cache_data_t *cache_info,
[out] error_status_t *status
*/
offset =
@ -1662,7 +1662,7 @@ static dcerpc_sub_dissector rs_pgo_dissectors[] = {
{5, "key_transfer", rs_pgo_dissect_key_transfer_rqst,
rs_pgo_dissect_key_transfer_resp},
{6, "add_member", rs_pgo_dissect_add_member_rqst,
rs_pgo_dissect_add_member_resp},
rs_pgo_dissect_add_member_resp},
{7, "delete_member", rs_pgo_dissect_delete_member_rqst,
rs_pgo_dissect_delete_member_resp},
{8, "is_member", rs_pgo_dissect_is_member_rqst,

View File

@ -52,21 +52,21 @@ static guint16 ver_rs_repadm = 1;
static dcerpc_sub_dissector rs_repadm_dissectors[] = {
{ 0, "stop", NULL, NULL},
{ 1, "maint", NULL, NULL},
{ 2, "mkey", NULL, NULL},
{ 3, "info", NULL, NULL},
{ 4, "info_full", NULL, NULL},
{ 5, "destroy", NULL, NULL},
{ 6, "init_replica", NULL, NULL},
{ 7, "change_master", NULL, NULL},
{ 8, "become_master", NULL, NULL},
{ 9, "become_slave", NULL, NULL},
{ 10, "set_sw_rev", NULL, NULL},
{ 11, "get_sw_vers_info", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "stop", NULL, NULL},
{ 1, "maint", NULL, NULL},
{ 2, "mkey", NULL, NULL},
{ 3, "info", NULL, NULL},
{ 4, "info_full", NULL, NULL},
{ 5, "destroy", NULL, NULL},
{ 6, "init_replica", NULL, NULL},
{ 7, "change_master", NULL, NULL},
{ 8, "become_master", NULL, NULL},
{ 9, "become_slave", NULL, NULL},
{ 10, "set_sw_rev", NULL, NULL},
{ 11, "get_sw_vers_info", NULL, NULL},
{ 0, NULL, NULL, NULL }
};

View File

@ -52,24 +52,24 @@ static guint16 ver_rs_replist = 2;
static dcerpc_sub_dissector rs_replist_dissectors[] = {
{ 0, "rs_replist_add_replica", NULL, NULL},
{ 1, "rs_replist_replace_replica", NULL, NULL},
{ 2, "rs_replist_delete_replica", NULL, NULL},
{ 3, "rs_replist_read", NULL, NULL},
{ 4, "rs_replist_read_full", NULL, NULL},
{ 5, "rs_replist_add_replica", NULL, NULL},
{ 6, "rs_replist_replace_replica", NULL, NULL},
{ 7, "rs_replist_delete_replica", NULL, NULL},
{ 8, "rs_replist_read", NULL, NULL},
{ 9, "rs_replist_read_full", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "rs_replist_add_replica", NULL, NULL},
{ 1, "rs_replist_replace_replica", NULL, NULL},
{ 2, "rs_replist_delete_replica", NULL, NULL},
{ 3, "rs_replist_read", NULL, NULL},
{ 4, "rs_replist_read_full", NULL, NULL},
{ 5, "rs_replist_add_replica", NULL, NULL},
{ 6, "rs_replist_replace_replica", NULL, NULL},
{ 7, "rs_replist_delete_replica", NULL, NULL},
{ 8, "rs_replist_read", NULL, NULL},
{ 9, "rs_replist_read_full", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void
proto_register_rs_replist (void)
{
static hf_register_info hf[] = {
{ &hf_rs_replist_opnum,
{ &hf_rs_replist_opnum,
{ "Operation", "rs_replist.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
};

View File

@ -51,17 +51,17 @@ static guint16 ver_rs_unix = 1;
static dcerpc_sub_dissector rs_unix_dissectors[] = {
{ 0, "getpwents", NULL, NULL },
{ 0, NULL, NULL, NULL },
{ 0, "getpwents", NULL, NULL },
{ 0, NULL, NULL, NULL },
};
void
proto_register_rs_unix (void)
{
static hf_register_info hf[] = {
{ &hf_rs_unix_opnum,
{ "Operation", "rs_unix.opnum", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }}
{ &hf_rs_unix_opnum,
{ "Operation", "rs_unix.opnum", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }}
};
static gint *ett[] = {

View File

@ -51,15 +51,15 @@ static guint16 ver_rsec_login = 2;
static dcerpc_sub_dissector rsec_login_dissectors[] = {
{ 0, "rsec_login_get_trusted_preauth", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "rsec_login_get_trusted_preauth", NULL, NULL},
{ 0, NULL, NULL, NULL }
};
void
proto_register_rsec_login (void)
{
static hf_register_info hf[] = {
{ &hf_rsec_login_opnum,
{ &hf_rsec_login_opnum,
{ "Operation", "rsec_login.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}
};

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
* Copyright 2002, Jaime Fournier <Jaime.Fournier@hush.com>
* This information is based off the released idl files from opengroup.
* ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/fsint/tkn4int.idl
*
*
* $Id$
*
* Wireshark - Network traffic analyzer
@ -52,16 +52,16 @@ static guint16 ver_tkn4int = 4;
static dcerpc_sub_dissector tkn4int_dissectors[] = {
{ 0, "Probe", NULL, NULL},
{ 1, "InitTokenState", NULL, NULL},
{ 2, "TokenRevoke", NULL, NULL},
{ 3, "GetCellName", NULL, NULL},
{ 4, "GetLock", NULL, NULL},
{ 5, "GetCE", NULL, NULL},
{ 6, "GetServerInterfaces", NULL, NULL},
{ 7, "SetParams", NULL, NULL},
{ 8, "AsyncGrant", NULL, NULL},
{ 0, NULL, NULL, NULL }
{ 0, "Probe", NULL, NULL},
{ 1, "InitTokenState", NULL, NULL},
{ 2, "TokenRevoke", NULL, NULL},
{ 3, "GetCellName", NULL, NULL},
{ 4, "GetLock", NULL, NULL},
{ 5, "GetCE", NULL, NULL},
{ 6, "GetServerInterfaces", NULL, NULL},
{ 7, "SetParams", NULL, NULL},
{ 8, "AsyncGrant", NULL, NULL},
{ 0, NULL, NULL, NULL }
};

View File

@ -67,7 +67,7 @@ void
proto_register_dcerpc_trksvr(void)
{
static hf_register_info hf[] = {
{ &hf_trksvr_opnum, {
{ &hf_trksvr_opnum, {
"Operation", "trksvr.opnum", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_trksvr_rc, {

View File

@ -75,10 +75,10 @@ static int hf_dispatch_flags_propget = -1;
static int hf_dispatch_flags_propput = -1;
static int hf_dispatch_flags_propputref = -1;
#define DISPATCH_FLAGS_METHOD 1
#define DISPATCH_FLAGS_PROPGET 2
#define DISPATCH_FLAGS_PROPPUT 4
#define DISPATCH_FLAGS_PROPPUTREF 8
#define DISPATCH_FLAGS_METHOD 1
#define DISPATCH_FLAGS_PROPGET 2
#define DISPATCH_FLAGS_PROPPUT 4
#define DISPATCH_FLAGS_PROPPUTREF 8
static gint ett_dispatch_flags = -1;
static gint ett_dispatch_params = -1;
@ -99,212 +99,212 @@ static const value_string dcom_lcid_vals[] = {
{ 0x0400, "LOCALE_USER_DEFAULT" },
{ 0x0409, "English (United States)" },
{ 0x0800, "LOCALE_SYSTEM_DEFAULT" },
{ 0, NULL }
{ 0, NULL }
};
int
dissect_IDispatch_GetTypeInfoCount_resp(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32TInfo;
guint32 u32HResult;
guint32 u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_tinfo, &u32TInfo);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_tinfo, &u32TInfo);
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
}
return offset;
return offset;
}
int
dissect_IDispatch_GetTypeInfo_rqst(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32TInfo;
guint32 u32Lcid;
guint32 u32Lcid;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_tinfo, &u32TInfo);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_lcid, &u32Lcid);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_tinfo, &u32TInfo);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_lcid, &u32Lcid);
return offset;
return offset;
}
int
dissect_IDispatch_GetTypeInfo_resp(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32HResult;
guint32 u32Pointer;
guint32 u32HResult;
guint32 u32Pointer;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
offset = dissect_dcom_MInterfacePointer(tvb, offset, pinfo, tree, drep, hf_dispatch_itinfo, NULL /* XXX */);
}
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
}
return offset;
return offset;
}
int
dissect_IDispatch_GetIDsOfNames_rqst(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
e_uuid_t riid;
guint32 u32Lcid;
gchar szName[1000] = { 0 };
guint32 u32Names;
guint32 u32ArraySize;
guint32 u32Pointer;
guint32 u32Tmp;
guint32 u32VariableOffset;
e_uuid_t riid;
guint32 u32Lcid;
gchar szName[1000] = { 0 };
guint32 u32Names;
guint32 u32ArraySize;
guint32 u32Pointer;
guint32 u32Tmp;
guint32 u32VariableOffset;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
hf_dispatch_riid, &riid);
offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
hf_dispatch_riid, &riid);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32VariableOffset = offset + u32ArraySize * 4;
u32VariableOffset = offset + u32ArraySize * 4;
u32Tmp = u32ArraySize;
while(u32Tmp--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_LPWSTR(tvb, u32VariableOffset, pinfo, tree, drep,
hf_dispatch_name, szName, sizeof(szName));
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", szName);
}
}
}
u32Tmp = u32ArraySize;
while(u32Tmp--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_LPWSTR(tvb, u32VariableOffset, pinfo, tree, drep,
hf_dispatch_name, szName, sizeof(szName));
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", szName);
}
}
}
offset = u32VariableOffset;
offset = u32VariableOffset;
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_names, &u32Names);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_names, &u32Names);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_lcid, &u32Lcid);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_lcid, &u32Lcid);
return offset;
return offset;
}
int
dissect_IDispatch_GetIDsOfNames_resp(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32DispId;
guint32 u32ArraySize;
guint32 u32Tmp;
guint32 u32HResult;
guint32 u32DispId;
guint32 u32ArraySize;
guint32 u32Tmp;
guint32 u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32Tmp = u32ArraySize;
while (u32Tmp--) {
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_id, &u32DispId);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispId);
}
}
u32Tmp = u32ArraySize;
while (u32Tmp--) {
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_id, &u32DispId);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispId);
}
}
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
}
return offset;
return offset;
}
int
dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32DispIdMember;
e_uuid_t riid;
guint32 u32Lcid;
guint32 u32Flags;
guint32 u32Args;
guint32 u32NamedArgs;
guint32 u32Pointer;
guint32 u32Pointer2;
guint32 u32ArraySize;
guint32 u32VariableOffset;
guint32 u32VarRef;
guint32 u32VarRefIdx;
guint32 u32TmpOffset;
guint32 u32DispIdMember;
e_uuid_t riid;
guint32 u32Lcid;
guint32 u32Flags;
guint32 u32Args;
guint32 u32NamedArgs;
guint32 u32Pointer;
guint32 u32Pointer2;
guint32 u32ArraySize;
guint32 u32VariableOffset;
guint32 u32VarRef;
guint32 u32VarRefIdx;
guint32 u32TmpOffset;
guint32 u32SubStart;
proto_item *feature_item;
proto_tree *feature_tree;
proto_item *dispparams_item;
proto_tree *dispparams_tree;
proto_item *feature_item;
proto_tree *feature_tree;
proto_item *dispparams_item;
proto_tree *dispparams_tree;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_id, &u32DispIdMember);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_id, &u32DispIdMember);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispIdMember);
}
col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispIdMember);
}
offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
hf_dispatch_riid, &riid);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_lcid, &u32Lcid);
/* dispatch flags */
u32TmpOffset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL, drep,
hf_dispatch_flags, &u32Flags);
offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
hf_dispatch_riid, &riid);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_lcid, &u32Lcid);
/* dispatch flags */
u32TmpOffset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL, drep,
hf_dispatch_flags, &u32Flags);
feature_item = proto_tree_add_uint (tree, hf_dispatch_flags, tvb, offset, 4, u32Flags);
feature_tree = proto_item_add_subtree (feature_item, ett_dispatch_flags);
if (feature_tree) {
@ -314,113 +314,113 @@ dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset,
proto_tree_add_boolean (feature_tree, hf_dispatch_flags_method, tvb, offset, 4, u32Flags);
}
if (u32Flags & DISPATCH_FLAGS_METHOD) {
proto_item_append_text(feature_item, ", Method");
col_append_str(pinfo->cinfo, COL_INFO, " Method");
}
if (u32Flags & DISPATCH_FLAGS_PROPGET) {
proto_item_append_text(feature_item, ", PropertyGet");
col_append_str(pinfo->cinfo, COL_INFO, " PropertyGet");
}
if (u32Flags & DISPATCH_FLAGS_PROPPUT) {
proto_item_append_text(feature_item, ", PropertyPut");
col_append_str(pinfo->cinfo, COL_INFO, " PropertyPut");
}
if (u32Flags & DISPATCH_FLAGS_PROPPUTREF) {
proto_item_append_text(feature_item, ", PropertyPutRef");
col_append_str(pinfo->cinfo, COL_INFO, " PropertyPutRef");
}
if (u32Flags & DISPATCH_FLAGS_METHOD) {
proto_item_append_text(feature_item, ", Method");
col_append_str(pinfo->cinfo, COL_INFO, " Method");
}
if (u32Flags & DISPATCH_FLAGS_PROPGET) {
proto_item_append_text(feature_item, ", PropertyGet");
col_append_str(pinfo->cinfo, COL_INFO, " PropertyGet");
}
if (u32Flags & DISPATCH_FLAGS_PROPPUT) {
proto_item_append_text(feature_item, ", PropertyPut");
col_append_str(pinfo->cinfo, COL_INFO, " PropertyPut");
}
if (u32Flags & DISPATCH_FLAGS_PROPPUTREF) {
proto_item_append_text(feature_item, ", PropertyPutRef");
col_append_str(pinfo->cinfo, COL_INFO, " PropertyPutRef");
}
offset = u32TmpOffset;
offset = u32TmpOffset;
dispparams_item = proto_tree_add_item(tree, hf_dispatch_dispparams, tvb, offset, 0, FALSE);
dispparams_tree = proto_item_add_subtree (dispparams_item, ett_dispatch_params);
u32SubStart = offset;
/* DISPPARAMS */
/* VARIANT rgvarg[u32Args] */
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
&u32Pointer);
/* DISPPARAMS */
/* VARIANT rgvarg[u32Args] */
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
&u32Pointer);
/* DISPID rgdispidNamedArgs[u32NamedArgs] */
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
&u32Pointer2);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
&u32Pointer2);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
hf_dispatch_args, &u32Args);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
hf_dispatch_named_args, &u32NamedArgs);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
hf_dispatch_args, &u32Args);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
hf_dispatch_named_args, &u32NamedArgs);
if (u32Pointer) {
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, dispparams_tree, drep,
&u32ArraySize);
u32VariableOffset = offset + u32ArraySize * 4;
while(u32ArraySize--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, dispparams_tree, drep, hf_dispatch_arg);
}
}
offset = u32VariableOffset;
}
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, dispparams_tree, drep,
&u32ArraySize);
u32VariableOffset = offset + u32ArraySize * 4;
while(u32ArraySize--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, dispparams_tree, drep, hf_dispatch_arg);
}
}
offset = u32VariableOffset;
}
/* DISPID rgdispidNamedArgs[u32NamedArgs] */
if (u32Pointer2) {
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, dispparams_tree, drep,
&u32ArraySize);
while(u32ArraySize--) {
offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
hf_dispatch_id, &u32DispIdMember);
}
}
/* DISPID rgdispidNamedArgs[u32NamedArgs] */
if (u32Pointer2) {
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, dispparams_tree, drep,
&u32ArraySize);
while(u32ArraySize--) {
offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
hf_dispatch_id, &u32DispIdMember);
}
}
proto_item_append_text(dispparams_item, ", Args: %u NamedArgs: %u", u32Args, u32NamedArgs);
proto_item_set_len(dispparams_item, offset - u32SubStart);
proto_item_append_text(dispparams_item, ", Args: %u NamedArgs: %u", u32Args, u32NamedArgs);
proto_item_set_len(dispparams_item, offset - u32SubStart);
/* end of DISPPARAMS */
/* end of DISPPARAMS */
/* u32VarRef */
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_varref, &u32VarRef);
/* u32VarRef */
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_varref, &u32VarRef);
/* rgVarRefIdx: UINT[u32VarRef] */
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
while(u32ArraySize--) {
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_varrefidx, &u32VarRefIdx);
}
/* rgVarRefIdx: UINT[u32VarRef] */
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
while(u32ArraySize--) {
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_varrefidx, &u32VarRefIdx);
}
/* rgVarRef: VARIANT[u32VarRef] */
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32VariableOffset = offset + u32ArraySize * 4;
while(u32ArraySize--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_varrefarg);
}
}
/* rgVarRef: VARIANT[u32VarRef] */
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32VariableOffset = offset + u32ArraySize * 4;
while(u32ArraySize--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_varrefarg);
}
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO,
" Args=%u NamedArgs=%u VarRef=%u", u32Args, u32NamedArgs, u32VarRef);
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO,
" Args=%u NamedArgs=%u VarRef=%u", u32Args, u32NamedArgs, u32VarRef);
}
return u32VariableOffset;
return u32VariableOffset;
}
int
dissect_IDispatch_Invoke_resp(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32Pointer;
guint32 u32Pointer2;
guint32 u32Pointer3;
guint32 u32VariableOffset;
guint32 u32ArraySize;
guint32 u32Pointer;
guint32 u32Pointer2;
guint32 u32Pointer3;
guint32 u32VariableOffset;
guint32 u32ArraySize;
guint32 u32SubStart;
guint16 u16Code;
guint16 u16Reserved;
@ -430,91 +430,91 @@ dissect_IDispatch_Invoke_resp(tvbuff_t *tvb, int offset,
guint32 u32ArgErr;
guint32 u32HResult;
guint32 u32SCode;
guint32 u32VarRef;
gchar szName[1000] = { 0 };
proto_item *excepinfo_item;
proto_tree *excepinfo_tree;
guint32 u32VarRef;
gchar szName[1000] = { 0 };
proto_item *excepinfo_item;
proto_tree *excepinfo_tree;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, drep, hf_dispatch_varresult);
}
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, drep, hf_dispatch_varresult);
}
/* ExcepInfo */
/* ExcepInfo */
excepinfo_item = proto_tree_add_item(tree, hf_dispatch_excepinfo, tvb, offset, 0, FALSE);
excepinfo_tree = proto_item_add_subtree (excepinfo_item, ett_dispatch_excepinfo);
u32SubStart = offset;
offset = dissect_dcom_WORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_code, &u16Code);
offset = dissect_dcom_WORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_reserved16, &u16Reserved);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
&u32Pointer);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
&u32Pointer2);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
&u32Pointer3);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_help_context, &u32HelpContext);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_reserved32, &u32Reserved);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_deferred_fill_in, &u32DeferredFillIn);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_scode, &u32SCode);
offset = dissect_dcom_WORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_code, &u16Code);
offset = dissect_dcom_WORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_reserved16, &u16Reserved);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
&u32Pointer);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
&u32Pointer2);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
&u32Pointer3);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_help_context, &u32HelpContext);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_reserved32, &u32Reserved);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_deferred_fill_in, &u32DeferredFillIn);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_scode, &u32SCode);
if (u32Pointer) {
offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_source, szName, sizeof(szName));
}
if (u32Pointer2) {
offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_description, szName, sizeof(szName));
}
if (u32Pointer3) {
offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_help_file, szName, sizeof(szName));
}
if (u32Pointer) {
offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_source, szName, sizeof(szName));
}
if (u32Pointer2) {
offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_description, szName, sizeof(szName));
}
if (u32Pointer3) {
offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
hf_dispatch_help_file, szName, sizeof(szName));
}
proto_item_append_text(excepinfo_item, ", SCode: %s",
val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"));
proto_item_set_len(excepinfo_item, offset - u32SubStart);
proto_item_append_text(excepinfo_item, ", SCode: %s",
val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"));
proto_item_set_len(excepinfo_item, offset - u32SubStart);
/* end of ExcepInfo */
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_arg_err, &u32ArgErr);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_dispatch_arg_err, &u32ArgErr);
/* rgVarRef: VARIANT[u32VarRef] */
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
/* rgVarRef: VARIANT[u32VarRef] */
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32VarRef = u32ArraySize;
u32VariableOffset = offset + u32ArraySize * 4;
while(u32ArraySize--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_varrefarg);
}
}
u32VariableOffset = offset + u32ArraySize * 4;
while(u32ArraySize--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_varrefarg);
}
}
offset = u32VariableOffset;
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " SCode=%s VarRef=%u -> %s",
val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"),
u32VarRef,
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " SCode=%s VarRef=%u -> %s",
val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"),
u32VarRef,
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
}
return offset;
return offset;
}
@ -537,90 +537,90 @@ void
proto_register_dcom_dispatch(void)
{
static hf_register_info hf_dispatch_array[] = {
static hf_register_info hf_dispatch_array[] = {
{ &hf_dispatch_opnum,
{ "Operation", "dispatch_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "Operation", "dispatch_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_riid,
{ "RIID", "dispatch_riid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_riid,
{ "RIID", "dispatch_riid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_name,
{ "Name", "hf_dispatch_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_names,
{ "Names", "dispatch_names", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "Name", "hf_dispatch_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_names,
{ "Names", "dispatch_names", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_lcid,
{ "LCID", "dispatch_lcid", FT_UINT32, BASE_HEX, VALS(dcom_lcid_vals), 0x0, NULL, HFILL }},
{ "LCID", "dispatch_lcid", FT_UINT32, BASE_HEX, VALS(dcom_lcid_vals), 0x0, NULL, HFILL }},
{ &hf_dispatch_id,
{ "DispID", "dispatch_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ "DispID", "dispatch_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_flags,
{ "Flags", "dispatch_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ "Flags", "dispatch_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_arg,
{ "Argument", "dispatch_arg", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_args,
{ "Args", "dispatch_args", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_named_args,
{ "NamedArgs", "dispatch_named_args", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_varref,
{ "VarRef", "dispatch_varref", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_varrefidx,
{ "VarRefIdx", "dispatch_varrefidx", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_varrefarg,
{ "VarRef", "dispatch_varrefarg", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_varresult,
{ "VarResult", "dispatch_varresult", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_arg,
{ "Argument", "dispatch_arg", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_args,
{ "Args", "dispatch_args", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_named_args,
{ "NamedArgs", "dispatch_named_args", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_varref,
{ "VarRef", "dispatch_varref", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_varrefidx,
{ "VarRefIdx", "dispatch_varrefidx", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_varrefarg,
{ "VarRef", "dispatch_varrefarg", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_varresult,
{ "VarResult", "dispatch_varresult", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_flags_method,
{ "Method", "dispatch_flags_method", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_METHOD, NULL, HFILL }},
{ "Method", "dispatch_flags_method", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_METHOD, NULL, HFILL }},
{ &hf_dispatch_flags_propget,
{ "PropertyGet", "dispatch_flags_propget", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPGET, NULL, HFILL }},
{ "PropertyGet", "dispatch_flags_propget", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPGET, NULL, HFILL }},
{ &hf_dispatch_flags_propput,
{ "PropertyPut", "dispatch_flags_propput", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPPUT, NULL, HFILL }},
{ "PropertyPut", "dispatch_flags_propput", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPPUT, NULL, HFILL }},
{ &hf_dispatch_flags_propputref,
{ "PropertyPutRef", "dispatch_flags_propputref", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPPUTREF, NULL, HFILL }},
{ "PropertyPutRef", "dispatch_flags_propputref", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPPUTREF, NULL, HFILL }},
{ &hf_dispatch_code,
{ "Code", "dispatch_code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ "Code", "dispatch_code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_reserved16,
{ "Reserved", "dispatch_reserved16", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ "Reserved", "dispatch_reserved16", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_source,
{ "Source", "dispatch_source", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "Source", "dispatch_source", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_description,
{ "Description", "dispatch_description", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "Description", "dispatch_description", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_help_file,
{ "HelpFile", "dispatch_help_file", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "HelpFile", "dispatch_help_file", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_help_context,
{ "HelpContext", "dispatch_help_context", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ "HelpContext", "dispatch_help_context", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_reserved32,
{ "Reserved", "dispatch_reserved32", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ "Reserved", "dispatch_reserved32", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_deferred_fill_in,
{ "DeferredFillIn", "dispatch_deferred_fill_in", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ "DeferredFillIn", "dispatch_deferred_fill_in", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_arg_err,
{ "ArgErr", "dispatch_arg_err", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "ArgErr", "dispatch_arg_err", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_tinfo,
{ "TInfo", "dispatch_tinfo", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "TInfo", "dispatch_tinfo", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_itinfo,
{ "TInfo", "dispatch_itinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "TInfo", "dispatch_itinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_dispparams,
{ "DispParams", "dispatch_dispparams", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "DispParams", "dispatch_dispparams", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_excepinfo,
{ "ExcepInfo", "dispatch_excepinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "ExcepInfo", "dispatch_excepinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dispatch_scode,
{ "SCode", "dispatch_scode", FT_UINT32, BASE_HEX, VALS(dcom_hresult_vals), 0x0, NULL, HFILL }}
{ "SCode", "dispatch_scode", FT_UINT32, BASE_HEX, VALS(dcom_hresult_vals), 0x0, NULL, HFILL }}
};
static gint *ett[] = {
&ett_dispatch,
&ett_dispatch_flags,
static gint *ett[] = {
&ett_dispatch,
&ett_dispatch_flags,
&ett_dispatch_params,
&ett_dispatch_excepinfo
};
};
/* IDispatch currently only partially implemented */
proto_dispatch = proto_register_protocol ("DCOM IDispatch", "IDispatch", "dispatch");
proto_register_field_array (proto_dispatch, hf_dispatch_array, array_length (hf_dispatch_array));
proto_register_subtree_array (ett, array_length (ett));
/* IDispatch currently only partially implemented */
proto_dispatch = proto_register_protocol ("DCOM IDispatch", "IDispatch", "dispatch");
proto_register_field_array (proto_dispatch, hf_dispatch_array, array_length (hf_dispatch_array));
proto_register_subtree_array (ett, array_length (ett));
}
@ -628,8 +628,8 @@ void
proto_reg_handoff_dcom_dispatch(void)
{
dcerpc_init_uuid(proto_dispatch, ett_dispatch,
&uuid_dispatch, ver_dispatch,
dispatch_dissectors, hf_dispatch_opnum);
dcerpc_init_uuid(proto_dispatch, ett_dispatch,
&uuid_dispatch, ver_dispatch,
dispatch_dissectors, hf_dispatch_opnum);
}

View File

@ -57,7 +57,7 @@ static guint16 ver_remact = 0;
static int
dissect_remact_remote_activation_rqst(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32ClientImpLevel;
guint32 u32Mode;
@ -66,58 +66,58 @@ dissect_remact_remote_activation_rqst(tvbuff_t *tvb, int offset,
guint32 u32ArraySize;
guint32 u32ItemIdx;
guint16 u16ProtSeqs;
e_uuid_t clsid;
e_uuid_t iid;
e_uuid_t clsid;
e_uuid_t iid;
gchar szObjName[1000] = { 0 };
guint32 u32ObjNameLen = sizeof(szObjName);
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_append_UUID(tvb, offset, pinfo, tree, drep,
hf_dcom_clsid, -1, &clsid);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
hf_dcom_clsid, -1, &clsid);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, drep,
hf_remact_object_name, szObjName, u32ObjNameLen);
offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, drep,
hf_remact_object_name, szObjName, u32ObjNameLen);
}
offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, drep,
hf_remact_object_storage, NULL /* XXX */);
offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, drep,
hf_remact_object_storage, NULL /* XXX */);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remact_client_impl_level, &u32ClientImpLevel);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remact_mode, &u32Mode);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remact_client_impl_level, &u32ClientImpLevel);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remact_mode, &u32Mode);
/* Interfaces */
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remact_interfaces, &u32Interfaces);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remact_interfaces, &u32Interfaces);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32ItemIdx = 1;
while (u32Interfaces--) {
offset = dissect_dcom_append_UUID(tvb, offset, pinfo, tree, drep,
hf_dcom_iid, u32ItemIdx, &iid);
hf_dcom_iid, u32ItemIdx, &iid);
u32ItemIdx++;
}
}
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
hf_remact_requested_protseqs, &u16ProtSeqs);
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
hf_remact_requested_protseqs, &u16ProtSeqs);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32ItemIdx = 1;
while (u32ArraySize--) {
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
hf_remact_protseqs, &u16ProtSeqs);
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
hf_remact_protseqs, &u16ProtSeqs);
u32ItemIdx++;
}
@ -127,7 +127,7 @@ dissect_remact_remote_activation_rqst(tvbuff_t *tvb, int offset,
static int
dissect_remact_remote_activation_resp(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32Pointer;
e_uuid_t ipid;
@ -140,64 +140,64 @@ dissect_remact_remote_activation_resp(tvbuff_t *tvb, int offset,
guint32 u32VariableOffset;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_ID(tvb, offset, pinfo, tree, drep,
hf_dcom_oxid, NULL);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
offset = dissect_dcom_ID(tvb, offset, pinfo, tree, drep,
hf_dcom_oxid, NULL);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
offset = dissect_dcom_DUALSTRINGARRAY(tvb, offset, pinfo, tree, drep,
hf_remact_oxid_bindings, NULL);
offset = dissect_dcom_DUALSTRINGARRAY(tvb, offset, pinfo, tree, drep,
hf_remact_oxid_bindings, NULL);
}
offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
hf_dcom_ipid, &ipid);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remact_authn_hint, &u32AuthnHint);
offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
hf_dcom_ipid, &ipid);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remact_authn_hint, &u32AuthnHint);
offset = dissect_dcom_COMVERSION(tvb, offset, pinfo, tree, drep,
&u16VersionMajor, &u16VersionMinor);
&u16VersionMajor, &u16VersionMinor);
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
&u32HResult);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32VariableOffset = offset + u32ArraySize * 4;
while (u32ArraySize--) {
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
if (u32Pointer) {
u32VariableOffset = dissect_dcom_MInterfacePointer(tvb, u32VariableOffset, pinfo, tree, drep,
hf_remact_interface_data, NULL /* XXX */);
hf_remact_interface_data, NULL /* XXX */);
}
}
offset = u32VariableOffset;
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32Idx = 1;
while (u32ArraySize--) {
offset = dissect_dcom_indexed_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult, u32Idx);
&u32HResult, u32Idx);
/* update column info now */
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"),
u32Idx);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"),
u32Idx);
}
u32Idx++;
}
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
&u32HResult);
/* update column info now */
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"));
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"));
}
return offset;
@ -205,8 +205,8 @@ dissect_remact_remote_activation_resp(tvbuff_t *tvb, int offset,
static dcerpc_sub_dissector remact_dissectors[] = {
{ 0, "RemoteActivation", dissect_remact_remote_activation_rqst, dissect_remact_remote_activation_resp },
{ 0, NULL, NULL, NULL },
{ 0, "RemoteActivation", dissect_remact_remote_activation_rqst, dissect_remact_remote_activation_resp },
{ 0, NULL, NULL, NULL },
};
@ -214,36 +214,36 @@ void
proto_register_remact (void)
{
static hf_register_info hf_remact[] = {
{ &hf_remact_opnum,
{ "Operation", "remact_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_opnum,
{ "Operation", "remact_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_requested_protseqs,
{ "RequestedProtSeqs", "remact_req_prot_seqs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "RequestedProtSeqs", "remact_req_prot_seqs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_protseqs,
{ "ProtSeqs", "remact_prot_seqs", FT_UINT16, BASE_DEC, VALS(dcom_protseq_vals), 0x0, NULL, HFILL }},
{ "ProtSeqs", "remact_prot_seqs", FT_UINT16, BASE_DEC, VALS(dcom_protseq_vals), 0x0, NULL, HFILL }},
{ &hf_remact_interfaces,
{ "Interfaces", "remact_interfaces", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "Interfaces", "remact_interfaces", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_mode,
{ "Mode", "remact_mode", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "Mode", "remact_mode", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_client_impl_level,
{ "ClientImplLevel", "remact_client_impl_level", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "ClientImplLevel", "remact_client_impl_level", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_object_name,
{ "ObjectName", "remact_object_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "ObjectName", "remact_object_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_object_storage,
{ "ObjectStorage", "remact_object_storage", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "ObjectStorage", "remact_object_storage", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_interface_data,
{ "InterfaceData", "remact_interface_data", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "InterfaceData", "remact_interface_data", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_oxid_bindings,
{ "OxidBindings", "hf_remact_oxid_bindings", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ "OxidBindings", "hf_remact_oxid_bindings", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_remact_authn_hint,
{ "AuthnHint", "remact_authn_hint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "AuthnHint", "remact_authn_hint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {
&ett_remact
};
proto_remact = proto_register_protocol ("DCOM IRemoteActivation", "REMACT", "remact");
proto_register_field_array (proto_remact, hf_remact, array_length (hf_remact));
proto_register_subtree_array (ett, array_length (ett));

View File

@ -76,225 +76,225 @@ static int proto_remunk2 = -1;
typedef struct remunk_remqueryinterface_call_s {
guint iid_count;
guint iid_count;
e_uuid_t *iids;
} remunk_remqueryinterface_call_t;
static int
dissect_remunk_remqueryinterface_rqst(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
e_uuid_t ipid;
guint32 u32Refs;
guint16 u16IIDs;
guint32 u32ArraySize;
guint32 u32ItemIdx;
e_uuid_t iid;
dcerpc_info *info = (dcerpc_info *) pinfo->private_data;
remunk_remqueryinterface_call_t *call;
e_uuid_t ipid;
guint32 u32Refs;
guint16 u16IIDs;
guint32 u32ArraySize;
guint32 u32ItemIdx;
e_uuid_t iid;
dcerpc_info *info = (dcerpc_info *) pinfo->private_data;
remunk_remqueryinterface_call_t *call;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
hf_dcom_ipid, &ipid);
offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
hf_dcom_ipid, &ipid);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remunk_refs, &u32Refs);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remunk_refs, &u32Refs);
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
hf_remunk_iids, &u16IIDs);
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
hf_remunk_iids, &u16IIDs);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
/* limit the allocation to a reasonable size */
if(u32ArraySize < 100) {
call = se_alloc(sizeof(remunk_remqueryinterface_call_t) + u32ArraySize * sizeof(e_uuid_t));
call->iid_count = u32ArraySize;
call->iids = (e_uuid_t *) (call+1);
call = se_alloc(sizeof(remunk_remqueryinterface_call_t) + u32ArraySize * sizeof(e_uuid_t));
call->iid_count = u32ArraySize;
call->iids = (e_uuid_t *) (call+1);
info->call_data->private_data = call;
} else {
call = NULL;
}
for (u32ItemIdx = 0; u32ArraySize--; u32ItemIdx++) {
offset = dissect_dcom_append_UUID(tvb, offset, pinfo, tree, drep,
hf_dcom_iid, u32ItemIdx+1, &iid);
for (u32ItemIdx = 0; u32ArraySize--; u32ItemIdx++) {
offset = dissect_dcom_append_UUID(tvb, offset, pinfo, tree, drep,
hf_dcom_iid, u32ItemIdx+1, &iid);
if(call != NULL) {
call->iids[u32ItemIdx] = iid;
call->iids[u32ItemIdx] = iid;
}
}
}
return offset;
return offset;
}
static int
dissect_remunk_remqueryinterface_resp(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32Pointer;
guint32 u32ArraySize;
guint32 u32ItemIdx;
proto_item *sub_item;
proto_tree *sub_tree;
guint32 u32HResult;
guint32 u32SubStart;
e_uuid_t iid;
e_uuid_t iid_null = DCERPC_UUID_NULL;
dcerpc_info *info = (dcerpc_info *) pinfo->private_data;
remunk_remqueryinterface_call_t *call = info->call_data->private_data;
guint64 oxid;
guint64 oid;
e_uuid_t ipid;
guint32 u32Pointer;
guint32 u32ArraySize;
guint32 u32ItemIdx;
proto_item *sub_item;
proto_tree *sub_tree;
guint32 u32HResult;
guint32 u32SubStart;
e_uuid_t iid;
e_uuid_t iid_null = DCERPC_UUID_NULL;
dcerpc_info *info = (dcerpc_info *) pinfo->private_data;
remunk_remqueryinterface_call_t *call = info->call_data->private_data;
guint64 oxid;
guint64 oid;
e_uuid_t ipid;
dcom_interface_t *dcom_if;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
&u32ArraySize);
u32ItemIdx = 1;
while (u32ArraySize--) {
/* add subtree */
sub_item = proto_tree_add_item(tree, hf_remunk_qiresult, tvb, offset, 0, FALSE);
sub_tree = proto_item_add_subtree(sub_item, ett_remunk_rqi_result);
u32ItemIdx = 1;
while (u32ArraySize--) {
/* add subtree */
sub_item = proto_tree_add_item(tree, hf_remunk_qiresult, tvb, offset, 0, FALSE);
sub_tree = proto_item_add_subtree(sub_item, ett_remunk_rqi_result);
/* REMQIRESULT */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, sub_tree, drep,
&u32HResult);
u32SubStart = offset - 4;
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep,
&u32Pointer);
/* REMQIRESULT */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, sub_tree, drep,
&u32HResult);
u32SubStart = offset - 4;
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep,
&u32Pointer);
/* try to read the iid from the request */
if(call != NULL && u32ItemIdx <= call->iid_count) {
iid = call->iids[u32ItemIdx-1];
} else {
iid = iid_null;
}
/* try to read the iid from the request */
if(call != NULL && u32ItemIdx <= call->iid_count) {
iid = call->iids[u32ItemIdx-1];
} else {
iid = iid_null;
}
/* XXX - this doesn't seem to be dependent on the pointer above?!? */
/*if (u32Pointer) {*/
offset = dissect_dcom_STDOBJREF(tvb, offset, pinfo, sub_tree, drep, 0 /* hfindex */,
&oxid, &oid, &ipid);
/*}*/
/* XXX - this doesn't seem to be dependent on the pointer above?!? */
/*if (u32Pointer) {*/
offset = dissect_dcom_STDOBJREF(tvb, offset, pinfo, sub_tree, drep, 0 /* hfindex */,
&oxid, &oid, &ipid);
/*}*/
/* add interface instance to database (we currently only handle IPv4) */
if(pinfo->net_src.type == AT_IPv4) {
dcom_if = dcom_interface_new(pinfo,
pinfo->net_src.data,
&iid, oxid, oid, &ipid);
dcom_if = dcom_interface_new(pinfo,
pinfo->net_src.data,
&iid, oxid, oid, &ipid);
}
/* update subtree */
proto_item_append_text(sub_item, "[%u]: %s",
u32ItemIdx,
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
proto_item_set_len(sub_item, offset - u32SubStart);
/* update subtree */
proto_item_append_text(sub_item, "[%u]: %s",
u32ItemIdx,
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
proto_item_set_len(sub_item, offset - u32SubStart);
/* update column info now */
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"),
u32ItemIdx);
}
/* update column info now */
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"),
u32ItemIdx);
}
u32ItemIdx++;
}
u32ItemIdx++;
}
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
/* HRESULT of call */
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
&u32HResult);
/* update column info now */
/* update column info now */
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"));
}
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"));
}
return offset;
return offset;
}
static int
dissect_remunk_remrelease_rqst(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
guint32 u32Pointer;
guint32 u32IntRefs;
guint32 u32ItemIdx;
e_uuid_t ipid;
guint32 u32PublicRefs;
guint32 u32PrivateRefs;
const gchar *pszFormat;
proto_item *sub_item;
proto_tree *sub_tree;
guint32 u32SubStart;
guint32 u32Pointer;
guint32 u32IntRefs;
guint32 u32ItemIdx;
e_uuid_t ipid;
guint32 u32PublicRefs;
guint32 u32PrivateRefs;
const gchar *pszFormat;
proto_item *sub_item;
proto_tree *sub_tree;
guint32 u32SubStart;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
&u32Pointer);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remunk_interface_refs, &u32IntRefs);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
hf_remunk_interface_refs, &u32IntRefs);
/* update column info now */
/* update column info now */
if (check_col(pinfo->cinfo, COL_INFO)) {
if (u32IntRefs) {
col_append_fstr(pinfo->cinfo, COL_INFO, " Cnt=%u Refs=", u32IntRefs);
} else {
col_append_str(pinfo->cinfo, COL_INFO, " Cnt=0");
}
}
if (u32IntRefs) {
col_append_fstr(pinfo->cinfo, COL_INFO, " Cnt=%u Refs=", u32IntRefs);
} else {
col_append_str(pinfo->cinfo, COL_INFO, " Cnt=0");
}
}
u32ItemIdx = 1;
while (u32IntRefs--) {
u32ItemIdx = 1;
while (u32IntRefs--) {
/* add subtree */
sub_item = proto_tree_add_item(tree, hf_remunk_reminterfaceref, tvb, offset, 0, FALSE);
sub_tree = proto_item_add_subtree(sub_item, ett_remunk_reminterfaceref);
u32SubStart = offset;
sub_item = proto_tree_add_item(tree, hf_remunk_reminterfaceref, tvb, offset, 0, FALSE);
sub_tree = proto_item_add_subtree(sub_item, ett_remunk_reminterfaceref);
u32SubStart = offset;
offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep,
hf_dcom_ipid, &ipid);
offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep,
hf_dcom_ipid, &ipid);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
hf_remunk_public_refs, &u32PublicRefs);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
hf_remunk_public_refs, &u32PublicRefs);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
hf_remunk_private_refs, &u32PrivateRefs);
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
hf_remunk_private_refs, &u32PrivateRefs);
/* update subtree */
proto_item_append_text(sub_item, "[%u]: IPID=%s, PublicRefs=%u, PrivateRefs=%u",
u32ItemIdx,
guids_resolve_uuid_to_str(&ipid),
u32PublicRefs, u32PrivateRefs);
proto_item_set_len(sub_item, offset - u32SubStart);
/* update subtree */
proto_item_append_text(sub_item, "[%u]: IPID=%s, PublicRefs=%u, PrivateRefs=%u",
u32ItemIdx,
guids_resolve_uuid_to_str(&ipid),
u32PublicRefs, u32PrivateRefs);
proto_item_set_len(sub_item, offset - u32SubStart);
/* update column info now */
if (check_col(pinfo->cinfo, COL_INFO)) {
pszFormat = "";
if (u32ItemIdx == 1) {
pszFormat = "%u-%u";
} else if (u32ItemIdx < 10) {
pszFormat = ",%u-%u";
} else if (u32ItemIdx == 10) {
pszFormat = ",...";
}
col_append_fstr(pinfo->cinfo, COL_INFO, pszFormat, u32PublicRefs, u32PrivateRefs);
}
/* update column info now */
if (check_col(pinfo->cinfo, COL_INFO)) {
pszFormat = "";
if (u32ItemIdx == 1) {
pszFormat = "%u-%u";
} else if (u32ItemIdx < 10) {
pszFormat = ",%u-%u";
} else if (u32ItemIdx == 10) {
pszFormat = ",...";
}
col_append_fstr(pinfo->cinfo, COL_INFO, pszFormat, u32PublicRefs, u32PrivateRefs);
}
u32ItemIdx++;
}
u32ItemIdx++;
}
return offset;
return offset;
}
@ -305,7 +305,7 @@ static dcerpc_sub_dissector remunk_dissectors[] = {
{ 2, "Release", NULL, NULL },
{ 3, "RemQueryInterface", dissect_remunk_remqueryinterface_rqst, dissect_remunk_remqueryinterface_resp },
{ 4, "RemAddRef", NULL, NULL },
{ 4, "RemAddRef", NULL, NULL },
{ 5, "RemRelease", dissect_remunk_remrelease_rqst, dissect_dcom_simple_resp },
{ 0, NULL, NULL, NULL }
};
@ -317,10 +317,10 @@ static dcerpc_sub_dissector remunk2_dissectors[] = {
{ 2, "Release", NULL, NULL },
{ 3, "RemQueryInterface", dissect_remunk_remqueryinterface_rqst, dissect_remunk_remqueryinterface_resp },
{ 4, "RemAddRef", NULL, NULL },
{ 4, "RemAddRef", NULL, NULL },
{ 5, "RemRelease", dissect_remunk_remrelease_rqst, dissect_dcom_simple_resp },
{ 6, "RemQueryInterface2", NULL, NULL },
{ 6, "RemQueryInterface2", NULL, NULL },
{ 0, NULL, NULL, NULL }
};
@ -329,41 +329,41 @@ static dcerpc_sub_dissector remunk2_dissectors[] = {
void
proto_register_remunk (void)
{
static hf_register_info hf_remunk_rqi_array[] = {
static hf_register_info hf_remunk_rqi_array[] = {
{ &hf_remunk_opnum,
{ "Operation", "remunk_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ "Operation", "remunk_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_refs,
{ "Refs", "remunk_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_iids,
{ "IIDs", "remunk_iids", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_qiresult,
{ "QIResult", "remunk_qiresult", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_flags,
{ "Flags", "remunk_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_public_refs,
{ "PublicRefs", "remunk_public_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_reminterfaceref,
{ "RemInterfaceRef", "remunk_reminterfaceref", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_interface_refs,
{ "InterfaceRefs", "remunk_int_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_private_refs,
{ "PrivateRefs", "remunk_private_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}
};
{ &hf_remunk_refs,
{ "Refs", "remunk_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_iids,
{ "IIDs", "remunk_iids", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_qiresult,
{ "QIResult", "remunk_qiresult", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_flags,
{ "Flags", "remunk_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_public_refs,
{ "PublicRefs", "remunk_public_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_reminterfaceref,
{ "RemInterfaceRef", "remunk_reminterfaceref", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_interface_refs,
{ "InterfaceRefs", "remunk_int_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_remunk_private_refs,
{ "PrivateRefs", "remunk_private_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}
};
static gint *ett_remunk_array[] = {
&ett_remunk,
&ett_remunk_rqi_result,
&ett_remunk2,
&ett_remunk_reminterfaceref
};
proto_remunk = proto_register_protocol ("IRemUnknown", "IRemUnknown", "remunk");
proto_register_field_array (proto_remunk, hf_remunk_rqi_array, array_length (hf_remunk_rqi_array));
static gint *ett_remunk_array[] = {
&ett_remunk,
&ett_remunk_rqi_result,
&ett_remunk2,
&ett_remunk_reminterfaceref
};
proto_remunk2 = proto_register_protocol ("IRemUnknown2", "IRemUnknown2", "remunk2");
proto_remunk = proto_register_protocol ("IRemUnknown", "IRemUnknown", "remunk");
proto_register_field_array (proto_remunk, hf_remunk_rqi_array, array_length (hf_remunk_rqi_array));
proto_register_subtree_array (ett_remunk_array, array_length (ett_remunk_array));
proto_remunk2 = proto_register_protocol ("IRemUnknown2", "IRemUnknown2", "remunk2");
proto_register_subtree_array (ett_remunk_array, array_length (ett_remunk_array));
}
void
@ -373,12 +373,12 @@ proto_reg_handoff_remunk (void)
/* Register the IPID */
guids_add_uuid(&ipid_remunk, "IPID-IRemUnknown");
/* Register the interfaces */
dcerpc_init_uuid(proto_remunk, ett_remunk,
&uuid_remunk, ver_remunk,
remunk_dissectors, hf_remunk_opnum);
/* Register the interfaces */
dcerpc_init_uuid(proto_remunk, ett_remunk,
&uuid_remunk, ver_remunk,
remunk_dissectors, hf_remunk_opnum);
dcerpc_init_uuid(proto_remunk2, ett_remunk2,
&uuid_remunk2, ver_remunk2,
remunk2_dissectors, hf_remunk_opnum);
dcerpc_init_uuid(proto_remunk2, ett_remunk2,
&uuid_remunk2, ver_remunk2,
remunk2_dissectors, hf_remunk_opnum);
}

File diff suppressed because it is too large Load Diff

View File

@ -604,7 +604,7 @@ de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
proto_tree_add_text(tf_tree,
tvb, curr_offset, 1,
"Split PG Cycle Code: %s (%u)",
str,
str,
oct);
curr_offset++;
@ -670,7 +670,7 @@ de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
proto_item *curr_item;
curr_offset = offset;
curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig,tvb,curr_offset,3,FALSE);
proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
@ -888,7 +888,7 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
proto_item *item;
curr_offset = offset;
/* bit 8: GEA1 */
proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_gea1, tvb, curr_offset, 1, FALSE);
@ -926,7 +926,7 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea6, tvb, curr_offset, 1, FALSE);
proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea7, tvb, curr_offset, 1, FALSE);
/* bit 1: LCS VA capability */
/* bit 1: LCS VA capability */
proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_lcs, tvb, curr_offset, 1, FALSE);
curr_offset++;
@ -954,7 +954,7 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+6, 2, FALSE);
curr_offset++;
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
return(curr_offset - offset);
}
@ -1047,7 +1047,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
"Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:2 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)", /* 16 */
"Max Rx-Slot/TDMA:7 Max Tx-Slot/TDMA:7 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:1 Trb:0 Type:2 (a: 1 with frequency hopping, 0 otherwise)", /* 17 */
"Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:8 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:0 Tra:0 Trb:0 Type:2", /* 18 */
"Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 19 */
"Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 19 */
"Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 20 */
"Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 21 */
"Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 22 */
@ -1127,7 +1127,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
curr_bits_length -= bits_needed;
oct <<= bits_needed;
bits_in_oct -= bits_needed;
if (( curr_len*8 + bits_in_oct ) < 11 )
break;
curr_bits_length = 11;
@ -1281,7 +1281,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
{
/* 0 GSM P
* 1 GSM E
* 2 GSM R
* 2 GSM R
* 5 GSM 450
* 6 GSM 480
* 7 GSM 850
@ -1418,7 +1418,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
curr_bits_length -= bits_needed;
oct <<= bits_needed;
bits_in_oct -= bits_needed;
for (i=1; i<= 7 ; i++ )
{
/*
@ -1855,7 +1855,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
case 3: str="Multislot class 11 supported"; break;
default: str="This should not happen";
}
proto_tree_add_text(tf_tree,
tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
"DTM GPRS Multi Slot Class: %s (%u)",str,oct>>(32-bits_needed));
@ -2368,7 +2368,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
case 0x03: str="GMSK_MULTISLOT_POWER_PROFILE 3"; break;
default: str="This should not happen";
}
proto_tree_add_text(tf_tree,
tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
"GMSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
@ -2392,7 +2392,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
case 0x03: str="8-PSK_MULTISLOT_POWER_PROFILE 3"; break;
default: str="This should not happen";
}
proto_tree_add_text(tf_tree,
tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
"8-PSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
@ -2421,7 +2421,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
} while ( 1 );
curr_offset+= curr_len;
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
return(curr_offset - offset);
@ -2483,7 +2483,7 @@ static const range_string gmm_cause_vals[] = {
{ 0x70, 0xff, "Protocol error, unspecified(Not def in v8.6.0)"},
{ 0, 0, NULL }
};
/* NOTE 1 TS 124 008 V8.6.0 (2009-07)
/* NOTE 1 TS 124 008 V8.6.0 (2009-07)
"Any other value received by the mobile station shall be treated as 0110 1111, "Protocol
error, unspecified". Any other value received by the network shall be treated as
0110 1111, "Protocol error, unspecified".
@ -3297,7 +3297,7 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
else if ((pdp_type_num == 0) && (pdp_type_org == 0x0f))
str="Empty";
else
str="Not specified";
str="Not specified";
proto_tree_add_text(tree,
tvb, curr_offset, 1,
@ -3321,7 +3321,7 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
}
curr_offset += 1;
if (pdp_type_org == 1)
if (pdp_type_org == 1)
switch (pdp_type_num)
{
case 0x57:
@ -3340,7 +3340,7 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,FALSE);
curr_offset+=4;
}
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
return(curr_offset - offset);
@ -3592,7 +3592,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -3608,7 +3608,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -3639,7 +3639,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
str = ep_strdup_printf("%u ms", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_trans_delay, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_trans_delay, tvb,
curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
tmp_oct = oct & 0x03;
@ -3648,7 +3648,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
else
str = ep_strdup_printf("Priority level %u", tmp_oct);
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_traf_handl_prio, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_traf_handl_prio, tvb,
curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
curr_offset+= 1;
@ -3664,7 +3664,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -3680,7 +3680,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -3697,7 +3697,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
else
str = "unknown";
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_source_stat_desc, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_source_stat_desc, tvb,
curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
curr_offset+= 1;
@ -3716,7 +3716,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
else
str = ep_strdup_printf("%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -3735,7 +3735,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
else
str = ep_strdup_printf("%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl_ext, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -3754,7 +3754,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
else
str = ep_strdup_printf("%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl_ext, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -3773,7 +3773,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
else
str = ep_strdup_printf("%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl_ext, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -3917,7 +3917,7 @@ de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
}
curr_offset+= curr_len;
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
return(curr_offset - offset);
@ -3980,11 +3980,11 @@ guint16
de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 1, FALSE);
proto_tree_add_item(tree, hf_gsm_a_sm_packet_flow_id, tvb, offset, 1, FALSE);
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
return(curr_offset - offset);
@ -4111,7 +4111,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
proto_tree_add_text(tf_tree,
tvb, curr_offset-1, 1,
"Packet evaluation precedence: 0x%02x (%u)",oct,oct );
"Packet evaluation precedence: 0x%02x (%u)",oct,oct );
if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); return(len);}
pf_length = tvb_get_guint8(tvb, curr_offset);
@ -4120,7 +4120,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
proto_tree_add_text(tf_tree,
tvb, curr_offset-1, 1,
"Packet filter length: 0x%02x (%u)",pf_length,pf_length );
"Packet filter length: 0x%02x (%u)",pf_length,pf_length );
/* New tree for component */
/* Dissect Packet filter Component */
@ -4140,7 +4140,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
comp_tree = proto_item_add_subtree(tf, ett_sm_tft );
switch ( pack_component_type ){
case 0x10:
str="IPv4 remote address type";
proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,FALSE);
@ -4248,7 +4248,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Authorization token value: 0x%s",
tvb_bytes_to_str(tvb, curr_offset, pf_length));
break;
case 0x02:
proto_tree_add_text(tf_tree, tvb, curr_offset, 2, "Media Component number value: 0x%x",
tvb_get_bits16(tvb, curr_offset<<3, 16, FALSE));
@ -4285,7 +4285,7 @@ de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *ad
{
guint32 curr_offset;
curr_offset = offset;
curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_sm_tmgi, tvb, curr_offset, 3, FALSE);
curr_offset += 3;
@ -4319,7 +4319,7 @@ de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -4337,7 +4337,7 @@ de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
else
str = ep_strdup_printf("%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
curr_offset+= 1;
@ -4383,7 +4383,7 @@ de_sm_enh_nsapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
str = "Reserved for use by lower layers in the p2p radio bearer allocation message for MBMS Broadcast mode";
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb,
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb,
offset, 1, oct, "%s (%u)", str, oct);
/* no length check possible */
@ -4454,7 +4454,7 @@ guint16 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
de_sm_tmgi, /* Temporary Mobile Group Identity (TMGI) */
de_sm_mbms_bearer_cap, /* MBMS bearer capabilities */
de_sm_mbms_prot_conf_opt, /* MBMS protocol configuration options */
de_sm_enh_nsapi, /* Enhanced network service access point identifier */
de_sm_enh_nsapi, /* Enhanced network service access point identifier */
de_sm_req_type, /* Request type */
/* GPRS Common Information Elements 10.5.7 */
de_gc_context_stat, /* PDP Context Status */
@ -4659,7 +4659,7 @@ dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE );
curr_len++;
curr_offset--;
ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND );
}
@ -4769,7 +4769,7 @@ dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
EXTRANEOUS_DATA_CHECK(curr_len, 0);
return;
}
ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN , NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0);
@ -5679,7 +5679,7 @@ dtap_sm_act_mbms_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
EXTRANEOUS_DATA_CHECK(curr_len, 0);
}
/*
* [9] 9.5.25 Request MBMS Context Activation
*/
@ -5945,7 +5945,7 @@ proto_register_gsm_a_gm(void)
NULL, HFILL }
},
{ &hf_gsm_a_tft_port,
{ "Port", "gsm_a.tft.port",
{ "Port", "gsm_a.tft.port",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},

View File

@ -330,7 +330,7 @@ const value_string gsm_rr_elem_strings[] = {
const value_string gsm_rr_rest_octets_elem_strings[] = {
/* RR Rest Octets information elements */
{ 0, "UTRAN FDD Description" },
{ 0, "UTRAN TDD Description" },
{ 0, "UTRAN TDD Description" },
{ 0, "3G Measurement Parameters Description" },
{ 0, "3G Additional Measurement Parameters Description" },
{ 0, "Measurement Parameters Description" },
@ -922,14 +922,14 @@ static void dissect_channel_list_n_range(tvbuff_t *tvb, proto_tree *tree, guint3
static guint16
dissect_arfcn_list_core(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_, guint8 format)
{
guint32 curr_offset;
guint32 curr_offset;
guint8 oct,bit,byte;
guint16 arfcn;
proto_item *item;
curr_offset = offset;
if ((format & 0xc0) == 0x00)
if ((format & 0xc0) == 0x00)
{
/* bit map 0 */
item = proto_tree_add_text(tree,tvb, curr_offset, len, "List of ARFCNs =");
@ -997,7 +997,7 @@ dissect_arfcn_list_core(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
}
}
return(curr_offset - offset);
return(curr_offset - offset);
}
/*
@ -1019,7 +1019,7 @@ dissect_arfcn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
curr_offset += dissect_arfcn_list_core(tvb, tree, offset, len, add_string, string_len, oct);
return(curr_offset - offset);
return(curr_offset - offset);
}
/*
@ -1034,7 +1034,7 @@ dissect_arfcn_list2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
curr_offset = offset;
/* Turn bit 127 off, in order to reuse the ARFCN dissection code */
/* Turn bit 127 off, in order to reuse the ARFCN dissection code */
oct = tvb_get_guint8(tvb, curr_offset) & 0xbf;
/* FORMAT-ID, Format Identifier (part of octet 3)*/
@ -1042,7 +1042,7 @@ dissect_arfcn_list2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
curr_offset += dissect_arfcn_list_core(tvb, tree, offset, len, add_string, string_len, oct);
return(curr_offset - offset);
return(curr_offset - offset);
}
guint16
@ -1061,7 +1061,7 @@ de_rr_ba_list_pref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
guint8 value;
curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_rr_ba_list_pref_length, tvb, curr_offset, 1, FALSE);
proto_tree_add_item(tree, hf_gsm_a_rr_ba_list_pref_length, tvb, curr_offset, 1, FALSE);
bit_offset = curr_offset << 3;
value = tvb_get_bits8(tvb,bit_offset,1);
bit_offset += 1;
@ -1099,7 +1099,7 @@ de_rr_utran_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
guint8 value;
curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_rr_utran_freq_list_length, tvb, curr_offset, 1, FALSE);
proto_tree_add_item(tree, hf_gsm_a_rr_utran_freq_list_length, tvb, curr_offset, 1, FALSE);
bit_offset = curr_offset << 3;
value = tvb_get_bits8(tvb,bit_offset,1);
bit_offset += 1;
@ -1174,7 +1174,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
break;
case 1: /* UTRAN FDD Description */
bit_offset_sav = bit_offset;
item = proto_tree_add_text(tree, tvb, bit_offset>>3, -1, "%s",
item = proto_tree_add_text(tree, tvb, bit_offset>>3, -1, "%s",
gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC].strptr);
subtree = proto_item_add_subtree(item, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
value = tvb_get_bits8(tvb,bit_offset,1);
@ -1216,7 +1216,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
nwi = 1;
jwi = 0;
i = 1;
while (idx > 0)
{
w[i] = tvb_get_bits(tvb, bit_offset, wsize, FALSE);
@ -1240,13 +1240,13 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
bit_offset += idx;
}
iused = i-1;
for (i=1; i <= iused; i++)
{
xdd_cell_info = f_k(i, w, 1024);
proto_tree_add_text(subtree2,tvb, bit_offset>>3, 0,
proto_tree_add_text(subtree2,tvb, bit_offset>>3, 0,
"Scrambling Code: %d", xdd_cell_info & 0x01FF);
proto_tree_add_text(subtree2,tvb, bit_offset>>3, 0,
proto_tree_add_text(subtree2,tvb, bit_offset>>3, 0,
"Diversity: %d", (xdd_cell_info >> 9) & 0x01);
}
}
@ -1286,7 +1286,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
proto_tree_add_text(subtree,tvb, bit_offset>>3, 1, "Nr of TDD Cells : %d", idx);
bit_offset += 5;
idx = convert_n_to_q[idx];
item2 = proto_tree_add_text(subtree,tvb, bit_offset>>3, (idx>>3)+1, "%s",
item2 = proto_tree_add_text(subtree,tvb, bit_offset>>3, (idx>>3)+1, "%s",
gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC].strptr);
subtree2 = proto_item_add_subtree(item2, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_TDD_CELL_INFORMATION_FIELD]);
proto_tree_add_text(subtree2,tvb, bit_offset>>3, (idx>>3)+1, "Field is %d bits long", idx);
@ -1302,7 +1302,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
nwi = 1;
jwi = 0;
i = 1;
while (idx > 0)
{
w[i] = tvb_get_bits(tvb, bit_offset, wsize, FALSE);
@ -1326,7 +1326,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
bit_offset += idx;
}
iused = i-1;
for (i=1; i <= iused; i++)
{
xdd_cell_info = f_k(i, w, 512);
@ -1562,7 +1562,7 @@ de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
str = "Unknown channel information";
subchannel = oct8;
}
other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s %d",a_bigbuf,str,subchannel);
}
@ -1571,12 +1571,12 @@ de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
curr_offset +=1;
/* Octet 3 */
oct8 = tvb_get_guint8(tvb, curr_offset);
other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Training Sequence: %d",a_bigbuf,((oct8 & 0xe0)>>5));
if ((oct8 & 0x10) == 0x10)
{
@ -1602,7 +1602,7 @@ de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
}
curr_offset = curr_offset + 2;
return(curr_offset - offset);
@ -1685,7 +1685,7 @@ de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
curr_offset +=1;
/* Octet 3 */
oct8 = tvb_get_guint8(tvb, curr_offset);
other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
@ -1715,7 +1715,7 @@ de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
}
curr_offset = curr_offset + 2;
return(curr_offset - offset);
@ -1769,7 +1769,7 @@ de_rr_ch_dsc3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
}
curr_offset = curr_offset + 2;
return(curr_offset - offset);
@ -2104,7 +2104,7 @@ de_rr_ctrl_ch_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
/* [3] 10.5.2.11a DTM Information Details
*/
/*
* [3] 10.5.2.11b Dynamic ARFCN Mapping
* [3] 10.5.2.11b Dynamic ARFCN Mapping
*/
static const value_string gsm_a_rr_gsm_band_vals[] = {
{ 0, "GSM 750"},
@ -2190,7 +2190,7 @@ de_rr_freq_ch_seq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
*/
/*
* [3] 10.5.2.13 Frequency List
*
*
* Bit Bit Bit Bit Bit format notation
* 8 7 4 3 2
* 0 0 X X X bit map 0
@ -2200,7 +2200,7 @@ de_rr_freq_ch_seq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
* 1 0 1 1 0 128 range
* 1 0 1 1 1 variable bit map
*/
/* The mask 0xce (1100 1110) will produce the result 0110 0111*/
/* The mask 0xce (1100 1110) will produce the result 0110 0111*/
static const value_string gsm_a_rr_freq_list_format_id_vals[] = {
{ 0x00, "bit map 0"},
{ 0x02, "bit map 0"},
@ -2404,7 +2404,7 @@ de_rr_rest_oct_gprs_power_control_parameters(tvbuff_t *tvb, proto_tree *tree, gi
proto_tree *subtree;
proto_item *item;
gint curr_bit_offset;
curr_bit_offset = bit_offset;
item = proto_tree_add_text(tree, tvb, curr_bit_offset>>3, -1, "%s", gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GPRS_POWER_CONTROL_PARAMS].strptr);
@ -2434,7 +2434,7 @@ de_rr_gprs_broadcast_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
bit_offset = curr_offset << 3;
bit_offset += de_rr_rest_oct_gprs_cell_options(tvb, tree, bit_offset);
bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, tree, bit_offset);
bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, tree, bit_offset);
curr_offset += len;
return (curr_offset - offset);
@ -2644,10 +2644,10 @@ de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
curr_offset++;
/* 3rd octet */
/* 3G-BA-USED */
/* 3G-BA-USED */
proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_ba_used, tvb, curr_offset<<3, 1, FALSE);
/* MEAS-VALID */
proto_tree_add_item(subtree, hf_gsm_a_rr_meas_valid, tvb, curr_offset, 1, FALSE);
proto_tree_add_item(subtree, hf_gsm_a_rr_meas_valid, tvb, curr_offset, 1, FALSE);
/* RXLEV-SUB-SERVING-CELL */
proto_tree_add_item(subtree, hf_gsm_a_rr_rxlev_sub_serv_cell, tvb, curr_offset, 1, FALSE);
@ -3233,12 +3233,12 @@ de_rr_packet_ch_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
curr_offset +=1;
/* Octet 3 */
oct8 = tvb_get_guint8(tvb, curr_offset);
other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Training Sequence: %d",a_bigbuf,((oct8 & 0xe0)>>5));
if ((oct8 & 0x10) == 0x10)
{
/* Hopping sequence */
@ -4044,7 +4044,7 @@ de_rr_si2quater_meas_info_utran_fdd_desc(tvbuff_t *tvb, proto_tree *tree, gint b
gint xdd_cell_info, wsize, nwi, jwi, w[64], i, iused, xdd_indic0;
guint8 value;
curr_bit_offset = bit_offset;
curr_bit_offset = bit_offset;
item = proto_tree_add_text(tree, tvb, curr_bit_offset>>3, -1, "%s", gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC].strptr);
subtree = proto_item_add_subtree(item, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
@ -4132,7 +4132,7 @@ de_rr_si2quater_meas_info_utran_tdd_desc(tvbuff_t *tvb, proto_tree *tree, gint b
gint xdd_cell_info, wsize, nwi, jwi, w[64], i, iused, xdd_indic0;
guint8 value;
curr_bit_offset = bit_offset;
curr_bit_offset = bit_offset;
item = proto_tree_add_text(tree, tvb, curr_bit_offset>>3, -1, "%s", gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC].strptr);
subtree = proto_item_add_subtree(item, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_TDD_DESC]);
@ -5055,7 +5055,7 @@ de_rr_si3_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si13alt_position, tvb, bit_offset, 1, FALSE);
bit_offset += 1;
}
curr_offset = curr_offset + len;
return curr_offset-offset;
@ -5867,7 +5867,7 @@ de_rr_si13_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
proto_tree_add_bits_item(subtree, hf_gsm_a_rr_network_control_order, tvb, bit_offset, 2, FALSE);
bit_offset += 2;
bit_offset += de_rr_rest_oct_gprs_cell_options(tvb, subtree, bit_offset);
bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, subtree, bit_offset);
bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, subtree, bit_offset);
}
if (gsm_a_rr_is_bit_high(tvb,bit_offset) == TRUE)
{ /* Additions in release 99 */
@ -6166,7 +6166,7 @@ de_rr_ext_meas_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
curr_offset = offset;
proto_tree_add_bits_item(tree, hf_gsm_a_rr_seq_code, tvb,(curr_offset<<3)+3, 1, FALSE);
return dissect_arfcn_list(tvb, tree, offset, 16, add_string, string_len);
}
@ -6201,8 +6201,8 @@ de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
* [3] 10.5.2.48 APDU ID
*/
static const value_string gsm_a_rr_apdu_id_vals[] = {
{ 0, "RRLP (GSM 04.31) LCS" },
{ 0, NULL },
{ 0, "RRLP (GSM 04.31) LCS" },
{ 0, NULL },
};
static guint16
de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
@ -6216,9 +6216,9 @@ de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
* [3] 10.5.2.49 APDU Flags
*/
static const value_string gsm_a_rr_apdu_flags_vals[] = {
{ 1, "Last or only segment" },
{ 2, "First or only segment" },
{ 0, NULL },
{ 1, "Last or only segment" },
{ 2, "First or only segment" },
{ 0, NULL },
};
static guint16
de_rr_apdu_flags(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
@ -6257,7 +6257,7 @@ de_rr_ho_to_utran_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
{
rrc_irat_ho_to_utran_cmd_tvb = tvb_new_subset(tvb, curr_offset, len, len);
if (rrc_irat_ho_to_utran_cmd_handle && gsm_a_dtap_pinfo)
/* gsm_a_dtap_pinfo MUST be set by any dissector calling de_rr_ho_to_utran_cmd */
/* gsm_a_dtap_pinfo MUST be set by any dissector calling de_rr_ho_to_utran_cmd */
call_dissector(rrc_irat_ho_to_utran_cmd_handle, rrc_irat_ho_to_utran_cmd_tvb, gsm_a_dtap_pinfo, tree);
}
@ -8570,7 +8570,7 @@ dissect_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_L2_PSEUDO_LEN);
tree = saved_tree;
offset = saved_offset;
len = curr_len;
len = curr_len;
oct_1_item =
proto_tree_add_text(ccch_tree,
@ -10134,7 +10134,7 @@ proto_register_gsm_a_rr(void)
}
};
/* Setup protocol subtree array */
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 3
gint *ett[NUM_INDIVIDUAL_ELEMS +
NUM_GSM_DTAP_MSG_RR +

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -18,12 +18,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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -276,7 +276,7 @@ static const value_string isns_function_ids[] = {
static const value_string isns_entity_protocol[] = {
{ISNS_ENTITY_PROTOCOL_NO_PROTOCOL, "No Protocol"},
{ISNS_ENTITY_PROTOCOL_ISCSI, "iSCSI"},
{ISNS_ENTITY_PROTOCOL_IFCP, "iFCP"},
{ISNS_ENTITY_PROTOCOL_IFCP, "iFCP"},
{0x0,NULL},
};
@ -306,7 +306,7 @@ static const value_string isns_errorcode[] = {
{21,"ESI Not Available"},
{22,"Invalid Deregistration"},
{23,"Registration Feature Not Supported"},
{0x0,NULL}
};
@ -562,29 +562,29 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti = NULL;
proto_tree *isns_tree = NULL;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "iSNS");
col_clear(pinfo->cinfo, COL_INFO);
/* Get the protocol version - only version one at the moment*/
/* Get the protocol version - only version one at the moment*/
isns_protocol_version = tvb_get_ntohs(tvb, offset + 0);
/* Get the function id from the packet */
function_id = tvb_get_ntohs(tvb, offset + 2);
/* Add the function name in the info col */
if (check_col(pinfo->cinfo, COL_INFO))
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(function_id, isns_function_ids,
"Unknown function ID 0x%04x"));
/* In the interest of speed, if "tree" is NULL, don't do any work not
* necessary to generate protocol tree items.
* necessary to generate protocol tree items.
*/
if (tree) {
guint16 b;
guint16 flags;
guint16 b;
guint16 flags;
proto_tree *tt;
proto_item *tflags;
proto_item *tpayload;
@ -594,7 +594,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* display window when the line in the protocol tree display
* corresponding to that item is selected.
* tvb_length(tvb) is a handy way to highlight all data from the offset to
* the end of the packet.
* the end of the packet.
*/
/* create display subtree for the protocol */
@ -690,7 +690,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
case ISNS_FUNC_DEVATTRREG:
case ISNS_FUNC_DEVATTRQRY:
case ISNS_FUNC_DEVGETNEXT:
case ISNS_FUNC_DEVGETNEXT:
case ISNS_FUNC_DEREGDEV:
case ISNS_FUNC_SCNREG:
case ISNS_FUNC_SCNDEREG:
@ -732,247 +732,247 @@ get_isns_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
static int
dissect_isns_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
gint length = tvb_length(tvb);
guint16 isns_protocol_version;
guint16 function_id;
{
gint length = tvb_length(tvb);
guint16 isns_protocol_version;
guint16 function_id;
if (length < ISNS_HEADER_SIZE) {
/*
* Not enough room to see if this is valid iSNS.
*/
return 0;
}
if (length < ISNS_HEADER_SIZE) {
/*
* Not enough room to see if this is valid iSNS.
*/
return 0;
}
/* Get the protocol version - only version one at the moment*/
isns_protocol_version = tvb_get_ntohs(tvb, 0);
if (isns_protocol_version != ISNS_PROTO_VER)
return 0;
/* Get the protocol version - only version one at the moment*/
isns_protocol_version = tvb_get_ntohs(tvb, 0);
if (isns_protocol_version != ISNS_PROTO_VER)
return 0;
/* Get the function id from the packet */
function_id = tvb_get_ntohs(tvb, 2);
if (match_strval(function_id, isns_function_ids) == NULL) {
/* Unknown function ID */
return 0;
}
/* Get the function id from the packet */
function_id = tvb_get_ntohs(tvb, 2);
if (match_strval(function_id, isns_function_ids) == NULL) {
/* Unknown function ID */
return 0;
}
tcp_dissect_pdus(tvb, pinfo, tree, isns_desegment, 12, get_isns_pdu_len,
dissect_isns_pdu);
return length;
tcp_dissect_pdus(tvb, pinfo, tree, isns_desegment, 12, get_isns_pdu_len,
dissect_isns_pdu);
return length;
}
static int
dissect_isns_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
gint length = tvb_length(tvb);
guint16 isns_protocol_version;
guint16 function_id;
{
gint length = tvb_length(tvb);
guint16 isns_protocol_version;
guint16 function_id;
if (length < ISNS_HEADER_SIZE) {
/*
* Not enough room to see if this is valid iSNS.
*/
return 0;
}
if (length < ISNS_HEADER_SIZE) {
/*
* Not enough room to see if this is valid iSNS.
*/
return 0;
}
/* Get the protocol version - only version one at the moment*/
isns_protocol_version = tvb_get_ntohs(tvb, 0);
if (isns_protocol_version != ISNS_PROTO_VER)
return 0;
/* Get the protocol version - only version one at the moment*/
isns_protocol_version = tvb_get_ntohs(tvb, 0);
if (isns_protocol_version != ISNS_PROTO_VER)
return 0;
/* Get the function id from the packet */
function_id = tvb_get_ntohs(tvb, 2);
if (match_strval(function_id, isns_function_ids) == NULL) {
/* Unknown function ID */
return 0;
}
/* Get the function id from the packet */
function_id = tvb_get_ntohs(tvb, 2);
if (match_strval(function_id, isns_function_ids) == NULL) {
/* Unknown function ID */
return 0;
}
dissect_isns_pdu(tvb, pinfo, tree);
return length;
dissect_isns_pdu(tvb, pinfo, tree);
return length;
}
static guint
dissect_isns_attr_ip_address(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
proto_item *item=NULL;
proto_tree *tree=NULL;
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
return offset+8+len;
return offset+8+len;
}
static guint
dissect_isns_attr_string(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
proto_item *item=NULL;
proto_tree *tree=NULL;
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
return offset+8+len;
return offset+8+len;
}
static guint
dissect_isns_attr_integer(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len, guint16 function_id)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
proto_item *item=NULL;
proto_tree *tree=NULL;
/*
* 5.6.5.1
* in a DevAttrReg , the PGT (tag 51) may be sent as 0 length
* which then means that we wish to register the portal group tag
* as NULL.
* (At least) some servers will respond with PGT as a 0 length
* value in these instances in the DevAttrRegRsp (eventhough I can
* not find this mentioned in the standard) so allow it for the
* response as well.
*/
if(len){
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
} else if((tag==ISNS_ATTR_TAG_PORTAL_GROUP_TAG)&&((function_id==ISNS_FUNC_DEVATTRREG)||(function_id==ISNS_FUNC_RSP_DEVATTRREG))){
/* 5.6.5.1 */
if(parent_tree){
item=proto_tree_add_uint_format(parent_tree, hf_isns_portal_group_tag, tvb, offset, 8, 0, "PG Tag: <NULL>");
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
} else {
if(parent_tree){
item=proto_tree_add_text(parent_tree, tvb, offset, 8, "Oops, you surprised me here. a 0 byte integer.");
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
}
/*
* 5.6.5.1
* in a DevAttrReg , the PGT (tag 51) may be sent as 0 length
* which then means that we wish to register the portal group tag
* as NULL.
* (At least) some servers will respond with PGT as a 0 length
* value in these instances in the DevAttrRegRsp (eventhough I can
* not find this mentioned in the standard) so allow it for the
* response as well.
*/
if(len){
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
} else if((tag==ISNS_ATTR_TAG_PORTAL_GROUP_TAG)&&((function_id==ISNS_FUNC_DEVATTRREG)||(function_id==ISNS_FUNC_RSP_DEVATTRREG))){
/* 5.6.5.1 */
if(parent_tree){
item=proto_tree_add_uint_format(parent_tree, hf_isns_portal_group_tag, tvb, offset, 8, 0, "PG Tag: <NULL>");
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
} else {
if(parent_tree){
item=proto_tree_add_text(parent_tree, tvb, offset, 8, "Oops, you surprised me here. a 0 byte integer.");
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
}
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
return offset+8+len;
return offset+8+len;
}
static guint
dissect_isns_attr_port(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len,
guint16 isns_port_type, packet_info *pinfo)
{
proto_item *tree=NULL;
proto_item *item=NULL;
guint16 port = tvb_get_ntohs(tvb, offset + 10);
guint16 isudp = tvb_get_ntohs(tvb, offset + 8)&0x01;
conversation_t *conversation;
proto_item *tree=NULL;
proto_item *item=NULL;
guint16 port = tvb_get_ntohs(tvb, offset + 10);
guint16 isudp = tvb_get_ntohs(tvb, offset + 8)&0x01;
conversation_t *conversation;
if(parent_tree){
item = proto_tree_add_uint(parent_tree, hf_index, tvb, offset+8, 4, port);
tree = proto_item_add_subtree(item, ett_isns_port);
}
if(parent_tree){
item = proto_tree_add_uint(parent_tree, hf_index, tvb, offset+8, 4, port);
tree = proto_item_add_subtree(item, ett_isns_port);
}
proto_tree_add_boolean(tree, hf_isns_port_type, tvb, offset+8, 2, isudp);
proto_tree_add_boolean(tree, hf_isns_port_type, tvb, offset+8, 2, isudp);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
if ((isns_port_type == ISNS_ESI_PORT) || (isns_port_type == ISNS_SCN_PORT)) {
if (isudp) {
conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP,
port, 0, NO_PORT_B);
if (conversation == NULL) {
conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
PT_UDP, port, 0, NO_PORT2_FORCE);
conversation_set_dissector (conversation, isns_udp_handle);
}
}
else {
conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_TCP,
port, 0, NO_PORT_B);
if (conversation == NULL) {
conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
PT_TCP, port, 0, NO_PORT2_FORCE);
conversation_set_dissector (conversation, isns_tcp_handle);
}
if ((isns_port_type == ISNS_ESI_PORT) || (isns_port_type == ISNS_SCN_PORT)) {
if (isudp) {
conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP,
port, 0, NO_PORT_B);
if (conversation == NULL) {
conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
PT_UDP, port, 0, NO_PORT2_FORCE);
conversation_set_dissector (conversation, isns_udp_handle);
}
}
else {
conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_TCP,
port, 0, NO_PORT_B);
if (conversation == NULL) {
conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
PT_TCP, port, 0, NO_PORT2_FORCE);
conversation_set_dissector (conversation, isns_tcp_handle);
}
}
}
return offset+8+len;
return offset+8+len;
}
static guint
dissect_isns_attr_none(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
{
proto_item *tree=NULL;
proto_item *item=NULL;
proto_item *tree=NULL;
proto_item *item=NULL;
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, 8, FALSE);
tree = proto_item_add_subtree(item, ett_isns_port);
}
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, 8, FALSE);
tree = proto_item_add_subtree(item, ett_isns_port);
}
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
return offset+8+len;
return offset+8+len;
}
static guint
dissect_isns_attr_not_decoded_yet(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
{
proto_item *tree=NULL;
proto_item *item=NULL;
proto_item *tree=NULL;
proto_item *item=NULL;
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_port);
}
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_port);
}
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
return offset+8+len;
return offset+8+len;
}
static guint
dissect_isns_attr_iscsi_node_type(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
guint32 node_type=tvb_get_ntohl(tvb, offset + 8);
proto_item *item=NULL;
proto_tree *tree=NULL;
guint32 node_type=tvb_get_ntohl(tvb, offset + 8);
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
proto_tree_add_boolean(tree, hf_isns_isnt_control, tvb, offset+8, 4, node_type);
if(node_type&0x00000004){
proto_item_append_text(item, " Control");
}
proto_tree_add_boolean(tree, hf_isns_isnt_initiator, tvb, offset+8, 4, node_type);
if(node_type&0x00000002){
proto_item_append_text(item, " Initiator");
}
proto_tree_add_boolean(tree, hf_isns_isnt_target, tvb, offset+8, 4, node_type);
if(node_type&0x00000001){
proto_item_append_text(item, " Target");
}
proto_tree_add_boolean(tree, hf_isns_isnt_control, tvb, offset+8, 4, node_type);
if(node_type&0x00000004){
proto_item_append_text(item, " Control");
}
proto_tree_add_boolean(tree, hf_isns_isnt_initiator, tvb, offset+8, 4, node_type);
if(node_type&0x00000002){
proto_item_append_text(item, " Initiator");
}
proto_tree_add_boolean(tree, hf_isns_isnt_target, tvb, offset+8, 4, node_type);
if(node_type&0x00000001){
proto_item_append_text(item, " Target");
}
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
return offset+8+len;
return offset+8+len;
}
@ -980,27 +980,27 @@ dissect_isns_attr_iscsi_node_type(tvbuff_t *tvb, guint offset, proto_tree *paren
static guint
dissect_isns_attr_portal_security_bitmap(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
guint32 psb=tvb_get_ntohl(tvb, offset + 8);
proto_item *item=NULL;
proto_tree *tree=NULL;
guint32 psb=tvb_get_ntohl(tvb, offset + 8);
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
proto_tree_add_boolean(tree, hf_isns_psb_tunnel_mode, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_transport_mode, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_pfs, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_aggressive_mode, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_main_mode, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_ike_ipsec, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_bitmap, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_tunnel_mode, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_transport_mode, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_pfs, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_aggressive_mode, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_main_mode, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_ike_ipsec, tvb, offset+8, 4, psb);
proto_tree_add_boolean(tree, hf_isns_psb_bitmap, tvb, offset+8, 4, psb);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
return offset+8+len;
return offset+8+len;
}
@ -1008,39 +1008,39 @@ dissect_isns_attr_portal_security_bitmap(tvbuff_t *tvb, guint offset, proto_tree
static guint
dissect_isns_attr_scn_bitmap(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
guint32 scn_bitmap=tvb_get_ntohl(tvb, offset + 8);
proto_item *item=NULL;
proto_tree *tree=NULL;
guint32 scn_bitmap=tvb_get_ntohl(tvb, offset + 8);
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
if(parent_tree){
item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
tree = proto_item_add_subtree(item, ett_isns_attribute);
}
/*
24 INITIATOR AND SELF INFORMATION ONLY
25 TARGET AND SELF INFORMATION ONLY
26 MANAGEMENT REGISTRATION/SCN
27 OBJECT REMOVED
28 OBJECT ADDED
29 OBJECT UPDATED
30 DD/DDS MEMBER REMOVED (Mgmt Reg/SCN only)
31 (Lsb) DD/DDS MEMBER ADDED (Mgmt Reg/SCN only)
*/
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_initiator_and_self_information_only, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_target_and_self_information_only, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_management_registration_scn, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_removed, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_added, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_updated, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_dd_dds_member_removed, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_dd_dds_member_added, tvb, offset+8, 4, scn_bitmap);
/*
24 INITIATOR AND SELF INFORMATION ONLY
25 TARGET AND SELF INFORMATION ONLY
26 MANAGEMENT REGISTRATION/SCN
27 OBJECT REMOVED
28 OBJECT ADDED
29 OBJECT UPDATED
30 DD/DDS MEMBER REMOVED (Mgmt Reg/SCN only)
31 (Lsb) DD/DDS MEMBER ADDED (Mgmt Reg/SCN only)
*/
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_initiator_and_self_information_only, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_target_and_self_information_only, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_management_registration_scn, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_removed, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_added, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_updated, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_dd_dds_member_removed, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_boolean(tree, hf_isns_scn_bitmap_dd_dds_member_added, tvb, offset+8, 4, scn_bitmap);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
return offset+8+len;
return offset+8+len;
}
@ -1066,7 +1066,7 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
}
return (offset+8);
}
tvb_ensure_bytes_exist(tvb, offset, len+8);
switch( tag )
@ -1078,30 +1078,30 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
dissect_isns_attr_string(tvb, offset, tree, hf_isns_entity_identifier, tag, len);
break;
case ISNS_ATTR_TAG_ENTITY_PROTOCOL:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_protocol, tag, len, function_id);
break;
case ISNS_ATTR_TAG_MGMT_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_mgmt_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_TIMESTAMP:
if(len != 8) THROW(ReportedBoundsError);
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_timestamp, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PROTOCOL_VERSION_RANGE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_REGISTRATION_PERIOD:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_registration_period, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_ISAKMP_PHASE_1:
@ -1113,43 +1113,43 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
case ISNS_ATTR_TAG_PORTAL_IP_ADDRESS:
switch(len){
case 64:
proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PORTAL_IP_ADDRESS tag should be 16 bytes in length");
proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PORTAL_IP_ADDRESS tag should be 16 bytes in length");
case 16:
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_portal_ip_addr, tag, 16);
break;
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_portal_ip_addr, tag, 16);
break;
default:
THROW(ReportedBoundsError);
THROW(ReportedBoundsError);
}
break;
case ISNS_ATTR_TAG_PORTAL_PORT:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_portal_port, tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_SYMBOLIC_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_portal_symbolic_name, tag, len);
break;
case ISNS_ATTR_TAG_ESI_INTERVAL:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_esi_interval, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ESI_PORT:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_esi_port, tag, len, ISNS_ESI_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_SCN_PORT:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_scn_port, tag, len, ISNS_SCN_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_SECURITY_BITMAP:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_portal_security_bitmap(tvb, offset, tree, hf_isns_psb, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_ISAKMP_PHASE_1:
@ -1165,26 +1165,26 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_TYPE:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_iscsi_node_type(tvb, offset, tree, hf_isns_iscsi_node_type, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_ALIAS:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_alias, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_SCN_BITMAP:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_scn_bitmap(tvb, offset, tree, hf_isns_scn_bitmap, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_WWNN_TOKEN:
if(len != 8) THROW(ReportedBoundsError);
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_wwnn_token, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ISCSI_AUTH_METHOD:
@ -1196,64 +1196,64 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
case ISNS_ATTR_TAG_PG_PORTAL_IP_ADDR:
switch(len){
case 64:
proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PG_PORTAL_IP_ADDRESS tag should be 16 bytes in length");
proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PG_PORTAL_IP_ADDRESS tag should be 16 bytes in length");
case 16:
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_pg_portal_ip_addr, tag, 16);
break;
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_pg_portal_ip_addr, tag, 16);
break;
default:
THROW(ReportedBoundsError);
THROW(ReportedBoundsError);
}
break;
case ISNS_ATTR_TAG_PG_PORTAL_PORT:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_pg_portal_port, tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_TAG:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_group_tag, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC_PORT_NAME_WWPN:
if(len != 8) THROW(ReportedBoundsError);
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_port_name_wwpn, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORT_ID:
if(len != 3) THROW(ReportedBoundsError);
if(len != 3) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_port_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC_PORT_TYPE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
0x0000 Unidentified/Null Entry
0x0001 Fibre Channel N_Port
0x0002 Fibre Channel NL_Port
0x0003 Fibre Channel F/NL_Port
0x0081 Fibre Channel F_Port
0x0082 Fibre Channel FL_Port
0x0084 Fibre Channel E_Port
0xFF12 iFCP Port
0x0000 Unidentified/Null Entry
0x0001 Fibre Channel N_Port
0x0002 Fibre Channel NL_Port
0x0003 Fibre Channel F/NL_Port
0x0081 Fibre Channel F_Port
0x0082 Fibre Channel FL_Port
0x0084 Fibre Channel E_Port
0xFF12 iFCP Port
*/
case ISNS_ATTR_TAG_SYMBOLIC_PORT_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_port_name, tag, len);
break;
case ISNS_ATTR_TAG_FABRIC_PORT_NAME:
if(len != 8) THROW(ReportedBoundsError);
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fabric_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_HARD_ADDRESS:
if(len != 3) THROW(ReportedBoundsError);
if(len != 3) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_hard_address, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORT_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_port_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_CLASS_OF_SERVICE:
@ -1289,12 +1289,12 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
bit 29 Control
bit 30 FCP Initiator
bit 31 (Lsb) FCP Target
bit 29 Control
bit 30 FCP Initiator
bit 31 (Lsb) FCP Target
*/
case ISNS_ATTR_TAG_PERMANENT_PORT_NAME:
if(len != 8) THROW(ReportedBoundsError);
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_permanent_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC4_TYPE_CODE:
@ -1302,44 +1302,44 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
break;
/* 8bit type code in byte0 */
case ISNS_ATTR_TAG_FC_NODE_NAME_WWNN:
if(len != 8) THROW(ReportedBoundsError);
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_node_name_wwnn, tag, len, function_id);
break;
case ISNS_ATTR_TAG_SYMBOLIC_NODE_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_node_name, tag, len);
break;
case ISNS_ATTR_TAG_NODE_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_node_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_NODE_IPA:
if(len != 8) THROW(ReportedBoundsError);
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_ipa, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PROXY_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_proxy_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_SWITCH_NAME:
if(len != 8) THROW(ReportedBoundsError);
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_switch_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PREFERRED_ID:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_preferred_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ASSIGNED_ID:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_assigned_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_VIRTUAL_FABRIC_ID:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_virtual_fabric_id, tag, len);
break;
case ISNS_ATTR_TAG_VENDOR_OUI:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_vendor_oui, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SET_ID:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SET_SYMBOLIC_NAME:
@ -1349,52 +1349,52 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_DD_SET_NEXT_ID:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_next_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_ID:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SYMBOLIC_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_symbolic_name, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_iscsi_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_member_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_FC_PORT_NAME:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_fc_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_INDEX:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_portal_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_dd_member_portal_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_PORT:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_dd_member_portal_port,
tag, len, ISNS_OTHER_PORT, pinfo);
tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_DD_FEATURES:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_DD_ID_NEXT_ID:
if(len != 4) THROW(ReportedBoundsError);
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id_next_id, tag, len, function_id);
break;
default:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
}
/* move on the offset to next attribute */
return offset+len+8;
@ -1415,12 +1415,12 @@ void proto_register_isns(void)
/* The Header Stuff */
{ &hf_isns_version,
{ "iSNSP Version","isns.PVer",
FT_UINT16, BASE_DEC, NULL, 0,
FT_UINT16, BASE_DEC, NULL, 0,
"iSNS Protocol Version" ,HFILL}
},
{ &hf_isns_function_id,
{ "Function ID","isns.functionid",
FT_UINT16, BASE_DEC,VALS(isns_function_ids),0,
{ "Function ID","isns.functionid",
FT_UINT16, BASE_DEC,VALS(isns_function_ids),0,
"iSNS Function ID" ,HFILL}
},
{ &hf_isns_pdu_length,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -71,10 +71,10 @@
* (FF) <francesco.fondelli[AT]gmail.com>
*
* Feb 12, 2010: add support for generalized label interpretation: SUKLM
* format for SONET/SDH label (RFC 4606), t3t2t1 format for G.709 ODUk label
* format for SONET/SDH label (RFC 4606), t3t2t1 format for G.709 ODUk label
* (RFC 4328), G.694 format for lambda label (draft-ietf-ccamp-gmpls-g-694-lamb
* da-labels-05). Add related user preference option.
* (FF) <francesco.fondelli[AT]gmail.com>
* da-labels-05). Add related user preference option.
* (FF) <francesco.fondelli[AT]gmail.com>
*/
@ -787,10 +787,10 @@ static const value_string adspec_params[] = {
{ 0, NULL }
};
/*
* FF: please keep this list in sync with
/*
* FF: please keep this list in sync with
* http://www.iana.org/assignments/gmpls-sig-parameters
* Registry Name: 'LSP Encoding Types'
* Registry Name: 'LSP Encoding Types'
*/
const range_string gmpls_lsp_enc_rvals[] = {
{ 1, 1, "Packet" },
@ -811,8 +811,8 @@ const range_string gmpls_lsp_enc_rvals[] = {
{ 0, 0, NULL }
};
/*
* FF: please keep this list in sync with
/*
* FF: please keep this list in sync with
* http://www.iana.org/assignments/gmpls-sig-parameters
* Registry Name: 'Switching Types'
*/
@ -833,8 +833,8 @@ const range_string gmpls_switching_type_rvals[] = {
{ 0, 0, NULL }
};
/*
* FF: please keep this list in sync with
/*
* FF: please keep this list in sync with
* http://www.iana.org/assignments/gmpls-sig-parameters
* Registry Name: 'Generalized PID (G-PID)'
*/
@ -1766,9 +1766,9 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
case 516:
/* FF: ERROR_STRING TLV, RFC 4783 */
ti2 =
proto_tree_add_text(rsvp_object_tree,
tvb, offset + tlv_off,
ti2 =
proto_tree_add_text(rsvp_object_tree,
tvb, offset + tlv_off,
tlv_len,
"ERROR_STRING TLV - %s",
tvb_format_text(tvb, offset + tlv_off + 4,
@ -1776,11 +1776,11 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off, 2,
"Type: 516 (ERROR_STRING)");
proto_tree_add_text(rsvp_ifid_subtree,
proto_tree_add_text(rsvp_ifid_subtree,
tvb, offset + tlv_off + 2, 2,
"Length: %u",
tvb_get_ntohs(tvb, offset + tlv_off + 2));
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
tlv_len - 4,
"Error String: %s",
tvb_format_text(tvb, offset + tlv_off + 4,
@ -1789,18 +1789,18 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
default:
/* FF: not yet known TLVs are displayed as raw data */
ti2 = proto_tree_add_text(rsvp_object_tree,
tvb, offset + tlv_off,
ti2 = proto_tree_add_text(rsvp_object_tree,
tvb, offset + tlv_off,
tlv_len,
"Unknown TLV (%u)", tlv_type);
rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off, 2,
"Type: %u (Unknown)", tlv_type);
proto_tree_add_text(rsvp_ifid_subtree,
proto_tree_add_text(rsvp_ifid_subtree,
tvb, offset + tlv_off + 2, 2,
"Length: %u",
tvb_get_ntohs(tvb, offset + tlv_off + 2));
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
tlv_len - 4,
"Data (%d bytes)", tlv_len - 4);
break;
@ -2016,7 +2016,7 @@ dissect_rsvp_error (proto_item *ti, proto_tree *rsvp_object_tree,
ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset3, 1,
"Flags: 0x%02x", error_flags);
rsvp_error_subtree = proto_item_add_subtree(ti2, TREE(TT_ERROR_FLAGS));
proto_tree_add_text(rsvp_error_subtree, tvb, offset3, 1, "%s",
proto_tree_add_text(rsvp_error_subtree, tvb, offset3, 1, "%s",
decode_boolean_bitfield(error_flags, 0x04, 8,
"Path State Removed",
""));
@ -2300,7 +2300,7 @@ dissect_rsvp_eth_tspec_tlv(proto_item *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+2, 2,
"Length: %u", tlv_len);
break;
case 129:
ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
offset+tlv_off, tlv_len,
@ -2350,7 +2350,7 @@ dissect_rsvp_eth_tspec_tlv(proto_item *ti, proto_tree *rsvp_object_tree,
tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
break;
default:
proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, 2,
"Unknown TLV: %u", tlv_type);
@ -2647,24 +2647,24 @@ dissect_rsvp_tspec (proto_item *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
"Signal Type: %d - %s", signal_type,
rval_to_str(signal_type,
gmpls_g709_signal_type_rvals,
gmpls_g709_signal_type_rvals,
"Unknown"));
proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 2, 2,
"Number of Multiplexed Components (NMC): %d",
"Number of Multiplexed Components (NMC): %d",
tvb_get_ntohs(tvb, offset2 + 2));
proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 2,
"Number of Virtual Components (NVC): %d",
"Number of Virtual Components (NVC): %d",
tvb_get_ntohs(tvb, offset2 + 4));
proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 6, 2,
"Multiplier (MT): %d",
"Multiplier (MT): %d",
tvb_get_ntohs(tvb, offset2 + 6));
proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
rval_to_str(signal_type,
gmpls_g709_signal_type_rvals,
rval_to_str(signal_type,
gmpls_g709_signal_type_rvals,
"Unknown"),
tvb_get_ntohs(tvb, offset2 + 2),
tvb_get_ntohs(tvb, offset2 + 4),
tvb_get_ntohs(tvb, offset2 + 4),
tvb_get_ntohs(tvb, offset2 + 6));
break;
@ -3008,24 +3008,24 @@ dissect_rsvp_flowspec (proto_item *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
"Signal Type: %d - %s", signal_type,
rval_to_str(signal_type,
gmpls_g709_signal_type_rvals,
gmpls_g709_signal_type_rvals,
"Unknown"));
proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 2, 2,
"Number of Multiplexed Components (NMC): %d",
"Number of Multiplexed Components (NMC): %d",
tvb_get_ntohs(tvb, offset2 + 2));
proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 2,
"Number of Virtual Components (NVC): %d",
"Number of Virtual Components (NVC): %d",
tvb_get_ntohs(tvb, offset2 + 4));
proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 6, 2,
"Multiplier (MT): %d",
"Multiplier (MT): %d",
tvb_get_ntohs(tvb, offset2 + 6));
proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
rval_to_str(signal_type,
gmpls_g709_signal_type_rvals,
rval_to_str(signal_type,
gmpls_g709_signal_type_rvals,
"Unknown"),
tvb_get_ntohs(tvb, offset2 + 2),
tvb_get_ntohs(tvb, offset2 + 4),
tvb_get_ntohs(tvb, offset2 + 4),
tvb_get_ntohs(tvb, offset2 + 6));
break;
@ -3353,7 +3353,7 @@ dissect_rsvp_label_request (proto_item *ti, proto_tree *rsvp_object_tree,
* LABEL
*---------------------------------------------------------------------------*/
/*
/*
FF: G.694 lambda label, see draft-ietf-ccamp-gmpls-g-694-lambda-labels-05
0 1 2 3
@ -3377,11 +3377,11 @@ dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
if (grid == 1) {
/* DWDM grid: Frequency (THz) = 193.1 THz + n * channel spacing (THz) */
cs_thz =
cs == 1 ? 0.1f :
cs_thz =
cs == 1 ? 0.1f :
cs == 2 ? 0.05f :
cs == 3 ? 0.025f :
cs == 4 ? 0.0125f :
cs == 4 ? 0.0125f :
0.0f;
freq = 193.1f + (n * cs_thz);
proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
@ -3391,14 +3391,14 @@ dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
"n=%d, "
"freq=%.2fTHz",
/* grid */
grid == 1 ? "DWDM" :
grid == 2 ? "CWDM" :
grid == 1 ? "DWDM" :
grid == 2 ? "CWDM" :
"unknown",
/* channel spacing */
cs == 1 ? "100GHz" :
cs == 1 ? "100GHz" :
cs == 2 ? "50GHz" :
cs == 3 ? "25GHz" :
cs == 4 ? "12.5GHz" :
cs == 4 ? "12.5GHz" :
"unknown",
/* n */
n,
@ -3414,11 +3414,11 @@ dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
"n=%d, "
"wavelength=%unm",
/* grid */
grid == 1 ? "DWDM" :
grid == 2 ? "CWDM" :
grid == 1 ? "DWDM" :
grid == 2 ? "CWDM" :
"unknown",
/* channel spacing */
cs == 1 ? "20nm" :
cs == 1 ? "20nm" :
"unknown",
/* n */
n,
@ -3436,7 +3436,7 @@ dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
return;
}
/*
/*
FF: SONET/SDH label, see RFC 4606
0 1 2 3
@ -3466,14 +3466,14 @@ dissect_glabel_sdh(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
s, u, k, l, m);
}
/*
/*
FF: G.709 label (aka ODUk label), see RFC 4328
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | t3 | t2 |t1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
static void
dissect_glabel_g709(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
@ -4455,7 +4455,7 @@ dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
"Component link identifier: %u",
tvb_get_ntohl(tvb, offset+tlv_off+4));
break;
case 2:
ti = proto_tree_add_text(rsvp_object_tree, tvb,
offset+tlv_off, tlv_len,
@ -4470,7 +4470,7 @@ dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
"Component link identifier: %s",
ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
break;
case 32769: /* oif-p0040.002.09 demo spec */
ti = proto_tree_add_text(rsvp_object_tree, tvb,
offset+tlv_off, tlv_len,
@ -5769,8 +5769,8 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
struct rsvp_request_key request_key, *new_request_key;
struct rsvp_request_val *request_val = NULL;
col_set_str(pinfo->cinfo, COL_PROTOCOL,
(pinfo->ipproto == IP_PROTO_RSVPE2EI) ? "RSVP-E2EI" : "RSVP");
col_set_str(pinfo->cinfo, COL_PROTOCOL,
(pinfo->ipproto == IP_PROTO_RSVPE2EI) ? "RSVP-E2EI" : "RSVP");
col_clear(pinfo->cinfo, COL_INFO);
ver_flags = tvb_get_guint8(tvb, 0);
@ -5784,13 +5784,13 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SET_ADDRESS(&rsvph->destination, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data);
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(message_type, message_type_vals, "Unknown (%u). "));
val_to_str(message_type, message_type_vals, "Unknown (%u). "));
find_rsvp_session_tempfilt(tvb, 0, &session_off, &tempfilt_off);
if (session_off)
col_append_str(pinfo->cinfo, COL_INFO, summary_session(tvb, session_off));
if (tempfilt_off)
col_append_str(pinfo->cinfo, COL_INFO, summary_template(tvb, tempfilt_off));
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(message_type, message_type_vals, "Unknown (%u). "));
@ -5808,7 +5808,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (tree) {
dissect_rsvp_msg_tree(tvb, pinfo, tree, TREE(TT_RSVP), rsvph);
dissect_rsvp_msg_tree(tvb, pinfo, tree, TREE(TT_RSVP), rsvph);
}
/* Find out what conversation this packet is part of. */
@ -5890,12 +5890,12 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* If not, insert the new request key into the hash table */
if (!request_val) {
new_request_key = se_memdup(&request_key, sizeof(struct rsvp_request_key));
new_request_key = se_memdup(&request_key, sizeof(struct rsvp_request_key));
request_val = se_alloc(sizeof(struct rsvp_request_val));
request_val->value = conversation->index;
request_val = se_alloc(sizeof(struct rsvp_request_val));
request_val->value = conversation->index;
g_hash_table_insert(rsvp_request_hash, new_request_key, request_val);
g_hash_table_insert(rsvp_request_hash, new_request_key, request_val);
}
tap_queue_packet(rsvp_tap, pinfo, rsvph);
@ -5926,330 +5926,330 @@ proto_register_rsvp(void)
{
gint i;
static hf_register_info rsvpf_info[] = {
static hf_register_info rsvpf_info[] = {
/* Message type number */
{&hf_rsvp_filter[RSVPF_MSG],
{ "Message Type", "rsvp.msg", FT_UINT8, BASE_DEC, VALS(message_type_vals), 0x0,
NULL, HFILL }},
/* Message type number */
{&hf_rsvp_filter[RSVPF_MSG],
{ "Message Type", "rsvp.msg", FT_UINT8, BASE_DEC, VALS(message_type_vals), 0x0,
NULL, HFILL }},
/* Message type shorthands */
{&hf_rsvp_filter[RSVPF_PATH],
{ "Path Message", "rsvp.path", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RESV],
{ "Resv Message", "rsvp.resv", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_PATHERR],
{ "Path Error Message", "rsvp.perr", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RESVERR],
{ "Resv Error Message", "rsvp.rerr", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_PATHTEAR],
{ "Path Tear Message", "rsvp.ptear", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RESVTEAR],
{ "Resv Tear Message", "rsvp.rtear", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RCONFIRM],
{ "Resv Confirm Message", "rsvp.resvconf", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RTEARCONFIRM],
{ "Resv Tear Confirm Message", "rsvp.rtearconf", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_BUNDLE],
{ "Bundle Message", "rsvp.bundle", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ACK],
{ "Ack Message", "rsvp.ack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SREFRESH],
{ "Srefresh Message", "rsvp.srefresh", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_HELLO],
{ "HELLO Message", "rsvp.hello", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Object class */
{&hf_rsvp_filter[RSVPF_OBJECT],
{ "Object class", "rsvp.object", FT_UINT8, BASE_DEC, VALS(rsvp_class_vals), 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_NOTIFY],
{ "Notify Message", "rsvp.notify", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Object present shorthands */
{&hf_rsvp_filter[RSVPF_SESSION],
{ "SESSION", "rsvp.session", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Message type shorthands */
{&hf_rsvp_filter[RSVPF_PATH],
{ "Path Message", "rsvp.path", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RESV],
{ "Resv Message", "rsvp.resv", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_PATHERR],
{ "Path Error Message", "rsvp.perr", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RESVERR],
{ "Resv Error Message", "rsvp.rerr", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_PATHTEAR],
{ "Path Tear Message", "rsvp.ptear", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RESVTEAR],
{ "Resv Tear Message", "rsvp.rtear", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RCONFIRM],
{ "Resv Confirm Message", "rsvp.resvconf", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RTEARCONFIRM],
{ "Resv Tear Confirm Message", "rsvp.rtearconf", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_BUNDLE],
{ "Bundle Message", "rsvp.bundle", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ACK],
{ "Ack Message", "rsvp.ack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SREFRESH],
{ "Srefresh Message", "rsvp.srefresh", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_HELLO],
{ "HELLO Message", "rsvp.hello", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Object class */
{&hf_rsvp_filter[RSVPF_OBJECT],
{ "Object class", "rsvp.object", FT_UINT8, BASE_DEC, VALS(rsvp_class_vals), 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_NOTIFY],
{ "Notify Message", "rsvp.notify", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Object present shorthands */
{&hf_rsvp_filter[RSVPF_SESSION],
{ "SESSION", "rsvp.session", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_HOP],
{ "HOP", "rsvp.hop", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_HOP],
{ "HOP", "rsvp.hop", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_HELLO_OBJ],
{ "HELLO Request/Ack", "rsvp.hello_obj", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_HELLO_OBJ],
{ "HELLO Request/Ack", "rsvp.hello_obj", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_INTEGRITY],
{ "INTEGRITY", "rsvp.integrity", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_INTEGRITY],
{ "INTEGRITY", "rsvp.integrity", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_TIME_VALUES],
{ "TIME VALUES", "rsvp.time", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_TIME_VALUES],
{ "TIME VALUES", "rsvp.time", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ERROR],
{ "ERROR", "rsvp.error", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ERROR],
{ "ERROR", "rsvp.error", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SCOPE],
{ "SCOPE", "rsvp.scope", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SCOPE],
{ "SCOPE", "rsvp.scope", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_STYLE],
{ "STYLE", "rsvp.style", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_STYLE],
{ "STYLE", "rsvp.style", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_FLOWSPEC],
{ "FLOWSPEC", "rsvp.flowspec", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_FLOWSPEC],
{ "FLOWSPEC", "rsvp.flowspec", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_FILTER_SPEC],
{ "FILTERSPEC", "rsvp.filter", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_FILTER_SPEC],
{ "FILTERSPEC", "rsvp.filter", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SENDER],
{ "SENDER TEMPLATE", "rsvp.sender", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SENDER],
{ "SENDER TEMPLATE", "rsvp.sender", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_TSPEC],
{ "SENDER TSPEC", "rsvp.tspec", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_TSPEC],
{ "SENDER TSPEC", "rsvp.tspec", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ADSPEC],
{ "ADSPEC", "rsvp.adspec", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ADSPEC],
{ "ADSPEC", "rsvp.adspec", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_POLICY],
{ "POLICY", "rsvp.policy", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_POLICY],
{ "POLICY", "rsvp.policy", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_CONFIRM],
{ "CONFIRM", "rsvp.confirm", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_CONFIRM],
{ "CONFIRM", "rsvp.confirm", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_LABEL],
{ "LABEL", "rsvp.label", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RECOVERY_LABEL],
{ "RECOVERY LABEL", "rsvp.recovery_label", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_UPSTREAM_LABEL],
{ "UPSTREAM LABEL", "rsvp.upstream_label", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SUGGESTED_LABEL],
{ "SUGGESTED LABEL", "rsvp.suggested_label", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_LABEL_SET],
{ "LABEL SET", "rsvp.label_set", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ACCEPTABLE_LABEL_SET],
{ "ACCEPTABLE LABEL SET", "rsvp.acceptable_label_set", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_PROTECTION],
{ "PROTECTION", "rsvp.protection", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV],
{ "DIFFSERV", "rsvp.diffserv", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DSTE],
{ "CLASSTYPE", "rsvp.dste", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RESTART_CAP],
{ "RESTART CAPABILITY", "rsvp.restart", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_LABEL_REQUEST],
{ "LABEL REQUEST", "rsvp.label_request", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_LABEL],
{ "LABEL", "rsvp.label", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RECOVERY_LABEL],
{ "RECOVERY LABEL", "rsvp.recovery_label", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_UPSTREAM_LABEL],
{ "UPSTREAM LABEL", "rsvp.upstream_label", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SUGGESTED_LABEL],
{ "SUGGESTED LABEL", "rsvp.suggested_label", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_LABEL_SET],
{ "LABEL SET", "rsvp.label_set", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ACCEPTABLE_LABEL_SET],
{ "ACCEPTABLE LABEL SET", "rsvp.acceptable_label_set", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_PROTECTION],
{ "PROTECTION", "rsvp.protection", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV],
{ "DIFFSERV", "rsvp.diffserv", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DSTE],
{ "CLASSTYPE", "rsvp.dste", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RESTART_CAP],
{ "RESTART CAPABILITY", "rsvp.restart", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_LABEL_REQUEST],
{ "LABEL REQUEST", "rsvp.label_request", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_ATTRIBUTE],
{ "SESSION ATTRIBUTE", "rsvp.session_attribute", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_ATTRIBUTE],
{ "SESSION ATTRIBUTE", "rsvp.session_attribute", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_EXPLICIT_ROUTE],
{ "EXPLICIT ROUTE", "rsvp.explicit_route", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_EXPLICIT_ROUTE],
{ "EXPLICIT ROUTE", "rsvp.explicit_route", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RECORD_ROUTE],
{ "RECORD ROUTE", "rsvp.record_route", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_RECORD_ROUTE],
{ "RECORD ROUTE", "rsvp.record_route", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_MESSAGE_ID],
{ "MESSAGE-ID", "rsvp.msgid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_MESSAGE_ID],
{ "MESSAGE-ID", "rsvp.msgid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_MESSAGE_ID_ACK],
{ "MESSAGE-ID ACK", "rsvp.msgid_ack", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_MESSAGE_ID_ACK],
{ "MESSAGE-ID ACK", "rsvp.msgid_ack", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_MESSAGE_ID_LIST],
{ "MESSAGE-ID LIST", "rsvp.msgid_list", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_MESSAGE_ID_LIST],
{ "MESSAGE-ID LIST", "rsvp.msgid_list", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DCLASS],
{ "DCLASS", "rsvp.dclass", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DCLASS],
{ "DCLASS", "rsvp.dclass", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_LSP_TUNNEL_IF_ID],
{ "LSP INTERFACE-ID", "rsvp.lsp_tunnel_if_id", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ADMIN_STATUS],
{ "ADMIN STATUS", "rsvp.admin_status", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ASSOCIATION],
{ "ASSOCIATION", "rsvp.association", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_NOTIFY_REQUEST],
{ "NOTIFY REQUEST", "rsvp.notify_request", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_GENERALIZED_UNI],
{ "GENERALIZED UNI", "rsvp.generalized_uni", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_CALL_ID],
{ "CALL ID", "rsvp.call_id", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_UNKNOWN_OBJ],
{ "Unknown object", "rsvp.obj_unknown", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Session fields */
{&hf_rsvp_filter[RSVPF_SESSION_IP],
{ "Destination address", "rsvp.session.ip", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_PORT],
{ "Port number", "rsvp.session.port", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_PROTO],
{ "Protocol", "rsvp.session.proto", FT_UINT8, BASE_DEC, VALS(proto_vals), 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
{ "Tunnel ID", "rsvp.session.tunnel_id", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
{ "Extended tunnel ID", "rsvp.session.ext_tunnel_id", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
/* Sender template/Filterspec fields */
{&hf_rsvp_filter[RSVPF_SENDER_IP],
{ "Sender IPv4 address", "rsvp.sender.ip", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SENDER_PORT],
{ "Sender port number", "rsvp.sender.port", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
{ "Sender LSP ID", "rsvp.sender.lsp_id", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
/* Diffserv object fields */
{&hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
{ "MAPnb", "rsvp.diffserv.mapnb", FT_UINT8, BASE_DEC, NULL, 0x0,
MAPNB_DESCRIPTION, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
{ "MAP", "rsvp.diffserv.map", FT_NONE, BASE_NONE, NULL, 0x0,
MAP_DESCRIPTION, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
{ "EXP", "rsvp.diffserv.map.exp", FT_UINT8, BASE_DEC, NULL, 0x0,
EXP_DESCRIPTION, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
{ PHBID_DESCRIPTION, "rsvp.diffserv.phbid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
{ PHBID_DSCP_DESCRIPTION, "rsvp.diffserv.phbid.dscp", FT_UINT16,
BASE_DEC, NULL, PHBID_DSCP_MASK, NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
{ PHBID_CODE_DESCRIPTION, "rsvp.diffserv.phbid.code", FT_UINT16,
BASE_DEC, NULL, PHBID_CODE_MASK, NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
{ PHBID_BIT14_DESCRIPTION, "rsvp.diffserv.phbid.bit14", FT_UINT16,
BASE_DEC, VALS(phbid_bit14_vals), PHBID_BIT14_MASK, NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15],
{ PHBID_BIT15_DESCRIPTION, "rsvp.diffserv.phbid.bit15", FT_UINT16,
BASE_DEC, VALS(phbid_bit15_vals), PHBID_BIT15_MASK, NULL, HFILL }},
/* Diffserv-aware TE object field */
{&hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
{ "CT", "rsvp.dste.classtype", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
/* Generalized UNI object field */
{&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
{ "Source TNA", "rsvp.guni.srctna.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
{ "Destination TNA", "rsvp.guni.dsttna.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
{ "Source TNA", "rsvp.guni.srctna.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
{ "Destination TNA", "rsvp.guni.dsttna.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Generalized UNI object field */
{&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
{ "Source Transport Network Address", "rsvp.callid.srcaddr.ipv4", FT_IPv4,
BASE_NONE, NULL, 0x0, NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
{ "Source Transport Network Address", "rsvp.callid.srcaddr.ipv6", FT_IPv6,
BASE_NONE, NULL, 0x0, NULL, HFILL }}
};
{&hf_rsvp_filter[RSVPF_LSP_TUNNEL_IF_ID],
{ "LSP INTERFACE-ID", "rsvp.lsp_tunnel_if_id", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ADMIN_STATUS],
{ "ADMIN STATUS", "rsvp.admin_status", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_ASSOCIATION],
{ "ASSOCIATION", "rsvp.association", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_NOTIFY_REQUEST],
{ "NOTIFY REQUEST", "rsvp.notify_request", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_GENERALIZED_UNI],
{ "GENERALIZED UNI", "rsvp.generalized_uni", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_CALL_ID],
{ "CALL ID", "rsvp.call_id", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_UNKNOWN_OBJ],
{ "Unknown object", "rsvp.obj_unknown", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Session fields */
{&hf_rsvp_filter[RSVPF_SESSION_IP],
{ "Destination address", "rsvp.session.ip", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_PORT],
{ "Port number", "rsvp.session.port", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_PROTO],
{ "Protocol", "rsvp.session.proto", FT_UINT8, BASE_DEC, VALS(proto_vals), 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
{ "Tunnel ID", "rsvp.session.tunnel_id", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
{ "Extended tunnel ID", "rsvp.session.ext_tunnel_id", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
/* Sender template/Filterspec fields */
{&hf_rsvp_filter[RSVPF_SENDER_IP],
{ "Sender IPv4 address", "rsvp.sender.ip", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SENDER_PORT],
{ "Sender port number", "rsvp.sender.port", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
{ "Sender LSP ID", "rsvp.sender.lsp_id", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
/* Diffserv object fields */
{&hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
{ "MAPnb", "rsvp.diffserv.mapnb", FT_UINT8, BASE_DEC, NULL, 0x0,
MAPNB_DESCRIPTION, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
{ "MAP", "rsvp.diffserv.map", FT_NONE, BASE_NONE, NULL, 0x0,
MAP_DESCRIPTION, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
{ "EXP", "rsvp.diffserv.map.exp", FT_UINT8, BASE_DEC, NULL, 0x0,
EXP_DESCRIPTION, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
{ PHBID_DESCRIPTION, "rsvp.diffserv.phbid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
{ PHBID_DSCP_DESCRIPTION, "rsvp.diffserv.phbid.dscp", FT_UINT16,
BASE_DEC, NULL, PHBID_DSCP_MASK, NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
{ PHBID_CODE_DESCRIPTION, "rsvp.diffserv.phbid.code", FT_UINT16,
BASE_DEC, NULL, PHBID_CODE_MASK, NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
{ PHBID_BIT14_DESCRIPTION, "rsvp.diffserv.phbid.bit14", FT_UINT16,
BASE_DEC, VALS(phbid_bit14_vals), PHBID_BIT14_MASK, NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15],
{ PHBID_BIT15_DESCRIPTION, "rsvp.diffserv.phbid.bit15", FT_UINT16,
BASE_DEC, VALS(phbid_bit15_vals), PHBID_BIT15_MASK, NULL, HFILL }},
/* Diffserv-aware TE object field */
{&hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
{ "CT", "rsvp.dste.classtype", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
/* Generalized UNI object field */
{&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
{ "Source TNA", "rsvp.guni.srctna.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
{ "Destination TNA", "rsvp.guni.dsttna.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
{ "Source TNA", "rsvp.guni.srctna.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
{ "Destination TNA", "rsvp.guni.dsttna.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Generalized UNI object field */
{&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
{ "Source Transport Network Address", "rsvp.callid.srcaddr.ipv4", FT_IPv4,
BASE_NONE, NULL, 0x0, NULL, HFILL }},
{&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
{ "Source Transport Network Address", "rsvp.callid.srcaddr.ipv6", FT_IPv6,
BASE_NONE, NULL, 0x0, NULL, HFILL }}
};
gint *ett_tree[TT_MAX];

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h> /* needed to define AF_ values on Windows */
#include <winsock2.h> /* needed to define AF_ values on Windows */
#endif
#ifdef NEED_INET_V6DEFS_H
@ -77,11 +77,11 @@
#include "packet-h264.h"
#include "packet-mp4ves.h"
static dissector_handle_t rtp_handle=NULL;
static dissector_handle_t rtcp_handle=NULL;
static dissector_handle_t t38_handle=NULL;
static dissector_handle_t msrp_handle=NULL;
static dissector_handle_t h264_handle = NULL;
static dissector_handle_t rtp_handle = NULL;
static dissector_handle_t rtcp_handle = NULL;
static dissector_handle_t t38_handle = NULL;
static dissector_handle_t msrp_handle = NULL;
static dissector_handle_t h264_handle = NULL;
static dissector_handle_t mp4ves_handle = NULL;
static int sdp_tap = -1;
@ -306,7 +306,7 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
transport_info.media_type=NULL;
for (n=0; n < SDP_NO_OF_PT; n++){
transport_info.encoding_name[n]=unknown_encoding;
transport_info.sample_rate[n] = 0;
transport_info.sample_rate[n] = 0;
}
for (n=0; n < SDP_MAX_RTP_CHANNELS; n++)
{
@ -955,9 +955,9 @@ static void dissect_key_mgmt(tvbuff_t *tvb, packet_info * pinfo, proto_item * ti
if ( prtcl_id != NULL && key_mgmt_dissector_table != NULL ) {
found_match = dissector_try_string(key_mgmt_dissector_table,
prtcl_id,
keymgmt_tvb, pinfo,
key_tree);
prtcl_id,
keymgmt_tvb, pinfo,
key_tree);
}
if (found_match) {
@ -1294,8 +1294,8 @@ decode_sdp_fmtp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset
/*
proto_tree_add_text(tree, tvb, offset, tokenlen, "Debug; Analysed string: '%s'",
tvb_get_ephemeral_string(tvb, offset, tokenlen));
*/
tvb_get_ephemeral_string(tvb, offset, tokenlen));
*/
/* Look for an '=' within this value - this may indicate that there is a
profile-level-id parameter to find if the MPEG4 media type is in use */
@ -1343,7 +1343,7 @@ decode_sdp_fmtp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset
item = proto_tree_add_uint(tree, hf_sdp_fmtp_h263_profile, tvb, offset, tokenlen,
atol((char*)format_specific_parameter));
PROTO_ITEM_SET_GENERATED(item);
}else if(strcmp((char*)field_name, "level") == 0) {
} else if(strcmp((char*)field_name, "level") == 0) {
offset++;
tokenlen = end_offset - offset;
format_specific_parameter = tvb_get_ephemeral_string(tvb, offset, tokenlen);
@ -1443,17 +1443,17 @@ typedef struct {
const char *name;
} sdp_names_t;
#define SDP_RTPMAP 1
#define SDP_FMTP 2
#define SDP_PATH 3
#define SDP_H248_ITEM 4
#define SDP_RTPMAP 1
#define SDP_FMTP 2
#define SDP_PATH 3
#define SDP_H248_ITEM 4
static const sdp_names_t sdp_media_attribute_names[] = {
{ "Unknown-name"}, /* 0 Pad so that the real headers start at index 1 */
{ "rtpmap"}, /* 1 */
{ "fmtp"}, /* 2 */
{ "path"}, /* 3 */
{ "h248item"}, /* 4 */
{ "Unknown-name"}, /* 0 Pad so that the real headers start at index 1 */
{ "rtpmap"}, /* 1 */
{ "fmtp"}, /* 2 */
{ "path"}, /* 3 */
{ "h248item"}, /* 4 */
};
static gint find_sdp_media_attribute_names(tvbuff_t *tvb, int offset, guint len)
@ -1480,7 +1480,7 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
guint8 *attribute_value;
gint *key;
guint8 pt;
gint sdp_media_attrbute_code;
gint sdp_media_attrbute_code;
const char *msrp_res = "msrp://";
const char *h324ext_h223lcparm = "h324ext/h223lcparm";
gboolean has_more_pars = TRUE;
@ -1546,7 +1546,7 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
tokenlen = next_offset - offset;
start_offset = offset;
start_offset = offset;
proto_tree_add_item(sdp_media_attribute_tree, hf_media_encoding_name, tvb,
offset, tokenlen, FALSE);
@ -1560,15 +1560,15 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
next_offset = next_offset + 1;
offset = next_offset;
while (length-1 >= next_offset){
if(!isdigit(tvb_get_guint8(tvb, next_offset)))
break;
next_offset++;
}
while (length-1 >= next_offset){
if(!isdigit(tvb_get_guint8(tvb, next_offset)))
break;
next_offset++;
}
tokenlen = next_offset - offset;
proto_tree_add_item(sdp_media_attribute_tree, hf_media_sample_rate, tvb,
offset, tokenlen, FALSE);
transport_info->sample_rate[pt] = atoi(tvb_get_ephemeral_string(tvb, offset, tokenlen));
transport_info->sample_rate[pt] = atoi(tvb_get_ephemeral_string(tvb, offset, tokenlen));
/* As per RFC2327 it is possible to have multiple Media Descriptions ("m=").
For example:
@ -1589,12 +1589,12 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
if (transport_info->media_count == 0) {
for (n=0; n < SDP_MAX_RTP_CHANNELS; n++) {
encoding_name_and_rate = g_malloc( sizeof(encoding_name_and_rate_t));
encoding_name_and_rate->encoding_name = g_strdup(transport_info->encoding_name[pt]);
encoding_name_and_rate->sample_rate = transport_info->sample_rate[pt];
if (n==0){
encoding_name_and_rate->encoding_name = g_strdup(transport_info->encoding_name[pt]);
encoding_name_and_rate->sample_rate = transport_info->sample_rate[pt];
if (n==0){
g_hash_table_insert(transport_info->media[n].rtp_dyn_payload,
key, encoding_name_and_rate);
}
}
else { /* we create a new key and encoding_name to assign to the other hash tables */
gint *key2;
key2=g_malloc( sizeof(gint) );
@ -1608,13 +1608,14 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
}else
/* in case there is an overflow in SDP_MAX_RTP_CHANNELS, we keep always the last "m=" */
encoding_name_and_rate = g_malloc( sizeof(encoding_name_and_rate_t));
encoding_name_and_rate->encoding_name = g_strdup(transport_info->encoding_name[pt]);
encoding_name_and_rate->sample_rate = transport_info->sample_rate[pt];
if (transport_info->media_count == SDP_MAX_RTP_CHANNELS-1)
g_hash_table_insert(transport_info->media[ transport_info->media_count ].rtp_dyn_payload,
key, encoding_name_and_rate);
else
g_hash_table_insert(transport_info->media[ transport_info->media_count-1 ].rtp_dyn_payload,
encoding_name_and_rate->encoding_name = g_strdup(transport_info->encoding_name[pt]);
encoding_name_and_rate->sample_rate = transport_info->sample_rate[pt];
if (transport_info->media_count == SDP_MAX_RTP_CHANNELS-1)
g_hash_table_insert(transport_info->media[ transport_info->media_count ].rtp_dyn_payload,
key, encoding_name_and_rate);
else
g_hash_table_insert(transport_info->media[ transport_info->media_count-1 ].rtp_dyn_payload,
key, encoding_name_and_rate);
break;
case SDP_FMTP:
@ -1938,7 +1939,7 @@ proto_register_sdp(void)
{ "MIME Type",
"sdp.mime.type",FT_STRING, BASE_NONE, NULL, 0x0,
"SDP MIME Type", HFILL }},
{ &hf_media_sample_rate,
{ &hf_media_sample_rate,
{ "Sample Rate",
"sdp.sample_rate",FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
@ -1954,23 +1955,23 @@ proto_register_sdp(void)
{ "IPBCP Command Type",
"ipbcp.command",FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_sdp_fmtp_mpeg4_profile_level_id,
{&hf_sdp_fmtp_mpeg4_profile_level_id,
{ "Level Code",
"sdp.fmtp.profile_level_id",FT_UINT32, BASE_DEC,VALS(mp4ves_level_indication_vals), 0x0,
NULL, HFILL }},
{ &hf_sdp_fmtp_h263_profile,
{ &hf_sdp_fmtp_h263_profile,
{ "Profile",
"sdp.fmtp.h263profile",FT_UINT32, BASE_DEC,VALS(h263_profile_vals), 0x0,
NULL, HFILL }},
{ &hf_sdp_fmtp_h263_level,
{ &hf_sdp_fmtp_h263_level,
{ "Level",
"sdp.fmtp.h263level",FT_UINT32, BASE_DEC,VALS(h263_level_vals), 0x0,
NULL, HFILL }},
{ &hf_sdp_h264_packetization_mode,
{ &hf_sdp_h264_packetization_mode,
{ "Packetization mode",
"sdp.fmtp.h264_packetization_mode",FT_UINT32, BASE_DEC,VALS(h264_packetization_mode_vals), 0x0,
NULL, HFILL }},
{ &hf_sdp_h264_sprop_parameter_sets,
{ &hf_sdp_h264_sprop_parameter_sets,
{ "Sprop_parameter_sets",
"sdp.h264.sprop_parameter_sets", FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
@ -2015,7 +2016,7 @@ proto_register_sdp(void)
proto_register_subtree_array(ett, array_length(ett));
key_mgmt_dissector_table = register_dissector_table("key_mgmt",
"Key Management", FT_STRING, BASE_NONE);
"Key Management", FT_STRING, BASE_NONE);
/*
* Preferences registration

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
* By Paolo Abeni <paolo.abeni@email.it>
* Ronnie Sahlberg 2006
* Chris Maynard 2010 <chris[dot]maynard[at]gtech[dot]com>
*
*
* http://www.usb.org/developers/docs/usb_20_122909-2.zip
*
* This program is free software; you can redistribute it and/or
@ -292,24 +292,24 @@ static const value_string usb_langid_vals[] = {
};
static const value_string usb_interfaceclass_vals[] = {
{IF_CLASS_FROM_INTERFACE_DESC, "Use class info in Interface Descriptor"},
{IF_CLASS_AUDIO, "AUDIO"},
{IF_CLASS_COMMUNICATIONS, "COMMUNICATIONS"},
{IF_CLASS_HID, "HID"},
{IF_CLASS_PHYSICAL, "PHYSICAL"},
{IF_CLASS_IMAGE, "IMAGE"},
{IF_CLASS_PRINTER, "PRINTER"},
{IF_CLASS_MASSTORAGE, "MASSTORAGE"},
{IF_CLASS_HUB, "HUB"},
{IF_CLASS_CDC_DATA, "CDC_DATA"},
{IF_CLASS_SMART_CARD, "SMART_CARD"},
{IF_CLASS_CONTENT_SECURITY, "CONTENT_SECURITY"},
{IF_CLASS_VIDEO, "VIDEO"},
{IF_CLASS_DIAGNOSTIC_DEVICE, "DIAGNOSTIC_DEVICE"},
{IF_CLASS_WIRELESS_CONTROLLER, "WIRELESS_CONTROLLER"},
{IF_CLASS_MISCELLANEOUS, "MISCELLANEOUS"},
{IF_CLASS_APPLICATION_SPECIFIC, "APPLICATION_SPECIFIC"},
{IF_CLASS_VENDOR_SPECIFIC, "VENDOR_SPECIFIC"},
{IF_CLASS_FROM_INTERFACE_DESC, "Use class info in Interface Descriptor"},
{IF_CLASS_AUDIO, "AUDIO"},
{IF_CLASS_COMMUNICATIONS, "COMMUNICATIONS"},
{IF_CLASS_HID, "HID"},
{IF_CLASS_PHYSICAL, "PHYSICAL"},
{IF_CLASS_IMAGE, "IMAGE"},
{IF_CLASS_PRINTER, "PRINTER"},
{IF_CLASS_MASSTORAGE, "MASSTORAGE"},
{IF_CLASS_HUB, "HUB"},
{IF_CLASS_CDC_DATA, "CDC_DATA"},
{IF_CLASS_SMART_CARD, "SMART_CARD"},
{IF_CLASS_CONTENT_SECURITY, "CONTENT_SECURITY"},
{IF_CLASS_VIDEO, "VIDEO"},
{IF_CLASS_DIAGNOSTIC_DEVICE, "DIAGNOSTIC_DEVICE"},
{IF_CLASS_WIRELESS_CONTROLLER, "WIRELESS_CONTROLLER"},
{IF_CLASS_MISCELLANEOUS, "MISCELLANEOUS"},
{IF_CLASS_APPLICATION_SPECIFIC, "APPLICATION_SPECIFIC"},
{IF_CLASS_VENDOR_SPECIFIC, "VENDOR_SPECIFIC"},
{0, NULL}
};
@ -355,210 +355,210 @@ static const value_string usb_urb_type_vals[] = {
#define USB_DT_BOS 15
#define USB_DT_DEVICE_CAPABILITY 16
#define USB_DT_WIRELESS_ENDPOINT_COMP 17
#define USB_DT_HID 33
#define USB_DT_HID 33
#define USB_DT_RPIPE 34
static const value_string descriptor_type_vals[] = {
{USB_DT_DEVICE, "DEVICE"},
{USB_DT_CONFIG, "CONFIGURATION"},
{USB_DT_STRING, "STRING"},
{USB_DT_INTERFACE, "INTERFACE"},
{USB_DT_ENDPOINT, "ENDPOINT"},
{USB_DT_DEVICE_QUALIFIER, "DEVICE QUALIFIER"},
{USB_DT_OTHER_SPEED_CONFIG, "OTHER_SPEED CONFIG"},
{USB_DT_INTERFACE_POWER, "INTERFACE POWER"},
{USB_DT_OTG, "OTG"},
{USB_DT_DEBUG, "DEBUG"},
{USB_DT_INTERFACE_ASSOCIATION, "INTERFACE ASSOCIATION"},
{USB_DT_SECURITY, "SECURITY"},
{USB_DT_KEY, "KEY"},
{USB_DT_ENCRYPTION_TYPE, "ENCRYPTION TYPE"},
{USB_DT_BOS, "BOS"},
{USB_DT_DEVICE_CAPABILITY, "DEVICE CAPABILITY"},
{USB_DT_WIRELESS_ENDPOINT_COMP, "WIRELESS ENDPOINT COMP"},
{USB_DT_HID, "HID"},
{USB_DT_RPIPE, "RPIPE"},
{USB_DT_DEVICE, "DEVICE"},
{USB_DT_CONFIG, "CONFIGURATION"},
{USB_DT_STRING, "STRING"},
{USB_DT_INTERFACE, "INTERFACE"},
{USB_DT_ENDPOINT, "ENDPOINT"},
{USB_DT_DEVICE_QUALIFIER, "DEVICE QUALIFIER"},
{USB_DT_OTHER_SPEED_CONFIG, "OTHER_SPEED CONFIG"},
{USB_DT_INTERFACE_POWER, "INTERFACE POWER"},
{USB_DT_OTG, "OTG"},
{USB_DT_DEBUG, "DEBUG"},
{USB_DT_INTERFACE_ASSOCIATION, "INTERFACE ASSOCIATION"},
{USB_DT_SECURITY, "SECURITY"},
{USB_DT_KEY, "KEY"},
{USB_DT_ENCRYPTION_TYPE, "ENCRYPTION TYPE"},
{USB_DT_BOS, "BOS"},
{USB_DT_DEVICE_CAPABILITY, "DEVICE CAPABILITY"},
{USB_DT_WIRELESS_ENDPOINT_COMP, "WIRELESS ENDPOINT COMP"},
{USB_DT_HID, "HID"},
{USB_DT_RPIPE, "RPIPE"},
{0,NULL}
};
/*
* Feature selectors.
*/
#define USB_FS_DEVICE_REMOTE_WAKEUP 1
#define USB_FS_ENDPOINT_HALT 0
#define USB_FS_TEST_MODE 2
#define USB_FS_DEVICE_REMOTE_WAKEUP 1
#define USB_FS_ENDPOINT_HALT 0
#define USB_FS_TEST_MODE 2
static const value_string usb_feature_selector_vals[] = {
{USB_FS_DEVICE_REMOTE_WAKEUP, "DEVICE REMOTE WAKEUP"},
{USB_FS_ENDPOINT_HALT, "ENDPOINT HALT"},
{USB_FS_TEST_MODE, "TEST MODE"},
{USB_FS_DEVICE_REMOTE_WAKEUP, "DEVICE REMOTE WAKEUP"},
{USB_FS_ENDPOINT_HALT, "ENDPOINT HALT"},
{USB_FS_TEST_MODE, "TEST MODE"},
{0,NULL}
};
static const value_string usb_bmAttributes_transfer_vals[] = {
{0x00, "Control-Transfer"},
{0x01, "Isochronous-Transfer"},
{0x02, "Bulk-Transfer"},
{0x03, "Interrupt-Transfer"},
{0x00, "Control-Transfer"},
{0x01, "Isochronous-Transfer"},
{0x02, "Bulk-Transfer"},
{0x03, "Interrupt-Transfer"},
{0,NULL}
};
static const value_string usb_bmAttributes_sync_vals[] = {
{0x00, "No Sync"},
{0x04, "Asynchronous"},
{0x08, "Adaptive"},
{0x0c, "Synchronous"},
{0x00, "No Sync"},
{0x04, "Asynchronous"},
{0x08, "Adaptive"},
{0x0c, "Synchronous"},
{0,NULL}
};
static const value_string usb_bmAttributes_behaviour_vals[] = {
{0x00, "Data-Endpoint"},
{0x10, "Explicit Feedback-Endpoint"},
{0x20, "Implicit Feedback-Data-Endpoint"},
{0x30, "Reserved"},
{0x00, "Data-Endpoint"},
{0x10, "Explicit Feedback-Endpoint"},
{0x20, "Implicit Feedback-Data-Endpoint"},
{0x30, "Reserved"},
{0,NULL}
};
/* from linux/include/asm-generic/errno.h */
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Try again */
#define ENOMEM 12 /* Out of memory */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */
#define EBUSY 16 /* Device or resource busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* File table overflow */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Not a typewriter */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Math argument out of domain of func */
#define ERANGE 34 /* Math result not representable */
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Try again */
#define ENOMEM 12 /* Out of memory */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */
#define EBUSY 16 /* Device or resource busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* File table overflow */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Not a typewriter */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Math argument out of domain of func */
#define ERANGE 34 /* Math result not representable */
/* from linux/include/asm-generic/errno.h*/
#define EDEADLK 35 /* Resource deadlock would occur */
#define ENAMETOOLONG 36 /* File name too long */
#define ENOLCK 37 /* No record locks available */
#define ENOSYS 38 /* Function not implemented */
#define ENOTEMPTY 39 /* Directory not empty */
#define ELOOP 40 /* Too many symbolic links encountered */
#define EWOULDBLOCK EAGAIN /* Operation would block */
#define ENOMSG 42 /* No message of desired type */
#define EIDRM 43 /* Identifier removed */
#define ECHRNG 44 /* Channel number out of range */
#define EL2NSYNC 45 /* Level 2 not synchronized */
#define EL3HLT 46 /* Level 3 halted */
#define EL3RST 47 /* Level 3 reset */
#define ELNRNG 48 /* Link number out of range */
#define EUNATCH 49 /* Protocol driver not attached */
#define ENOCSI 50 /* No CSI structure available */
#define EL2HLT 51 /* Level 2 halted */
#define EBADE 52 /* Invalid exchange */
#define EBADR 53 /* Invalid request descriptor */
#define EXFULL 54 /* Exchange full */
#define ENOANO 55 /* No anode */
#define EBADRQC 56 /* Invalid request code */
#define EBADSLT 57 /* Invalid slot */
#define EDEADLK 35 /* Resource deadlock would occur */
#define ENAMETOOLONG 36 /* File name too long */
#define ENOLCK 37 /* No record locks available */
#define ENOSYS 38 /* Function not implemented */
#define ENOTEMPTY 39 /* Directory not empty */
#define ELOOP 40 /* Too many symbolic links encountered */
#define EWOULDBLOCK EAGAIN /* Operation would block */
#define ENOMSG 42 /* No message of desired type */
#define EIDRM 43 /* Identifier removed */
#define ECHRNG 44 /* Channel number out of range */
#define EL2NSYNC 45 /* Level 2 not synchronized */
#define EL3HLT 46 /* Level 3 halted */
#define EL3RST 47 /* Level 3 reset */
#define ELNRNG 48 /* Link number out of range */
#define EUNATCH 49 /* Protocol driver not attached */
#define ENOCSI 50 /* No CSI structure available */
#define EL2HLT 51 /* Level 2 halted */
#define EBADE 52 /* Invalid exchange */
#define EBADR 53 /* Invalid request descriptor */
#define EXFULL 54 /* Exchange full */
#define ENOANO 55 /* No anode */
#define EBADRQC 56 /* Invalid request code */
#define EBADSLT 57 /* Invalid slot */
#define EDEADLOCK EDEADLK
#define EDEADLOCK EDEADLK
#define EBFONT 59 /* Bad font file format */
#define ENOSTR 60 /* Device not a stream */
#define ENODATA 61 /* No data available */
#define ETIME 62 /* Timer expired */
#define ENOSR 63 /* Out of streams resources */
#define ENONET 64 /* Machine is not on the network */
#define ENOPKG 65 /* Package not installed */
#define EREMOTE 66 /* Object is remote */
#define ENOLINK 67 /* Link has been severed */
#define EADV 68 /* Advertise error */
#define ESRMNT 69 /* Srmount error */
#define ECOMM 70 /* Communication error on send */
#define EPROTO 71 /* Protocol error */
#define EMULTIHOP 72 /* Multihop attempted */
#define EDOTDOT 73 /* RFS specific error */
#define EBADMSG 74 /* Not a data message */
#define EOVERFLOW 75 /* Value too large for defined data type */
#define ENOTUNIQ 76 /* Name not unique on network */
#define EBADFD 77 /* File descriptor in bad state */
#define EREMCHG 78 /* Remote address changed */
#define ELIBACC 79 /* Can not access a needed shared library */
#define ELIBBAD 80 /* Accessing a corrupted shared library */
#define ELIBSCN 81 /* .lib section in a.out corrupted */
#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
#define ELIBEXEC 83 /* Cannot exec a shared library directly */
#define EILSEQ 84 /* Illegal byte sequence */
#define ERESTART 85 /* Interrupted system call should be restarted */
#define ESTRPIPE 86 /* Streams pipe error */
#define EUSERS 87 /* Too many users */
#define ENOTSOCK 88 /* Socket operation on non-socket */
#define EDESTADDRREQ 89 /* Destination address required */
#define EMSGSIZE 90 /* Message too long */
#define EPROTOTYPE 91 /* Protocol wrong type for socket */
#define ENOPROTOOPT 92 /* Protocol not available */
#define EPROTONOSUPPORT 93 /* Protocol not supported */
#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
#define EPFNOSUPPORT 96 /* Protocol family not supported */
#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
#define EADDRINUSE 98 /* Address already in use */
#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
#define ENETDOWN 100 /* Network is down */
#define ENETUNREACH 101 /* Network is unreachable */
#define ENETRESET 102 /* Network dropped connection because of reset */
#define ECONNABORTED 103 /* Software caused connection abort */
#define ECONNRESET 104 /* Connection reset by peer */
#define ENOBUFS 105 /* No buffer space available */
#define EISCONN 106 /* Transport endpoint is already connected */
#define ENOTCONN 107 /* Transport endpoint is not connected */
#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
#define ETOOMANYREFS 109 /* Too many references: cannot splice */
#define ETIMEDOUT 110 /* Connection timed out */
#define ECONNREFUSED 111 /* Connection refused */
#define EHOSTDOWN 112 /* Host is down */
#define EHOSTUNREACH 113 /* No route to host */
#define EALREADY 114 /* Operation already in progress */
#define EINPROGRESS 115 /* Operation now in progress */
#define ESTALE 116 /* Stale NFS file handle */
#define EUCLEAN 117 /* Structure needs cleaning */
#define ENOTNAM 118 /* Not a XENIX named type file */
#define ENAVAIL 119 /* No XENIX semaphores available */
#define EISNAM 120 /* Is a named type file */
#define EREMOTEIO 121 /* Remote I/O error */
#define EDQUOT 122 /* Quota exceeded */
#define EBFONT 59 /* Bad font file format */
#define ENOSTR 60 /* Device not a stream */
#define ENODATA 61 /* No data available */
#define ETIME 62 /* Timer expired */
#define ENOSR 63 /* Out of streams resources */
#define ENONET 64 /* Machine is not on the network */
#define ENOPKG 65 /* Package not installed */
#define EREMOTE 66 /* Object is remote */
#define ENOLINK 67 /* Link has been severed */
#define EADV 68 /* Advertise error */
#define ESRMNT 69 /* Srmount error */
#define ECOMM 70 /* Communication error on send */
#define EPROTO 71 /* Protocol error */
#define EMULTIHOP 72 /* Multihop attempted */
#define EDOTDOT 73 /* RFS specific error */
#define EBADMSG 74 /* Not a data message */
#define EOVERFLOW 75 /* Value too large for defined data type */
#define ENOTUNIQ 76 /* Name not unique on network */
#define EBADFD 77 /* File descriptor in bad state */
#define EREMCHG 78 /* Remote address changed */
#define ELIBACC 79 /* Can not access a needed shared library */
#define ELIBBAD 80 /* Accessing a corrupted shared library */
#define ELIBSCN 81 /* .lib section in a.out corrupted */
#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
#define ELIBEXEC 83 /* Cannot exec a shared library directly */
#define EILSEQ 84 /* Illegal byte sequence */
#define ERESTART 85 /* Interrupted system call should be restarted */
#define ESTRPIPE 86 /* Streams pipe error */
#define EUSERS 87 /* Too many users */
#define ENOTSOCK 88 /* Socket operation on non-socket */
#define EDESTADDRREQ 89 /* Destination address required */
#define EMSGSIZE 90 /* Message too long */
#define EPROTOTYPE 91 /* Protocol wrong type for socket */
#define ENOPROTOOPT 92 /* Protocol not available */
#define EPROTONOSUPPORT 93 /* Protocol not supported */
#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
#define EPFNOSUPPORT 96 /* Protocol family not supported */
#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
#define EADDRINUSE 98 /* Address already in use */
#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
#define ENETDOWN 100 /* Network is down */
#define ENETUNREACH 101 /* Network is unreachable */
#define ENETRESET 102 /* Network dropped connection because of reset */
#define ECONNABORTED 103 /* Software caused connection abort */
#define ECONNRESET 104 /* Connection reset by peer */
#define ENOBUFS 105 /* No buffer space available */
#define EISCONN 106 /* Transport endpoint is already connected */
#define ENOTCONN 107 /* Transport endpoint is not connected */
#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
#define ETOOMANYREFS 109 /* Too many references: cannot splice */
#define ETIMEDOUT 110 /* Connection timed out */
#define ECONNREFUSED 111 /* Connection refused */
#define EHOSTDOWN 112 /* Host is down */
#define EHOSTUNREACH 113 /* No route to host */
#define EALREADY 114 /* Operation already in progress */
#define EINPROGRESS 115 /* Operation now in progress */
#define ESTALE 116 /* Stale NFS file handle */
#define EUCLEAN 117 /* Structure needs cleaning */
#define ENOTNAM 118 /* Not a XENIX named type file */
#define ENAVAIL 119 /* No XENIX semaphores available */
#define EISNAM 120 /* Is a named type file */
#define EREMOTEIO 121 /* Remote I/O error */
#define EDQUOT 122 /* Quota exceeded */
#define ENOMEDIUM 123 /* No medium found */
#define EMEDIUMTYPE 124 /* Wrong medium type */
#define ECANCELED 125 /* Operation Canceled */
#define ENOKEY 126 /* Required key not available */
#define EKEYEXPIRED 127 /* Key has expired */
#define EKEYREVOKED 128 /* Key has been revoked */
#define EKEYREJECTED 129 /* Key was rejected by service */
#define ENOMEDIUM 123 /* No medium found */
#define EMEDIUMTYPE 124 /* Wrong medium type */
#define ECANCELED 125 /* Operation Canceled */
#define ENOKEY 126 /* Required key not available */
#define EKEYEXPIRED 127 /* Key has expired */
#define EKEYREVOKED 128 /* Key has been revoked */
#define EKEYREJECTED 129 /* Key was rejected by service */
/* for robust mutexes */
#define EOWNERDEAD 130 /* Owner died */
#define ENOTRECOVERABLE 131 /* State not recoverable */
#define EOWNERDEAD 130 /* Owner died */
#define ENOTRECOVERABLE 131 /* State not recoverable */
static const value_string usb_urb_status_vals[] = {
@ -1346,7 +1346,7 @@ static int
dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info, usb_conv_info_t *usb_conv_info)
{
proto_item *item=NULL;
guint32 data_len;
guint32 data_len;
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
@ -1373,16 +1373,16 @@ dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree,
break;
case USB_DT_RPIPE:
if (usb_conv_info->interfaceClass == IF_CLASS_HID) {
offset=dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info);
break;
offset=dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info);
break;
}
/* else fall through as default/unknown */
default:
/* XXX dissect the descriptor coming back from the device */
item=proto_tree_add_text(tree, tvb, offset, -1, "GET DESCRIPTOR data (unknown descriptor type)");
tree=proto_item_add_subtree(item, ett_descriptor_device);
tvb_memcpy(tvb, (guint8 *)&data_len, offset, 4);
proto_tree_add_uint(tree, hf_usb_data, tvb, offset, 4, data_len);
tvb_memcpy(tvb, (guint8 *)&data_len, offset, 4);
proto_tree_add_uint(tree, hf_usb_data, tvb, offset, 4, data_len);
offset += data_len;
break;
}
@ -1637,58 +1637,58 @@ typedef struct _usb_setup_dissector_table_t {
guint8 request;
usb_setup_dissector dissector;
} usb_setup_dissector_table_t;
#define USB_SETUP_GET_STATUS 0
#define USB_SETUP_CLEAR_FEATURE 1
#define USB_SETUP_SET_FEATURE 2
#define USB_SETUP_SET_ADDRESS 5
#define USB_SETUP_GET_DESCRIPTOR 6
#define USB_SETUP_SET_DESCRIPTOR 7
#define USB_SETUP_GET_CONFIGURATION 8
#define USB_SETUP_SET_CONFIGURATION 9
#define USB_SETUP_GET_INTERFACE 10
#define USB_SETUP_SET_INTERFACE 11
#define USB_SETUP_SYNCH_FRAME 12
#define USB_SETUP_GET_STATUS 0
#define USB_SETUP_CLEAR_FEATURE 1
#define USB_SETUP_SET_FEATURE 2
#define USB_SETUP_SET_ADDRESS 5
#define USB_SETUP_GET_DESCRIPTOR 6
#define USB_SETUP_SET_DESCRIPTOR 7
#define USB_SETUP_GET_CONFIGURATION 8
#define USB_SETUP_SET_CONFIGURATION 9
#define USB_SETUP_GET_INTERFACE 10
#define USB_SETUP_SET_INTERFACE 11
#define USB_SETUP_SYNCH_FRAME 12
static const usb_setup_dissector_table_t setup_request_dissectors[] = {
{USB_SETUP_GET_STATUS, dissect_usb_setup_get_status_request},
{USB_SETUP_CLEAR_FEATURE, dissect_usb_setup_clear_feature_request},
{USB_SETUP_SET_FEATURE, dissect_usb_setup_set_feature_request},
{USB_SETUP_SET_ADDRESS, dissect_usb_setup_set_address_request},
{USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_request},
{USB_SETUP_GET_STATUS, dissect_usb_setup_get_status_request},
{USB_SETUP_CLEAR_FEATURE, dissect_usb_setup_clear_feature_request},
{USB_SETUP_SET_FEATURE, dissect_usb_setup_set_feature_request},
{USB_SETUP_SET_ADDRESS, dissect_usb_setup_set_address_request},
{USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_request},
{USB_SETUP_SET_CONFIGURATION, dissect_usb_setup_set_configuration_request},
{USB_SETUP_GET_INTERFACE, dissect_usb_setup_get_interface_request},
{USB_SETUP_SET_INTERFACE, dissect_usb_setup_set_interface_request},
{USB_SETUP_SYNCH_FRAME, dissect_usb_setup_synch_frame_request},
{USB_SETUP_GET_INTERFACE, dissect_usb_setup_get_interface_request},
{USB_SETUP_SET_INTERFACE, dissect_usb_setup_set_interface_request},
{USB_SETUP_SYNCH_FRAME, dissect_usb_setup_synch_frame_request},
{0, NULL}
};
static const usb_setup_dissector_table_t setup_response_dissectors[] = {
{USB_SETUP_GET_STATUS, dissect_usb_setup_get_status_response},
{USB_SETUP_CLEAR_FEATURE, dissect_usb_setup_clear_feature_response},
{USB_SETUP_SET_FEATURE, dissect_usb_setup_set_feature_response},
{USB_SETUP_SET_ADDRESS, dissect_usb_setup_set_address_response},
{USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_response},
{USB_SETUP_GET_STATUS, dissect_usb_setup_get_status_response},
{USB_SETUP_CLEAR_FEATURE, dissect_usb_setup_clear_feature_response},
{USB_SETUP_SET_FEATURE, dissect_usb_setup_set_feature_response},
{USB_SETUP_SET_ADDRESS, dissect_usb_setup_set_address_response},
{USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_response},
{USB_SETUP_GET_CONFIGURATION, dissect_usb_setup_get_configuration_response},
{USB_SETUP_SET_CONFIGURATION, dissect_usb_setup_set_configuration_response},
{USB_SETUP_GET_INTERFACE, dissect_usb_setup_get_interface_response},
{USB_SETUP_SET_INTERFACE, dissect_usb_setup_set_interface_response},
{USB_SETUP_SYNCH_FRAME, dissect_usb_setup_synch_frame_response},
{USB_SETUP_GET_INTERFACE, dissect_usb_setup_get_interface_response},
{USB_SETUP_SET_INTERFACE, dissect_usb_setup_set_interface_response},
{USB_SETUP_SYNCH_FRAME, dissect_usb_setup_synch_frame_response},
{0, NULL}
};
/* bRequest values but only when bmRequestType.type == 0 (Device) */
static const value_string setup_request_names_vals[] = {
{USB_SETUP_GET_STATUS, "GET STATUS"},
{USB_SETUP_CLEAR_FEATURE, "CLEAR FEATURE"},
{USB_SETUP_SET_FEATURE, "SET FEATURE"},
{USB_SETUP_SET_ADDRESS, "SET ADDRESS"},
{USB_SETUP_GET_DESCRIPTOR, "GET DESCRIPTOR"},
{USB_SETUP_SET_DESCRIPTOR, "SET DESCRIPTOR"},
{USB_SETUP_GET_CONFIGURATION, "GET CONFIGURATION"},
{USB_SETUP_SET_CONFIGURATION, "SET CONFIGURATION"},
{USB_SETUP_GET_INTERFACE, "GET INTERFACE"},
{USB_SETUP_SET_INTERFACE, "SET INTERFACE"},
{USB_SETUP_SYNCH_FRAME, "SYNCH FRAME"},
{USB_SETUP_GET_STATUS, "GET STATUS"},
{USB_SETUP_CLEAR_FEATURE, "CLEAR FEATURE"},
{USB_SETUP_SET_FEATURE, "SET FEATURE"},
{USB_SETUP_SET_ADDRESS, "SET ADDRESS"},
{USB_SETUP_GET_DESCRIPTOR, "GET DESCRIPTOR"},
{USB_SETUP_SET_DESCRIPTOR, "SET DESCRIPTOR"},
{USB_SETUP_GET_CONFIGURATION, "GET CONFIGURATION"},
{USB_SETUP_SET_CONFIGURATION, "SET CONFIGURATION"},
{USB_SETUP_GET_INTERFACE, "GET INTERFACE"},
{USB_SETUP_SET_INTERFACE, "SET INTERFACE"},
{USB_SETUP_SYNCH_FRAME, "SYNCH FRAME"},
{0, NULL}
};
@ -1734,7 +1734,7 @@ dissect_usb_bmrequesttype(proto_tree *parent_tree, tvbuff_t *tvb, int offset,
}
/* Adds the Linux USB pseudo header fields to the tree.
* NOTE: The multi-byte fields in this header (and only this header) are in
* NOTE: The multi-byte fields in this header (and only this header) are in
* host-endian format so we can't use proto_tree_add_item() nor the
* tvb_get_xyz() routines and is the reason for the tvb_memcpy() and
* proto_tree_add_uint[64]() pairs below. */
@ -1743,39 +1743,39 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
{
guint8 transfer_type;
const gchar* val_str;
guint8 type, flag;
guint16 val16;
guint32 val32;
guint64 val64;
guint8 type, flag;
guint16 val16;
guint32 val32;
guint64 val64;
tvb_memcpy(tvb, (guint8 *)&val64, 0, 8);
tvb_memcpy(tvb, (guint8 *)&val64, 0, 8);
proto_tree_add_uint64(tree, hf_usb_urb_id, tvb, 0, 8, val64);
/* show the event type of this URB as string and as a character */
type = tvb_get_guint8(tvb, 8);
type = tvb_get_guint8(tvb, 8);
val_str = val_to_str(type, usb_urb_type_vals, "Unknown %d");
proto_tree_add_string_format_value(tree, hf_usb_urb_type, tvb, 8, 1,
&type, "%s ('%c')", val_str, isprint(type) ? type : '.');
proto_tree_add_item(tree, hf_usb_transfer_type, tvb, 9, 1, FALSE);
proto_tree_add_item(tree, hf_usb_transfer_type, tvb, 9, 1, FALSE);
if (check_col(pinfo->cinfo, COL_INFO)) {
transfer_type = tvb_get_guint8(tvb, 9);
transfer_type = tvb_get_guint8(tvb, 9);
col_append_str(pinfo->cinfo, COL_INFO,
val_to_str(transfer_type, usb_transfer_type_vals, "Unknown type %x"));
val_to_str(transfer_type, usb_transfer_type_vals, "Unknown type %x"));
}
proto_tree_add_item(tree, hf_usb_endpoint_number, tvb, 10, 1, FALSE);
proto_tree_add_item(tree, hf_usb_device_address, tvb, 11, 1, FALSE);
tvb_memcpy(tvb, (guint8 *)&val16, 12, 2);
tvb_memcpy(tvb, (guint8 *)&val16, 12, 2);
proto_tree_add_uint(tree, hf_usb_bus_id, tvb, 12, 2, val16);
/* Right after the pseudo header we always have
* sizeof(struct usb_device_setup_hdr) bytes. The content of these
* bytes only have meaning in case setup_flag == 0.
*/
flag = tvb_get_guint8(tvb, 14);
flag = tvb_get_guint8(tvb, 14);
if (flag == 0) {
proto_tree_add_string(tree, hf_usb_setup_flag, tvb, 14, 1, "relevant (0)");
} else {
@ -1783,7 +1783,7 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
14, 1, &flag, "not relevant ('%c')", isprint(flag) ? flag: '.');
}
flag = tvb_get_guint8(tvb, 15);
flag = tvb_get_guint8(tvb, 15);
if (flag == 0) {
proto_tree_add_string(tree, hf_usb_data_flag, tvb, 15, 1, "present (0)");
} else {
@ -1791,19 +1791,19 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
15, 1, &flag, "not present ('%c')", isprint(flag) ? flag : '.');
}
tvb_memcpy(tvb, (guint8 *)&val64, 16, 8);
tvb_memcpy(tvb, (guint8 *)&val64, 16, 8);
proto_tree_add_uint64(tree, hf_usb_urb_ts_sec, tvb, 16, 8, val64);
tvb_memcpy(tvb, (guint8 *)&val32, 24, 4);
tvb_memcpy(tvb, (guint8 *)&val32, 24, 4);
proto_tree_add_uint(tree, hf_usb_urb_ts_usec, tvb, 24, 4, val32);
tvb_memcpy(tvb, (guint8 *)&val32, 28, 4);
tvb_memcpy(tvb, (guint8 *)&val32, 28, 4);
proto_tree_add_int(tree, hf_usb_urb_status, tvb, 28, 4, val32);
tvb_memcpy(tvb, (guint8 *)&val32, 32, 4);
tvb_memcpy(tvb, (guint8 *)&val32, 32, 4);
proto_tree_add_uint(tree, hf_usb_urb_len, tvb, 32, 4, val32);
tvb_memcpy(tvb, (guint8 *)&val32, 36, 4);
tvb_memcpy(tvb, (guint8 *)&val32, 36, 4);
proto_tree_add_uint(tree, hf_usb_data_len, tvb, 36, 4, val32);
}
@ -1834,7 +1834,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
tree = proto_item_add_subtree(ti, usb_hdr);
}
dissect_linux_usb_pseudo_header(tvb, pinfo, tree);
dissect_linux_usb_pseudo_header(tvb, pinfo, tree);
is_request = (tvb_get_guint8(tvb, 8) == URB_SUBMIT) ? TRUE : FALSE;
type = tvb_get_guint8(tvb, 9);
endpoint = tvb_get_guint8(tvb, 10) & (~URB_TRANSFER_IN);
@ -2023,7 +2023,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
* If this is padded (as is the case if the capture
* is done in memory-mapped mode), skip the padding;
* it's padded to a multiple of 64 bits *after* the
* pseudo-header and setup header.
* pseudo-header and setup header.
*/
if (padded)
offset += (64 - ((sizeof(struct linux_usb_phdr) + sizeof(struct usb_device_setup_hdr)) % 64)) % 64;
@ -2520,13 +2520,13 @@ proto_register_usb(void)
};
static gint *usb_subtrees[] = {
&usb_hdr,
&usb_setup_hdr,
&ett_usb_setup_bmrequesttype,
&ett_descriptor_device,
&ett_configuration_bmAttributes,
&ett_configuration_bEndpointAddress,
&ett_endpoint_bmAttributes
&usb_hdr,
&usb_setup_hdr,
&ett_usb_setup_bmrequesttype,
&ett_descriptor_device,
&ett_configuration_bmAttributes,
&ett_configuration_bEndpointAddress,
&ett_endpoint_bmAttributes
};