diff options
author | Bill Meier <wmeier@newsguy.com> | 2014-09-30 16:59:17 -0400 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2014-09-30 21:06:37 +0000 |
commit | 9b181b97c62542625a5ea6573e68c85202dd1f38 (patch) | |
tree | c210a0e51e6165a98bbe3eee64cf2e9a566cde49 | |
parent | 6896c2648cbdd13a1a00d429ee43be6a2680f094 (diff) | |
download | wireshark-9b181b97c62542625a5ea6573e68c85202dd1f38.tar.gz wireshark-9b181b97c62542625a5ea6573e68c85202dd1f38.tar.bz2 wireshark-9b181b97c62542625a5ea6573e68c85202dd1f38.zip |
Add editor modelines; Adjust whitespace; Remove boilerplate comments
Change-Id: I1f5f83ed441f6009125cf2cbe5023af04986898a
Reviewed-on: https://code.wireshark.org/review/4392
Reviewed-by: Bill Meier <wmeier@newsguy.com>
75 files changed, 3242 insertions, 2374 deletions
diff --git a/epan/dissectors/packet-3com-njack.c b/epan/dissectors/packet-3com-njack.c index 6202b12570..dce98fcf33 100644 --- a/epan/dissectors/packet-3com-njack.c +++ b/epan/dissectors/packet-3com-njack.c @@ -795,3 +795,15 @@ proto_reg_handoff_njack(void) /* heur_dissector_add("tcp", dissect_njack_heur, proto_njack); */ } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-actrace.c b/epan/dissectors/packet-actrace.c index c319736c4b..2561542cac 100644 --- a/epan/dissectors/packet-actrace.c +++ b/epan/dissectors/packet-actrace.c @@ -31,8 +31,9 @@ #include <epan/wmem/wmem.h> #define UDP_PORT_ACTRACE 2428 -#define NOT_ACTRACE 0 -#define ACTRACE_CAS 1 + +#define NOT_ACTRACE 0 +#define ACTRACE_CAS 1 #define ACTRACE_ISDN 2 @@ -74,15 +75,15 @@ 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_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_DSP, "D"}, + {ACTRACE_CAS_SOURCE_USER, "U"}, {ACTRACE_CAS_SOURCE_TABLE, "T"}, {0, NULL } }; @@ -124,89 +125,89 @@ static const value_string actrace_cas_mf_vals[] = { static value_string_ext actrace_cas_mf_vals_ext = VALUE_STRING_EXT_INIT(actrace_cas_mf_vals); 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_STOPPED"}, - {48, "EV_MFRn_2_STOPPED"}, - {49, "EV_MFRn_3_STOPPED"}, - {50, "EV_MFRn_4_STOPPED"}, - {51, "EV_MFRn_5_STOPPED"}, - {52, "EV_MFRn_6_STOPPED"}, - {53, "EV_MFRn_7_STOPPED"}, - {54, "EV_MFRn_8_STOPPED"}, - {55, "EV_MFRn_9_STOPPED"}, - {56, "EV_MFRn_10_STOPPED"}, - {57, "EV_MFRn_11_STOPPED"}, - {58, "EV_MFRn_12_STOPPED"}, - {59, "EV_MFRn_13_STOPPED"}, - {60, "EV_MFRn_14_STOPPED"}, - {61, "EV_MFRn_15_STOPPED"}, - {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"}, - {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, "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_STOPPED"}, + { 48, "EV_MFRn_2_STOPPED"}, + { 49, "EV_MFRn_3_STOPPED"}, + { 50, "EV_MFRn_4_STOPPED"}, + { 51, "EV_MFRn_5_STOPPED"}, + { 52, "EV_MFRn_6_STOPPED"}, + { 53, "EV_MFRn_7_STOPPED"}, + { 54, "EV_MFRn_8_STOPPED"}, + { 55, "EV_MFRn_9_STOPPED"}, + { 56, "EV_MFRn_10_STOPPED"}, + { 57, "EV_MFRn_11_STOPPED"}, + { 58, "EV_MFRn_12_STOPPED"}, + { 59, "EV_MFRn_13_STOPPED"}, + { 60, "EV_MFRn_14_STOPPED"}, + { 61, "EV_MFRn_15_STOPPED"}, + { 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"}, + { 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"}, {1010, "EV_TIMER_EXPIRED10"}, {1020, "EV_DEBOUNCE_TIMER_EXPIRED"}, {1030, "EV_INTER_DIGIT_TIMER_EXPIRED"}, @@ -214,50 +215,50 @@ static const value_string actrace_cas_event_vals[] = { }; static value_string_ext actrace_cas_event_vals_ext = VALUE_STRING_EXT_INIT(actrace_cas_event_vals); -#define SEND_CAS 2 +#define SEND_CAS 2 #define SEND_EVENT 3 #define CHANGE_COLLECT_TYPE 13 #define SEND_MF 8 #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"}, + { 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"}, + {14, "GENERATE_CAS_EV"}, {0, NULL} }; static value_string_ext actrace_cas_function_vals_ext = VALUE_STRING_EXT_INIT(actrace_cas_function_vals); 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"}, + { 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"}, @@ -283,75 +284,75 @@ 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_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"}, + {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"}, - {39, "PERM_FR_MODE_CONN_OUT_OF_S"}, - {40, "PERM_FR_MODE_CONN_OPERATIONAL"}, - {41, "NETWORK_TEMPORARY_FAILURE"}, - {42, "NETWORK_CONGESTION"}, - {43, "ACCESS_INFORMATION_DISCARDED"}, - {44, "REQUESTED_CIRCUIT_NOT_AVAILABLE"}, - {46, "PRECEDENCE_CALL_BLOCKED"}, - {47, "RESOURCE_UNAVAILABLE_UNSPECIFIED"}, - {49, "QUALITY_OF_SERVICE_UNAVAILABLE"}, - {50, "REQUESTED_FAC_NOT_SUBSCRIBED"}, - {53, "CUG_OUT_CALLS_BARRED"}, - {55, "CUG_INC_CALLS_BARRED"}, - {57, "BC_NOT_AUTHORIZED"}, - {58, "BC_NOT_PRESENTLY_AVAILABLE"}, - {62, "ACCES_INFO_SUBS_CLASS_INCONS"}, - {63, "SERVICE_NOT_AVAILABLE"}, - {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"}, - {87, "NOT_CUG_MEMBER"}, - {88, "INCOMPATIBLE_DESTINATION"}, - {90, "CUG_NON_EXISTENT"}, - {91, "INVALID_TRANSIT_NETWORK_SELECTION"}, - {95, "INVALID_MESSAGE_UNSPECIFIED"}, - {96, "MANDATORY_IE_MISSING"}, - {97, "MESSAGE_TYPE_NON_EXISTENT"}, - {98, "MESSAGE_STATE_INCONSISTENCY"}, - {99, "NON_EXISTENT_IE"}, + { 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"}, + { 39, "PERM_FR_MODE_CONN_OUT_OF_S"}, + { 40, "PERM_FR_MODE_CONN_OPERATIONAL"}, + { 41, "NETWORK_TEMPORARY_FAILURE"}, + { 42, "NETWORK_CONGESTION"}, + { 43, "ACCESS_INFORMATION_DISCARDED"}, + { 44, "REQUESTED_CIRCUIT_NOT_AVAILABLE"}, + { 46, "PRECEDENCE_CALL_BLOCKED"}, + { 47, "RESOURCE_UNAVAILABLE_UNSPECIFIED"}, + { 49, "QUALITY_OF_SERVICE_UNAVAILABLE"}, + { 50, "REQUESTED_FAC_NOT_SUBSCRIBED"}, + { 53, "CUG_OUT_CALLS_BARRED"}, + { 55, "CUG_INC_CALLS_BARRED"}, + { 57, "BC_NOT_AUTHORIZED"}, + { 58, "BC_NOT_PRESENTLY_AVAILABLE"}, + { 62, "ACCES_INFO_SUBS_CLASS_INCONS"}, + { 63, "SERVICE_NOT_AVAILABLE"}, + { 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"}, + { 87, "NOT_CUG_MEMBER"}, + { 88, "INCOMPATIBLE_DESTINATION"}, + { 90, "CUG_NON_EXISTENT"}, + { 91, "INVALID_TRANSIT_NETWORK_SELECTION"}, + { 95, "INVALID_MESSAGE_UNSPECIFIED"}, + { 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"}, @@ -450,7 +451,7 @@ static int dissect_actrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, { proto_tree *actrace_tree; proto_item *ti; - int actrace_protocol; + int actrace_protocol; /* Initialize variables */ actrace_tree = NULL; @@ -496,11 +497,11 @@ static int dissect_actrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *actrace_tree) { /* Declare variables */ - gint32 value, function, trunk, bchannel, source, event, curr_state, next_state; - gint32 par0, par1, par2; + gint32 value, function, trunk, bchannel, source, event, curr_state, next_state; + gint32 par0, par1, par2; const gchar *frame_label = NULL; - int direction = 0; - int offset = 0; + int direction = 0; + int offset = 0; col_set_str(pinfo->cinfo, COL_PROTOCOL, "AC_CAS"); @@ -649,10 +650,10 @@ static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree * proto_tree *actrace_tree) { /* Declare variables */ - gint len; - gint32 value, trunk; + gint len; + gint32 value, trunk; tvbuff_t *next_tvb; - int offset = 0; + int offset = 0; len = tvb_get_ntohs(tvb, 44); @@ -706,7 +707,7 @@ static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree * */ static int is_actrace(tvbuff_t *tvb, gint offset) { - gint tvb_len; + gint tvb_len; gint32 source, isdn_header; tvb_len = tvb_reported_length(tvb); @@ -811,9 +812,9 @@ void proto_register_actrace(void) /* The registration hand-off routine */ void proto_reg_handoff_actrace(void) { - static gboolean actrace_prefs_initialized = FALSE; + static gboolean actrace_prefs_initialized = FALSE; static dissector_handle_t actrace_handle; - static guint actrace_udp_port; + static guint actrace_udp_port; if (!actrace_prefs_initialized) { @@ -833,3 +834,15 @@ void proto_reg_handoff_actrace(void) dissector_add_uint("udp.port", global_actrace_udp_port, actrace_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-ans.c b/epan/dissectors/packet-ans.c index 45576d2f1f..c10c3fdc4d 100644 --- a/epan/dissectors/packet-ans.c +++ b/epan/dissectors/packet-ans.c @@ -146,3 +146,15 @@ proto_reg_handoff_ans(void) dissector_add_uint("ethertype", ETHERTYPE_INTEL_ANS, ans_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-aprs.c b/epan/dissectors/packet-aprs.c index ac655edcd7..60ce834462 100644 --- a/epan/dissectors/packet-aprs.c +++ b/epan/dissectors/packet-aprs.c @@ -1150,7 +1150,7 @@ static int aprs_3rd_party( proto_tree *aprs_tree, tvbuff_t *tvb, int offset, int data_len ) { /* If the type of the hf[] entry pointed to by hfindex is FT_BYTES or FT_STRING */ - /* then data_len == -1 is allowed and means "remainder of the tvbuff" */ + /* then data_len == -1 is allowed and means "remainder of the tvbuff" */ if ( data_len == -1 ) { data_len = tvb_reported_length_remaining( tvb, offset ); @@ -1170,7 +1170,7 @@ aprs_default_string( proto_tree *aprs_tree, tvbuff_t *tvb, int offset, int data_ { /* Assumption: hfindex points to an hf[] entry with type FT_STRING; should be validated ? */ /* If the type of the hf[] entry pointed to by hfindex is FT_STRING */ - /* then data_len == -1 is allowed and means "remainder of the tvbuff" */ + /* then data_len == -1 is allowed and means "remainder of the tvbuff" */ if ( data_len == -1 ) { data_len = tvb_reported_length_remaining( tvb, offset ); @@ -1188,7 +1188,7 @@ aprs_default_bytes( proto_tree *aprs_tree, tvbuff_t *tvb, int offset, int data_l { /* Assumption: hfindex points to an hf[] entry with type FT_BYTES; should be validated ? */ /* If the type of the hf[] entry pointed to by hfindex is FT_BYTES */ - /* then data_len == -1 is allowed and means "remainder of the tvbuff" */ + /* then data_len == -1 is allowed and means "remainder of the tvbuff" */ if ( data_len == -1 ) { data_len = tvb_reported_length_remaining( tvb, offset ); @@ -1969,13 +1969,25 @@ proto_register_aprs( void ) proto_register_subtree_array( ett, array_length( ett ) ); /* Register preferences module */ - aprs_module = prefs_register_protocol( proto_aprs, NULL); + aprs_module = prefs_register_protocol( proto_aprs, NULL); /* Register any preference */ - prefs_register_bool_preference(aprs_module, "showaprslax", + prefs_register_bool_preference(aprs_module, "showaprslax", "Allow APRS violations.", "Attempt to display common APRS protocol violations correctly", &gPREF_APRS_LAX ); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-ax25-kiss.c b/epan/dissectors/packet-ax25-kiss.c index f9743d56da..77c342dc99 100644 --- a/epan/dissectors/packet-ax25-kiss.c +++ b/epan/dissectors/packet-ax25-kiss.c @@ -381,3 +381,15 @@ proto_reg_handoff_ax25_kiss(void) ax25_handle = find_dissector( "ax25" ); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-ax25.c b/epan/dissectors/packet-ax25.c index 32842f1f19..87c416ac29 100644 --- a/epan/dissectors/packet-ax25.c +++ b/epan/dissectors/packet-ax25.c @@ -451,3 +451,15 @@ proto_reg_handoff_ax25(void) } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-bctp.c b/epan/dissectors/packet-bctp.c index 2475449ee6..9bbeffe5a1 100644 --- a/epan/dissectors/packet-bctp.c +++ b/epan/dissectors/packet-bctp.c @@ -118,3 +118,15 @@ proto_reg_handoff_bctp(void) text_handle = find_dissector("data-text-lines"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-bt-oui.c b/epan/dissectors/packet-bt-oui.c index e9123c9803..6388b08c82 100644 --- a/epan/dissectors/packet-bt-oui.c +++ b/epan/dissectors/packet-bt-oui.c @@ -85,3 +85,15 @@ void proto_register_bt_oui(void) llc_add_oui(OUI_BLUETOOTH, "llc.bluetooth_pid", "LLC Bluetooth OUI PID", hf); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-cisco-erspan.c b/epan/dissectors/packet-cisco-erspan.c index 9142ed3f05..cee85e757b 100644 --- a/epan/dissectors/packet-cisco-erspan.c +++ b/epan/dissectors/packet-cisco-erspan.c @@ -131,8 +131,8 @@ dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint32 offset = 0; guint16 version; - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME); - col_set_str(pinfo->cinfo, COL_INFO, PROTO_SHORT_NAME ":"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME); + col_set_str(pinfo->cinfo, COL_INFO, PROTO_SHORT_NAME ":"); if (tree) { @@ -206,8 +206,8 @@ dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 12; } - eth_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(ethnofcs_handle, eth_tvb, pinfo, tree); + eth_tvb = tvb_new_subset_remaining(tvb, offset); + call_dissector(ethnofcs_handle, eth_tvb, pinfo, tree); } void @@ -305,11 +305,23 @@ proto_reg_handoff_erspan(void) { dissector_handle_t erspan_handle; - ethnofcs_handle = find_dissector("eth_withoutfcs"); + ethnofcs_handle = find_dissector("eth_withoutfcs"); erspan_handle = create_dissector_handle(dissect_erspan, proto_erspan); - dissector_add_uint("gre.proto", GRE_ERSPAN_88BE, erspan_handle); - dissector_add_uint("gre.proto", GRE_ERSPAN_22EB, erspan_handle); + dissector_add_uint("gre.proto", GRE_ERSPAN_88BE, erspan_handle); + dissector_add_uint("gre.proto", GRE_ERSPAN_22EB, erspan_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-cisco-oui.c b/epan/dissectors/packet-cisco-oui.c index 13e8bb1c18..2a986a1f18 100644 --- a/epan/dissectors/packet-cisco-oui.c +++ b/epan/dissectors/packet-cisco-oui.c @@ -73,3 +73,15 @@ proto_register_cisco_oui(void) llc_add_oui(OUI_CISCO, "llc.cisco_pid", "LLC Cisco OUI PID", hf); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-cisco-wids.c b/epan/dissectors/packet-cisco-wids.c index 4bc90f225d..93a07f6eb8 100644 --- a/epan/dissectors/packet-cisco-wids.c +++ b/epan/dissectors/packet-cisco-wids.c @@ -209,3 +209,15 @@ proto_reg_handoff_cwids(void) saved_udp_port = global_udp_port; } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dbus.c b/epan/dissectors/packet-dbus.c index fb39346faf..85938624bd 100644 --- a/epan/dissectors/packet-dbus.c +++ b/epan/dissectors/packet-dbus.c @@ -689,3 +689,15 @@ proto_reg_handoff_dbus(void) dissector_add_for_decode_as("tcp.port", dbus_handle_tcp); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dcerpc-conv.c b/epan/dissectors/packet-dcerpc-conv.c index b53129faf9..09a7a51565 100644 --- a/epan/dissectors/packet-dcerpc-conv.c +++ b/epan/dissectors/packet-dcerpc-conv.c @@ -105,10 +105,10 @@ conv_dissect_who_are_you2_rqst (tvbuff_t *tvb, int offset, * [in] uuid_t *actuid, * [in] unsigned32 boot_time, */ - e_uuid_t actuid; + e_uuid_t actuid; - offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_conv_who_are_you2_rqst_actuid, &actuid); - offset = dissect_ndr_time_t(tvb, offset, pinfo, tree, di, drep, hf_conv_who_are_you2_rqst_boot_time, NULL); + offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, di, drep, hf_conv_who_are_you2_rqst_actuid, &actuid); + offset = dissect_ndr_time_t(tvb, offset, pinfo, tree, di, drep, hf_conv_who_are_you2_rqst_boot_time, NULL); col_add_fstr(pinfo->cinfo, COL_INFO, "conv_who_are_you2 request actuid: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", @@ -148,17 +148,17 @@ conv_dissect_who_are_you2_resp (tvbuff_t *tvb, int offset, static dcerpc_sub_dissector conv_dissectors[] = { - { 0, "who_are_you", - conv_dissect_who_are_you_rqst, conv_dissect_who_are_you_resp }, - { 1, "who_are_you2", - conv_dissect_who_are_you2_rqst, conv_dissect_who_are_you2_resp }, - { 2, "are_you_there", - NULL, NULL }, - { 3, "who_are_you_auth", - NULL, NULL }, - { 4, "who_are_you_auth_more", - NULL, NULL }, - { 0, NULL, NULL, NULL } + { 0, "who_are_you", + conv_dissect_who_are_you_rqst, conv_dissect_who_are_you_resp }, + { 1, "who_are_you2", + conv_dissect_who_are_you2_rqst, conv_dissect_who_are_you2_resp }, + { 2, "are_you_there", + NULL, NULL }, + { 3, "who_are_you_auth", + NULL, NULL }, + { 4, "who_are_you_auth_more", + NULL, NULL }, + { 0, NULL, NULL, NULL } }; void @@ -202,3 +202,15 @@ proto_reg_handoff_conv (void) dcerpc_init_uuid (proto_conv, ett_conv, &uuid_conv, ver_conv, conv_dissectors, hf_conv_opnum); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dect.c b/epan/dissectors/packet-dect.c index 578d24c8e3..f1c69f9c2c 100644 --- a/epan/dissectors/packet-dect.c +++ b/epan/dissectors/packet-dect.c @@ -2582,3 +2582,15 @@ proto_reg_handoff_dect(void) dissector_add_uint("ethertype", ETHERTYPE_DECT , dect_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c index 54305653f9..83a0cefb4d 100644 --- a/epan/dissectors/packet-dhcp-failover.c +++ b/epan/dissectors/packet-dhcp-failover.c @@ -1170,3 +1170,15 @@ proto_reg_handoff_dhcpfo(void) saved_tcp_port = tcp_port_pref; } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dmx-chan.c b/epan/dissectors/packet-dmx-chan.c index f3e5d67fa1..fe39a5b87b 100644 --- a/epan/dissectors/packet-dmx-chan.c +++ b/epan/dissectors/packet-dmx-chan.c @@ -188,3 +188,15 @@ proto_register_dmx_chan(void) col_count, FALSE); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dmx-sip.c b/epan/dissectors/packet-dmx-sip.c index 220dc9938e..636c3ef33f 100644 --- a/epan/dissectors/packet-dmx-sip.c +++ b/epan/dissectors/packet-dmx-sip.c @@ -303,3 +303,15 @@ proto_register_dmx_sip(void) register_dissector("dmx-sip", dissect_dmx_sip, proto_dmx_sip); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dmx-text.c b/epan/dissectors/packet-dmx-text.c index 0c19d508a6..f3c7fa543e 100644 --- a/epan/dissectors/packet-dmx-text.c +++ b/epan/dissectors/packet-dmx-text.c @@ -108,3 +108,15 @@ proto_register_dmx_text(void) register_dissector("dmx-text", dissect_dmx_text, proto_dmx_text); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dpnss-link.c b/epan/dissectors/packet-dpnss-link.c index a73293f11c..048f35e0dd 100644 --- a/epan/dissectors/packet-dpnss-link.c +++ b/epan/dissectors/packet-dpnss-link.c @@ -225,3 +225,15 @@ proto_reg_handoff_dpnss_link(void) dpnss_handle = find_dissector("dpnss"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-dtpt.c b/epan/dissectors/packet-dtpt.c index e865b0c035..83a3317e06 100644 --- a/epan/dissectors/packet-dtpt.c +++ b/epan/dissectors/packet-dtpt.c @@ -1226,4 +1226,15 @@ proto_reg_handoff_dtpt(void) dissector_add_uint("tcp.port", gbl_dtptServerPort, dtpt_handle); } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-etv.c b/epan/dissectors/packet-etv.c index 2aed9ef1a2..de2ca93dbf 100644 --- a/epan/dissectors/packet-etv.c +++ b/epan/dissectors/packet-etv.c @@ -239,3 +239,15 @@ proto_reg_handoff_etv(void) dsmcc_handle = find_dissector("mp2t-dsmcc"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-fix.c b/epan/dissectors/packet-fix.c index 2afccc61da..1d2f020e2c 100644 --- a/epan/dissectors/packet-fix.c +++ b/epan/dissectors/packet-fix.c @@ -446,10 +446,10 @@ dissect_fix_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data /* Register the protocol with Wireshark */ static void fix_prefs(void) { - dissector_delete_uint_range("tcp.port", fix_tcp_range, fix_handle); + dissector_delete_uint_range("tcp.port", fix_tcp_range, fix_handle); g_free(fix_tcp_range); fix_tcp_range = range_copy(global_fix_tcp_range); - dissector_add_uint_range("tcp.port", fix_tcp_range, fix_handle); + dissector_add_uint_range("tcp.port", fix_tcp_range, fix_handle); } /* this format is require because a script is used to build the C function @@ -536,3 +536,15 @@ proto_reg_handoff_fix(void) dissector_add_for_decode_as("tcp.port", fix_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-force10-oui.c b/epan/dissectors/packet-force10-oui.c index 2d0403f045..7cbf972fa8 100644 --- a/epan/dissectors/packet-force10-oui.c +++ b/epan/dissectors/packet-force10-oui.c @@ -51,3 +51,15 @@ proto_register_force10_oui(void) llc_add_oui(OUI_FORCE10, "llc.force10_pid", "LLC FORCE10 OUI PID", hf); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-g723.c b/epan/dissectors/packet-g723.c index 5f17c50817..65c4632e56 100644 --- a/epan/dissectors/packet-g723.c +++ b/epan/dissectors/packet-g723.c @@ -45,11 +45,11 @@ static int ett_g723 = -1; /* RFC 3551 The least significant two bits of the first octet in the frame determine the frame size and codec type: - bits content octets/frame - 00 high-rate speech (6.3 kb/s) 24 - 01 low-rate speech (5.3 kb/s) 20 - 10 SID frame 4 - 11 reserved + bits content octets/frame + 00 high-rate speech (6.3 kb/s) 24 + 01 low-rate speech (5.3 kb/s) 20 + 10 SID frame 4 + 11 reserved */ static const value_string g723_frame_size_and_codec_type_value[] = { @@ -144,4 +144,15 @@ proto_register_g723(void) } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-gadu-gadu.c b/epan/dissectors/packet-gadu-gadu.c index dbd34b4170..aed854d9f4 100644 --- a/epan/dissectors/packet-gadu-gadu.c +++ b/epan/dissectors/packet-gadu-gadu.c @@ -2120,3 +2120,15 @@ proto_reg_handoff_gadu_gadu(void) xml_handle = find_dissector("xml"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-gluster_cli.c b/epan/dissectors/packet-gluster_cli.c index 316ddc6468..a866d07909 100644 --- a/epan/dissectors/packet-gluster_cli.c +++ b/epan/dissectors/packet-gluster_cli.c @@ -255,7 +255,7 @@ static const vsff gluster_cli_2_proc[] = { gluster_cli_2_common_call, gluster_cli_2_common_reply }, { - GLUSTER_CLI_2_GET_VOLUME, "GET_VOLUME", + GLUSTER_CLI_2_GET_VOLUME, "GET_VOLUME", gluster_cli_2_common_call, gluster_cli_2_common_reply }, { @@ -538,3 +538,15 @@ proto_reg_handoff_gluster_cli(void) hf_gluster_cli_2_proc); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-gluster_pmap.c b/epan/dissectors/packet-gluster_pmap.c index 648f276fdb..f462a163eb 100644 --- a/epan/dissectors/packet-gluster_pmap.c +++ b/epan/dissectors/packet-gluster_pmap.c @@ -271,3 +271,15 @@ proto_reg_handoff_gluster_dump(void) hf_gluster_dump_proc); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-glusterfs.c b/epan/dissectors/packet-glusterfs.c index 580834db42..cc40cde7a5 100644 --- a/epan/dissectors/packet-glusterfs.c +++ b/epan/dissectors/packet-glusterfs.c @@ -602,11 +602,11 @@ static int _glusterfs_gfs3_common_readdir_reply(tvbuff_t *tvb, proto_tree *tree, int offset) { proto_item *errno_item; - guint op_errno; + guint op_errno; offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_entries, offset); - if (tree) { + if (tree) { op_errno = tvb_get_ntohl(tvb, offset); errno_item = proto_tree_add_int(tree, hf_gluster_op_errno, tvb, offset, 4, op_errno); @@ -1460,7 +1460,7 @@ glusterfs_gfs3_3_op_readdir_reply(tvbuff_t *tvb, int offset, glusterfs_gfs3_3_op_readdir_entry, NULL); offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset); - return offset; + return offset; } static int @@ -1637,7 +1637,7 @@ glusterfs_gfs3_3_op_readdirp_reply(tvbuff_t *tvb, int offset, glusterfs_gfs3_3_op_readdirp_entry, NULL); offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset); - return offset; + return offset; } /* READDIRP and DISCARD both use this */ @@ -2691,3 +2691,15 @@ proto_reg_handoff_glusterfs(void) } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c index 76857cc05a..d923139a5b 100644 --- a/epan/dissectors/packet-gprs-llc.c +++ b/epan/dissectors/packet-gprs-llc.c @@ -460,7 +460,6 @@ static void llc_gprs_dissect_xid(tvbuff_t *tvb, } -/* Code to actually dissect the packets */ static void dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -727,7 +726,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ctrl_f_tree = proto_tree_add_subtree_format(llcgprs_tree, tvb, offset, (llc_data_reported_length-offset), ett_llcgprs_sframe, NULL, - "TOM Envelope - Protocol: %s", + "TOM Envelope - Protocol: %s", val_to_str(tom_pd, tompd_formats, "Unknown (%d)")); proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_rl, tvb, offset, 1, tom_byte); @@ -855,7 +854,8 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ctrl_f_tree = proto_tree_add_subtree_format(llcgprs_tree, tvb, offset, (llc_data_reported_length-offset), ett_llcgprs_sframe, NULL, - "TOM Envelope - Protocol: %s", val_to_str(tom_pd, tompd_formats, "Unknown (%d)")); + "TOM Envelope - Protocol: %s", + val_to_str(tom_pd, tompd_formats, "Unknown (%d)")); proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_rl, tvb, offset, 1, tom_byte); proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_pd, tvb, offset, 1, tom_byte); @@ -915,7 +915,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { ctrl_f_tree = proto_tree_add_subtree_format(llcgprs_tree, tvb, offset-2, 2, ett_llcgprs_ctrlf, NULL, - "Unconfirmed Information format - UI, N(U) = %u", nu); + "Unconfirmed Information format - UI, N(U) = %u", nu); proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_U_fmt, tvb, offset-2, 2, ctrl_fld_ui_s); @@ -958,7 +958,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ctrl_f_tree = proto_tree_add_subtree_format(llcgprs_tree, tvb, offset, (llc_data_reported_length-offset), ett_llcgprs_sframe, NULL, - "TOM Envelope - Protocol: %s", + "TOM Envelope - Protocol: %s", val_to_str(tom_pd, tompd_formats, "Unknown (%d)")); proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_rl, tvb, offset, 1, tom_byte); @@ -1126,8 +1126,6 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Register the protocol with Wireshark */ -/* this format is require because a script is used to build the C function */ -/* that calls all the protocol registration. */ void proto_register_llcgprs(void) @@ -1359,9 +1357,6 @@ proto_register_llcgprs(void) } -/* If this dissector uses sub-dissector registration add a registration routine. */ -/* This format is required because a script is used to find these routines and */ -/* create the code that calls these routines. */ void proto_reg_handoff_llcgprs(void) { @@ -1375,3 +1370,15 @@ proto_reg_handoff_llcgprs(void) sndcp_xid_handle = find_dissector("sndcpxid"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c index 89dd4da8d2..9bb29b4f64 100644 --- a/epan/dissectors/packet-gsm_a_bssmap.c +++ b/epan/dissectors/packet-gsm_a_bssmap.c @@ -816,22 +816,22 @@ typedef enum BE_UDEF_130, /* Undefined */ BE_KC128, /* Kc128 */ BE_CSG_ID, /* CSG Identifier */ - BE_REDIR_ATT_FLG, /* Redirect Attempt Flag 3.2.2.111 */ - BE_REROUTE_REJ_CAUSE, /* Reroute Reject Cause 3.2.2.112 */ - BE_SEND_SEQN, /* Send Sequence Number 3.2.2.113 */ - BE_REROUTE_OUTCOME, /* Reroute complete outcome 3.2.2.114 */ - BE_GLOBAL_CALL_REF, /* Global Call Reference 3.2.2.115 */ - BE_LCLS_CONF, /* LCLS-Configuration 3.2.2.116 */ - BE_LCLS_CON_STATUS_CONTROL, /* LCLS-Connection-Status-Control 3.2.2.117 */ - BE_LCLS_CORR_NOT_NEEDED, /* LCLS-Correlation-Not-Needed 3.2.2.118 */ - BE_LCLS_BSS_STATUS, /* LCLS-BSS-Status 3.2.2.119 */ - BE_LCLS_BREAK_REQ, /* LCLS-Break-Request 3.2.2.120 */ - BE_CSFB_IND, /* CSFB Indication 3.2.2.121 */ - BE_CS_TO_PS_SRVCC, /* CS to PS SRVCC 3.2.2.122 */ - BE_SRC_ENB_2_TGT_ENB_TRANSP_INF, /* Source eNB to target eNB transparent information (E-UTRAN)" 3.2.2.123 */ - BE_CS_TO_PS_SRVCC_IND, /* CS to PS SRVCC Indication 3.2.2.124 */ - BE_CN_TO_MS_TRANSP, /* CN to MS transparent information 3.2.2.125 */ - BE_SELECTED_PLMN_ID, /* Selected PLMN ID 3.2.2.126 */ + BE_REDIR_ATT_FLG, /* Redirect Attempt Flag 3.2.2.111 */ + BE_REROUTE_REJ_CAUSE, /* Reroute Reject Cause 3.2.2.112 */ + BE_SEND_SEQN, /* Send Sequence Number 3.2.2.113 */ + BE_REROUTE_OUTCOME, /* Reroute complete outcome 3.2.2.114 */ + BE_GLOBAL_CALL_REF, /* Global Call Reference 3.2.2.115 */ + BE_LCLS_CONF, /* LCLS-Configuration 3.2.2.116 */ + BE_LCLS_CON_STATUS_CONTROL, /* LCLS-Connection-Status-Control 3.2.2.117 */ + BE_LCLS_CORR_NOT_NEEDED, /* LCLS-Correlation-Not-Needed 3.2.2.118 */ + BE_LCLS_BSS_STATUS, /* LCLS-BSS-Status 3.2.2.119 */ + BE_LCLS_BREAK_REQ, /* LCLS-Break-Request 3.2.2.120 */ + BE_CSFB_IND, /* CSFB Indication 3.2.2.121 */ + BE_CS_TO_PS_SRVCC, /* CS to PS SRVCC 3.2.2.122 */ + BE_SRC_ENB_2_TGT_ENB_TRANSP_INF, /* Source eNB to target eNB transparent information (E-UTRAN)" 3.2.2.123 */ + BE_CS_TO_PS_SRVCC_IND, /* CS to PS SRVCC Indication 3.2.2.124 */ + BE_CN_TO_MS_TRANSP, /* CN to MS transparent information 3.2.2.125 */ + BE_SELECTED_PLMN_ID, /* Selected PLMN ID 3.2.2.126 */ BE_NONE /* NONE */ } bssmap_elem_idx_t; @@ -1280,7 +1280,7 @@ static const value_string gsm_a_bssap_channel_rate_and_type_vals[] = { { 0x1a, "Full or Half rate channel, Full rate preferred changes between full and half rate not allowed after first allocation"}, { 0x1b, "Full or Half rate channel, Half rate preferred changes between full and half rate not allowed after first allocation"}, { 0x1f, "Full or Half rate channel, changes between full and half rate not allowed after first allocation"}, - { 0, NULL } + { 0, NULL } }; /* Bits 7-1 indicate the permitted speech version identifier; */ @@ -1337,7 +1337,7 @@ be_chan_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of { proto_tree_add_item(tree, hf_gsm_a_bssmap_chan_type_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_bssmap_perm_speech_v_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - curr_offset++; + curr_offset++; } while ((len - (curr_offset - offset)) > 0); } @@ -3869,7 +3869,7 @@ be_aoip_trans_lay_add(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g if ((!pinfo->fd->flags.visited) && rtp_port != 0) { rtp_add_address(pinfo, &rtp_dst_addr, rtp_port, 0, "BSS MAP", pinfo->fd->num, FALSE, 0); - rtcp_add_address(pinfo, &rtp_dst_addr, rtp_port+1, 0, "BSS MAP", pinfo->fd->num); + rtcp_add_address(pinfo, &rtp_dst_addr, rtp_port+1, 0, "BSS MAP", pinfo->fd->num); } return(curr_offset - offset); } @@ -4165,7 +4165,7 @@ be_speech_codec(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 val_to_str_const(tvb_get_guint8(tvb, curr_offset) & 0x0f, bssap_speech_codec_values, "Unknown")); - curr_offset++; + curr_offset++; consumed++; proto_tree_add_text(subtree, tvb, curr_offset, 2, "S0 - S15"); curr_offset+=2; @@ -4429,7 +4429,7 @@ be_global_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin guint32 curr_offset; curr_offset = offset; - /* Global Call Reference Identifier */ + /* Global Call Reference Identifier */ proto_tree_add_text(tree, tvb, curr_offset, len, "Field Element not decoded yet"); return len; @@ -4685,24 +4685,24 @@ guint16 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo NULL, /* Undefined */ be_kc128, /* Kc128 */ be_csg_id, /* CSG Identifier */ - NULL, /* Redirect Attempt Flag 3.2.2.111 No data */ - be_reroute_rej_cause, /* Reroute Reject Cause 3.2.2.112 */ - be_send_seqn, /* Send Sequence Number 3.2.2.113 */ - be_reroute_outcome, /* Reroute complete outcome 3.2.2.114 */ - be_global_call_ref, /* Global Call Reference 3.2.2.115 */ - be_lcls_conf, /* LCLS-Configuration 3.2.2.116 */ - be_lcls_con_status_control, /* LCLS-Connection-Status-Control 3.2.2.117 */ - NULL, /* LCLS-Correlation-Not-Needed 3.2.2.118 No data */ - be_lcls_bss_status, /* LCLS-BSS-Status 3.2.2.119 */ - NULL, /* LCLS-Break-Request 3.2.2.120 No data */ - NULL, /* CSFB Indication 3.2.2.121 No data */ + NULL, /* Redirect Attempt Flag 3.2.2.111 No data */ + be_reroute_rej_cause, /* Reroute Reject Cause 3.2.2.112 */ + be_send_seqn, /* Send Sequence Number 3.2.2.113 */ + be_reroute_outcome, /* Reroute complete outcome 3.2.2.114 */ + be_global_call_ref, /* Global Call Reference 3.2.2.115 */ + be_lcls_conf, /* LCLS-Configuration 3.2.2.116 */ + be_lcls_con_status_control, /* LCLS-Connection-Status-Control 3.2.2.117 */ + NULL, /* LCLS-Correlation-Not-Needed 3.2.2.118 No data */ + be_lcls_bss_status, /* LCLS-BSS-Status 3.2.2.119 */ + NULL, /* LCLS-Break-Request 3.2.2.120 No data */ + NULL, /* CSFB Indication 3.2.2.121 No data */ #if 0 - BE_CS_TO_PS_SRVCC, /* CS to PS SRVCC 3.2.2.122 */ - BE_SRC_ENB_2_TGT_ENB_TRANSP_INF, /* Source eNB to target eNB transparent information (E-UTRAN)" 3.2.2.123 */ - BE_CS_TO_PS_SRVCC_IND, /* CS to PS SRVCC Indication 3.2.2.124 */ - BE_CN_TO_MS_TRANSP, /* CN to MS transparent information 3.2.2.125 */ + BE_CS_TO_PS_SRVCC, /* CS to PS SRVCC 3.2.2.122 */ + BE_SRC_ENB_2_TGT_ENB_TRANSP_INF, /* Source eNB to target eNB transparent information (E-UTRAN)" 3.2.2.123 */ + BE_CS_TO_PS_SRVCC_IND, /* CS to PS SRVCC Indication 3.2.2.124 */ + BE_CN_TO_MS_TRANSP, /* CN to MS transparent information 3.2.2.125 */ #endif - be_selected_plmn_id, /* Selected PLMN ID 3.2.2.126 */ + be_selected_plmn_id, /* Selected PLMN ID 3.2.2.126 */ NULL /* NONE */ }; @@ -4930,7 +4930,7 @@ static guint16 (*bssmap_bss_to_bss_element_fcn[])(tvbuff_t *tvb, proto_tree *tre NULL, /* NONE */ }; -#define NUM_BSS_ELEMENT_FCNS (int)(sizeof(bssmap_bss_to_bss_element_fcn)/(sizeof bssmap_bss_to_bss_element_fcn[0])) +#define NUM_BSS_ELEMENT_FCNS (int)(sizeof(bssmap_bss_to_bss_element_fcn)/(sizeof bssmap_bss_to_bss_element_fcn[0])) static guint16 be_field_element_dissect(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) @@ -4982,7 +4982,7 @@ be_field_element_dissect(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gu /* dissect the field element */ curr_offset += (*bssmap_bss_to_bss_element_fcn[idx])(tvb, bss_to_bss_tree, pinfo, curr_offset, ie_len, NULL, 0); - EXTRANEOUS_DATA_CHECK_EXPERT(ie_len, curr_offset - fe_start_offset, pinfo, &ei_gsm_a_bssmap_extraneous_data); + EXTRANEOUS_DATA_CHECK_EXPERT(ie_len, curr_offset - fe_start_offset, pinfo, &ei_gsm_a_bssmap_extraneous_data); } } @@ -5633,7 +5633,7 @@ bssmap_clear_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 ELEM_OPT_TLV(BE_L3_HEADER_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, NULL); /* Cause 3.2.2.5 MSC-BSS M 3-4 */ ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL); - /* CSFB Indication 3.2.2.121 MSC-BSS O 1 */ + /* CSFB Indication 3.2.2.121 MSC-BSS O 1 */ ELEM_OPT_T(BE_CSFB_IND, GSM_A_PDU_TYPE_BSSMAP, BE_CSFB_IND, NULL); EXTRANEOUS_DATA_CHECK(curr_len, 0); @@ -7052,7 +7052,7 @@ bssmap_reroute_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin /* IMSI 3.2.2.6 MSC-BSS O (note 5) 3-10 */ ELEM_OPT_TLV(BE_IMSI, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); - EXTRANEOUS_DATA_CHECK(curr_len, 0); + EXTRANEOUS_DATA_CHECK(curr_len, 0); } /* @@ -7234,7 +7234,7 @@ static void (*bssmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pi NULL, /* NONE */ }; -#define NUM_BSSMAP_MSG_FCNS (int)(sizeof(bssmap_msg_fcn)/sizeof(bssmap_msg_fcn[0])) +#define NUM_BSSMAP_MSG_FCNS (int)(sizeof(bssmap_msg_fcn)/sizeof(bssmap_msg_fcn[0])) void dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) @@ -8139,3 +8139,15 @@ proto_reg_handoff_gsm_a_bssmap(void) } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-gsm_abis_om2000.c b/epan/dissectors/packet-gsm_abis_om2000.c index 068933f595..f49301369f 100644 --- a/epan/dissectors/packet-gsm_abis_om2000.c +++ b/epan/dissectors/packet-gsm_abis_om2000.c @@ -1430,3 +1430,15 @@ proto_register_abis_om2000(void) proto_abis_om2000); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-gsm_um.c b/epan/dissectors/packet-gsm_um.c index 7f6715584c..be64b3e4b6 100644 --- a/epan/dissectors/packet-gsm_um.c +++ b/epan/dissectors/packet-gsm_um.c @@ -308,3 +308,15 @@ proto_reg_handoff_gsm_um(void) dissector_add_uint("wtap_encap", WTAP_ENCAP_GSM_UM, gsm_um_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-h248_10.c b/epan/dissectors/packet-h248_10.c index 10ec81f9ea..d391bfef1a 100644 --- a/epan/dissectors/packet-h248_10.c +++ b/epan/dissectors/packet-h248_10.c @@ -109,4 +109,15 @@ void proto_register_h248_dot10(void) { h248_register_package(&h248_pkg_CHP,REPLACE_PKG); } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-h248_2.c b/epan/dissectors/packet-h248_2.c index eed923fd37..bfd092b556 100644 --- a/epan/dissectors/packet-h248_2.c +++ b/epan/dissectors/packet-h248_2.c @@ -47,112 +47,123 @@ static gint ett_h248_2_dtone_dtt_obs_evt = -1; static const value_string hf_h248_2_dtone_dtt_obs_evt_val_values[] = { - /*For FAX*/ - { 0x0001, "CNG"}, /* A T.30 fax calling tone */ - { 0x0002, "V21flag"}, /* V21 tone and flags for fax answering */ - /* For TEXT */ - { 0x0003, "XCI"}, /* A V.18 XCI */ - { 0x0004, "V18txp1"}, /* A V.18 txp signal in channel V.21(1) */ - { 0x0005, "V18txp2"}, /* A V.18 txp signal in channel V.21(2) */ - { 0x0006, "BellHi"}, /* A Bell 103 carrier on the high channel */ - { 0x0007, "BellLo"}, /* A Bell 103 low channel */ - { 0x0008, "Baudot45"}, /* Baudot45 initial carrier and characters */ - { 0x0009, "Baudot50"}, /* A Baudot50 initial carrier and characters */ - { 0x000a, "Edt"}, /* An EDT initial tone and characters */ - { 0x000b, "DTMF"}, /* DTMF signals */ - { 0x001c, "CTM"}, /* CTM signals */ - /* For DATA */ - { 0x000c, "Sig"}, /* Modulation signal from a mode only used for data, i.e., not V.21, V.23 nor Bell 103 */ - /* Common to TEXT and DATA */ - { 0x000d, "CT"}, /* A V.25 calling tone */ - { 0x000e, "V21hi"}, /* A V.21 carrier on the higher frequency channel */ - { 0x000f, "V21lo"}, /* A V.21 carrier on the low frequency channel */ - { 0x0010, "V23hi"}, /* A V.23 high carrier */ - { 0x0011, "V23lo"}, /* A V.23 low carrier */ - { 0x0012, "CI"}, /* A V.8 CI with contents in "dtvalue" */ - /* Common to FAX, TEXT and DATA */ - { 0x0013, "ANS(T.30 CED)"}, /* V.25 ANS, equivalent to T.30 CED from answering terminal */ - { 0x0014, "ANSbar"}, /* V.25 ANS with phase reversals" */ - { 0x0015, "ANSAM"}, /* V.8 ANSam */ - { 0x0016, "ANSAMbar"}, /* V.8 ANSam with phase reversals */ - { 0x0017, "CM"}, /* V.8 CM with contents in "dtvalue" */ - { 0x0018, "CJ"}, /* V.8 CJ */ - { 0x0019, "JM"}, /* V.8 JM with contents in "dtvalue" */ - { 0x001a, "ENDOFSIG"}, /* End of reported signal detected reported for continuous or repeated signals */ - { 0x001b, "V8BIS"}, /* V.8 bis signal, with signal type in parameter V8bistype and value in "dtvalue" */ - { 0, NULL } + /*For FAX*/ + { 0x0001, "CNG"}, /* A T.30 fax calling tone */ + { 0x0002, "V21flag"}, /* V21 tone and flags for fax answering */ + /* For TEXT */ + { 0x0003, "XCI"}, /* A V.18 XCI */ + { 0x0004, "V18txp1"}, /* A V.18 txp signal in channel V.21(1) */ + { 0x0005, "V18txp2"}, /* A V.18 txp signal in channel V.21(2) */ + { 0x0006, "BellHi"}, /* A Bell 103 carrier on the high channel */ + { 0x0007, "BellLo"}, /* A Bell 103 low channel */ + { 0x0008, "Baudot45"}, /* Baudot45 initial carrier and characters */ + { 0x0009, "Baudot50"}, /* A Baudot50 initial carrier and characters */ + { 0x000a, "Edt"}, /* An EDT initial tone and characters */ + { 0x000b, "DTMF"}, /* DTMF signals */ + { 0x001c, "CTM"}, /* CTM signals */ + /* For DATA */ + { 0x000c, "Sig"}, /* Modulation signal from a mode only used for data, i.e., not V.21, V.23 nor Bell 103 */ + /* Common to TEXT and DATA */ + { 0x000d, "CT"}, /* A V.25 calling tone */ + { 0x000e, "V21hi"}, /* A V.21 carrier on the higher frequency channel */ + { 0x000f, "V21lo"}, /* A V.21 carrier on the low frequency channel */ + { 0x0010, "V23hi"}, /* A V.23 high carrier */ + { 0x0011, "V23lo"}, /* A V.23 low carrier */ + { 0x0012, "CI"}, /* A V.8 CI with contents in "dtvalue" */ + /* Common to FAX, TEXT and DATA */ + { 0x0013, "ANS(T.30 CED)"}, /* V.25 ANS, equivalent to T.30 CED from answering terminal */ + { 0x0014, "ANSbar"}, /* V.25 ANS with phase reversals" */ + { 0x0015, "ANSAM"}, /* V.8 ANSam */ + { 0x0016, "ANSAMbar"}, /* V.8 ANSam with phase reversals */ + { 0x0017, "CM"}, /* V.8 CM with contents in "dtvalue" */ + { 0x0018, "CJ"}, /* V.8 CJ */ + { 0x0019, "JM"}, /* V.8 JM with contents in "dtvalue" */ + { 0x001a, "ENDOFSIG"}, /* End of reported signal detected reported for continuous or repeated signals */ + { 0x001b, "V8BIS"}, /* V.8 bis signal, with signal type in parameter V8bistype and value in "dtvalue" */ + { 0, NULL } }; static h248_pkg_param_t h248_2_dtone_dtt_obs_evt_params[] = { - { 0x0001, &hf_h248_2_dtone_dtt_obs_evt_val, h248_param_ber_integer, NULL }, - { 0, NULL, NULL, NULL} + { 0x0001, &hf_h248_2_dtone_dtt_obs_evt_val, h248_param_ber_integer, NULL }, + { 0, NULL, NULL, NULL} }; static const value_string h248_2_ctype_events_vals[] = { - { 0x0001, "Discriminating Tone Detected(dtone)"}, - { 0x0002, "Call Type Discrimination Result(calldisres)"}, - { 0, NULL } + { 0x0001, "Discriminating Tone Detected(dtone)"}, + { 0x0002, "Call Type Discrimination Result(calldisres)"}, + { 0, NULL } }; static h248_pkg_evt_t h248_pkg_generic_cause_evts[] = { - { 0x0001, &hf_h248_2_dtone_dtt_obs_evt, &ett_h248_2_dtone_dtt_obs_evt, h248_2_dtone_dtt_obs_evt_params, h248_2_ctype_events_vals}, - { 0, NULL, NULL, NULL, NULL} + { 0x0001, &hf_h248_2_dtone_dtt_obs_evt, &ett_h248_2_dtone_dtt_obs_evt, h248_2_dtone_dtt_obs_evt_params, h248_2_ctype_events_vals}, + { 0, NULL, NULL, NULL, NULL} }; /* Call Type Discrimination Package */ static h248_package_t h248_pkg_ctype = { - 0x0011, /* Id */ - &proto_h248_2, /* hfid */ - &ett_h248_2, /* ett */ - - NULL, /* value_string param_names */ - NULL, /* value_string signal_names */ - h248_2_ctype_events_vals, /* value_string event_names */ - NULL, /* value_string stats_names */ - - NULL, /* properties */ - NULL, /* signals */ - h248_pkg_generic_cause_evts, /* events */ - NULL /* statistics */ + 0x0011, /* Id */ + &proto_h248_2, /* hfid */ + &ett_h248_2, /* ett */ + + NULL, /* value_string param_names */ + NULL, /* value_string signal_names */ + h248_2_ctype_events_vals, /* value_string event_names */ + NULL, /* value_string stats_names */ + + NULL, /* properties */ + NULL, /* signals */ + h248_pkg_generic_cause_evts, /* events */ + NULL /* statistics */ }; void proto_register_h248_dot2(void) { - static hf_register_info hf[] = { + static hf_register_info hf[] = { #if 0 - { &hf_h248_2_dtone_evt, - { "Discriminating Tone Type", "h248.2.dtt", - FT_BYTES, BASE_NONE, NULL, 0, - NULL, HFILL } - }, + { &hf_h248_2_dtone_evt, + { "Discriminating Tone Type", "h248.2.dtt", + FT_BYTES, BASE_NONE, NULL, 0, + NULL, HFILL } + }, #endif - { &hf_h248_2_dtone_dtt_obs_evt, - { "Discriminating Tone Type(dtt)", "h248.2.dtt", - FT_BYTES, BASE_NONE, NULL, 0, + { &hf_h248_2_dtone_dtt_obs_evt, + { "Discriminating Tone Type(dtt)", "h248.2.dtt", + FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }, - }, - { &hf_h248_2_dtone_dtt_obs_evt_val, - { "call type", "h248.2.dtt.val", - FT_UINT32, BASE_DEC, VALS(hf_h248_2_dtone_dtt_obs_evt_val_values) , 0, - NULL, HFILL } - }, + }, + { &hf_h248_2_dtone_dtt_obs_evt_val, + { "call type", "h248.2.dtt.val", + FT_UINT32, BASE_DEC, VALS(hf_h248_2_dtone_dtt_obs_evt_val_values) , 0, + NULL, HFILL } + }, - }; + }; - static gint *ett[] = { - &ett_h248_2, - &ett_h248_2_dtone_dtt_obs_evt, - }; + static gint *ett[] = { + &ett_h248_2, + &ett_h248_2_dtone_dtt_obs_evt, + }; - proto_h248_2 = proto_register_protocol(PNAME, PSNAME, PFNAME); + proto_h248_2 = proto_register_protocol(PNAME, PSNAME, PFNAME); - proto_register_field_array(proto_h248_2, hf, array_length(hf)); + proto_register_field_array(proto_h248_2, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + proto_register_subtree_array(ett, array_length(ett)); - h248_register_package(&h248_pkg_ctype,MERGE_PKG_HIGH); + h248_register_package(&h248_pkg_ctype,MERGE_PKG_HIGH); } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-h248_3gpp.c b/epan/dissectors/packet-h248_3gpp.c index 285c67dfe0..b48692abee 100644 --- a/epan/dissectors/packet-h248_3gpp.c +++ b/epan/dissectors/packet-h248_3gpp.c @@ -643,3 +643,15 @@ void proto_register_h248_3gpp(void) { h248_register_package(&h248_package_threegint, REPLACE_PKG); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-h248_7.c b/epan/dissectors/packet-h248_7.c index c8d59e84fe..01ce1137ca 100644 --- a/epan/dissectors/packet-h248_7.c +++ b/epan/dissectors/packet-h248_7.c @@ -174,4 +174,15 @@ void proto_register_h248_7(void) { h248_register_package(&h248_pkg_an,REPLACE_PKG); } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-h248_annex_e.c b/epan/dissectors/packet-h248_annex_e.c index 4c5ddfd43a..8af8e4208e 100644 --- a/epan/dissectors/packet-h248_annex_e.c +++ b/epan/dissectors/packet-h248_annex_e.c @@ -1087,7 +1087,7 @@ void proto_register_h248_annex_e(void) { &ett_h248_pkg_tonedet_evt_etd, &ett_h248_pkg_tonedet_evt_ltd, - /* dg 0x0005 */ + /* dg 0x0005 */ &ett_h248_pkg_dg, &ett_h248_pkg_dg_sig_pt, &ett_h248_pkg_dg_sig_d0, @@ -1177,4 +1177,15 @@ void proto_register_h248_annex_e(void) { h248_register_package(&h248_pkg_tdmc,MERGE_PKG_LOW); /* 0x000d */ } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-interlink.c b/epan/dissectors/packet-interlink.c index 4bb4c7b965..88a0223ee7 100644 --- a/epan/dissectors/packet-interlink.c +++ b/epan/dissectors/packet-interlink.c @@ -241,3 +241,15 @@ proto_reg_handoff_interlink(void) data_handle = find_dissector("data"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-ipsec-tcp.c b/epan/dissectors/packet-ipsec-tcp.c index 8178594748..b50db424d3 100644 --- a/epan/dissectors/packet-ipsec-tcp.c +++ b/epan/dissectors/packet-ipsec-tcp.c @@ -264,3 +264,15 @@ proto_reg_handoff_tcpencap(void) } } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-ipsi-ctl.c b/epan/dissectors/packet-ipsi-ctl.c index 5942447e27..2816db5b9c 100644 --- a/epan/dissectors/packet-ipsi-ctl.c +++ b/epan/dissectors/packet-ipsi-ctl.c @@ -32,8 +32,8 @@ void proto_register_ipsictl(void); void proto_reg_handoff_ipsictl(void); -#define IPSICTL_PORT 5010 -#define IPSICTL_PDU_MAGIC 0x0300 +#define IPSICTL_PORT 5010 +#define IPSICTL_PDU_MAGIC 0x0300 static int proto_ipsictl = -1; @@ -57,16 +57,16 @@ static void dissect_ipsictl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) int offset = 0; int loffset = 0; int llength = 0; - int remaining_length; + int remaining_length; guint16 magic; guint16 length; guint16 type=0; guint16 sequence=0; - int first_sequence=-1; - int last_sequence=-1; + int first_sequence=-1; + int last_sequence=-1; guint16 field1=0; guint16 pdu=0; - int haspdus=0; + int haspdus=0; remaining_length=tvb_reported_length_remaining(tvb, offset); @@ -192,33 +192,33 @@ void proto_register_ipsictl(void) static hf_register_info hf[] = { { &hf_ipsictl_pdu, - { "PDU", "ipsictl.pdu", - FT_UINT16, BASE_DEC, NULL, 0x0, - "IPSICTL PDU", HFILL }}, + { "PDU", "ipsictl.pdu", + FT_UINT16, BASE_DEC, NULL, 0x0, + "IPSICTL PDU", HFILL }}, { &hf_ipsictl_magic, - { "Magic", "ipsictl.magic", - FT_UINT16, BASE_HEX, NULL, 0x0, - "IPSICTL Magic", HFILL }}, + { "Magic", "ipsictl.magic", + FT_UINT16, BASE_HEX, NULL, 0x0, + "IPSICTL Magic", HFILL }}, { &hf_ipsictl_length, - { "Length", "ipsictl.length", - FT_UINT16, BASE_HEX, NULL, 0x0, - "IPSICTL Length", HFILL }}, + { "Length", "ipsictl.length", + FT_UINT16, BASE_HEX, NULL, 0x0, + "IPSICTL Length", HFILL }}, { &hf_ipsictl_type, - { "Type", "ipsictl.type", - FT_UINT16, BASE_HEX, NULL, 0x0, - "IPSICTL Type", HFILL }}, + { "Type", "ipsictl.type", + FT_UINT16, BASE_HEX, NULL, 0x0, + "IPSICTL Type", HFILL }}, { &hf_ipsictl_sequence, - { "Sequence", "ipsictl.sequence", - FT_UINT16, BASE_HEX, NULL, 0x0, - "IPSICTL Sequence", HFILL }}, + { "Sequence", "ipsictl.sequence", + FT_UINT16, BASE_HEX, NULL, 0x0, + "IPSICTL Sequence", HFILL }}, { &hf_ipsictl_field1, - { "Field1", "ipsictl.field1", - FT_UINT16, BASE_HEX, NULL, 0x0, - "IPSICTL Field1", HFILL }}, + { "Field1", "ipsictl.field1", + FT_UINT16, BASE_HEX, NULL, 0x0, + "IPSICTL Field1", HFILL }}, { &hf_ipsictl_data, - { "Data", "ipsictl.data", - FT_BYTES, BASE_NONE, NULL, 0x0, - "IPSICTL data", HFILL }}, + { "Data", "ipsictl.data", + FT_BYTES, BASE_NONE, NULL, 0x0, + "IPSICTL data", HFILL }}, }; static gint *ett[] = { @@ -243,3 +243,15 @@ void proto_reg_handoff_ipsictl(void) } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c index 71ae0ba28c..e858bcab54 100644 --- a/epan/dissectors/packet-json.c +++ b/epan/dissectors/packet-json.c @@ -624,3 +624,15 @@ proto_reg_handoff_json(void) text_lines_handle = find_dissector("data-text-lines"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-kdp.c b/epan/dissectors/packet-kdp.c index 53fe965393..f6b9fcfe38 100644 --- a/epan/dissectors/packet-kdp.c +++ b/epan/dissectors/packet-kdp.c @@ -78,8 +78,8 @@ static int hf_kdp_bcst_flag = -1; static int hf_kdp_dup_flag = -1; static void dissect_kdp(tvbuff_t *tvb, - packet_info *pinfo, - proto_tree *tree) { + packet_info *pinfo, + proto_tree *tree) { guint body_len; guint8 version = 0; guint8 header_len = 0; @@ -111,9 +111,9 @@ static void dissect_kdp(tvbuff_t *tvb, header_len = tvb_get_guint8(tvb, 1) * 4; body_len = tvb_reported_length(tvb); if (header_len > body_len) { - body_len = 0; /* malformed packet */ + body_len = 0; /* malformed packet */ } else { - body_len = body_len - header_len; + body_len = body_len - header_len; } packet_flags = tvb_get_guint8(tvb, 2); packet_errors = tvb_get_guint8(tvb, 3); @@ -132,99 +132,99 @@ static void dissect_kdp(tvbuff_t *tvb, proto_tree_add_item(kdp_tree, hf_kdp_errors, tvb, 3, 1, ENC_BIG_ENDIAN); if (header_len > 4) { - offset = 4; - if (packet_flags & KDP_ACK_FLAG) { - proto_tree_add_item(kdp_tree, hf_kdp_destflowid, tvb, offset, 4, ENC_BIG_ENDIAN); - offset = offset + 4; - } + offset = 4; + if (packet_flags & KDP_ACK_FLAG) { + proto_tree_add_item(kdp_tree, hf_kdp_destflowid, tvb, offset, 4, ENC_BIG_ENDIAN); + offset = offset + 4; + } - if (packet_flags & (KDP_SYN_FLAG | KDP_BCST_FLAG)) { - proto_tree_add_item(kdp_tree, hf_kdp_srcflowid, tvb, offset, 4, ENC_BIG_ENDIAN); - src_flowid = tvb_get_ntohl(tvb, offset); - offset = offset + 4; - } + if (packet_flags & (KDP_SYN_FLAG | KDP_BCST_FLAG)) { + proto_tree_add_item(kdp_tree, hf_kdp_srcflowid, tvb, offset, 4, ENC_BIG_ENDIAN); + src_flowid = tvb_get_ntohl(tvb, offset); + offset = offset + 4; + } - proto_tree_add_item(kdp_tree, hf_kdp_sequence, tvb, offset, 4, ENC_BIG_ENDIAN); - sequence_number = tvb_get_ntohl(tvb, offset); - offset = offset + 4; + proto_tree_add_item(kdp_tree, hf_kdp_sequence, tvb, offset, 4, ENC_BIG_ENDIAN); + sequence_number = tvb_get_ntohl(tvb, offset); + offset = offset + 4; - if (packet_flags & KDP_ACK_FLAG) { - proto_tree_add_item(kdp_tree, hf_kdp_ack, tvb, offset, 4, ENC_BIG_ENDIAN); - ack_number = tvb_get_ntohl(tvb, offset); - offset = offset + 4; - } - if (packet_flags & KDP_SYN_FLAG) { - proto_tree_add_item(kdp_tree, hf_kdp_maxsegmentsize, tvb, offset, 4, ENC_BIG_ENDIAN); - offset = offset + 4; - } + if (packet_flags & KDP_ACK_FLAG) { + proto_tree_add_item(kdp_tree, hf_kdp_ack, tvb, offset, 4, ENC_BIG_ENDIAN); + ack_number = tvb_get_ntohl(tvb, offset); + offset = offset + 4; + } + if (packet_flags & KDP_SYN_FLAG) { + proto_tree_add_item(kdp_tree, hf_kdp_maxsegmentsize, tvb, offset, 4, ENC_BIG_ENDIAN); + offset = offset + 4; + } - while (offset < ((body_len > 0) ? header_len - 4 : header_len)) { - guint8 option_number; - guint8 option_len = 0; + while (offset < ((body_len > 0) ? header_len - 4 : header_len)) { + guint8 option_number; + guint8 option_len = 0; - option_number = tvb_get_guint8(tvb, offset); + option_number = tvb_get_guint8(tvb, offset); - proto_tree_add_item(kdp_tree, hf_kdp_optionnumber, tvb, offset, 1, ENC_BIG_ENDIAN); - offset = offset + 1; - if (option_number > 0) { - option_len = tvb_get_guint8(tvb, offset); - proto_tree_add_item(kdp_tree, hf_kdp_optionlen, tvb, offset, 1, ENC_BIG_ENDIAN); - offset = offset + 1; - } + proto_tree_add_item(kdp_tree, hf_kdp_optionnumber, tvb, offset, 1, ENC_BIG_ENDIAN); + offset = offset + 1; + if (option_number > 0) { + option_len = tvb_get_guint8(tvb, offset); + proto_tree_add_item(kdp_tree, hf_kdp_optionlen, tvb, offset, 1, ENC_BIG_ENDIAN); + offset = offset + 1; + } - switch (option_number) { - case 0: - break; - case 1: - proto_tree_add_item(kdp_tree, hf_kdp_option1, tvb, offset, 2, ENC_BIG_ENDIAN); - offset = offset + 2; - break; - case 2: - proto_tree_add_item(kdp_tree, hf_kdp_option2, tvb, offset, 2, ENC_BIG_ENDIAN); - offset = offset + 2; - break; - case 3: - proto_tree_add_item(kdp_tree, hf_kdp_option3, tvb, offset, 2, ENC_BIG_ENDIAN); - offset = offset + 2; - break; - case 4: - proto_tree_add_item(kdp_tree, hf_kdp_option4, tvb, offset, 0, ENC_NA); - break; - case 5: - proto_tree_add_item(kdp_tree, hf_kdp_option5, tvb, offset, 0, ENC_NA); - break; - case 6: - proto_tree_add_item(kdp_tree, hf_kdp_option6, tvb, offset, option_len - 2, ENC_NA); - offset = offset + option_len - 2; - break; - case 7: - proto_tree_add_item(kdp_tree, hf_kdp_option7, tvb, offset, 2, ENC_BIG_ENDIAN); - offset = offset + 2; - break; - case 8: - proto_tree_add_item(kdp_tree, hf_kdp_option8, tvb, offset, 2, ENC_BIG_ENDIAN); - offset = offset + 2; - break; - case 9: - proto_tree_add_item(kdp_tree, hf_kdp_option9, tvb, offset, 2, ENC_BIG_ENDIAN); - offset = offset + 2; - break; - default: - proto_tree_add_item(kdp_tree, hf_kdp_option_unknown, tvb, offset, option_len - 2, ENC_NA); - offset = offset + option_len - 2; - break; - } - } + switch (option_number) { + case 0: + break; + case 1: + proto_tree_add_item(kdp_tree, hf_kdp_option1, tvb, offset, 2, ENC_BIG_ENDIAN); + offset = offset + 2; + break; + case 2: + proto_tree_add_item(kdp_tree, hf_kdp_option2, tvb, offset, 2, ENC_BIG_ENDIAN); + offset = offset + 2; + break; + case 3: + proto_tree_add_item(kdp_tree, hf_kdp_option3, tvb, offset, 2, ENC_BIG_ENDIAN); + offset = offset + 2; + break; + case 4: + proto_tree_add_item(kdp_tree, hf_kdp_option4, tvb, offset, 0, ENC_NA); + break; + case 5: + proto_tree_add_item(kdp_tree, hf_kdp_option5, tvb, offset, 0, ENC_NA); + break; + case 6: + proto_tree_add_item(kdp_tree, hf_kdp_option6, tvb, offset, option_len - 2, ENC_NA); + offset = offset + option_len - 2; + break; + case 7: + proto_tree_add_item(kdp_tree, hf_kdp_option7, tvb, offset, 2, ENC_BIG_ENDIAN); + offset = offset + 2; + break; + case 8: + proto_tree_add_item(kdp_tree, hf_kdp_option8, tvb, offset, 2, ENC_BIG_ENDIAN); + offset = offset + 2; + break; + case 9: + proto_tree_add_item(kdp_tree, hf_kdp_option9, tvb, offset, 2, ENC_BIG_ENDIAN); + offset = offset + 2; + break; + default: + proto_tree_add_item(kdp_tree, hf_kdp_option_unknown, tvb, offset, option_len - 2, ENC_NA); + offset = offset + option_len - 2; + break; + } + } - if (body_len > 0) { - proto_tree_add_item(kdp_tree, hf_kdp_fragment, tvb, offset, 2, ENC_BIG_ENDIAN); - offset = offset + 2; + if (body_len > 0) { + proto_tree_add_item(kdp_tree, hf_kdp_fragment, tvb, offset, 2, ENC_BIG_ENDIAN); + offset = offset + 2; - proto_tree_add_item(kdp_tree, hf_kdp_fragtotal, tvb, offset, 2, ENC_BIG_ENDIAN); - offset = offset + 2; + proto_tree_add_item(kdp_tree, hf_kdp_fragtotal, tvb, offset, 2, ENC_BIG_ENDIAN); + offset = offset + 2; - proto_tree_add_item(kdp_tree, hf_kdp_body, tvb, offset, -1, ENC_NA); - } + proto_tree_add_item(kdp_tree, hf_kdp_body, tvb, offset, -1, ENC_NA); + } } } } @@ -238,30 +238,30 @@ static void dissect_kdp(tvbuff_t *tvb, char src_flowid_string[BUFFER_SIZE]; if (packet_flags & KDP_ACK_FLAG) { - g_snprintf(ack_string, sizeof(ack_string), "ACK=%x ", ack_number); + g_snprintf(ack_string, sizeof(ack_string), "ACK=%x ", ack_number); } else { - ack_string[0] = '\0'; + ack_string[0] = '\0'; } if (header_len > 4) { - g_snprintf(seq_num_string, sizeof(seq_num_string), "SEQ=%x ", sequence_number); + g_snprintf(seq_num_string, sizeof(seq_num_string), "SEQ=%x ", sequence_number); } else { - seq_num_string[0] = '\0'; + seq_num_string[0] = '\0'; } if (packet_flags & (KDP_SYN_FLAG | KDP_BCST_FLAG)) { - g_snprintf(src_flowid_string, sizeof(src_flowid_string), "SRC_FLOWID=%x ", src_flowid); + g_snprintf(src_flowid_string, sizeof(src_flowid_string), "SRC_FLOWID=%x ", src_flowid); } else { - src_flowid_string[0] = '\0'; + src_flowid_string[0] = '\0'; } col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s%s%s%s%s%s%serrors=%d", - ((packet_flags & KDP_DROP_FLAG) ? "DROP " : ""), - ((packet_flags & KDP_SYN_FLAG) ? "SYN " : ""), - ((packet_flags & KDP_RST_FLAG) ? "RST " : ""), - ((packet_flags & KDP_BCST_FLAG) ? "BCST " : ""), - ((packet_flags & KDP_DUP_FLAG) ? "DUP " : ""), - ack_string, - seq_num_string, - src_flowid_string, - packet_errors); + ((packet_flags & KDP_DROP_FLAG) ? "DROP " : ""), + ((packet_flags & KDP_SYN_FLAG) ? "SYN " : ""), + ((packet_flags & KDP_RST_FLAG) ? "RST " : ""), + ((packet_flags & KDP_BCST_FLAG) ? "BCST " : ""), + ((packet_flags & KDP_DUP_FLAG) ? "DUP " : ""), + ack_string, + seq_num_string, + src_flowid_string, + packet_errors); } } @@ -310,87 +310,87 @@ void proto_register_kdp(void) { }, { &hf_kdp_destflowid, { "DestFlowID", "kdp.destflowid", - FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_srcflowid, { "SrcFlowID", "kdp.srcflowid", - FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_sequence, { "Sequence", "kdp.sequence", - FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_ack, { "Ack", "kdp.ack", - FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_maxsegmentsize, { "MaxSegmentSize", "kdp.maxsegmentsize", - FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_optionnumber, { "Option Number", "kdp.optionnumber", - FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_optionlen, { "Option Len", "kdp.option", - FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option1, { "Option1 - Max Window", "kdp.option1", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option2, { "Option2 - TCP Fraction", "kdp.option2", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option3, { "Option3 - KDP Version", "kdp.option3", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option4, { "Option4 - Enable Reliable", "kdp.option4", - FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL} + FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option5, { "Option5 - Disable Reliable", "kdp.option5", - FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL} + FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option6, { "Option6 - SACK", "kdp.option6", - FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option7, { "Option7 - COS", "kdp.option7", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option8, { "Option8 - BWMIN", "kdp.option8", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option9, { "Option9 - INT", "kdp.option9", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_option_unknown, { "Unknown option", "kdp.option_unknown", - FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_fragment, { "Fragment", "kdp.fragment", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_fragtotal, { "FragTotal", "kdp.fragtotal", - FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_body, { "Encrypted Body", "kdp.body", - FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} }, { &hf_kdp_xml_body, { "XML Body", "kdp.xml_body", - FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL} + FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL} } }; @@ -400,8 +400,8 @@ void proto_register_kdp(void) { }; proto_kdp = proto_register_protocol("Kontiki Delivery Protocol", /* name */ - "KDP", /* short name */ - "kdp"); /* abbrev */ + "KDP", /* short name */ + "kdp"); /* abbrev */ proto_register_field_array(proto_kdp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } @@ -413,3 +413,15 @@ proto_reg_handoff_kdp(void) { dissector_add_uint("udp.port", KDP_PORT, kdp_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-lapdm.c b/epan/dissectors/packet-lapdm.c index 5ed9353907..8b418bccf4 100644 --- a/epan/dissectors/packet-lapdm.c +++ b/epan/dissectors/packet-lapdm.c @@ -116,25 +116,25 @@ static gboolean reassemble_lapdm = TRUE; /* * Bits in the address field. */ -#define LAPDM_SAPI 0x1c /* Service Access Point Identifier */ -#define LAPDM_SAPI_SHIFT 2 -#define LAPDM_CR 0x02 /* Command/Response bit */ -#define LAPDM_EA 0x01 /* First Address Extension bit */ -#define LAPDM_LPD 0x60 /* Link Protocol Discriminator */ +#define LAPDM_SAPI 0x1c /* Service Access Point Identifier */ +#define LAPDM_SAPI_SHIFT 2 +#define LAPDM_CR 0x02 /* Command/Response bit */ +#define LAPDM_EA 0x01 /* First Address Extension bit */ +#define LAPDM_LPD 0x60 /* Link Protocol Discriminator */ /* * Bits in the length field. */ -#define LAPDM_EL 0x01 /* Extended Length = 1 */ -#define LAPDM_M 0x02 /* More fragments */ -#define LAPDM_M_SHIFT 1 -#define LAPDM_LEN 0xfc /* Length */ -#define LAPDM_LEN_SHIFT 2 +#define LAPDM_EL 0x01 /* Extended Length = 1 */ +#define LAPDM_M 0x02 /* More fragments */ +#define LAPDM_M_SHIFT 1 +#define LAPDM_LEN 0xfc /* Length */ +#define LAPDM_LEN_SHIFT 2 #define LAPDM_HEADER_LEN 3 -#define LAPDM_SAPI_RR_CC_MM 0 -#define LAPDM_SAPI_SMS 3 +#define LAPDM_SAPI_RR_CC_MM 0 +#define LAPDM_SAPI_SMS 3 /* Used only for U frames */ static const xdlc_cf_items lapdm_cf_items = { @@ -150,33 +150,33 @@ static const xdlc_cf_items lapdm_cf_items = { }; static const value_string lapdm_ea_vals[] = { - { 0, "More octets" }, - { 1, "Final octet" }, - { 0, NULL } + { 0, "More octets" }, + { 1, "Final octet" }, + { 0, NULL } }; static const value_string lapdm_sapi_vals[] = { - { LAPDM_SAPI_RR_CC_MM, "RR/MM/CC" }, - { LAPDM_SAPI_SMS, "SMS/SS" }, - { 0, NULL } + { LAPDM_SAPI_RR_CC_MM, "RR/MM/CC" }, + { LAPDM_SAPI_SMS, "SMS/SS" }, + { 0, NULL } }; static const value_string lapdm_lpd_vals[] = { - { 0, "Normal GSM" }, - { 1, "Cell broadcast service" }, - { 0, NULL } + { 0, "Normal GSM" }, + { 1, "Cell broadcast service" }, + { 0, NULL } }; static const value_string lapdm_m_vals[] = { - { 0, "Last segment" }, - { 1, "More segments" }, - { 0, NULL } + { 0, "Last segment" }, + { 1, "More segments" }, + { 0, NULL } }; static const value_string lapdm_el_vals[] = { - { 0, "More octets" }, - { 1, "Final octet" }, - { 0, NULL } + { 0, "More octets" }, + { 1, "Final octet" }, + { 0, NULL } }; @@ -258,12 +258,12 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } control = dissect_xdlc_control(tvb, 1, pinfo, lapdm_tree, hf_lapdm_control, - ett_lapdm_control, &lapdm_cf_items, NULL /* LAPDm doesn't support extended */, NULL, NULL, - is_response, FALSE, FALSE); + ett_lapdm_control, &lapdm_cf_items, NULL /* LAPDm doesn't support extended */, NULL, NULL, + is_response, FALSE, FALSE); if (tree) { length_ti = proto_tree_add_uint(lapdm_tree, hf_lapdm_length, tvb, - 2, 1, length); + 2, 1, length); length_tree = proto_item_add_subtree(length_ti, ett_lapdm_length); proto_tree_add_uint(length_tree, hf_lapdm_len, tvb, 2, 1, length); @@ -288,55 +288,55 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ if( (control & XDLC_I_MASK) == XDLC_I && reassemble_lapdm ) { - fragment_head *fd_m = NULL; - tvbuff_t *reassembled = NULL; - guint32 fragment_id; - gboolean save_fragmented = pinfo->fragmented; - - pinfo->fragmented = m; - - /* Rely on caller to provide a way to group fragments */ - fragment_id = (pinfo->circuit_id << 4) | (sapi << 1) | pinfo->p2p_dir; - - /* This doesn't seem the best way of doing it as doesn't - take N(S) into account, but N(S) isn't always 0 for - the first fragment! - */ - fd_m = fragment_add_seq_next (&lapdm_reassembly_table, payload, 0, - pinfo, - fragment_id, /* guint32 ID for fragments belonging together */ - NULL, - /*n_s guint32 fragment sequence number */ - len, /* guint32 fragment length */ - m); /* More fragments? */ - - reassembled = process_reassembled_data(payload, 0, pinfo, - "Reassembled LAPDm", fd_m, &lapdm_frag_items, - NULL, lapdm_tree); - - /* Reassembled into this packet - */ - if (fd_m && pinfo->fd->num == fd_m->reassembled_in) { - if (!dissector_try_uint(lapdm_sapi_dissector_table, sapi, - reassembled, pinfo, tree)) - call_dissector(data_handle, reassembled, pinfo, tree); - } - else { - col_append_str(pinfo->cinfo, COL_INFO, " (Fragment)"); - proto_tree_add_item(lapdm_tree, hf_lapdm_fragment_data, payload, 0, -1, ENC_NA); - } - - /* Now reset fragmentation information in pinfo - */ - pinfo->fragmented = save_fragmented; + fragment_head *fd_m = NULL; + tvbuff_t *reassembled = NULL; + guint32 fragment_id; + gboolean save_fragmented = pinfo->fragmented; + + pinfo->fragmented = m; + + /* Rely on caller to provide a way to group fragments */ + fragment_id = (pinfo->circuit_id << 4) | (sapi << 1) | pinfo->p2p_dir; + + /* This doesn't seem the best way of doing it as doesn't + take N(S) into account, but N(S) isn't always 0 for + the first fragment! + */ + fd_m = fragment_add_seq_next (&lapdm_reassembly_table, payload, 0, + pinfo, + fragment_id, /* guint32 ID for fragments belonging together */ + NULL, + /*n_s guint32 fragment sequence number */ + len, /* guint32 fragment length */ + m); /* More fragments? */ + + reassembled = process_reassembled_data(payload, 0, pinfo, + "Reassembled LAPDm", fd_m, &lapdm_frag_items, + NULL, lapdm_tree); + + /* Reassembled into this packet + */ + if (fd_m && pinfo->fd->num == fd_m->reassembled_in) { + if (!dissector_try_uint(lapdm_sapi_dissector_table, sapi, + reassembled, pinfo, tree)) + call_dissector(data_handle, reassembled, pinfo, tree); + } + else { + col_append_str(pinfo->cinfo, COL_INFO, " (Fragment)"); + proto_tree_add_item(lapdm_tree, hf_lapdm_fragment_data, payload, 0, -1, ENC_NA); + } + + /* Now reset fragmentation information in pinfo + */ + pinfo->fragmented = save_fragmented; } else { /* Whole packet If we have some data, try and dissect it (only happens for UI, SABM, UA or I frames) - */ + */ if (!dissector_try_uint(lapdm_sapi_dissector_table, sapi, - payload, pinfo, tree)) + payload, pinfo, tree)) call_dissector(data_handle,payload, pinfo, tree); } } @@ -347,126 +347,126 @@ proto_register_lapdm(void) static hf_register_info hf[] = { { &hf_lapdm_address, - { "Address Field", "lapdm.address_field", FT_UINT8, BASE_HEX, NULL, 0x0, - "Address", HFILL }}, + { "Address Field", "lapdm.address_field", FT_UINT8, BASE_HEX, NULL, 0x0, + "Address", HFILL }}, { &hf_lapdm_ea, - { "EA", "lapdm.ea", FT_UINT8, BASE_DEC, VALS(lapdm_ea_vals), LAPDM_EA, - "Address field extension bit", HFILL }}, + { "EA", "lapdm.ea", FT_UINT8, BASE_DEC, VALS(lapdm_ea_vals), LAPDM_EA, + "Address field extension bit", HFILL }}, { &hf_lapdm_cr, - { "C/R", "lapdm.cr", FT_UINT8, BASE_DEC, NULL, LAPDM_CR, - "Command/response field bit", HFILL }}, + { "C/R", "lapdm.cr", FT_UINT8, BASE_DEC, NULL, LAPDM_CR, + "Command/response field bit", HFILL }}, { &hf_lapdm_lpd, - { "LPD", "lapdm.lpd", FT_UINT8, BASE_DEC, VALS(lapdm_lpd_vals), LAPDM_LPD, - "Link Protocol Discriminator", HFILL }}, + { "LPD", "lapdm.lpd", FT_UINT8, BASE_DEC, VALS(lapdm_lpd_vals), LAPDM_LPD, + "Link Protocol Discriminator", HFILL }}, { &hf_lapdm_sapi, - { "SAPI", "lapdm.sapi", FT_UINT8, BASE_DEC, VALS(lapdm_sapi_vals), LAPDM_SAPI, - "Service access point identifier", HFILL }}, + { "SAPI", "lapdm.sapi", FT_UINT8, BASE_DEC, VALS(lapdm_sapi_vals), LAPDM_SAPI, + "Service access point identifier", HFILL }}, { &hf_lapdm_control, - { "Control Field", "lapdm.control_field", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, + { "Control Field", "lapdm.control_field", FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, { &hf_lapdm_n_r, - { "N(R)", "lapdm.control.n_r", FT_UINT8, BASE_DEC, - NULL, XDLC_N_R_MASK, NULL, HFILL }}, + { "N(R)", "lapdm.control.n_r", FT_UINT8, BASE_DEC, + NULL, XDLC_N_R_MASK, NULL, HFILL }}, { &hf_lapdm_n_s, - { "N(S)", "lapdm.control.n_s", FT_UINT8, BASE_DEC, - NULL, XDLC_N_S_MASK, NULL, HFILL }}, + { "N(S)", "lapdm.control.n_s", FT_UINT8, BASE_DEC, + NULL, XDLC_N_S_MASK, NULL, HFILL }}, { &hf_lapdm_p, - { "Poll", "lapdm.control.p", FT_BOOLEAN, 8, - TFS(&tfs_true_false), XDLC_P_F, NULL, HFILL }}, + { "Poll", "lapdm.control.p", FT_BOOLEAN, 8, + TFS(&tfs_true_false), XDLC_P_F, NULL, HFILL }}, { &hf_lapdm_f, - { "Final", "lapdm.control.f", FT_BOOLEAN, 8, - TFS(&tfs_true_false), XDLC_P_F, NULL, HFILL }}, + { "Final", "lapdm.control.f", FT_BOOLEAN, 8, + TFS(&tfs_true_false), XDLC_P_F, NULL, HFILL }}, { &hf_lapdm_s_ftype, - { "Supervisory frame type", "lapdm.control.s_ftype", FT_UINT8, BASE_HEX, - VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }}, + { "Supervisory frame type", "lapdm.control.s_ftype", FT_UINT8, BASE_HEX, + VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }}, { &hf_lapdm_u_modifier_cmd, - { "Command", "lapdm.control.u_modifier_cmd", FT_UINT8, BASE_HEX, - VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, + { "Command", "lapdm.control.u_modifier_cmd", FT_UINT8, BASE_HEX, + VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, { &hf_lapdm_u_modifier_resp, - { "Response", "lapdm.control.u_modifier_resp", FT_UINT8, BASE_HEX, - VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, + { "Response", "lapdm.control.u_modifier_resp", FT_UINT8, BASE_HEX, + VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, { &hf_lapdm_ftype_i, - { "Frame type", "lapdm.control.ftype", FT_UINT8, BASE_HEX, - VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }}, + { "Frame type", "lapdm.control.ftype", FT_UINT8, BASE_HEX, + VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }}, { &hf_lapdm_ftype_s_u, - { "Frame type", "lapdm.control.ftype", FT_UINT8, BASE_HEX, - VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, + { "Frame type", "lapdm.control.ftype", FT_UINT8, BASE_HEX, + VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, { &hf_lapdm_length, - { "Length Field", "lapdm.length_field", FT_UINT8, BASE_HEX, - NULL, 0x0, NULL, HFILL }}, + { "Length Field", "lapdm.length_field", FT_UINT8, BASE_HEX, + NULL, 0x0, NULL, HFILL }}, { &hf_lapdm_el, - { "EL", "lapdm.el", FT_UINT8, BASE_DEC, - VALS(lapdm_el_vals), LAPDM_EL, "Length indicator field extension bit", HFILL }}, + { "EL", "lapdm.el", FT_UINT8, BASE_DEC, + VALS(lapdm_el_vals), LAPDM_EL, "Length indicator field extension bit", HFILL }}, { &hf_lapdm_m, - { "M", "lapdm.m", FT_UINT8, BASE_DEC, - VALS(lapdm_m_vals), LAPDM_M, "More data bit", HFILL }}, + { "M", "lapdm.m", FT_UINT8, BASE_DEC, + VALS(lapdm_m_vals), LAPDM_M, "More data bit", HFILL }}, { &hf_lapdm_len, - { "Length", "lapdm.length", FT_UINT8, BASE_DEC, - NULL, LAPDM_LEN, "Length indicator", HFILL }}, + { "Length", "lapdm.length", FT_UINT8, BASE_DEC, + NULL, LAPDM_LEN, "Length indicator", HFILL }}, - /* Fragment reassembly - */ + /* Fragment reassembly + */ { &hf_lapdm_fragment_data, - { "Fragment Data", "lapdm.fragment_data", FT_NONE, BASE_NONE, - NULL, 0x00, NULL, HFILL }}, + { "Fragment Data", "lapdm.fragment_data", FT_NONE, BASE_NONE, + NULL, 0x00, NULL, HFILL }}, { &hf_lapdm_fragments, - { "Message fragments", "lapdm.fragments", FT_NONE, BASE_NONE, - NULL, 0x00, "LAPDm Message fragments", HFILL }}, + { "Message fragments", "lapdm.fragments", FT_NONE, BASE_NONE, + NULL, 0x00, "LAPDm Message fragments", HFILL }}, { &hf_lapdm_fragment, - { "Message fragment", "lapdm.fragment", FT_FRAMENUM, BASE_NONE, - NULL, 0x00, "LAPDm Message fragment", HFILL }}, + { "Message fragment", "lapdm.fragment", FT_FRAMENUM, BASE_NONE, + NULL, 0x00, "LAPDm Message fragment", HFILL }}, { &hf_lapdm_fragment_overlap, - { "Message fragment overlap", "lapdm.fragment.overlap", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, "LAPDm Message fragment overlaps with other fragment(s)", HFILL }}, + { "Message fragment overlap", "lapdm.fragment.overlap", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, "LAPDm Message fragment overlaps with other fragment(s)", HFILL }}, { &hf_lapdm_fragment_overlap_conflicts, - { "Message fragment overlapping with conflicting data", "lapdm.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, "LAPDm Message fragment overlaps with conflicting data", HFILL }}, + { "Message fragment overlapping with conflicting data", "lapdm.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, "LAPDm Message fragment overlaps with conflicting data", HFILL }}, { &hf_lapdm_fragment_multiple_tails, - { "Message has multiple tail fragments", "lapdm.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, "LAPDm Message fragment has multiple tail fragments", HFILL }}, + { "Message has multiple tail fragments", "lapdm.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, "LAPDm Message fragment has multiple tail fragments", HFILL }}, { &hf_lapdm_fragment_too_long_fragment, - { "Message fragment too long", "lapdm.fragment.too_long_fragment", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, "LAPDm Message fragment data goes beyond the packet end", HFILL }}, + { "Message fragment too long", "lapdm.fragment.too_long_fragment", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, "LAPDm Message fragment data goes beyond the packet end", HFILL }}, { &hf_lapdm_fragment_error, - { "Message defragmentation error", "lapdm.fragment.error", FT_FRAMENUM, BASE_NONE, - NULL, 0x00, "LAPDm Message defragmentation error due to illegal fragments", HFILL }}, + { "Message defragmentation error", "lapdm.fragment.error", FT_FRAMENUM, BASE_NONE, + NULL, 0x00, "LAPDm Message defragmentation error due to illegal fragments", HFILL }}, { &hf_lapdm_fragment_count, - { "Message fragment count", "lapdm.fragment.count", FT_UINT32, BASE_DEC, - NULL, 0x00, NULL, HFILL }}, + { "Message fragment count", "lapdm.fragment.count", FT_UINT32, BASE_DEC, + NULL, 0x00, NULL, HFILL }}, { &hf_lapdm_reassembled_in, - { "Reassembled in", "lapdm.reassembled.in", FT_FRAMENUM, BASE_NONE, - NULL, 0x00, "LAPDm Message has been reassembled in this packet.", HFILL }}, + { "Reassembled in", "lapdm.reassembled.in", FT_FRAMENUM, BASE_NONE, + NULL, 0x00, "LAPDm Message has been reassembled in this packet.", HFILL }}, { &hf_lapdm_reassembled_length, - { "Reassembled LAPDm length", "lapdm.reassembled.length", FT_UINT32, BASE_DEC, - NULL, 0x00, "The total length of the reassembled payload", HFILL }} + { "Reassembled LAPDm length", "lapdm.reassembled.length", FT_UINT32, BASE_DEC, + NULL, 0x00, "The total length of the reassembled payload", HFILL }} }; static gint *ett[] = { @@ -490,9 +490,9 @@ proto_register_lapdm(void) lapdm_module = prefs_register_protocol(proto_lapdm, NULL); prefs_register_bool_preference(lapdm_module, "reassemble", - "Reassemble fragmented LAPDm packets", - "Whether the dissector should defragment LAPDm messages spanning multiple packets.", - &reassemble_lapdm); + "Reassemble fragmented LAPDm packets", + "Whether the dissector should defragment LAPDm messages spanning multiple packets.", + &reassemble_lapdm); register_init_routine (lapdm_defragment_init); } @@ -502,3 +502,15 @@ proto_reg_handoff_lapdm(void) data_handle = find_dissector("data"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-laplink.c b/epan/dissectors/packet-laplink.c index 0e590154b1..b3663e054f 100644 --- a/epan/dissectors/packet-laplink.c +++ b/epan/dissectors/packet-laplink.c @@ -247,3 +247,15 @@ proto_reg_handoff_laplink(void) dissector_add_uint("udp.port", UDP_PORT_LAPLINK, laplink_udp_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-lge_monitor.c b/epan/dissectors/packet-lge_monitor.c index 418a7a9356..9f8af778f4 100644 --- a/epan/dissectors/packet-lge_monitor.c +++ b/epan/dissectors/packet-lge_monitor.c @@ -198,4 +198,15 @@ proto_register_lge_monitor(void) } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-mint.c b/epan/dissectors/packet-mint.c index 469d3fddd6..71ab45b9c5 100644 --- a/epan/dissectors/packet-mint.c +++ b/epan/dissectors/packet-mint.c @@ -288,7 +288,7 @@ dissect_eth_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mint_tree, tvbuff_t *eth_tvb; #ifdef MINT_DEVELOPMENT - col_set_writable(pinfo->cinfo, FALSE); + col_set_writable(pinfo->cinfo, FALSE); #endif eth_tvb = tvb_new_subset_length(tvb, offset, length); @@ -301,7 +301,7 @@ dissect_eth_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mint_tree, offset += length; #ifdef MINT_DEVELOPMENT - col_set_writable(pinfo->cinfo, TRUE); + col_set_writable(pinfo->cinfo, TRUE); #endif return offset; } @@ -357,7 +357,7 @@ dissect_mint_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offset += 2; /* FIXME: This is probably not the right way to determine the packet type. * It's more likely something in mint_header_unknown1 but I haven't - * found out what. */ + * found out what. */ switch(packet_type) { case MINT_TYPE_DATA_UC: ti = proto_tree_add_item(mint_tree, &hfi_mint_data, tvb, @@ -391,7 +391,7 @@ dissect_mint_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offset += dissect_eth_frame(tvb, pinfo, tree, offset, packet_length - offset); break; - case MINT_TYPE_CTRL_0x0c: + case MINT_TYPE_CTRL_0x0c: ti = proto_tree_add_item(mint_tree, &hfi_mint_control, tvb, offset, packet_length - 16, ENC_NA); mint_ctrl_tree = proto_item_add_subtree(ti, ett_mint_ctrl); @@ -479,7 +479,7 @@ dissect_mint_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } } break; - case MINT_TYPE_CTRL_0x1e: + case MINT_TYPE_CTRL_0x1e: ti = proto_tree_add_item(mint_tree, &hfi_mint_control, tvb, offset, packet_length - 16, ENC_NA); mint_ctrl_tree = proto_item_add_subtree(ti, ett_mint_ctrl); @@ -491,7 +491,7 @@ dissect_mint_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offset, bytes_remaining, ENC_NA); offset += bytes_remaining; break; - case MINT_TYPE_ETH_0x22: + case MINT_TYPE_ETH_0x22: ti = proto_tree_add_item(mint_tree, &hfi_mint_control, tvb, offset, packet_length - 16, ENC_NA); mint_ctrl_tree = proto_item_add_subtree(ti, ett_mint_ctrl); @@ -753,3 +753,15 @@ proto_reg_handoff_mint(void) eth_handle = find_dissector("eth_withoutfcs"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-mp4ves.c b/epan/dissectors/packet-mp4ves.c index b3cd058d7d..d65c2bd941 100644 --- a/epan/dissectors/packet-mp4ves.c +++ b/epan/dissectors/packet-mp4ves.c @@ -1065,3 +1065,15 @@ proto_reg_handoff_mp4ves(void) } } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-msnip.c b/epan/dissectors/packet-msnip.c index fc8aaf4a23..3f4a92914c 100644 --- a/epan/dissectors/packet-msnip.c +++ b/epan/dissectors/packet-msnip.c @@ -322,3 +322,15 @@ proto_register_msnip(void) proto_register_subtree_array(ett, array_length(ett)); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-mtp3mg.c b/epan/dissectors/packet-mtp3mg.c index 6e160e33d5..3ab68c5838 100644 --- a/epan/dissectors/packet-mtp3mg.c +++ b/epan/dissectors/packet-mtp3mg.c @@ -57,10 +57,10 @@ void proto_reg_handoff_mtp3mg(void); #define H0_FCM 0x03 #define H0_TFM 0x04 #define H0_RSM 0x05 -#define H0_MIM 0x06 /* not used in Japan */ -#define H0_TRM 0x07 /* not used in Japan */ -#define H0_DLM 0x08 /* not used in Japan */ -#define H0_UFC 0x0a /* not used in Japan */ +#define H0_MIM 0x06 /* not used in Japan */ +#define H0_TRM 0x07 /* not used in Japan */ +#define H0_DLM 0x08 /* not used in Japan */ +#define H0_UFC 0x0a /* not used in Japan */ static const value_string h0_message_type_values[] = { { H0_CHM, "Changeover and changeback messages" }, { H0_ECM, "Emergency changeover messages" }, @@ -345,23 +345,23 @@ static const value_string japan_test_message_type_acro_values[] = { /* This list is slightly different from that in packet-mtp3.c */ static const value_string service_indicator_code_vals[] = { - { 0x0, "Spare" }, - { 0x1, "Spare"}, - { 0x2, "Spare" }, - { 0x3, "SCCP" }, - { 0x4, "TUP" }, - { 0x5, "ISUP" }, - { 0x6, "DUP (call and circuit related messages)" }, - { 0x7, "DUP (facility registration and cancellation message)" }, - { 0x8, "MTP testing user part" }, - { 0x9, "ISUP-b" }, - { 0xa, "ISUP-s" }, - { 0xb, "Spare" }, - { 0xc, "Spare" }, - { 0xd, "Spare" }, - { 0xe, "Spare" }, - { 0xf, "Spare" }, - { 0, NULL } + { 0x0, "Spare" }, + { 0x1, "Spare"}, + { 0x2, "Spare" }, + { 0x3, "SCCP" }, + { 0x4, "TUP" }, + { 0x5, "ISUP" }, + { 0x6, "DUP (call and circuit related messages)" }, + { 0x7, "DUP (facility registration and cancellation message)" }, + { 0x8, "MTP testing user part" }, + { 0x9, "ISUP-b" }, + { 0xa, "ISUP-s" }, + { 0xb, "Spare" }, + { 0xc, "Spare" }, + { 0xd, "Spare" }, + { 0xe, "Spare" }, + { 0xf, "Spare" }, + { 0, NULL } }; /* Initialize the protocol and registered fields */ @@ -435,190 +435,190 @@ dissect_mtp3mg_unknown_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr message_length = tvb_length(tvb); proto_tree_add_expert_format(tree, pinfo, &ei_mtp3mg_unknown_message, tvb, 0, message_length, - "Unknown message (%u byte%s)", message_length, - plurality(message_length, "", "s")); + "Unknown message (%u byte%s)", message_length, + plurality(message_length, "", "s")); } static void dissect_mtp3mg_chm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, chm_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, chm_h1_message_type_acro_values, "Unknown")); switch (h1) { case CHM_H1_COO: case CHM_H1_COA: - if (mtp3_standard == ANSI_STANDARD) - { - proto_tree_add_item(tree, hf_mtp3mg_coo_ansi_slc, tvb, 0, - ANSI_COO_LENGTH, ENC_NA); - proto_tree_add_item(tree, hf_mtp3mg_coo_ansi_fsn, tvb, 0, - ANSI_COO_LENGTH, ENC_NA); - } else /* ITU_STANDARD, CHINESE_ITU_STANDARD, and JAPAN_STANDARD */ { - proto_tree_add_item(tree, hf_mtp3mg_coo_itu_fsn, tvb, 0, - ITU_COO_LENGTH, ENC_NA); - } - break; + if (mtp3_standard == ANSI_STANDARD) + { + proto_tree_add_item(tree, hf_mtp3mg_coo_ansi_slc, tvb, 0, + ANSI_COO_LENGTH, ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_coo_ansi_fsn, tvb, 0, + ANSI_COO_LENGTH, ENC_NA); + } else /* ITU_STANDARD, CHINESE_ITU_STANDARD, and JAPAN_STANDARD */ { + proto_tree_add_item(tree, hf_mtp3mg_coo_itu_fsn, tvb, 0, + ITU_COO_LENGTH, ENC_NA); + } + break; case CHM_H1_XCO: case CHM_H1_XCA: - if (mtp3_standard == ANSI_STANDARD) - { - proto_tree_add_item(tree, hf_mtp3mg_xco_ansi_slc, tvb, 0, - ANSI_XCO_LENGTH, ENC_LITTLE_ENDIAN); - proto_tree_add_item(tree, hf_mtp3mg_xco_ansi_fsn, tvb, 0, - ANSI_XCO_LENGTH, ENC_LITTLE_ENDIAN); - } else /* ITU_STANDARD, CHINESE_ITU_STANDARD, and JAPAN_STANDARD */ { - proto_tree_add_item(tree, hf_mtp3mg_xco_itu_fsn, tvb, 0, - ITU_XCO_LENGTH, ENC_LITTLE_ENDIAN); - } - break; + if (mtp3_standard == ANSI_STANDARD) + { + proto_tree_add_item(tree, hf_mtp3mg_xco_ansi_slc, tvb, 0, + ANSI_XCO_LENGTH, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_mtp3mg_xco_ansi_fsn, tvb, 0, + ANSI_XCO_LENGTH, ENC_LITTLE_ENDIAN); + } else /* ITU_STANDARD, CHINESE_ITU_STANDARD, and JAPAN_STANDARD */ { + proto_tree_add_item(tree, hf_mtp3mg_xco_itu_fsn, tvb, 0, + ITU_XCO_LENGTH, ENC_LITTLE_ENDIAN); + } + break; case CHM_H1_CBD: case CHM_H1_CBA: - if (mtp3_standard == ANSI_STANDARD) - { - proto_tree_add_item(tree, hf_mtp3mg_cbd_ansi_slc, tvb, 0, - ANSI_CBD_LENGTH, ENC_LITTLE_ENDIAN); - proto_tree_add_item(tree, hf_mtp3mg_cbd_ansi_cbc, tvb, 0, - ANSI_CBD_LENGTH, ENC_LITTLE_ENDIAN); - } else if (mtp3_standard == JAPAN_STANDARD) { - proto_tree_add_item(tree, hf_mtp3mg_cbd_japan_cbc, tvb, 0, - ITU_CBD_LENGTH, ENC_NA); - } else /* ITU_STANDARD and CHINESE_ITU_STANDARD */ { - proto_tree_add_item(tree, hf_mtp3mg_cbd_itu_cbc, tvb, 0, - ITU_CBD_LENGTH, ENC_NA); - } - break; + if (mtp3_standard == ANSI_STANDARD) + { + proto_tree_add_item(tree, hf_mtp3mg_cbd_ansi_slc, tvb, 0, + ANSI_CBD_LENGTH, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_mtp3mg_cbd_ansi_cbc, tvb, 0, + ANSI_CBD_LENGTH, ENC_LITTLE_ENDIAN); + } else if (mtp3_standard == JAPAN_STANDARD) { + proto_tree_add_item(tree, hf_mtp3mg_cbd_japan_cbc, tvb, 0, + ITU_CBD_LENGTH, ENC_NA); + } else /* ITU_STANDARD and CHINESE_ITU_STANDARD */ { + proto_tree_add_item(tree, hf_mtp3mg_cbd_itu_cbc, tvb, 0, + ITU_CBD_LENGTH, ENC_NA); + } + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_ecm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, ecm_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, ecm_h1_message_type_acro_values, "Unknown")); switch (h1) { case ECM_H1_ECO: case ECM_H1_ECA: - if (mtp3_standard == ANSI_STANDARD) - { - proto_tree_add_item(tree, hf_mtp3mg_eco_ansi_slc, tvb, 0, - ANSI_ECO_LENGTH, ENC_NA); - } - /* else: nothing to dissect */ - break; + if (mtp3_standard == ANSI_STANDARD) + { + proto_tree_add_item(tree, hf_mtp3mg_eco_ansi_slc, tvb, 0, + ANSI_ECO_LENGTH, ENC_NA); + } + /* else: nothing to dissect */ + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_fcm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { proto_item *apc_item; col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, fcm_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, fcm_h1_message_type_acro_values, "Unknown")); switch (h1) { case FCM_H1_RCT: - /* nothing to dissect */ - break; + /* nothing to dissect */ + break; case FCM_H1_TFC: - if (mtp3_standard == ITU_STANDARD) - { + if (mtp3_standard == ITU_STANDARD) + { - apc_item = proto_tree_add_item(tree, hf_mtp3mg_itu_apc, tvb, 0, - ITU_PC_LENGTH, ENC_LITTLE_ENDIAN); + apc_item = proto_tree_add_item(tree, hf_mtp3mg_itu_apc, tvb, 0, + ITU_PC_LENGTH, ENC_LITTLE_ENDIAN); - if (mtp3_pc_structured()) { - guint32 apc; + if (mtp3_pc_structured()) { + guint32 apc; - apc = tvb_get_letohs(tvb, 0) & ITU_PC_MASK; - proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); - } + apc = tvb_get_letohs(tvb, 0) & ITU_PC_MASK; + proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); + } - /* Congestion level is a national option */ - proto_tree_add_item(tree, hf_mtp3mg_tfc_itu_status, tvb, 0, - ITU_TFC_STATUS_LENGTH, ENC_NA); + /* Congestion level is a national option */ + proto_tree_add_item(tree, hf_mtp3mg_tfc_itu_status, tvb, 0, + ITU_TFC_STATUS_LENGTH, ENC_NA); - } else if (mtp3_standard == JAPAN_STANDARD) { + } else if (mtp3_standard == JAPAN_STANDARD) { - proto_tree_add_item(tree, hf_mtp3mg_tfc_japan_spare, tvb, - JAPAN_TFC_SPARE_OFFSET, - JAPAN_TFC_SPARE_LENGTH, ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_tfc_japan_spare, tvb, + JAPAN_TFC_SPARE_OFFSET, + JAPAN_TFC_SPARE_LENGTH, ENC_NA); - apc_item = proto_tree_add_item(tree, hf_mtp3mg_japan_apc, tvb, - JAPAN_TFC_APC_OFFSET, - JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN); - if (mtp3_pc_structured()) { - guint32 apc; + apc_item = proto_tree_add_item(tree, hf_mtp3mg_japan_apc, tvb, + JAPAN_TFC_APC_OFFSET, + JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN); + if (mtp3_pc_structured()) { + guint32 apc; - apc = tvb_get_letohs(tvb, JAPAN_TFC_APC_OFFSET); - proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); - } + apc = tvb_get_letohs(tvb, JAPAN_TFC_APC_OFFSET); + proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); + } - proto_tree_add_item(tree, hf_mtp3mg_tfc_japan_status, tvb, - JAPAN_TFC_STATUS_OFFSET, - JAPAN_TFC_STATUS_LENGTH, ENC_NA); - proto_tree_add_item(tree, hf_mtp3mg_tfc_japan_status_spare, tvb, - JAPAN_TFC_STATUS_OFFSET, - JAPAN_TFC_STATUS_LENGTH, ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_tfc_japan_status, tvb, + JAPAN_TFC_STATUS_OFFSET, + JAPAN_TFC_STATUS_LENGTH, ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_tfc_japan_status_spare, tvb, + JAPAN_TFC_STATUS_OFFSET, + JAPAN_TFC_STATUS_LENGTH, ENC_NA); - } else /* ANSI_STANDARD and CHINESE_ITU_STANDARD */ { + } else /* ANSI_STANDARD and CHINESE_ITU_STANDARD */ { - int hf_apc_string; + int hf_apc_string; - if (mtp3_standard == ANSI_STANDARD) { + if (mtp3_standard == ANSI_STANDARD) { - hf_apc_string = hf_mtp3mg_ansi_apc; + hf_apc_string = hf_mtp3mg_ansi_apc; - } else /* CHINESE_ITU_STANDARD */ { + } else /* CHINESE_ITU_STANDARD */ { - hf_apc_string = hf_mtp3mg_chinese_apc; - } + hf_apc_string = hf_mtp3mg_chinese_apc; + } - dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_fcm_apc, - hf_apc_string, hf_mtp3mg_apc_network, - hf_mtp3mg_apc_cluster, - hf_mtp3mg_apc_member, 0, 0); + dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_fcm_apc, + hf_apc_string, hf_mtp3mg_apc_network, + hf_mtp3mg_apc_cluster, + hf_mtp3mg_apc_member, 0, 0); - proto_tree_add_item(tree, hf_mtp3mg_tfc_ansi_status, tvb, - ANSI_TFC_STATUS_OFFSET, ANSI_TFC_STATUS_LENGTH, - ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_tfc_ansi_status, tvb, + ANSI_TFC_STATUS_OFFSET, ANSI_TFC_STATUS_LENGTH, + ENC_NA); - } - break; + } + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_tfm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { proto_item *apc_item; col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, tfm_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, tfm_h1_message_type_acro_values, "Unknown")); switch (h1) { @@ -628,82 +628,82 @@ dissect_mtp3mg_tfm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, case TFM_H1_TCR: case TFM_H1_TFA: case TFM_H1_TCA: - if (mtp3_standard == ANSI_STANDARD) { - dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_tfm_apc, - hf_mtp3mg_ansi_apc, - hf_mtp3mg_apc_network, - hf_mtp3mg_apc_cluster, - hf_mtp3mg_apc_member, 0, 0); - - } else if (mtp3_standard == JAPAN_STANDARD) { - guint8 count, i; - guint32 offset; - - if (h1 == TFM_H1_TCP || h1 == TFM_H1_TCR || h1 == TFM_H1_TCA - || h1 == TFM_H1_TFR) - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); - - proto_tree_add_item(tree, hf_mtp3mg_tfm_japan_count, tvb, - JAPAN_TFM_COUNT_OFFSET, - JAPAN_TFM_COUNT_LENGTH, ENC_NA); - - count = tvb_get_guint8(tvb, JAPAN_TFM_COUNT_OFFSET); - offset = JAPAN_TFM_COUNT_LENGTH; - for (i = 0; i < count; i++) - { - apc_item = proto_tree_add_item(tree, hf_mtp3mg_japan_apc, tvb, - offset, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN); - - if (mtp3_pc_structured()) { - guint32 apc; - - apc = tvb_get_letohs(tvb, offset); - proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); - } - - offset += JAPAN_PC_LENGTH; - proto_tree_add_item(tree, hf_mtp3mg_tfm_japan_spare, tvb, - offset, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN); - offset += JAPAN_PC_LENGTH; - } - } else /* ITU_STANDARD and CHINESE_ITU_STANDARD */ { - - if (h1 == TFM_H1_TCP || h1 == TFM_H1_TCR || h1 == TFM_H1_TCA) - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); - else if (mtp3_standard == ITU_STANDARD) - { - apc_item = proto_tree_add_item(tree, hf_mtp3mg_itu_apc, - tvb, 0, ITU_PC_LENGTH, ENC_LITTLE_ENDIAN); - - if (mtp3_pc_structured()) { - guint32 apc; - - apc = tvb_get_letohs(tvb, 0) & ITU_PC_MASK; - proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); - } - } - else if (mtp3_standard == CHINESE_ITU_STANDARD) - dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_tfm_apc, - hf_mtp3mg_chinese_apc, - hf_mtp3mg_apc_network, - hf_mtp3mg_apc_cluster, - hf_mtp3mg_apc_member, 0, 0); - } - break; + if (mtp3_standard == ANSI_STANDARD) { + dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_tfm_apc, + hf_mtp3mg_ansi_apc, + hf_mtp3mg_apc_network, + hf_mtp3mg_apc_cluster, + hf_mtp3mg_apc_member, 0, 0); + + } else if (mtp3_standard == JAPAN_STANDARD) { + guint8 count, i; + guint32 offset; + + if (h1 == TFM_H1_TCP || h1 == TFM_H1_TCR || h1 == TFM_H1_TCA + || h1 == TFM_H1_TFR) + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + + proto_tree_add_item(tree, hf_mtp3mg_tfm_japan_count, tvb, + JAPAN_TFM_COUNT_OFFSET, + JAPAN_TFM_COUNT_LENGTH, ENC_NA); + + count = tvb_get_guint8(tvb, JAPAN_TFM_COUNT_OFFSET); + offset = JAPAN_TFM_COUNT_LENGTH; + for (i = 0; i < count; i++) + { + apc_item = proto_tree_add_item(tree, hf_mtp3mg_japan_apc, tvb, + offset, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN); + + if (mtp3_pc_structured()) { + guint32 apc; + + apc = tvb_get_letohs(tvb, offset); + proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); + } + + offset += JAPAN_PC_LENGTH; + proto_tree_add_item(tree, hf_mtp3mg_tfm_japan_spare, tvb, + offset, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN); + offset += JAPAN_PC_LENGTH; + } + } else /* ITU_STANDARD and CHINESE_ITU_STANDARD */ { + + if (h1 == TFM_H1_TCP || h1 == TFM_H1_TCR || h1 == TFM_H1_TCA) + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + else if (mtp3_standard == ITU_STANDARD) + { + apc_item = proto_tree_add_item(tree, hf_mtp3mg_itu_apc, + tvb, 0, ITU_PC_LENGTH, ENC_LITTLE_ENDIAN); + + if (mtp3_pc_structured()) { + guint32 apc; + + apc = tvb_get_letohs(tvb, 0) & ITU_PC_MASK; + proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); + } + } + else if (mtp3_standard == CHINESE_ITU_STANDARD) + dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_tfm_apc, + hf_mtp3mg_chinese_apc, + hf_mtp3mg_apc_network, + hf_mtp3mg_apc_cluster, + hf_mtp3mg_apc_member, 0, 0); + } + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_rsm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { proto_item *apc_item; col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, rsm_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, rsm_h1_message_type_acro_values, "Unknown")); switch (h1) { @@ -711,82 +711,82 @@ dissect_mtp3mg_rsm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, case RSM_H1_RSR: case RSM_H1_RCP: case RSM_H1_RCR: - if (mtp3_standard == ANSI_STANDARD) { - dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_rsm_apc, - hf_mtp3mg_ansi_apc, - hf_mtp3mg_apc_network, - hf_mtp3mg_apc_cluster, - hf_mtp3mg_apc_member, 0, 0); - - } else if (mtp3_standard == JAPAN_STANDARD) { - if (h1 == RSM_H1_RST) { - guint32 offset; - guint8 count, i; - - proto_tree_add_item(tree, hf_mtp3mg_rsm_japan_count, tvb, - JAPAN_TFM_COUNT_OFFSET, - JAPAN_TFM_COUNT_LENGTH, ENC_NA); - - count = tvb_get_guint8(tvb, JAPAN_TFM_COUNT_OFFSET); - offset = JAPAN_TFM_COUNT_LENGTH; - for (i = 0; i < count; i++) { - apc_item = proto_tree_add_item(tree, - hf_mtp3mg_japan_apc, - tvb, offset, - JAPAN_PC_LENGTH, - ENC_LITTLE_ENDIAN); - if (mtp3_pc_structured()) { - guint32 apc; - - apc = tvb_get_letohs(tvb, 0); - proto_item_append_text(apc_item, " (%s)", - mtp3_pc_to_str(apc)); - } - offset += JAPAN_PC_LENGTH; - proto_tree_add_item(tree, hf_mtp3mg_rsm_japan_spare, tvb, - offset, JAPAN_PC_LENGTH, - ENC_LITTLE_ENDIAN); - offset += JAPAN_PC_LENGTH; - } - } else - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); - - } else /* ITU_STANDARD and CHINESE_ITU_STANDARD */ { - - if (h1 == RSM_H1_RST || h1 == RSM_H1_RSR) { - if (mtp3_standard == ITU_STANDARD) { - apc_item = proto_tree_add_item(tree, hf_mtp3mg_itu_apc, - tvb, 0, ITU_PC_LENGTH, - ENC_LITTLE_ENDIAN); - if (mtp3_pc_structured()) { - guint32 apc; - - apc = tvb_get_letohs(tvb, 0) & ITU_PC_MASK; - proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); - } - } - else /* CHINESE_ITU_STANDARD */ - dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_rsm_apc, - hf_mtp3mg_chinese_apc, - hf_mtp3mg_apc_network, - hf_mtp3mg_apc_cluster, - hf_mtp3mg_apc_member, 0, 0); - } else - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); - } - break; + if (mtp3_standard == ANSI_STANDARD) { + dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_rsm_apc, + hf_mtp3mg_ansi_apc, + hf_mtp3mg_apc_network, + hf_mtp3mg_apc_cluster, + hf_mtp3mg_apc_member, 0, 0); + + } else if (mtp3_standard == JAPAN_STANDARD) { + if (h1 == RSM_H1_RST) { + guint32 offset; + guint8 count, i; + + proto_tree_add_item(tree, hf_mtp3mg_rsm_japan_count, tvb, + JAPAN_TFM_COUNT_OFFSET, + JAPAN_TFM_COUNT_LENGTH, ENC_NA); + + count = tvb_get_guint8(tvb, JAPAN_TFM_COUNT_OFFSET); + offset = JAPAN_TFM_COUNT_LENGTH; + for (i = 0; i < count; i++) { + apc_item = proto_tree_add_item(tree, + hf_mtp3mg_japan_apc, + tvb, offset, + JAPAN_PC_LENGTH, + ENC_LITTLE_ENDIAN); + if (mtp3_pc_structured()) { + guint32 apc; + + apc = tvb_get_letohs(tvb, 0); + proto_item_append_text(apc_item, " (%s)", + mtp3_pc_to_str(apc)); + } + offset += JAPAN_PC_LENGTH; + proto_tree_add_item(tree, hf_mtp3mg_rsm_japan_spare, tvb, + offset, JAPAN_PC_LENGTH, + ENC_LITTLE_ENDIAN); + offset += JAPAN_PC_LENGTH; + } + } else + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + + } else /* ITU_STANDARD and CHINESE_ITU_STANDARD */ { + + if (h1 == RSM_H1_RST || h1 == RSM_H1_RSR) { + if (mtp3_standard == ITU_STANDARD) { + apc_item = proto_tree_add_item(tree, hf_mtp3mg_itu_apc, + tvb, 0, ITU_PC_LENGTH, + ENC_LITTLE_ENDIAN); + if (mtp3_pc_structured()) { + guint32 apc; + + apc = tvb_get_letohs(tvb, 0) & ITU_PC_MASK; + proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); + } + } + else /* CHINESE_ITU_STANDARD */ + dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_rsm_apc, + hf_mtp3mg_chinese_apc, + hf_mtp3mg_apc_network, + hf_mtp3mg_apc_cluster, + hf_mtp3mg_apc_member, 0, 0); + } else + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + } + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_mim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, mim_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, mim_h1_message_type_acro_values, "Unknown")); switch (h1) { @@ -798,171 +798,171 @@ dissect_mtp3mg_mim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, case MIM_H1_LFU: case MIM_H1_LLT: case MIM_H1_LRT: - if (mtp3_standard == ANSI_STANDARD) - { - proto_tree_add_item(tree, hf_mtp3mg_mim_ansi_slc, tvb, 0, - ANSI_MIM_LENGTH, ENC_NA); - } - /* else: nothing to dissect */ - break; + if (mtp3_standard == ANSI_STANDARD) + { + proto_tree_add_item(tree, hf_mtp3mg_mim_ansi_slc, tvb, 0, + ANSI_MIM_LENGTH, ENC_NA); + } + /* else: nothing to dissect */ + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_trm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, trm_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, trm_h1_message_type_acro_values, "Unknown")); switch (h1) { case TRM_H1_TRA: - /* nothing to dissect */ - break; + /* nothing to dissect */ + break; case TRM_H1_TRW: - if (mtp3_standard != ANSI_STANDARD) - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); - /* else: nothing to dissect */ - break; + if (mtp3_standard != ANSI_STANDARD) + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + /* else: nothing to dissect */ + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_dlm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, dlm_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, dlm_h1_message_type_acro_values, "Unknown")); switch (h1) { case DLM_H1_DLC: - if (mtp3_standard == ANSI_STANDARD) - { - proto_tree_add_item(tree, hf_mtp3mg_dlc_ansi_slc, tvb, 0, - ANSI_DLC_LENGTH, ENC_LITTLE_ENDIAN); - proto_tree_add_item(tree, hf_mtp3mg_dlc_ansi_link, tvb, 0, - ANSI_DLC_LENGTH, ENC_LITTLE_ENDIAN); - } else /* ITU_STANDARD and CHINESE_ITU_STANDARD */ { - proto_tree_add_item(tree, hf_mtp3mg_dlc_itu_link, tvb, 0, - ITU_DLC_LENGTH, ENC_LITTLE_ENDIAN); - } - break; + if (mtp3_standard == ANSI_STANDARD) + { + proto_tree_add_item(tree, hf_mtp3mg_dlc_ansi_slc, tvb, 0, + ANSI_DLC_LENGTH, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_mtp3mg_dlc_ansi_link, tvb, 0, + ANSI_DLC_LENGTH, ENC_LITTLE_ENDIAN); + } else /* ITU_STANDARD and CHINESE_ITU_STANDARD */ { + proto_tree_add_item(tree, hf_mtp3mg_dlc_itu_link, tvb, 0, + ITU_DLC_LENGTH, ENC_LITTLE_ENDIAN); + } + break; case DLM_H1_CSS: case DLM_H1_CNS: case DLM_H1_CNP: - /* nothing to dissect */ - break; + /* nothing to dissect */ + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_ufc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { proto_item *apc_item; col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, ufc_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, ufc_h1_message_type_acro_values, "Unknown")); switch (h1) { case UFC_H1_UPU: - if (mtp3_standard == ANSI_STANDARD - || mtp3_standard == CHINESE_ITU_STANDARD) { - int hf_apc; - - if (mtp3_standard == ANSI_STANDARD) - hf_apc = hf_mtp3mg_ansi_apc; - else /* CHINESE_ITU_STANDARD */ - hf_apc = hf_mtp3mg_chinese_apc; - - dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_upu_apc, hf_apc, - hf_mtp3mg_apc_network, - hf_mtp3mg_apc_cluster, - hf_mtp3mg_apc_member, 0, 0); - - proto_tree_add_item(tree, hf_mtp3mg_upu_user, tvb, - ANSI_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); - proto_tree_add_item(tree, hf_mtp3mg_upu_cause, tvb, - ANSI_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); - } else if (mtp3_standard == ITU_STANDARD) { - - apc_item = proto_tree_add_item(tree, hf_mtp3mg_itu_apc, tvb, 0, - ITU_PC_LENGTH, ENC_LITTLE_ENDIAN); - if (mtp3_pc_structured()) { - guint32 apc; - - apc = tvb_get_letohs(tvb, 0) & ITU_PC_MASK; - proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); - } - - proto_tree_add_item(tree, hf_mtp3mg_upu_user, tvb, - ITU_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); - proto_tree_add_item(tree, hf_mtp3mg_upu_cause, tvb, - ITU_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); - } else { /* JAPAN_STANDARD */ - - apc_item = proto_tree_add_item(tree, hf_mtp3mg_japan_apc, tvb, - 0, JAPAN_PC_LENGTH, - ENC_LITTLE_ENDIAN); - if (mtp3_pc_structured()) { - guint32 apc; - - apc = tvb_get_letohs(tvb, 0); - proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); - } - - proto_tree_add_item(tree, hf_mtp3mg_upu_user, tvb, - ITU_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); - proto_tree_add_item(tree, hf_mtp3mg_upu_cause, tvb, - ITU_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); - } - break; + if (mtp3_standard == ANSI_STANDARD + || mtp3_standard == CHINESE_ITU_STANDARD) { + int hf_apc; + + if (mtp3_standard == ANSI_STANDARD) + hf_apc = hf_mtp3mg_ansi_apc; + else /* CHINESE_ITU_STANDARD */ + hf_apc = hf_mtp3mg_chinese_apc; + + dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_upu_apc, hf_apc, + hf_mtp3mg_apc_network, + hf_mtp3mg_apc_cluster, + hf_mtp3mg_apc_member, 0, 0); + + proto_tree_add_item(tree, hf_mtp3mg_upu_user, tvb, + ANSI_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_upu_cause, tvb, + ANSI_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); + } else if (mtp3_standard == ITU_STANDARD) { + + apc_item = proto_tree_add_item(tree, hf_mtp3mg_itu_apc, tvb, 0, + ITU_PC_LENGTH, ENC_LITTLE_ENDIAN); + if (mtp3_pc_structured()) { + guint32 apc; + + apc = tvb_get_letohs(tvb, 0) & ITU_PC_MASK; + proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); + } + + proto_tree_add_item(tree, hf_mtp3mg_upu_user, tvb, + ITU_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_upu_cause, tvb, + ITU_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); + } else { /* JAPAN_STANDARD */ + + apc_item = proto_tree_add_item(tree, hf_mtp3mg_japan_apc, tvb, + 0, JAPAN_PC_LENGTH, + ENC_LITTLE_ENDIAN); + if (mtp3_pc_structured()) { + guint32 apc; + + apc = tvb_get_letohs(tvb, 0); + proto_item_append_text(apc_item, " (%s)", mtp3_pc_to_str(apc)); + } + + proto_tree_add_item(tree, hf_mtp3mg_upu_user, tvb, + ITU_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_upu_cause, tvb, + ITU_UPU_USER_OFFSET, UPU_USER_LENGTH, ENC_NA); + } + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } static void dissect_mtp3mg_test(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint8 h1) + guint8 h1) { guint8 length; col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h1, test_h1_message_type_acro_values, "Unknown")); + val_to_str_const(h1, test_h1_message_type_acro_values, "Unknown")); switch (h1) { case TEST_H1_SLTM: case TEST_H1_SLTA: - if (mtp3_standard == ANSI_STANDARD) - { - proto_tree_add_item(tree, hf_mtp3mg_test_ansi_slc, tvb, 0, - TEST_LENGTH, ENC_NA); - } + if (mtp3_standard == ANSI_STANDARD) + { + proto_tree_add_item(tree, hf_mtp3mg_test_ansi_slc, tvb, 0, + TEST_LENGTH, ENC_NA); + } - proto_tree_add_item(tree, hf_mtp3mg_test_length, tvb, 0, TEST_LENGTH, - ENC_NA); + proto_tree_add_item(tree, hf_mtp3mg_test_length, tvb, 0, TEST_LENGTH, + ENC_NA); - length = tvb_get_guint8(tvb, 0) >> TEST_LENGTH_SHIFT; - proto_tree_add_item(tree, hf_mtp3mg_test_pattern, tvb, TEST_PATTERN_OFFSET, length, ENC_NA); - break; + length = tvb_get_guint8(tvb, 0) >> TEST_LENGTH_SHIFT; + proto_tree_add_item(tree, hf_mtp3mg_test_pattern, tvb, TEST_PATTERN_OFFSET, length, ENC_NA); + break; default: - dissect_mtp3mg_unknown_message(tvb, pinfo, tree); + dissect_mtp3mg_unknown_message(tvb, pinfo, tree); } } @@ -979,187 +979,187 @@ dissect_mtp3mg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Make entries in Protocol column on summary display */ switch(mtp3_standard) { - case ITU_STANDARD: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3MG (Int. ITU)"); - break; - case ANSI_STANDARD: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3MG (ANSI)"); - break; - case CHINESE_ITU_STANDARD: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3MG (Chin. ITU)"); - break; - case JAPAN_STANDARD: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3MG (Japan)"); - break; - }; - - /* create display subtree for the protocol */ - mtp3mg_item = proto_tree_add_item(tree, proto_mtp3mg, tvb, 0, -1, ENC_NA); - mtp3mg_tree = proto_item_add_subtree(mtp3mg_item, ett_mtp3mg); + case ITU_STANDARD: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3MG (Int. ITU)"); + break; + case ANSI_STANDARD: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3MG (ANSI)"); + break; + case CHINESE_ITU_STANDARD: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3MG (Chin. ITU)"); + break; + case JAPAN_STANDARD: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3MG (Japan)"); + break; + }; + + /* create display subtree for the protocol */ + mtp3mg_item = proto_tree_add_item(tree, proto_mtp3mg, tvb, 0, -1, ENC_NA); + mtp3mg_tree = proto_item_add_subtree(mtp3mg_item, ett_mtp3mg); /* * Dissect the message */ if(pinfo->match_uint == MTP_SI_MTN || /* ITU */ pinfo->match_uint == MTP_SI_MTNS) /* ANSI */ - { /* Test messages */ - - if (mtp3_standard == JAPAN_STANDARD) - { - guint8 h0h1; - guint16 test_pattern; - proto_item *pattern_item; - - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_japan_spare, tvb, 0, - JAPAN_SPARE_LENGTH, ENC_NA); - - h0h1 = tvb_get_guint8(tvb, JAPAN_H0H1_OFFSET); - - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_japan_test, tvb, - JAPAN_SPARE_LENGTH, H0H1_LENGTH, ENC_NA); - - col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str_const(h0h1, japan_test_message_type_acro_values, "Unknown")); - - switch (h0h1) - { - case JAPAN_TEST_SRT: - case JAPAN_TEST_SRA: - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_japan_test_spare, - tvb, JAPAN_TEST_SPARE_OFFSET, - JAPAN_TEST_SPARE_LENGTH, ENC_NA); - - test_pattern = tvb_get_letohs(tvb, JAPAN_TEST_PATTERN_OFFSET); - pattern_item = proto_tree_add_item(mtp3mg_tree, - hf_mtp3mg_japan_test_pattern, - tvb, - JAPAN_TEST_PATTERN_OFFSET, - JAPAN_TEST_PATTERN_LENGTH, - ENC_LITTLE_ENDIAN); - proto_item_append_text(pattern_item, " (%s)", - test_pattern == JAPAN_TEST_PATTERN - ? "correct" : "incorrect"); - break; - - default: - dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); - } - - } else { /* not JAPAN */ - proto_tree_add_item(mtp3mg_tree, hf_mtp3test_h0, tvb, 0, H0H1_LENGTH, ENC_NA); - /* H1 is added below */ - - h0 = tvb_get_guint8(tvb, 0) & H0_MASK; - h1 = (tvb_get_guint8(tvb, 0) & H1_MASK) >> H1_SHIFT; - - payload_tvb = tvb_new_subset_remaining(tvb, H0H1_LENGTH); - - switch (h0) - { - case TEST_H0_SLT: - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_test_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_test(payload_tvb, pinfo, mtp3mg_tree, h1); - break; - - default: - col_set_str(pinfo->cinfo, COL_INFO, "Unknown "); - - dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); - } /* switch */ - - } - - } else { /* Real management messages */ - - - if (mtp3_standard == JAPAN_STANDARD) - { - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_japan_spare, tvb, 0, - JAPAN_SPARE_LENGTH, ENC_NA); - - /* Get a tvb w/o the spare byte--it makes for less code below */ - tvb = tvb_new_subset_remaining(tvb, JAPAN_SPARE_LENGTH); - } - - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_h0, tvb, 0, H0H1_LENGTH, - ENC_NA); - /* H1 is added below */ - - h0 = tvb_get_guint8(tvb, 0) & H0_MASK; - h1 = (tvb_get_guint8(tvb, 0) & H1_MASK) >> H1_SHIFT; - - payload_tvb = tvb_new_subset_remaining(tvb, H0H1_LENGTH); - - switch (h0) - { - case H0_CHM: - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_chm_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_chm(payload_tvb, pinfo, mtp3mg_tree, h1); - break; - case H0_ECM: - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_ecm_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_ecm(payload_tvb, pinfo, mtp3mg_tree, h1); - break; - case H0_FCM: - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_fcm_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_fcm(payload_tvb, pinfo, mtp3mg_tree, h1); - break; - case H0_TFM: - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_tfm_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_tfm(payload_tvb, pinfo, mtp3mg_tree, h1); - break; - case H0_RSM: - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_rsm_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_rsm(payload_tvb, pinfo, mtp3mg_tree, h1); - break; - case H0_MIM: - if (mtp3_standard != JAPAN_STANDARD) - { - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_mim_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_mim(payload_tvb, pinfo, mtp3mg_tree, h1); - } else - dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); - break; - case H0_TRM: - if (mtp3_standard != JAPAN_STANDARD) - { - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_trm_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_trm(payload_tvb, pinfo, mtp3mg_tree, h1); - } else - dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); - break; - case H0_DLM: - if (mtp3_standard != JAPAN_STANDARD) - { - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_dlm_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_dlm(payload_tvb, pinfo, mtp3mg_tree, h1); - } else - dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); - break; - case H0_UFC: - if (mtp3_standard != JAPAN_STANDARD) - { - proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_ufc_h1, tvb, 0, - H0H1_LENGTH, ENC_NA); - dissect_mtp3mg_ufc(payload_tvb, pinfo, mtp3mg_tree, h1); - } else - dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); - break; - - default: - col_set_str(pinfo->cinfo, COL_INFO, "Unknown "); - - dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); - } /* switch */ + { /* Test messages */ + + if (mtp3_standard == JAPAN_STANDARD) + { + guint8 h0h1; + guint16 test_pattern; + proto_item *pattern_item; + + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_japan_spare, tvb, 0, + JAPAN_SPARE_LENGTH, ENC_NA); + + h0h1 = tvb_get_guint8(tvb, JAPAN_H0H1_OFFSET); + + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_japan_test, tvb, + JAPAN_SPARE_LENGTH, H0H1_LENGTH, ENC_NA); + + col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", + val_to_str_const(h0h1, japan_test_message_type_acro_values, "Unknown")); + + switch (h0h1) + { + case JAPAN_TEST_SRT: + case JAPAN_TEST_SRA: + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_japan_test_spare, + tvb, JAPAN_TEST_SPARE_OFFSET, + JAPAN_TEST_SPARE_LENGTH, ENC_NA); + + test_pattern = tvb_get_letohs(tvb, JAPAN_TEST_PATTERN_OFFSET); + pattern_item = proto_tree_add_item(mtp3mg_tree, + hf_mtp3mg_japan_test_pattern, + tvb, + JAPAN_TEST_PATTERN_OFFSET, + JAPAN_TEST_PATTERN_LENGTH, + ENC_LITTLE_ENDIAN); + proto_item_append_text(pattern_item, " (%s)", + test_pattern == JAPAN_TEST_PATTERN + ? "correct" : "incorrect"); + break; + + default: + dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); + } + + } else { /* not JAPAN */ + proto_tree_add_item(mtp3mg_tree, hf_mtp3test_h0, tvb, 0, H0H1_LENGTH, ENC_NA); + /* H1 is added below */ + + h0 = tvb_get_guint8(tvb, 0) & H0_MASK; + h1 = (tvb_get_guint8(tvb, 0) & H1_MASK) >> H1_SHIFT; + + payload_tvb = tvb_new_subset_remaining(tvb, H0H1_LENGTH); + + switch (h0) + { + case TEST_H0_SLT: + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_test_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_test(payload_tvb, pinfo, mtp3mg_tree, h1); + break; + + default: + col_set_str(pinfo->cinfo, COL_INFO, "Unknown "); + + dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); + } /* switch */ + + } + + } else { /* Real management messages */ + + + if (mtp3_standard == JAPAN_STANDARD) + { + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_japan_spare, tvb, 0, + JAPAN_SPARE_LENGTH, ENC_NA); + + /* Get a tvb w/o the spare byte--it makes for less code below */ + tvb = tvb_new_subset_remaining(tvb, JAPAN_SPARE_LENGTH); + } + + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_h0, tvb, 0, H0H1_LENGTH, + ENC_NA); + /* H1 is added below */ + + h0 = tvb_get_guint8(tvb, 0) & H0_MASK; + h1 = (tvb_get_guint8(tvb, 0) & H1_MASK) >> H1_SHIFT; + + payload_tvb = tvb_new_subset_remaining(tvb, H0H1_LENGTH); + + switch (h0) + { + case H0_CHM: + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_chm_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_chm(payload_tvb, pinfo, mtp3mg_tree, h1); + break; + case H0_ECM: + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_ecm_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_ecm(payload_tvb, pinfo, mtp3mg_tree, h1); + break; + case H0_FCM: + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_fcm_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_fcm(payload_tvb, pinfo, mtp3mg_tree, h1); + break; + case H0_TFM: + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_tfm_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_tfm(payload_tvb, pinfo, mtp3mg_tree, h1); + break; + case H0_RSM: + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_rsm_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_rsm(payload_tvb, pinfo, mtp3mg_tree, h1); + break; + case H0_MIM: + if (mtp3_standard != JAPAN_STANDARD) + { + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_mim_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_mim(payload_tvb, pinfo, mtp3mg_tree, h1); + } else + dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); + break; + case H0_TRM: + if (mtp3_standard != JAPAN_STANDARD) + { + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_trm_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_trm(payload_tvb, pinfo, mtp3mg_tree, h1); + } else + dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); + break; + case H0_DLM: + if (mtp3_standard != JAPAN_STANDARD) + { + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_dlm_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_dlm(payload_tvb, pinfo, mtp3mg_tree, h1); + } else + dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); + break; + case H0_UFC: + if (mtp3_standard != JAPAN_STANDARD) + { + proto_tree_add_item(mtp3mg_tree, hf_mtp3mg_ufc_h1, tvb, 0, + H0H1_LENGTH, ENC_NA); + dissect_mtp3mg_ufc(payload_tvb, pinfo, mtp3mg_tree, h1); + } else + dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); + break; + + default: + col_set_str(pinfo->cinfo, COL_INFO, "Unknown "); + + dissect_mtp3mg_unknown_message(tvb, pinfo, mtp3mg_tree); + } /* switch */ } /* else */ } @@ -1170,223 +1170,223 @@ proto_register_mtp3mg(void) /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { - { &hf_mtp3mg_h0, - { "H0 (Message Group)", "mtp3mg.h0", - FT_UINT8, BASE_HEX, VALS(h0_message_type_values), H0_MASK, - "Message group identifier", HFILL }}, - { &hf_mtp3mg_chm_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(chm_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_ecm_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(ecm_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_fcm_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(fcm_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_tfm_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(tfm_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_rsm_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(rsm_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_mim_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(mim_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_trm_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(trm_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_dlm_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(dlm_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_ufc_h1, - { "H1 (Message)", "mtp3mg.h1", - FT_UINT8, BASE_HEX, VALS(ufc_h1_message_type_values), H1_MASK, - "Message type", HFILL }}, - { &hf_mtp3mg_coo_ansi_slc, - { "Signalling Link Code", "mtp3mg.slc", - FT_UINT8, BASE_DEC, NULL, ANSI_COO_SLC_MASK, - "SLC of affected link", HFILL }}, - { &hf_mtp3mg_coo_ansi_fsn, - { "Forward Sequence Number", "mtp3mg.fsn", - FT_UINT8, BASE_DEC, NULL, ANSI_COO_FSN_MASK, - "Forward Sequence Number of last accepted message", HFILL }}, - { &hf_mtp3mg_coo_itu_fsn, - { "Forward Sequence Number", "mtp3mg.fsn", - FT_UINT8, BASE_DEC, NULL, ITU_COO_FSN_MASK, - "Forward Sequence Number of last accepted message", HFILL }}, - { &hf_mtp3mg_xco_ansi_slc, - { "Signalling Link Code", "mtp3mg.slc", - FT_UINT32, BASE_DEC, NULL, ANSI_XCO_SLC_MASK, - "SLC of affected link", HFILL }}, - { &hf_mtp3mg_xco_ansi_fsn, - { "Forward Sequence Number", "mtp3mg.fsn", - FT_UINT32, BASE_DEC, NULL, ANSI_XCO_FSN_MASK, - "Forward Sequence Number of last accepted message", HFILL }}, - { &hf_mtp3mg_xco_itu_fsn, - { "Forward Sequence Number", "mtp3mg.fsn", - FT_UINT24, BASE_DEC, NULL, 0x0, - "Forward Sequence Number of last accepted message", HFILL }}, - { &hf_mtp3mg_cbd_ansi_slc, - { "Signalling Link Code", "mtp3mg.slc", - FT_UINT16, BASE_DEC, NULL, ANSI_CBD_SLC_MASK, - "SLC of affected link", HFILL }}, - { &hf_mtp3mg_cbd_ansi_cbc, - { "Change Back Code", "mtp3mg.cbc", - FT_UINT16, BASE_DEC, NULL, ANSI_CBD_CBC_MASK, - NULL, HFILL }}, - { &hf_mtp3mg_cbd_itu_cbc, - { "Change Back Code", "mtp3mg.cbc", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_cbd_japan_cbc, - { "Change Back Code", "mtp3mg.cbc", - FT_UINT8, BASE_DEC, NULL, JAPAN_CBD_CBC_MASK, - NULL, HFILL }}, - { &hf_mtp3mg_eco_ansi_slc, - { "Signalling Link Code", "mtp3mg.slc", - FT_UINT8, BASE_DEC, NULL, ANSI_ECO_SLC_MASK, - "SLC of affected link", HFILL }}, - { &hf_mtp3mg_ansi_apc, - { "Affected Point Code", "mtp3mg.ansi_apc", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_apc_member, - { "Affected Point Code member", "mtp3mg.apc.member", - FT_UINT24, BASE_DEC, NULL, ANSI_MEMBER_MASK, - NULL, HFILL }}, - { &hf_mtp3mg_apc_cluster, - { "Affected Point Code cluster", "mtp3mg.apc.cluster", - FT_UINT24, BASE_DEC, NULL, ANSI_CLUSTER_MASK, - NULL, HFILL }}, - { &hf_mtp3mg_apc_network, - { "Affected Point Code network", "mtp3mg.apc.network", - FT_UINT24, BASE_DEC, NULL, ANSI_NETWORK_MASK, - NULL, HFILL }}, - { &hf_mtp3mg_tfc_ansi_status, - { "Status", "mtp3mg.status", - FT_UINT8, BASE_DEC, NULL, ANSI_TFC_STATUS_MASK, - "Congestion status", HFILL }}, - { &hf_mtp3mg_itu_apc, - { "Affected Point Code (ITU)", "mtp3mg.apc", - FT_UINT16, BASE_DEC, NULL, ITU_PC_MASK, - NULL, HFILL }}, - { &hf_mtp3mg_tfc_itu_status, - { "Status", "mtp3mg.status", - FT_UINT8, BASE_DEC, NULL, ITU_TFC_STATUS_MASK, - "Congestion status", HFILL }}, - { &hf_mtp3mg_chinese_apc, - { "Affected Point Code", "mtp3mg.chinese_apc", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_tfc_japan_spare, - { "TFC spare (Japan)", "mtp3mg.japan_spare", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_japan_apc, - { "Affected Point Code", "mtp3mg.japan_apc", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_tfc_japan_status, - { "Status", "mtp3mg.japan_status", - FT_UINT8, BASE_DEC, NULL, JAPAN_TFC_STATUS_MASK, - NULL, HFILL }}, - { &hf_mtp3mg_tfc_japan_status_spare, - { "Spare (Japan)", "mtp3mg.japan_spare", - FT_UINT8, BASE_HEX, NULL, JAPAN_TFC_STATUS_SPARE_MASK, - NULL, HFILL }}, - { &hf_mtp3mg_tfm_japan_count, - { "Count of Affected Point Codes (Japan)", "mtp3mg.japan_count", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_tfm_japan_spare, - { "Spare (Japan)", "mtp3mg.japan_spare", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_rsm_japan_count, - { "Count of Affected Point Codes (Japan)", "mtp3mg.japan_count", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_rsm_japan_spare, - { "Spare (Japan)", "mtp3mg.japan_spare", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_mim_ansi_slc, - { "Signalling Link Code", "mtp3mg.slc", - FT_UINT8, BASE_DEC, NULL, ANSI_MIM_SLC_MASK, - "SLC of affected link", HFILL }}, - { &hf_mtp3mg_dlc_ansi_slc, - { "Signalling Link Code", "mtp3mg.slc", - FT_UINT8, BASE_DEC, NULL, ANSI_DLC_SLC_MASK, - "SLC of affected link", HFILL }}, - { &hf_mtp3mg_dlc_ansi_link, - { "Link", "mtp3mg.link", - FT_UINT8, BASE_DEC, NULL, ANSI_DLC_LINK_MASK, - "CIC of BIC used to carry data", HFILL }}, - { &hf_mtp3mg_dlc_itu_link, - { "Link", "mtp3mg.link", - FT_UINT8, BASE_DEC, NULL, ITU_DLC_LINK_MASK, - "CIC of BIC used to carry data", HFILL }}, - { &hf_mtp3mg_upu_user, - { "User", "mtp3mg.user", - FT_UINT8, BASE_HEX, VALS(service_indicator_code_vals), UPU_USER_MASK, - "Unavailable user part", HFILL }}, - { &hf_mtp3mg_upu_cause, - { "Cause", "mtp3mg.cause", - FT_UINT8, BASE_HEX, VALS(upu_cause_values), UPU_CAUSE_MASK, - "Cause of user unavailability", HFILL }}, - { &hf_mtp3test_h0, - { "H0 (Message Group)", "mtp3mg.test.h0", - FT_UINT8, BASE_HEX, VALS(test_h0_message_type_values), H0_MASK, - "Message group identifier", HFILL }}, - { &hf_mtp3mg_test_h1, - { "H1 (Message)", "mtp3mg.test.h1", - FT_UINT8, BASE_HEX, VALS(test_h1_message_type_values), H1_MASK, - "SLT message type", HFILL }}, - { &hf_mtp3mg_test_length, - { "Test length", "mtp3mg.test.length", - FT_UINT8, BASE_DEC, NULL, H1_MASK, - "Signalling link test pattern length", HFILL }}, - { &hf_mtp3mg_japan_test, - { "Japan test message", "mtp3mg.test", - FT_UINT8, BASE_HEX, VALS(japan_test_message_type_values), 0x0, - "Japan test message type", HFILL }}, - { &hf_mtp3mg_japan_test_spare, - { "Japan test message spare", "mtp3mg.test.spare", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_japan_test_pattern, - { "Japan test message pattern", "mtp3mg.test.pattern", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_japan_spare, - { "Japan management spare", "mtp3mg.spare", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_mtp3mg_test_ansi_slc, - { "Signalling Link Code", "mtp3mg.slc", - FT_UINT8, BASE_DEC, NULL, ANSI_TEST_SLC_MASK, - "SLC of affected link", HFILL }}, - { &hf_mtp3mg_test_pattern, - { "Test pattern", "mtp3mg.test_pattern", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { &hf_mtp3mg_h0, + { "H0 (Message Group)", "mtp3mg.h0", + FT_UINT8, BASE_HEX, VALS(h0_message_type_values), H0_MASK, + "Message group identifier", HFILL }}, + { &hf_mtp3mg_chm_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(chm_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_ecm_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(ecm_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_fcm_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(fcm_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_tfm_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(tfm_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_rsm_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(rsm_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_mim_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(mim_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_trm_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(trm_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_dlm_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(dlm_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_ufc_h1, + { "H1 (Message)", "mtp3mg.h1", + FT_UINT8, BASE_HEX, VALS(ufc_h1_message_type_values), H1_MASK, + "Message type", HFILL }}, + { &hf_mtp3mg_coo_ansi_slc, + { "Signalling Link Code", "mtp3mg.slc", + FT_UINT8, BASE_DEC, NULL, ANSI_COO_SLC_MASK, + "SLC of affected link", HFILL }}, + { &hf_mtp3mg_coo_ansi_fsn, + { "Forward Sequence Number", "mtp3mg.fsn", + FT_UINT8, BASE_DEC, NULL, ANSI_COO_FSN_MASK, + "Forward Sequence Number of last accepted message", HFILL }}, + { &hf_mtp3mg_coo_itu_fsn, + { "Forward Sequence Number", "mtp3mg.fsn", + FT_UINT8, BASE_DEC, NULL, ITU_COO_FSN_MASK, + "Forward Sequence Number of last accepted message", HFILL }}, + { &hf_mtp3mg_xco_ansi_slc, + { "Signalling Link Code", "mtp3mg.slc", + FT_UINT32, BASE_DEC, NULL, ANSI_XCO_SLC_MASK, + "SLC of affected link", HFILL }}, + { &hf_mtp3mg_xco_ansi_fsn, + { "Forward Sequence Number", "mtp3mg.fsn", + FT_UINT32, BASE_DEC, NULL, ANSI_XCO_FSN_MASK, + "Forward Sequence Number of last accepted message", HFILL }}, + { &hf_mtp3mg_xco_itu_fsn, + { "Forward Sequence Number", "mtp3mg.fsn", + FT_UINT24, BASE_DEC, NULL, 0x0, + "Forward Sequence Number of last accepted message", HFILL }}, + { &hf_mtp3mg_cbd_ansi_slc, + { "Signalling Link Code", "mtp3mg.slc", + FT_UINT16, BASE_DEC, NULL, ANSI_CBD_SLC_MASK, + "SLC of affected link", HFILL }}, + { &hf_mtp3mg_cbd_ansi_cbc, + { "Change Back Code", "mtp3mg.cbc", + FT_UINT16, BASE_DEC, NULL, ANSI_CBD_CBC_MASK, + NULL, HFILL }}, + { &hf_mtp3mg_cbd_itu_cbc, + { "Change Back Code", "mtp3mg.cbc", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_cbd_japan_cbc, + { "Change Back Code", "mtp3mg.cbc", + FT_UINT8, BASE_DEC, NULL, JAPAN_CBD_CBC_MASK, + NULL, HFILL }}, + { &hf_mtp3mg_eco_ansi_slc, + { "Signalling Link Code", "mtp3mg.slc", + FT_UINT8, BASE_DEC, NULL, ANSI_ECO_SLC_MASK, + "SLC of affected link", HFILL }}, + { &hf_mtp3mg_ansi_apc, + { "Affected Point Code", "mtp3mg.ansi_apc", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_apc_member, + { "Affected Point Code member", "mtp3mg.apc.member", + FT_UINT24, BASE_DEC, NULL, ANSI_MEMBER_MASK, + NULL, HFILL }}, + { &hf_mtp3mg_apc_cluster, + { "Affected Point Code cluster", "mtp3mg.apc.cluster", + FT_UINT24, BASE_DEC, NULL, ANSI_CLUSTER_MASK, + NULL, HFILL }}, + { &hf_mtp3mg_apc_network, + { "Affected Point Code network", "mtp3mg.apc.network", + FT_UINT24, BASE_DEC, NULL, ANSI_NETWORK_MASK, + NULL, HFILL }}, + { &hf_mtp3mg_tfc_ansi_status, + { "Status", "mtp3mg.status", + FT_UINT8, BASE_DEC, NULL, ANSI_TFC_STATUS_MASK, + "Congestion status", HFILL }}, + { &hf_mtp3mg_itu_apc, + { "Affected Point Code (ITU)", "mtp3mg.apc", + FT_UINT16, BASE_DEC, NULL, ITU_PC_MASK, + NULL, HFILL }}, + { &hf_mtp3mg_tfc_itu_status, + { "Status", "mtp3mg.status", + FT_UINT8, BASE_DEC, NULL, ITU_TFC_STATUS_MASK, + "Congestion status", HFILL }}, + { &hf_mtp3mg_chinese_apc, + { "Affected Point Code", "mtp3mg.chinese_apc", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_tfc_japan_spare, + { "TFC spare (Japan)", "mtp3mg.japan_spare", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_japan_apc, + { "Affected Point Code", "mtp3mg.japan_apc", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_tfc_japan_status, + { "Status", "mtp3mg.japan_status", + FT_UINT8, BASE_DEC, NULL, JAPAN_TFC_STATUS_MASK, + NULL, HFILL }}, + { &hf_mtp3mg_tfc_japan_status_spare, + { "Spare (Japan)", "mtp3mg.japan_spare", + FT_UINT8, BASE_HEX, NULL, JAPAN_TFC_STATUS_SPARE_MASK, + NULL, HFILL }}, + { &hf_mtp3mg_tfm_japan_count, + { "Count of Affected Point Codes (Japan)", "mtp3mg.japan_count", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_tfm_japan_spare, + { "Spare (Japan)", "mtp3mg.japan_spare", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_rsm_japan_count, + { "Count of Affected Point Codes (Japan)", "mtp3mg.japan_count", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_rsm_japan_spare, + { "Spare (Japan)", "mtp3mg.japan_spare", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_mim_ansi_slc, + { "Signalling Link Code", "mtp3mg.slc", + FT_UINT8, BASE_DEC, NULL, ANSI_MIM_SLC_MASK, + "SLC of affected link", HFILL }}, + { &hf_mtp3mg_dlc_ansi_slc, + { "Signalling Link Code", "mtp3mg.slc", + FT_UINT8, BASE_DEC, NULL, ANSI_DLC_SLC_MASK, + "SLC of affected link", HFILL }}, + { &hf_mtp3mg_dlc_ansi_link, + { "Link", "mtp3mg.link", + FT_UINT8, BASE_DEC, NULL, ANSI_DLC_LINK_MASK, + "CIC of BIC used to carry data", HFILL }}, + { &hf_mtp3mg_dlc_itu_link, + { "Link", "mtp3mg.link", + FT_UINT8, BASE_DEC, NULL, ITU_DLC_LINK_MASK, + "CIC of BIC used to carry data", HFILL }}, + { &hf_mtp3mg_upu_user, + { "User", "mtp3mg.user", + FT_UINT8, BASE_HEX, VALS(service_indicator_code_vals), UPU_USER_MASK, + "Unavailable user part", HFILL }}, + { &hf_mtp3mg_upu_cause, + { "Cause", "mtp3mg.cause", + FT_UINT8, BASE_HEX, VALS(upu_cause_values), UPU_CAUSE_MASK, + "Cause of user unavailability", HFILL }}, + { &hf_mtp3test_h0, + { "H0 (Message Group)", "mtp3mg.test.h0", + FT_UINT8, BASE_HEX, VALS(test_h0_message_type_values), H0_MASK, + "Message group identifier", HFILL }}, + { &hf_mtp3mg_test_h1, + { "H1 (Message)", "mtp3mg.test.h1", + FT_UINT8, BASE_HEX, VALS(test_h1_message_type_values), H1_MASK, + "SLT message type", HFILL }}, + { &hf_mtp3mg_test_length, + { "Test length", "mtp3mg.test.length", + FT_UINT8, BASE_DEC, NULL, H1_MASK, + "Signalling link test pattern length", HFILL }}, + { &hf_mtp3mg_japan_test, + { "Japan test message", "mtp3mg.test", + FT_UINT8, BASE_HEX, VALS(japan_test_message_type_values), 0x0, + "Japan test message type", HFILL }}, + { &hf_mtp3mg_japan_test_spare, + { "Japan test message spare", "mtp3mg.test.spare", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_japan_test_pattern, + { "Japan test message pattern", "mtp3mg.test.pattern", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_japan_spare, + { "Japan management spare", "mtp3mg.spare", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_mtp3mg_test_ansi_slc, + { "Signalling Link Code", "mtp3mg.slc", + FT_UINT8, BASE_DEC, NULL, ANSI_TEST_SLC_MASK, + "SLC of affected link", HFILL }}, + { &hf_mtp3mg_test_pattern, + { "Test pattern", "mtp3mg.test_pattern", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, }; /* Setup protocol subtree array */ static gint *ett[] = { - &ett_mtp3mg, - &ett_mtp3mg_fcm_apc, - &ett_mtp3mg_tfm_apc, - &ett_mtp3mg_rsm_apc, - &ett_mtp3mg_upu_apc + &ett_mtp3mg, + &ett_mtp3mg_fcm_apc, + &ett_mtp3mg_tfm_apc, + &ett_mtp3mg_rsm_apc, + &ett_mtp3mg_upu_apc }; static ei_register_info ei[] = { @@ -1397,7 +1397,7 @@ proto_register_mtp3mg(void) /* Register the protocol name and description */ proto_mtp3mg = proto_register_protocol("Message Transfer Part Level 3 Management", - "MTP3MG", "mtp3mg"); + "MTP3MG", "mtp3mg"); register_dissector("mtp3mg", dissect_mtp3mg, proto_mtp3mg); /* Required calls to register the header fields and subtrees used */ @@ -1424,3 +1424,15 @@ proto_reg_handoff_mtp3mg(void) dissector_add_uint("mtp3.service_indicator", MTP_SI_MTNS, mtp3mg_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-nb_rtpmux.c b/epan/dissectors/packet-nb_rtpmux.c index 3bf398cc83..d18d74af7f 100644 --- a/epan/dissectors/packet-nb_rtpmux.c +++ b/epan/dissectors/packet-nb_rtpmux.c @@ -48,7 +48,6 @@ static gint ett_nb_rtpmux_cmp_rtp_hdr = -1; static dissector_handle_t rtpdissector; -/* Code to actually dissect the packets */ static int dissect_nb_rtpmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { @@ -99,8 +98,8 @@ dissect_nb_rtpmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat guint16 dstport, srcport; unsigned int length; gint captured_length; - tvbuff_t* next_tvb; - gboolean tbit; + tvbuff_t *next_tvb; + gboolean tbit; length = tvb_get_guint8(tvb, offset+2); ti = proto_tree_add_item(tree, proto_nb_rtpmux, tvb, offset, length+5, ENC_NA); @@ -108,54 +107,54 @@ dissect_nb_rtpmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat /* XXX - what if the T bit is set? */ proto_tree_add_item(nb_rtpmux_tree, hf_nb_rtpmux_compressed, tvb, offset, 2, ENC_BIG_ENDIAN); - tbit = tvb_get_guint8(tvb,offset)>>7; - if(tbit == 1){ - /* 6.4.2.4 Transport Format for multiplexing with RTP header compression */ - dstport = (tvb_get_ntohs(tvb, offset) & 0x7fff) << 1; - proto_tree_add_uint(nb_rtpmux_tree, hf_nb_rtpmux_dstport, tvb, offset, 2, dstport ); - proto_tree_add_item(nb_rtpmux_tree, hf_nb_rtpmux_length, tvb, offset+2, 1, ENC_BIG_ENDIAN); + tbit = tvb_get_guint8(tvb,offset)>>7; + if(tbit == 1){ + /* 6.4.2.4 Transport Format for multiplexing with RTP header compression */ + dstport = (tvb_get_ntohs(tvb, offset) & 0x7fff) << 1; + proto_tree_add_uint(nb_rtpmux_tree, hf_nb_rtpmux_dstport, tvb, offset, 2, dstport ); + proto_tree_add_item(nb_rtpmux_tree, hf_nb_rtpmux_length, tvb, offset+2, 1, ENC_BIG_ENDIAN); proto_tree_add_item(nb_rtpmux_tree, hf_nb_r_bit, tvb, offset+3, 2, ENC_BIG_ENDIAN); - srcport = (tvb_get_ntohs(tvb, offset+3) & 0x7fff) << 1; - proto_tree_add_uint(nb_rtpmux_tree, hf_nb_rtpmux_srcport, tvb, offset+3, 2, srcport ); - nb_rtpmux_cmp_rtp_tree = proto_tree_add_subtree( nb_rtpmux_tree, tvb, offset+5, 3, ett_nb_rtpmux_cmp_rtp_hdr, NULL, "Compressed RTP header" ); - /* Sequence Number (SN) */ - proto_tree_add_item(nb_rtpmux_cmp_rtp_tree, hf_nb_rtpmux_cmp_rtp_sequence_no, tvb, offset+5, 1, ENC_BIG_ENDIAN); - /* Timestamp (TS) */ - proto_tree_add_item(nb_rtpmux_cmp_rtp_tree, hf_nb_rtpmux_cmp_rtp_timestamp, tvb, offset+6, 2, ENC_BIG_ENDIAN); - if (length != 0) - proto_tree_add_item(nb_rtpmux_cmp_rtp_tree, hf_nb_rtpmux_cmp_rtp_data,tvb, offset+8, length-3, ENC_NA); - - }else{ - /* 6.4.2.3 Transport Format for multiplexing without RTP Header Compression */ - dstport = (tvb_get_ntohs(tvb, offset) & 0x7fff) << 1; - proto_tree_add_uint(nb_rtpmux_tree, hf_nb_rtpmux_dstport, tvb, offset, 2, dstport ); - proto_tree_add_item(nb_rtpmux_tree, - hf_nb_rtpmux_length, tvb, offset+2, 1, ENC_BIG_ENDIAN); + srcport = (tvb_get_ntohs(tvb, offset+3) & 0x7fff) << 1; + proto_tree_add_uint(nb_rtpmux_tree, hf_nb_rtpmux_srcport, tvb, offset+3, 2, srcport ); + nb_rtpmux_cmp_rtp_tree = proto_tree_add_subtree( nb_rtpmux_tree, tvb, offset+5, 3, ett_nb_rtpmux_cmp_rtp_hdr, NULL, "Compressed RTP header" ); + /* Sequence Number (SN) */ + proto_tree_add_item(nb_rtpmux_cmp_rtp_tree, hf_nb_rtpmux_cmp_rtp_sequence_no, tvb, offset+5, 1, ENC_BIG_ENDIAN); + /* Timestamp (TS) */ + proto_tree_add_item(nb_rtpmux_cmp_rtp_tree, hf_nb_rtpmux_cmp_rtp_timestamp, tvb, offset+6, 2, ENC_BIG_ENDIAN); + if (length != 0) + proto_tree_add_item(nb_rtpmux_cmp_rtp_tree, hf_nb_rtpmux_cmp_rtp_data,tvb, offset+8, length-3, ENC_NA); + + }else{ + /* 6.4.2.3 Transport Format for multiplexing without RTP Header Compression */ + dstport = (tvb_get_ntohs(tvb, offset) & 0x7fff) << 1; + proto_tree_add_uint(nb_rtpmux_tree, hf_nb_rtpmux_dstport, tvb, offset, 2, dstport ); + proto_tree_add_item(nb_rtpmux_tree, + hf_nb_rtpmux_length, tvb, offset+2, 1, ENC_BIG_ENDIAN); proto_tree_add_item(nb_rtpmux_tree, hf_nb_r_bit, tvb, offset+3, 1, ENC_BIG_ENDIAN); - srcport = (tvb_get_ntohs(tvb, offset+3) & 0x7fff) << 1; - proto_tree_add_uint(nb_rtpmux_tree, hf_nb_rtpmux_srcport, tvb, offset+3, 2, srcport ); - - if (length != 0) - { - /* We have an RTP payload. */ - if (rtpdissector) - { - captured_length = tvb_length_remaining(tvb, offset + 5); - if (captured_length > (gint)length) - captured_length = length; - next_tvb = tvb_new_subset(tvb, offset+5, captured_length, - length); - - call_dissector(rtpdissector, next_tvb, pinfo, nb_rtpmux_tree); - } - else - { - proto_tree_add_item(nb_rtpmux_tree, - hf_nb_rtpmux_data, tvb, offset+5, length, ENC_NA); - } - } - } /* if tbit */ - offset += 5+length; + srcport = (tvb_get_ntohs(tvb, offset+3) & 0x7fff) << 1; + proto_tree_add_uint(nb_rtpmux_tree, hf_nb_rtpmux_srcport, tvb, offset+3, 2, srcport ); + + if (length != 0) + { + /* We have an RTP payload. */ + if (rtpdissector) + { + captured_length = tvb_length_remaining(tvb, offset + 5); + if (captured_length > (gint)length) + captured_length = length; + next_tvb = tvb_new_subset(tvb, offset+5, captured_length, + length); + + call_dissector(rtpdissector, next_tvb, pinfo, nb_rtpmux_tree); + } + else + { + proto_tree_add_item(nb_rtpmux_tree, + hf_nb_rtpmux_data, tvb, offset+5, length, ENC_NA); + } + } + } /* if tbit */ + offset += 5+length; } /* Return the amount of data this dissector was able to dissect */ @@ -165,66 +164,63 @@ dissect_nb_rtpmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat /* Register the protocol with Wireshark */ -/* this format is require because a script is used to build the C function - that calls all the protocol registration. -*/ void proto_register_nb_rtpmux(void) { static hf_register_info hf[] = { { &hf_nb_rtpmux_compressed, - { "Compressed headers(T bit)", "nb_rtpmux.compressed", - FT_BOOLEAN, 16, NULL, 0x8000, + { "Compressed headers(T bit)", "nb_rtpmux.compressed", + FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, { &hf_nb_rtpmux_dstport, - { "Dst port", "nb_rtpmux.dstport", - FT_UINT16, BASE_DEC, NULL, 0x0, + { "Dst port", "nb_rtpmux.dstport", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_nb_rtpmux_length, - { "Length", "nb_rtpmux.length", - FT_UINT8, BASE_DEC, NULL, 0x00, + { "Length", "nb_rtpmux.length", + FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_nb_r_bit, - { "R bit", "nb_rtpmux.r_bit", - FT_BOOLEAN, 16, NULL, 0x8000, + { "R bit", "nb_rtpmux.r_bit", + FT_BOOLEAN, 16, NULL, 0x8000, NULL, HFILL } }, { &hf_nb_rtpmux_srcport, - { "Src port", "nb_rtpmux.srcport", - FT_UINT16, BASE_DEC, NULL, 0x0, + { "Src port", "nb_rtpmux.srcport", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_nb_rtpmux_data, - { "RTP Packet", "nb_rtpmux.data", - FT_BYTES, BASE_NONE, NULL, 0x00, + { "RTP Packet", "nb_rtpmux.data", + FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL } }, - { &hf_nb_rtpmux_cmp_rtp_sequence_no, - { "Sequence Number", "nb_rtpmux.cmp_rtp.sequence_no", - FT_UINT16, BASE_DEC, NULL, 0x00, + { &hf_nb_rtpmux_cmp_rtp_sequence_no, + { "Sequence Number", "nb_rtpmux.cmp_rtp.sequence_no", + FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL } - }, - { &hf_nb_rtpmux_cmp_rtp_timestamp, - { "Timestamp", "nb_rtpmux.cmp_rtp.timestamp", - FT_UINT16, BASE_DEC, NULL, 0x00, + }, + { &hf_nb_rtpmux_cmp_rtp_timestamp, + { "Timestamp", "nb_rtpmux.cmp_rtp.timestamp", + FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL } - }, - { &hf_nb_rtpmux_cmp_rtp_data, - { "RTP Data", "nb_rtpmux.cmp_rtp.data", - FT_BYTES, BASE_NONE, NULL, 0x00, + }, + { &hf_nb_rtpmux_cmp_rtp_data, + { "RTP Data", "nb_rtpmux.cmp_rtp.data", + FT_BYTES, BASE_NONE, NULL, 0x00, NULL,HFILL } - } + } }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_nb_rtpmux, - &ett_nb_rtpmux_cmp_rtp_hdr + &ett_nb_rtpmux_cmp_rtp_hdr }; /* Register the protocol name and description */ @@ -237,15 +233,6 @@ proto_register_nb_rtpmux(void) } - -/* If this dissector uses sub-dissector registration add a registration routine. - This exact format is required because a script is used to find these - routines and create the code that calls these routines. - - This function is also called by preferences whenever "Apply" is pressed - (see prefs_register_protocol above) so it should accommodate being called - more than once. -*/ void proto_reg_handoff_nb_rtpmux(void) { @@ -262,3 +249,15 @@ proto_reg_handoff_nb_rtpmux(void) rtpdissector = find_dissector("rtp"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-netdump.c b/epan/dissectors/packet-netdump.c index 31c2a0ecbf..5ff9445f61 100644 --- a/epan/dissectors/packet-netdump.c +++ b/epan/dissectors/packet-netdump.c @@ -225,3 +225,15 @@ void proto_reg_handoff_netdump(void) dissector_add_uint("udp.port", CurrentPort, netdump_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-netrom.c b/epan/dissectors/packet-netrom.c index 1e24d7b4f7..d0df9f661e 100644 --- a/epan/dissectors/packet-netrom.c +++ b/epan/dissectors/packet-netrom.c @@ -646,3 +646,15 @@ proto_reg_handoff_netrom(void) } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-netsync.c b/epan/dissectors/packet-netsync.c index 8bde2c0941..1fa16e04cb 100644 --- a/epan/dissectors/packet-netsync.c +++ b/epan/dissectors/packet-netsync.c @@ -312,7 +312,7 @@ static gint dissect_netsync_cmd_send_data(tvbuff_t *tvb, gint offset, proto_tre { proto_tree_add_item(tree, hf_netsync_cmd_send_data_type, tvb, offset, 1, ENC_BIG_ENDIAN ); - offset += 1; + offset += 1; proto_tree_add_item(tree, hf_netsync_cmd_send_data_id, tvb, offset, NETSNYC_MERKLE_HASH_LENGTH, ENC_NA ); @@ -326,7 +326,7 @@ static gint dissect_netsync_cmd_send_delta(tvbuff_t *tvb, gint offset, proto_tr { proto_tree_add_item(tree, hf_netsync_cmd_send_delta_type, tvb, offset, 1, ENC_BIG_ENDIAN ); - offset += 1; + offset += 1; proto_tree_add_item(tree, hf_netsync_cmd_send_delta_base_id, tvb, offset, NETSNYC_MERKLE_HASH_LENGTH, ENC_NA ); @@ -473,7 +473,7 @@ dissect_netsync_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d proto_tree_add_uint(netsync_tree, hf_netsync_size, tvb, - offset, size_bytes, size ); + offset, size_bytes, size ); offset += size_bytes; switch (cmd) { @@ -762,3 +762,15 @@ proto_reg_handoff_netsync(void) dissector_add_uint("tcp.port", global_tcp_port_netsync, netsync_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-oicq.c b/epan/dissectors/packet-oicq.c index d577cbdbb4..08a1d2df6c 100644 --- a/epan/dissectors/packet-oicq.c +++ b/epan/dissectors/packet-oicq.c @@ -39,12 +39,12 @@ void proto_register_oicq(void); void proto_reg_handoff_oicq(void); /* - Protocol Flag: 8bit unsigned - Sender Flag: 16bit unsigned - Command Number: 16bit unsigned - Sequence Number: 16bit unsigned - OICQ Number: 32bit unsigned - Data: Variable Length data + Protocol Flag: 8bit unsigned + Sender Flag: 16bit unsigned + Command Number: 16bit unsigned + Sequence Number: 16bit unsigned + OICQ Number: 32bit unsigned + Data: Variable Length data * */ @@ -121,8 +121,8 @@ dissect_oicq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ /* Make sure this packet is for us. */ /* heuristic: OICQ iff (([0] == STX) && ([3/4] == <valid_command>) ) */ - /* (Supposedly each OICQ message ends with an ETX so a test for */ - /* same could also be part of the heuristic). */ + /* (Supposedly each OICQ message ends with an ETX so a test for */ + /* same could also be part of the heuristic). */ if ( (try_val_to_str(tvb_get_guint8(tvb, 0), oicq_flag_vals) == NULL) || (try_val_to_str(tvb_get_ntohs(tvb, 3), oicq_command_vals) == NULL) ) return 0; @@ -182,7 +182,7 @@ proto_register_oicq(void) { &hf_oicq_data, { "Data", "oicq.data", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, - }; + }; static gint *ett[] = { &ett_oicq, }; @@ -202,3 +202,15 @@ proto_reg_handoff_oicq(void) dissector_add_uint("udp.port", UDP_PORT_OICQ, oicq_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c index 85e05e4b84..12c4afdda1 100644 --- a/epan/dissectors/packet-pvfs2.c +++ b/epan/dissectors/packet-pvfs2.c @@ -281,14 +281,14 @@ static int dissect_pvfs_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, static guint get_pvfs_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { - guint32 plen; + guint32 plen; - /* - * Get the length of the PVFS-over-TCP packet. Ignore top 32 bits - */ - plen = tvb_get_letohl(tvb, offset + 16); + /* + * Get the length of the PVFS-over-TCP packet. Ignore top 32 bits + */ + plen = tvb_get_letohl(tvb, offset + 16); - return plen+24; + return plen+24; } static int @@ -1017,7 +1017,7 @@ dissect_fhandle_data_unknown(tvbuff_t *tvb, int offset, proto_tree *tree) static void dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, - proto_tree *tree, guint32 *hash) + proto_tree *tree, guint32 *hash) { guint32 fhhash; guint32 i; @@ -3617,3 +3617,15 @@ proto_reg_handoff_pvfs(void) heur_dissector_add("tcp", dissect_pvfs_heur, proto_pvfs); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-quake.c b/epan/dissectors/packet-quake.c index 545b48706b..cd0fa2e82e 100644 --- a/epan/dissectors/packet-quake.c +++ b/epan/dissectors/packet-quake.c @@ -122,9 +122,9 @@ static const value_string names_control_command[] = { #define QUAKE_MAXSTRING 0x800 static const value_string names_control_direction[] = { - { CCREQ, "Request" }, - { CCREP, "Reply" }, - { 0, NULL } + { CCREQ, "Request" }, + { CCREP, "Reply" }, + { 0, NULL } }; @@ -481,136 +481,136 @@ void proto_reg_handoff_quake(void); void proto_register_quake(void) { - static hf_register_info hf[] = { - { &hf_quake_header_flags, - { "Flags", "quake.header.flags", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_quake_header_flags_data, - { "Data", "quake.header.flags.data", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_DATA, - NULL, HFILL }}, - { &hf_quake_header_flags_ack, - { "Acknowledgment", "quake.header.flags.ack", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_ACK, - NULL, HFILL }}, - { &hf_quake_header_flags_no_ack, - { "No Acknowledgment", "quake.header.flags.no_ack", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_NAK, - NULL, HFILL }}, - { &hf_quake_header_flags_endmsg, - { "End Of Message", "quake.header.flags.endmsg", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_EOM, - NULL, HFILL }}, - { &hf_quake_header_flags_unreliable, - { "Unreliable", "quake.header.flags.unreliable", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_UNRELIABLE, - NULL, HFILL }}, - { &hf_quake_header_flags_control, - { "Control", "quake.header.flags.control", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_CTL, - NULL, HFILL }}, - { &hf_quake_header_length, - { "Length", "quake.header.length", - FT_UINT16, BASE_DEC, NULL, 0x0, - "full data length", HFILL }}, - { &hf_quake_header_sequence, - { "Sequence", "quake.header.sequence", - FT_UINT32, BASE_HEX, NULL, 0x0, - "Sequence Number", HFILL }}, - { &hf_quake_control_command, - { "Command", "quake.control.command", - FT_UINT8, BASE_HEX, VALS(names_control_command), 0x0, - "Control Command", HFILL }}, - { &hf_quake_CCREQ_CONNECT_game, - { "Game", "quake.control.connect.game", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Game Name", HFILL }}, - { &hf_quake_CCREQ_CONNECT_version, - { "Version", "quake.control.connect.version", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Game Protocol Version Number", HFILL }}, - { &hf_quake_CCREQ_SERVER_INFO_game, - { "Game", "quake.control.server_info.game", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Game Name", HFILL }}, - { &hf_quake_CCREQ_SERVER_INFO_version, - { "Version", "quake.control.server_info.version", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Game Protocol Version Number", HFILL }}, - { &hf_quake_CCREQ_PLAYER_INFO_player, - { "Player", "quake.control.player_info.player", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_quake_CCREQ_RULE_INFO_lastrule, - { "Last Rule", "quake.control.rule_info.lastrule", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Last Rule Name", HFILL }}, - { &hf_quake_CCREP_ACCEPT_port, - { "Port", "quake.control.accept.port", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Game Data Port", HFILL }}, - { &hf_quake_CCREP_REJECT_reason, - { "Reason", "quake.control.reject.reason", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Reject Reason", HFILL }}, - { &hf_quake_CCREP_SERVER_INFO_address, - { "Address", "quake.control.server_info.address", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Server Address", HFILL }}, - { &hf_quake_CCREP_SERVER_INFO_server, - { "Server", "quake.control.server_info.server", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Server Name", HFILL }}, - { &hf_quake_CCREP_SERVER_INFO_map, - { "Map", "quake.control.server_info.map", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Map Name", HFILL }}, - { &hf_quake_CCREP_SERVER_INFO_num_player, - { "Number of Players", "quake.control.server_info.num_player", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Current Number of Players", HFILL }}, - { &hf_quake_CCREP_SERVER_INFO_max_player, - { "Maximal Number of Players", "quake.control.server_info.max_player", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_quake_CCREP_PLAYER_INFO_name, - { "Name", "quake.control.player_info.name", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Player Name", HFILL }}, - { &hf_quake_CCREP_PLAYER_INFO_colors, - { "Colors", "quake.control.player_info.colors", - FT_UINT32, BASE_HEX, NULL, 0x0, - "Player Colors", HFILL }}, - { &hf_quake_CCREP_PLAYER_INFO_colors_shirt, - { "Shirt", "quake.control.player_info.colors.shirt", - FT_UINT8, BASE_DEC, VALS(names_colors), 0x0, - "Shirt Color", HFILL }}, - { &hf_quake_CCREP_PLAYER_INFO_colors_pants, - { "Pants", "quake.control.player_info.colors.pants", - FT_UINT8, BASE_DEC, VALS(names_colors), 0x0, - "Pants Color", HFILL }}, - { &hf_quake_CCREP_PLAYER_INFO_frags, - { "Frags", "quake.control.player_info.frags", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Player Frags", HFILL }}, - { &hf_quake_CCREP_PLAYER_INFO_connect_time, - { "Connect Time", "quake.control.player_info.connect_time", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Player Connect Time", HFILL }}, - { &hf_quake_CCREP_PLAYER_INFO_address, - { "Address", "quake.control.player_info.address", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Player Address", HFILL }}, - { &hf_quake_CCREP_RULE_INFO_rule, - { "Rule", "quake.control.rule_info.rule", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Rule Name", HFILL }}, - { &hf_quake_CCREP_RULE_INFO_value, - { "Value", "quake.control.rule_info.value", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Rule Value", HFILL }}, - }; + static hf_register_info hf[] = { + { &hf_quake_header_flags, + { "Flags", "quake.header.flags", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_quake_header_flags_data, + { "Data", "quake.header.flags.data", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_DATA, + NULL, HFILL }}, + { &hf_quake_header_flags_ack, + { "Acknowledgment", "quake.header.flags.ack", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_ACK, + NULL, HFILL }}, + { &hf_quake_header_flags_no_ack, + { "No Acknowledgment", "quake.header.flags.no_ack", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_NAK, + NULL, HFILL }}, + { &hf_quake_header_flags_endmsg, + { "End Of Message", "quake.header.flags.endmsg", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_EOM, + NULL, HFILL }}, + { &hf_quake_header_flags_unreliable, + { "Unreliable", "quake.header.flags.unreliable", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_UNRELIABLE, + NULL, HFILL }}, + { &hf_quake_header_flags_control, + { "Control", "quake.header.flags.control", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), NETFLAG_CTL, + NULL, HFILL }}, + { &hf_quake_header_length, + { "Length", "quake.header.length", + FT_UINT16, BASE_DEC, NULL, 0x0, + "full data length", HFILL }}, + { &hf_quake_header_sequence, + { "Sequence", "quake.header.sequence", + FT_UINT32, BASE_HEX, NULL, 0x0, + "Sequence Number", HFILL }}, + { &hf_quake_control_command, + { "Command", "quake.control.command", + FT_UINT8, BASE_HEX, VALS(names_control_command), 0x0, + "Control Command", HFILL }}, + { &hf_quake_CCREQ_CONNECT_game, + { "Game", "quake.control.connect.game", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Game Name", HFILL }}, + { &hf_quake_CCREQ_CONNECT_version, + { "Version", "quake.control.connect.version", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Game Protocol Version Number", HFILL }}, + { &hf_quake_CCREQ_SERVER_INFO_game, + { "Game", "quake.control.server_info.game", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Game Name", HFILL }}, + { &hf_quake_CCREQ_SERVER_INFO_version, + { "Version", "quake.control.server_info.version", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Game Protocol Version Number", HFILL }}, + { &hf_quake_CCREQ_PLAYER_INFO_player, + { "Player", "quake.control.player_info.player", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_quake_CCREQ_RULE_INFO_lastrule, + { "Last Rule", "quake.control.rule_info.lastrule", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Last Rule Name", HFILL }}, + { &hf_quake_CCREP_ACCEPT_port, + { "Port", "quake.control.accept.port", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Game Data Port", HFILL }}, + { &hf_quake_CCREP_REJECT_reason, + { "Reason", "quake.control.reject.reason", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Reject Reason", HFILL }}, + { &hf_quake_CCREP_SERVER_INFO_address, + { "Address", "quake.control.server_info.address", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Server Address", HFILL }}, + { &hf_quake_CCREP_SERVER_INFO_server, + { "Server", "quake.control.server_info.server", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Server Name", HFILL }}, + { &hf_quake_CCREP_SERVER_INFO_map, + { "Map", "quake.control.server_info.map", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Map Name", HFILL }}, + { &hf_quake_CCREP_SERVER_INFO_num_player, + { "Number of Players", "quake.control.server_info.num_player", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Current Number of Players", HFILL }}, + { &hf_quake_CCREP_SERVER_INFO_max_player, + { "Maximal Number of Players", "quake.control.server_info.max_player", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_quake_CCREP_PLAYER_INFO_name, + { "Name", "quake.control.player_info.name", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Player Name", HFILL }}, + { &hf_quake_CCREP_PLAYER_INFO_colors, + { "Colors", "quake.control.player_info.colors", + FT_UINT32, BASE_HEX, NULL, 0x0, + "Player Colors", HFILL }}, + { &hf_quake_CCREP_PLAYER_INFO_colors_shirt, + { "Shirt", "quake.control.player_info.colors.shirt", + FT_UINT8, BASE_DEC, VALS(names_colors), 0x0, + "Shirt Color", HFILL }}, + { &hf_quake_CCREP_PLAYER_INFO_colors_pants, + { "Pants", "quake.control.player_info.colors.pants", + FT_UINT8, BASE_DEC, VALS(names_colors), 0x0, + "Pants Color", HFILL }}, + { &hf_quake_CCREP_PLAYER_INFO_frags, + { "Frags", "quake.control.player_info.frags", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Player Frags", HFILL }}, + { &hf_quake_CCREP_PLAYER_INFO_connect_time, + { "Connect Time", "quake.control.player_info.connect_time", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Player Connect Time", HFILL }}, + { &hf_quake_CCREP_PLAYER_INFO_address, + { "Address", "quake.control.player_info.address", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Player Address", HFILL }}, + { &hf_quake_CCREP_RULE_INFO_rule, + { "Rule", "quake.control.rule_info.rule", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Rule Name", HFILL }}, + { &hf_quake_CCREP_RULE_INFO_value, + { "Value", "quake.control.rule_info.value", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Rule Value", HFILL }}, + }; static gint *ett[] = { &ett_quake, &ett_quake_control, @@ -620,17 +620,17 @@ proto_register_quake(void) module_t *quake_module; proto_quake = proto_register_protocol("Quake Network Protocol", - "QUAKE", "quake"); + "QUAKE", "quake"); proto_register_field_array(proto_quake, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); /* Register a configuration option for port */ quake_module = prefs_register_protocol(proto_quake, - proto_reg_handoff_quake); + proto_reg_handoff_quake); prefs_register_uint_preference(quake_module, "udp.port", - "Quake Server UDP Port", - "Set the UDP port for the Quake Server", - 10, &gbl_quakeServerPort); + "Quake Server UDP Port", + "Set the UDP port for the Quake Server", + 10, &gbl_quakeServerPort); } @@ -654,4 +654,15 @@ proto_reg_handoff_quake(void) dissector_add_uint("udp.port", gbl_quakeServerPort, quake_handle); } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-quake3.c b/epan/dissectors/packet-quake3.c index 1a7b961fb9..bf91c47ed3 100644 --- a/epan/dissectors/packet-quake3.c +++ b/epan/dissectors/packet-quake3.c @@ -26,7 +26,7 @@ /* - All informations used in this decoding were gathered from + All informations used in this decoding were gathered from * some own captures of a private server, * the "Server commands howto" document written by id Software (http://www.quake3arena.com/tech/ServerCommandsHowto.html) @@ -173,7 +173,7 @@ dissect_quake3_ConnectionlessPacket(tvbuff_t *tvb, packet_info *pinfo _U_, * encoding is used for them? */ text = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &len, ENC_ASCII|ENC_NA); - if (cl_tree) { + if (cl_tree) { text_item = proto_tree_add_string(cl_tree, hf_quake3_connectionless_text, tvb, offset, len, text); @@ -318,13 +318,13 @@ dissect_quake3_ConnectionlessPacket(tvbuff_t *tvb, packet_info *pinfo _U_, *direction = DIR_UNKNOWN; } - if (text_tree && command_finished == FALSE) { + if (text_tree && command_finished == FALSE) { proto_tree_add_string(text_tree, hf_quake3_connectionless_command, tvb, offset, command_len, val_to_str_const(command, names_command, "Unknown")); - } + } - /*offset += len;*/ + /*offset += len;*/ } @@ -349,9 +349,9 @@ dissect_quake3_server_commands(tvbuff_t *tvb, packet_info *pinfo, static const value_string names_reliable[] = { - { 0, "Non Reliable" }, - { 1, "Reliable" }, - { 0, NULL } + { 0, "Non Reliable" }, + { 1, "Reliable" }, + { 0, NULL } }; @@ -600,7 +600,7 @@ proto_reg_handoff_quake3(void) dissector_delete_uint("udp.port", master_port+i, quake3_handle); } - /* set port for future deletes */ + /* set port for future deletes */ server_port = gbl_quake3_server_port; master_port = gbl_quake3_master_port; @@ -613,4 +613,15 @@ proto_reg_handoff_quake3(void) quake3_handle); } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-quakeworld.c b/epan/dissectors/packet-quakeworld.c index 33ff826a0b..d915d43a8e 100644 --- a/epan/dissectors/packet-quakeworld.c +++ b/epan/dissectors/packet-quakeworld.c @@ -78,10 +78,10 @@ static gint ett_quakeworld_game_svc = -1; static dissector_handle_t data_handle; /* - helper functions, they may ave to go somewhere else - they are mostly copied without change from - quakeworldsource/client/cmd.c - quakeworldsource/client/common.c + helper functions, they may ave to go somewhere else + they are mostly copied without change from + quakeworldsource/client/cmd.c + quakeworldsource/client/common.c */ #define MAX_TEXT_SIZE 2048 @@ -369,12 +369,12 @@ dissect_quakeworld_ConnectionlessPacket(tvbuff_t *tvb, packet_info *pinfo, text = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &len, ENC_ASCII|ENC_NA); /* actually, we should look for a eol char and stop already there */ - if (cl_tree) { + if (cl_tree) { proto_item *text_item; - text_item = proto_tree_add_string(cl_tree, hf_quakeworld_connectionless_text, + text_item = proto_tree_add_string(cl_tree, hf_quakeworld_connectionless_text, tvb, offset, len, text); text_tree = proto_item_add_subtree(text_item, ett_quakeworld_connectionless_text); - } + } if (direction == DIR_C2S) { /* client to server commands */ @@ -564,9 +564,9 @@ dissect_quakeworld_server_commands(tvbuff_t *tvb, packet_info *pinfo, static const value_string names_reliable[] = { - { 0, "Non Reliable" }, - { 1, "Reliable" }, - { 0, NULL } + { 0, "Non Reliable" }, + { 1, "Reliable" }, + { 0, NULL } }; @@ -833,9 +833,21 @@ proto_reg_handoff_quakeworld(void) dissector_delete_uint("udp.port", ServerPort, quakeworld_handle); } - /* set port for future deletes */ - ServerPort=gbl_quakeworldServerPort; + /* set port for future deletes */ + ServerPort=gbl_quakeworldServerPort; dissector_add_uint("udp.port", gbl_quakeworldServerPort, quakeworld_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-redback.c b/epan/dissectors/packet-redback.c index 473899ed7b..b59aa78070 100644 --- a/epan/dissectors/packet-redback.c +++ b/epan/dissectors/packet-redback.c @@ -252,4 +252,15 @@ proto_reg_handoff_redback(void) dissector_add_uint("wtap_encap", WTAP_ENCAP_REDBACK, redback_handle); } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-rfc2190.c b/epan/dissectors/packet-rfc2190.c index 1a6816621d..bc5a9c6be6 100644 --- a/epan/dissectors/packet-rfc2190.c +++ b/epan/dissectors/packet-rfc2190.c @@ -46,7 +46,7 @@ void proto_register_rfc2190(void); void proto_reg_handoff_rfc2190(void); /* H.263 header fields */ -static int proto_rfc2190 = -1; +static int proto_rfc2190 = -1; /* Mode A header */ static int hf_rfc2190_ftype = -1; @@ -72,44 +72,44 @@ static int hf_rfc2190_vmv1 = -1; static int hf_rfc2190_hmv2 = -1; static int hf_rfc2190_vmv2 = -1; -static gint ett_rfc2190 = -1; +static gint ett_rfc2190 = -1; static dissector_handle_t h263_handle; static void dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) { - proto_item *ti = NULL; - proto_tree *rfc2190_tree = NULL; - int offset = 0; - unsigned int rfc2190_version = 0; - tvbuff_t *next_tvb; - int hdr_len = 0; + proto_item *ti = NULL; + proto_tree *rfc2190_tree = NULL; + int offset = 0; + unsigned int rfc2190_version = 0; + tvbuff_t *next_tvb; + int hdr_len = 0; rfc2190_version = (tvb_get_guint8( tvb, offset ) & 0xc0 ) >> 6; col_set_str(pinfo->cinfo, COL_PROTOCOL, "H.263 "); - /* Three formats (mode A, mode B and mode C) are defined for H.263 - * payload header. In mode A, an H.263 payload header of four bytes is - * present before actual compressed H.263 video bitstream in a packet. - * It allows fragmentation at GOB boundaries. In mode B, an eight byte - * H.263 payload header is used and each packet starts at MB boundaries - * without the PB-frames option. Finally, a twelve byte H.263 payload - * header is defined in mode C to support fragmentation at MB boundaries - * for frames that are coded with the PB-frames option. - */ + /* Three formats (mode A, mode B and mode C) are defined for H.263 + * payload header. In mode A, an H.263 payload header of four bytes is + * present before actual compressed H.263 video bitstream in a packet. + * It allows fragmentation at GOB boundaries. In mode B, an eight byte + * H.263 payload header is used and each packet starts at MB boundaries + * without the PB-frames option. Finally, a twelve byte H.263 payload + * header is defined in mode C to support fragmentation at MB boundaries + * for frames that are coded with the PB-frames option. + */ if( rfc2190_version == 0x00) { col_append_str( pinfo->cinfo, COL_INFO, "MODE A "); - hdr_len = 4; + hdr_len = 4; } else if( rfc2190_version == 0x02) { col_append_str( pinfo->cinfo, COL_INFO, "MODE B "); - hdr_len = 8; + hdr_len = 8; } else if( rfc2190_version == 0x03) { col_append_str( pinfo->cinfo, COL_INFO, "MODE C "); - hdr_len = 12; + hdr_len = 12; } if ( tree ) { @@ -117,27 +117,27 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) rfc2190_tree = proto_item_add_subtree( ti, ett_rfc2190 ); /* FBIT 1st octet, 1 bit */ - proto_tree_add_item( rfc2190_tree, hf_rfc2190_ftype, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item( rfc2190_tree, hf_rfc2190_ftype, tvb, offset, 1, ENC_BIG_ENDIAN ); /* PBIT 1st octet, 1 bit */ - proto_tree_add_item( rfc2190_tree, hf_rfc2190_pbframes, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item( rfc2190_tree, hf_rfc2190_pbframes, tvb, offset, 1, ENC_BIG_ENDIAN ); /* SBIT 1st octet, 3 bits */ - proto_tree_add_item( rfc2190_tree, hf_rfc2190_sbit, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item( rfc2190_tree, hf_rfc2190_sbit, tvb, offset, 1, ENC_BIG_ENDIAN ); /* EBIT 1st octet, 3 bits */ - proto_tree_add_item( rfc2190_tree, hf_rfc2190_ebit, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item( rfc2190_tree, hf_rfc2190_ebit, tvb, offset, 1, ENC_BIG_ENDIAN ); offset++; /* SRC 2nd octet, 3 bits */ - proto_tree_add_item( rfc2190_tree, hf_rfc2190_srcformat, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item( rfc2190_tree, hf_rfc2190_srcformat, tvb, offset, 1, ENC_BIG_ENDIAN ); if(rfc2190_version == 0x00) { /* MODE A */ /* I flag, 1 bit */ - proto_tree_add_bits_item(rfc2190_tree, hf_rfc2190_picture_coding_type, tvb, (offset<<3)+3, 1, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(rfc2190_tree, hf_rfc2190_picture_coding_type, tvb, (offset<<3)+3, 1, ENC_BIG_ENDIAN); /* U flag, 1 bit */ - proto_tree_add_bits_item(rfc2190_tree, hf_rfc2190_unrestricted_motion_vector, tvb, (offset<<3)+4, 1, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(rfc2190_tree, hf_rfc2190_unrestricted_motion_vector, tvb, (offset<<3)+4, 1, ENC_BIG_ENDIAN); /* S flag, 1 bit */ - proto_tree_add_bits_item(rfc2190_tree, hf_rfc2190_syntax_based_arithmetic, tvb, (offset<<3)+5, 1, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(rfc2190_tree, hf_rfc2190_syntax_based_arithmetic, tvb, (offset<<3)+5, 1, ENC_BIG_ENDIAN); /* A flag, 1 bit */ - proto_tree_add_bits_item(rfc2190_tree, hf_rfc2190_advanced_prediction, tvb, (offset<<3)+6, 1, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(rfc2190_tree, hf_rfc2190_advanced_prediction, tvb, (offset<<3)+6, 1, ENC_BIG_ENDIAN); /* Reserved 2nd octect, 1 bit + 3rd octect 3 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_r, tvb, offset, 2, ( ( tvb_get_guint8( tvb, offset ) & 0x1 ) << 3 ) + ( ( tvb_get_guint8( tvb, offset + 1 ) & 0xe0 ) >> 5 ) ); @@ -145,9 +145,9 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) offset++; /* DBQ 3 octect, 2 bits */ - proto_tree_add_item( rfc2190_tree, hf_rfc2190_dbq, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item( rfc2190_tree, hf_rfc2190_dbq, tvb, offset, 1, ENC_BIG_ENDIAN ); /* TRB 3 octect, 3 bits */ - proto_tree_add_item( rfc2190_tree, hf_rfc2190_trb, tvb, offset, 1, ENC_BIG_ENDIAN ); + proto_tree_add_item( rfc2190_tree, hf_rfc2190_trb, tvb, offset, 1, ENC_BIG_ENDIAN ); offset++; /* TR 4 octect, 8 bits */ @@ -244,286 +244,296 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) void proto_reg_handoff_rfc2190(void) { - dissector_handle_t rfc2190_handle; + dissector_handle_t rfc2190_handle; - rfc2190_handle = find_dissector("rfc2190"); - dissector_add_uint("rtp.pt", PT_H263, rfc2190_handle); - dissector_add_uint("iax2.codec", AST_FORMAT_H263, rfc2190_handle); + rfc2190_handle = find_dissector("rfc2190"); + dissector_add_uint("rtp.pt", PT_H263, rfc2190_handle); + dissector_add_uint("iax2.codec", AST_FORMAT_H263, rfc2190_handle); - h263_handle = find_dissector("h263data"); + h263_handle = find_dissector("h263data"); } void proto_register_rfc2190(void) { - static hf_register_info hf[] = - { - { - &hf_rfc2190_ftype, - { - "F", - "rfc2190.ftype", - FT_BOOLEAN, - 8, - NULL, - 0x80, - "Indicates the mode of the payload header (MODE A or B/C)", HFILL - } - }, - { - &hf_rfc2190_pbframes, - { - "p/b frame", - "rfc2190.pbframes", - FT_BOOLEAN, - 8, - NULL, - 0x40, - "Optional PB-frames mode as defined by H.263 (MODE C)", HFILL - } - }, - { - &hf_rfc2190_sbit, - { - "Start bit position", - "rfc2190.sbit", - FT_UINT8, - BASE_DEC, - NULL, - 0x38, - "Start bit position specifies number of most significant bits that shall be ignored in the first data byte.", HFILL - } - }, - { - &hf_rfc2190_ebit, - { - "End bit position", - "rfc2190.ebit", - FT_UINT8, - BASE_DEC, - NULL, - 0x7, - "End bit position specifies number of least significant bits that shall be ignored in the last data byte.", HFILL - } - }, - { - &hf_rfc2190_srcformat, - { - "SRC format", - "rfc2190.srcformat", - FT_UINT8, - BASE_DEC, - VALS(h263_srcformat_vals), - 0xe0, - "Source format specifies the resolution of the current picture.", HFILL - } - }, - { - &hf_rfc2190_picture_coding_type, - { - "Inter-coded frame", - "rfc2190.picture_coding_type", - FT_BOOLEAN, - 8, - NULL, - 0x0, - "Picture coding type, intra-coded (false) or inter-coded (true)", HFILL - } - }, - { - &hf_rfc2190_unrestricted_motion_vector, - { - "Motion vector", - "rfc2190.unrestricted_motion_vector", - FT_BOOLEAN, - 8, - NULL, - 0x0, - "Unrestricted Motion Vector option for current picture", HFILL - } - }, - { - &hf_rfc2190_syntax_based_arithmetic, - { - "Syntax-based arithmetic coding", - "rfc2190.syntax_based_arithmetic", - FT_BOOLEAN, - 8, - NULL, - 0x0, - "Syntax-based Arithmetic Coding option for current picture", HFILL - } - }, - { - &hf_rfc2190_advanced_prediction, - { - "Advanced prediction option", - "rfc2190.advanced_prediction", - FT_BOOLEAN, - 8, - NULL, - 0x0, - "Advanced Prediction option for current picture", HFILL - } - }, - { - &hf_rfc2190_dbq, - { - "Differential quantization parameter", - "rfc2190.dbq", - FT_UINT8, - BASE_DEC, - NULL, - 0x18, - "Differential quantization parameter used to calculate quantizer for the B frame based on quantizer for the P frame, when PB-frames option is used.", HFILL - } - }, - { - &hf_rfc2190_trb, - { - "Temporal Reference for B frames", - "rfc2190.trb", - FT_UINT8, - BASE_DEC, - NULL, - 0x07, - "Temporal Reference for the B frame as defined by H.263", HFILL - } - }, - { - &hf_rfc2190_tr, - { - "Temporal Reference for P frames", - "rfc2190.tr", - FT_UINT8, - BASE_DEC, - NULL, - 0x0, - "Temporal Reference for the P frame as defined by H.263", HFILL - } - }, - { - &hf_rfc2190_quant, - { - "Quantizer", - "rfc2190.quant", - FT_UINT8, - BASE_DEC, - NULL, - 0x0, - "Quantization value for the first MB coded at the starting of the packet.", HFILL - } - }, - { - &hf_rfc2190_gobn, - { - "GOB Number", - "rfc2190.gobn", - FT_UINT8, - BASE_DEC, - NULL, - 0x0, - "GOB number in effect at the start of the packet.", HFILL - } - }, - { - &hf_rfc2190_mba, - { - "Macroblock address", - "rfc2190.mba", - FT_UINT16, - BASE_DEC, - NULL, - 0x0, - "The address within the GOB of the first MB in the packet, counting from zero in scan order.", HFILL - } - }, - { - &hf_rfc2190_hmv1, - { - "Horizontal motion vector 1", - "rfc2190.hmv1", - FT_UINT8, - BASE_DEC, - NULL, - 0x0, - "Horizontal motion vector predictor for the first MB in this packet", HFILL - } - }, - { - &hf_rfc2190_vmv1, - { - "Vertical motion vector 1", - "rfc2190.vmv1", - FT_UINT8, - BASE_DEC, - NULL, - 0x0, - "Vertical motion vector predictor for the first MB in this packet", HFILL - } - }, - { - &hf_rfc2190_hmv2, - { - "Horizontal motion vector 2", - "rfc2190.hmv2", - FT_UINT8, - BASE_DEC, - NULL, - 0x0, - "Horizontal motion vector predictor for block number 3 in the first MB in this packet when four motion vectors are used with the advanced prediction option.", HFILL - } - }, - { - &hf_rfc2190_vmv2, - { - "Vertical motion vector 2", - "rfc2190.vmv2", - FT_UINT8, - BASE_DEC, - NULL, - 0x0, - "Vertical motion vector predictor for block number 3 in the first MB in this packet when four motion vectors are used with the advanced prediction option.", HFILL - } - }, - { - &hf_rfc2190_r, - { - "Reserved field", - "rfc2190.r", - FT_UINT8, - BASE_DEC, - NULL, - 0x0, - "Reserved field that should contain zeroes", HFILL - } - }, - { - &hf_rfc2190_rr, - { - "Reserved field 2", - "rfc2190.rr", - FT_UINT16, - BASE_DEC, - NULL, - 0x0, - "Reserved field that should contain zeroes", HFILL - } - }, - }; - - static gint *ett[] = - { - &ett_rfc2190, - }; - - proto_register_subtree_array(ett, array_length(ett)); - - proto_rfc2190 = proto_register_protocol("H.263 RTP Payload header (RFC2190)", - "RFC2190", "rfc2190"); - - proto_register_field_array(proto_rfc2190, hf, array_length(hf)); - register_dissector("rfc2190", dissect_rfc2190, proto_rfc2190); + static hf_register_info hf[] = { + { + &hf_rfc2190_ftype, + { + "F", + "rfc2190.ftype", + FT_BOOLEAN, + 8, + NULL, + 0x80, + "Indicates the mode of the payload header (MODE A or B/C)", HFILL + } + }, + { + &hf_rfc2190_pbframes, + { + "p/b frame", + "rfc2190.pbframes", + FT_BOOLEAN, + 8, + NULL, + 0x40, + "Optional PB-frames mode as defined by H.263 (MODE C)", HFILL + } + }, + { + &hf_rfc2190_sbit, + { + "Start bit position", + "rfc2190.sbit", + FT_UINT8, + BASE_DEC, + NULL, + 0x38, + "Start bit position specifies number of most significant bits that shall be ignored in the first data byte.", HFILL + } + }, + { + &hf_rfc2190_ebit, + { + "End bit position", + "rfc2190.ebit", + FT_UINT8, + BASE_DEC, + NULL, + 0x7, + "End bit position specifies number of least significant bits that shall be ignored in the last data byte.", HFILL + } + }, + { + &hf_rfc2190_srcformat, + { + "SRC format", + "rfc2190.srcformat", + FT_UINT8, + BASE_DEC, + VALS(h263_srcformat_vals), + 0xe0, + "Source format specifies the resolution of the current picture.", HFILL + } + }, + { + &hf_rfc2190_picture_coding_type, + { + "Inter-coded frame", + "rfc2190.picture_coding_type", + FT_BOOLEAN, + 8, + NULL, + 0x0, + "Picture coding type, intra-coded (false) or inter-coded (true)", HFILL + } + }, + { + &hf_rfc2190_unrestricted_motion_vector, + { + "Motion vector", + "rfc2190.unrestricted_motion_vector", + FT_BOOLEAN, + 8, + NULL, + 0x0, + "Unrestricted Motion Vector option for current picture", HFILL + } + }, + { + &hf_rfc2190_syntax_based_arithmetic, + { + "Syntax-based arithmetic coding", + "rfc2190.syntax_based_arithmetic", + FT_BOOLEAN, + 8, + NULL, + 0x0, + "Syntax-based Arithmetic Coding option for current picture", HFILL + } + }, + { + &hf_rfc2190_advanced_prediction, + { + "Advanced prediction option", + "rfc2190.advanced_prediction", + FT_BOOLEAN, + 8, + NULL, + 0x0, + "Advanced Prediction option for current picture", HFILL + } + }, + { + &hf_rfc2190_dbq, + { + "Differential quantization parameter", + "rfc2190.dbq", + FT_UINT8, + BASE_DEC, + NULL, + 0x18, + "Differential quantization parameter used to calculate quantizer for the B frame based on quantizer for the P frame, when PB-frames option is used.", HFILL + } + }, + { + &hf_rfc2190_trb, + { + "Temporal Reference for B frames", + "rfc2190.trb", + FT_UINT8, + BASE_DEC, + NULL, + 0x07, + "Temporal Reference for the B frame as defined by H.263", HFILL + } + }, + { + &hf_rfc2190_tr, + { + "Temporal Reference for P frames", + "rfc2190.tr", + FT_UINT8, + BASE_DEC, + NULL, + 0x0, + "Temporal Reference for the P frame as defined by H.263", HFILL + } + }, + { + &hf_rfc2190_quant, + { + "Quantizer", + "rfc2190.quant", + FT_UINT8, + BASE_DEC, + NULL, + 0x0, + "Quantization value for the first MB coded at the starting of the packet.", HFILL + } + }, + { + &hf_rfc2190_gobn, + { + "GOB Number", + "rfc2190.gobn", + FT_UINT8, + BASE_DEC, + NULL, + 0x0, + "GOB number in effect at the start of the packet.", HFILL + } + }, + { + &hf_rfc2190_mba, + { + "Macroblock address", + "rfc2190.mba", + FT_UINT16, + BASE_DEC, + NULL, + 0x0, + "The address within the GOB of the first MB in the packet, counting from zero in scan order.", HFILL + } + }, + { + &hf_rfc2190_hmv1, + { + "Horizontal motion vector 1", + "rfc2190.hmv1", + FT_UINT8, + BASE_DEC, + NULL, + 0x0, + "Horizontal motion vector predictor for the first MB in this packet", HFILL + } + }, + { + &hf_rfc2190_vmv1, + { + "Vertical motion vector 1", + "rfc2190.vmv1", + FT_UINT8, + BASE_DEC, + NULL, + 0x0, + "Vertical motion vector predictor for the first MB in this packet", HFILL + } + }, + { + &hf_rfc2190_hmv2, + { + "Horizontal motion vector 2", + "rfc2190.hmv2", + FT_UINT8, + BASE_DEC, + NULL, + 0x0, + "Horizontal motion vector predictor for block number 3 in the first MB in this packet when four motion vectors are used with the advanced prediction option.", HFILL + } + }, + { + &hf_rfc2190_vmv2, + { + "Vertical motion vector 2", + "rfc2190.vmv2", + FT_UINT8, + BASE_DEC, + NULL, + 0x0, + "Vertical motion vector predictor for block number 3 in the first MB in this packet when four motion vectors are used with the advanced prediction option.", HFILL + } + }, + { + &hf_rfc2190_r, + { + "Reserved field", + "rfc2190.r", + FT_UINT8, + BASE_DEC, + NULL, + 0x0, + "Reserved field that should contain zeroes", HFILL + } + }, + { + &hf_rfc2190_rr, + { + "Reserved field 2", + "rfc2190.rr", + FT_UINT16, + BASE_DEC, + NULL, + 0x0, + "Reserved field that should contain zeroes", HFILL + } + }, + }; + + static gint *ett[] = { + &ett_rfc2190, + }; + + proto_register_subtree_array(ett, array_length(ett)); + + proto_rfc2190 = proto_register_protocol("H.263 RTP Payload header (RFC2190)", + "RFC2190", "rfc2190"); + + proto_register_field_array(proto_rfc2190, hf, array_length(hf)); + register_dissector("rfc2190", dissect_rfc2190, proto_rfc2190); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-rquota.c b/epan/dissectors/packet-rquota.c index 853b1a4cca..f4472d3cf4 100644 --- a/epan/dissectors/packet-rquota.c +++ b/epan/dissectors/packet-rquota.c @@ -300,5 +300,15 @@ proto_reg_handoff_rquota(void) rpc_init_proc_table(RQUOTA_PROGRAM, 2, rquota2_proc, hf_rquota_procedure_v2); } - - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-rwall.c b/epan/dissectors/packet-rwall.c index bc6456f58f..6c1a5fd41f 100644 --- a/epan/dissectors/packet-rwall.c +++ b/epan/dissectors/packet-rwall.c @@ -93,4 +93,15 @@ proto_reg_handoff_rwall(void) rpc_init_proc_table(RWALL_PROGRAM, 1, rwall1_proc, hfi_rwall_procedure_v1.id); } - +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-sccpmg.c b/epan/dissectors/packet-sccpmg.c index 0f604854a0..30baed62b5 100644 --- a/epan/dissectors/packet-sccpmg.c +++ b/epan/dissectors/packet-sccpmg.c @@ -58,29 +58,29 @@ void proto_reg_handoff_sccpmg(void); /* Same as below but with names typed out */ static const value_string sccpmg_message_type_values[] = { - { SCCPMG_MESSAGE_TYPE_SSA, "SubSystem Allowed" }, - { SCCPMG_MESSAGE_TYPE_SSP, "SubSystem Prohibited" }, - { SCCPMG_MESSAGE_TYPE_SST, "Subsystem Status Test" }, - { SCCPMG_MESSAGE_TYPE_SOR, "Subsystem Out of service Request" }, - { SCCPMG_MESSAGE_TYPE_SOG, "Subsystem Out of service Grant" }, - { SCCPMG_MESSAGE_TYPE_SSC, "SubSystem Congested (ITU)" }, - { SCCPMG_MESSAGE_TYPE_SBR, "Subsystem Backup Routing (ANSI)" }, - { SCCPMG_MESSAGE_TYPE_SNR, "Subsystem Normal Routing (ANSI)" }, - { SCCPMG_MESSAGE_TYPE_SRT, "Subsystem Routing status Test (ANSI)" }, - { 0, NULL } }; + { SCCPMG_MESSAGE_TYPE_SSA, "SubSystem Allowed" }, + { SCCPMG_MESSAGE_TYPE_SSP, "SubSystem Prohibited" }, + { SCCPMG_MESSAGE_TYPE_SST, "Subsystem Status Test" }, + { SCCPMG_MESSAGE_TYPE_SOR, "Subsystem Out of service Request" }, + { SCCPMG_MESSAGE_TYPE_SOG, "Subsystem Out of service Grant" }, + { SCCPMG_MESSAGE_TYPE_SSC, "SubSystem Congested (ITU)" }, + { SCCPMG_MESSAGE_TYPE_SBR, "Subsystem Backup Routing (ANSI)" }, + { SCCPMG_MESSAGE_TYPE_SNR, "Subsystem Normal Routing (ANSI)" }, + { SCCPMG_MESSAGE_TYPE_SRT, "Subsystem Routing status Test (ANSI)" }, + { 0, NULL } }; /* Same as above but in acronym for (for the Info column) */ static const value_string sccpmg_message_type_acro_values[] = { - { SCCPMG_MESSAGE_TYPE_SSA, "SSA" }, - { SCCPMG_MESSAGE_TYPE_SSP, "SSP" }, - { SCCPMG_MESSAGE_TYPE_SST, "SST" }, - { SCCPMG_MESSAGE_TYPE_SOR, "SOR" }, - { SCCPMG_MESSAGE_TYPE_SOG, "SOG" }, - { SCCPMG_MESSAGE_TYPE_SSC, "SSC" }, - { SCCPMG_MESSAGE_TYPE_SBR, "SBR" }, - { SCCPMG_MESSAGE_TYPE_SNR, "SNR" }, - { SCCPMG_MESSAGE_TYPE_SRT, "SRT" }, - { 0, NULL } }; + { SCCPMG_MESSAGE_TYPE_SSA, "SSA" }, + { SCCPMG_MESSAGE_TYPE_SSP, "SSP" }, + { SCCPMG_MESSAGE_TYPE_SST, "SST" }, + { SCCPMG_MESSAGE_TYPE_SOR, "SOR" }, + { SCCPMG_MESSAGE_TYPE_SOG, "SOG" }, + { SCCPMG_MESSAGE_TYPE_SSC, "SSC" }, + { SCCPMG_MESSAGE_TYPE_SBR, "SBR" }, + { SCCPMG_MESSAGE_TYPE_SNR, "SNR" }, + { SCCPMG_MESSAGE_TYPE_SRT, "SRT" }, + { 0, NULL } }; #define SCCPMG_MESSAGE_TYPE_OFFSET 0 @@ -363,3 +363,15 @@ proto_reg_handoff_sccpmg(void) dissector_add_uint("sccp.ssn", SCCPMG_SSN, sccpmg_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-sgsap.c b/epan/dissectors/packet-sgsap.c index 80d3cf5e89..0bc1abcb54 100644 --- a/epan/dissectors/packet-sgsap.c +++ b/epan/dissectors/packet-sgsap.c @@ -1128,7 +1128,7 @@ sgsap_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 O TLV 6-10 */ ELEM_OPT_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); @@ -1170,7 +1170,7 @@ sgsap_ue_act_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 M TLV 6-10 */ ELEM_MAND_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); @@ -1189,7 +1189,7 @@ sgsap_ue_unreachable(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 M TLV 6-10 */ @@ -1210,7 +1210,7 @@ sgsap_ue_ul_unitdata(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 M TLV 6-10 */ ELEM_MAND_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); @@ -1240,7 +1240,7 @@ sgsap_release_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 M TLV 6-10 */ ELEM_MAND_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); @@ -1397,7 +1397,7 @@ dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint8 oct; /* Save pinfo */ - len = tvb_length(tvb); + len = tvb_length(tvb); /* Make entry in the Protocol column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME); @@ -1447,7 +1447,7 @@ dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) void proto_register_sgsap(void) { guint i; guint last_offset; - module_t *sgsap_module; + module_t *sgsap_module; /* List of fields */ @@ -1568,7 +1568,7 @@ void proto_register_sgsap(void) { /* Set default SCTP ports */ range_convert_str(&global_sgsap_port_range, SGSAP_SCTP_PORT_RANGE, MAX_SCTP_PORT); - sgsap_module = prefs_register_protocol(proto_sgsap, proto_reg_handoff_sgsap); + sgsap_module = prefs_register_protocol(proto_sgsap, proto_reg_handoff_sgsap); prefs_register_range_preference(sgsap_module, "sctp_ports", "SGsAP SCTP port numbers", @@ -1602,3 +1602,15 @@ proto_reg_handoff_sgsap(void) dissector_add_uint_range("sctp.port", sgsap_port_range, sgsap_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-skype.c b/epan/dissectors/packet-skype.c index d7c24b0016..8ee2c4a2d4 100644 --- a/epan/dissectors/packet-skype.c +++ b/epan/dissectors/packet-skype.c @@ -457,3 +457,15 @@ proto_reg_handoff_skype(void) } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-spray.c b/epan/dissectors/packet-spray.c index 010f18eb25..f205319f50 100644 --- a/epan/dissectors/packet-spray.c +++ b/epan/dissectors/packet-spray.c @@ -143,3 +143,15 @@ proto_reg_handoff_spray(void) rpc_init_proc_table(SPRAY_PROGRAM, 1, spray1_proc, hf_spray_procedure_v1); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-tali.c b/epan/dissectors/packet-tali.c index 390ed562aa..2420e3d3f5 100644 --- a/epan/dissectors/packet-tali.c +++ b/epan/dissectors/packet-tali.c @@ -72,14 +72,14 @@ static header_field_info *hfi_tali = NULL; #define TALI_HFI_INIT HFI_INIT(proto_tali) /* Initialize the protocol and registered fields */ -static header_field_info hfi_tali_sync_indicator TALI_HFI_INIT = - { "Sync", "tali.sync", FT_STRING, BASE_NONE, NULL, 0x00, "TALI SYNC", HFILL }; +static header_field_info hfi_tali_sync_indicator TALI_HFI_INIT = { + "Sync", "tali.sync", FT_STRING, BASE_NONE, NULL, 0x00, "TALI SYNC", HFILL }; -static header_field_info hfi_tali_opcode_indicator TALI_HFI_INIT = - { "Opcode", "tali.opcode", FT_STRING, BASE_NONE, NULL, 0x00, "TALI Operation Code", HFILL }; +static header_field_info hfi_tali_opcode_indicator TALI_HFI_INIT = { + "Opcode", "tali.opcode", FT_STRING, BASE_NONE, NULL, 0x00, "TALI Operation Code", HFILL }; -static header_field_info hfi_tali_length_indicator TALI_HFI_INIT = - { "Length", "tali.msu_length", FT_UINT16, BASE_DEC, NULL, 0x00, "TALI MSU Length", HFILL }; +static header_field_info hfi_tali_length_indicator TALI_HFI_INIT = { + "Length", "tali.msu_length", FT_UINT16, BASE_DEC, NULL, 0x00, "TALI MSU Length", HFILL }; static dissector_table_t tali_dissector_table; @@ -150,15 +150,15 @@ dissect_tali(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) * A 'heuristic dissector' that attemtps to establish whether we have * a TALI MSU here. * Only works when: - * the fixed header is there - * it is a 'well-known' operation + * the fixed header is there + * it is a 'well-known' operation */ static gboolean dissect_tali_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { char opcode[TALI_OPCODE_LENGTH]; /* TALI opcode */ - if (tvb_reported_length(tvb) < TALI_HEADER_LENGTH) /* Mandatory header */ + if (tvb_reported_length(tvb) < TALI_HEADER_LENGTH) /* Mandatory header */ return FALSE; if (tvb_strneql(tvb, 0, TALI_SYNC, TALI_SYNC_LENGTH) != 0) @@ -217,9 +217,9 @@ proto_register_tali(void) tali_module = prefs_register_protocol(proto_tali, NULL); prefs_register_bool_preference(tali_module, "reassemble", - "Reassemble TALI messages spanning multiple TCP segments", - "Whether the TALI dissector should reassemble messages spanning multiple TCP segments." - " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", + "Reassemble TALI messages spanning multiple TCP segments", + "Whether the TALI dissector should reassemble messages spanning multiple TCP segments." + " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &tali_desegment); } @@ -231,3 +231,15 @@ proto_reg_handoff_tali(void) data_handle = find_dissector("data"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-tapa.c b/epan/dissectors/packet-tapa.c index c646f8d6b2..dd8e3ac21a 100644 --- a/epan/dissectors/packet-tapa.c +++ b/epan/dissectors/packet-tapa.c @@ -467,16 +467,16 @@ dissect_tapa_static(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d static gboolean dissect_tapa_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { - ws_ip* iph = (ws_ip*)data; + ws_ip *iph = (ws_ip*)data; - /* The TAPA protocol also uses IP protocol number 4 but it isn't really IPIP */ - if (iph && (iph->ip_p == IP_PROTO_IPIP) && ((tvb_get_guint8(tvb, 0) & 0xF0) != 0x40) && - (tvb_get_ntohs(tvb, 2)) < 20) { - dissect_tapa_static(tvb, pinfo, tree, data); - return TRUE; - } + /* The TAPA protocol also uses IP protocol number 4 but it isn't really IPIP */ + if (iph && (iph->ip_p == IP_PROTO_IPIP) && ((tvb_get_guint8(tvb, 0) & 0xF0) != 0x40) && + (tvb_get_ntohs(tvb, 2)) < 20) { + dissect_tapa_static(tvb, pinfo, tree, data); + return TRUE; + } - return FALSE; + return FALSE; } void @@ -484,137 +484,137 @@ proto_register_tapa(void) { static hf_register_info hf[] = { - /* TAPA discover header */ + /* TAPA discover header */ { &hf_tapa_discover_type, - { "Type", "tapa.discover.type", FT_UINT8, BASE_DEC, VALS(tapa_discover_type_vals), - 0x0, NULL, HFILL }}, + { "Type", "tapa.discover.type", FT_UINT8, BASE_DEC, VALS(tapa_discover_type_vals), + 0x0, NULL, HFILL }}, { &hf_tapa_discover_flags, - { "Flags", "tapa.discover.flags", FT_UINT8, BASE_HEX, NULL, - 0x0, NULL, HFILL }}, + { "Flags", "tapa.discover.flags", FT_UINT8, BASE_HEX, NULL, + 0x0, NULL, HFILL }}, { &hf_tapa_discover_length, - { "Length", "tapa.discover.length", FT_UINT16, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "Length", "tapa.discover.length", FT_UINT16, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - /* TAPA discover request */ + /* TAPA discover request */ { &hf_tapa_discover_req_type, - { "Req type", "tapa.discover.req.type", FT_UINT8, BASE_DEC, VALS(tapa_discover_request_vals), - 0x0, NULL, HFILL }}, + { "Req type", "tapa.discover.req.type", FT_UINT8, BASE_DEC, VALS(tapa_discover_request_vals), + 0x0, NULL, HFILL }}, { &hf_tapa_discover_req_pad, - { "Req padding", "tapa.discover.req.pad", FT_UINT8, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "Req padding", "tapa.discover.req.pad", FT_UINT8, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, { &hf_tapa_discover_req_length, - { "Req length", "tapa.discover.req.length", FT_UINT16, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "Req length", "tapa.discover.req.length", FT_UINT16, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_tapa_discover_req_value, - { "Req value", "tapa.discover.req.value", FT_BYTES, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_discover_req_value, + { "Req value", "tapa.discover.req.value", FT_BYTES, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - /* TAPA discover reply */ - { &hf_tapa_discover_reply_switchip, - { "Switch Ip", "tapa.discover.reply.switchip", FT_IPv4, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + /* TAPA discover reply */ + { &hf_tapa_discover_reply_switchip, + { "Switch Ip", "tapa.discover.reply.switchip", FT_IPv4, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, { &hf_tapa_discover_reply_unused, - { "Reply unused", "tapa.discover.reply.unused", FT_UINT8, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "Reply unused", "tapa.discover.reply.unused", FT_UINT8, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, { &hf_tapa_discover_reply_bias, - { "Reply bias", "tapa.discover.reply.bias", FT_UINT8, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "Reply bias", "tapa.discover.reply.bias", FT_UINT8, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_tapa_discover_reply_pad, - { "Reply pad", "tapa.discover.reply.pad", FT_BYTES, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_discover_reply_pad, + { "Reply pad", "tapa.discover.reply.pad", FT_BYTES, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - /* TAPA discover new request/reply tlv */ + /* TAPA discover new request/reply tlv */ { &hf_tapa_discover_newtlv_type, - { "New tlv type", "tapa.discover.newtlv.type", FT_UINT8, BASE_DEC, VALS(tapa_discover_request_vals), - 0x0, NULL, HFILL }}, + { "New tlv type", "tapa.discover.newtlv.type", FT_UINT8, BASE_DEC, VALS(tapa_discover_request_vals), + 0x0, NULL, HFILL }}, { &hf_tapa_discover_newtlv_pad, - { "New tlv padding", "tapa.discover.newtlv.pad", FT_UINT8, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "New tlv padding", "tapa.discover.newtlv.pad", FT_UINT8, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, { &hf_tapa_discover_newtlv_length, - { "New tlv length", "tapa.discover.newtlv.length", FT_UINT16, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "New tlv length", "tapa.discover.newtlv.length", FT_UINT16, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_tapa_discover_newtlv_valuetext, - { "New tlv value", "tapa.discover.newtlv.valuetext", FT_STRING, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_discover_newtlv_valuetext, + { "New tlv value", "tapa.discover.newtlv.valuetext", FT_STRING, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - { &hf_tapa_discover_newtlv_valuehex, - { "New tlv value", "tapa.discover.newtlv.valuehex", FT_BYTES, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_discover_newtlv_valuehex, + { "New tlv value", "tapa.discover.newtlv.valuehex", FT_BYTES, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - /* TAPA discover unknown packet */ - { &hf_tapa_discover_unknown, - { "Tapa unknown packet", "tapa.discover.unknown", FT_BYTES, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + /* TAPA discover unknown packet */ + { &hf_tapa_discover_unknown, + { "Tapa unknown packet", "tapa.discover.unknown", FT_BYTES, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - /* TAPA tunnel */ - { &hf_tapa_tunnel_version, - { "Tapa tunnel version", "tapa.tunnel.version", FT_UINT8, BASE_HEX, NULL, - 0xF0, NULL, HFILL }}, + /* TAPA tunnel */ + { &hf_tapa_tunnel_version, + { "Tapa tunnel version", "tapa.tunnel.version", FT_UINT8, BASE_HEX, NULL, + 0xF0, NULL, HFILL }}, - { &hf_tapa_tunnel_five, - { "Tapa tunnel five", "tapa.tunnel.five", FT_UINT8, BASE_HEX, NULL, - 0x0F, NULL, HFILL }}, + { &hf_tapa_tunnel_five, + { "Tapa tunnel five", "tapa.tunnel.five", FT_UINT8, BASE_HEX, NULL, + 0x0F, NULL, HFILL }}, - { &hf_tapa_tunnel_type, - { "Tapa tunnel type", "tapa.tunnel.type", FT_UINT8, BASE_HEX, VALS(tapa_tunnel_type_vals), - 0x0, NULL, HFILL }}, + { &hf_tapa_tunnel_type, + { "Tapa tunnel type", "tapa.tunnel.type", FT_UINT8, BASE_HEX, VALS(tapa_tunnel_type_vals), + 0x0, NULL, HFILL }}, - { &hf_tapa_tunnel_zero, - { "Tapa tunnel zeroes", "tapa.tunnel.zero", FT_BYTES, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_tunnel_zero, + { "Tapa tunnel zeroes", "tapa.tunnel.zero", FT_BYTES, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - { &hf_tapa_tunnel_dmac, - { "Tapa tunnel dest mac", "tapa.tunnel.dmac", FT_ETHER, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_tunnel_dmac, + { "Tapa tunnel dest mac", "tapa.tunnel.dmac", FT_ETHER, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - { &hf_tapa_tunnel_smac, - { "Tapa tunnel src mac", "tapa.tunnel.smac", FT_ETHER, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_tunnel_smac, + { "Tapa tunnel src mac", "tapa.tunnel.smac", FT_ETHER, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - /* TAPA tunnel type 0 */ - { &hf_tapa_tunnel_0804, - { "Tapa tunnel 0804", "tapa.tunnel.0804", FT_UINT16, BASE_HEX, NULL, - 0x0, NULL, HFILL }}, + /* TAPA tunnel type 0 */ + { &hf_tapa_tunnel_0804, + { "Tapa tunnel 0804", "tapa.tunnel.0804", FT_UINT16, BASE_HEX, NULL, + 0x0, NULL, HFILL }}, - { &hf_tapa_tunnel_tagsetc, - { "Tapa tunnel tags, seqno, pad", "tapa.tunnel.tags", FT_BYTES, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_tunnel_tagsetc, + { "Tapa tunnel tags, seqno, pad", "tapa.tunnel.tags", FT_BYTES, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - /* TAPA tunnel type 1 */ - { &hf_tapa_tunnel_seqno, - { "Tapa tunnel seqno", "tapa.tunnel.seqno", FT_UINT16, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + /* TAPA tunnel type 1 */ + { &hf_tapa_tunnel_seqno, + { "Tapa tunnel seqno", "tapa.tunnel.seqno", FT_UINT16, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_tapa_tunnel_length, - { "Tapa tunnel length", "tapa.tunnel.length", FT_UINT16, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { &hf_tapa_tunnel_length, + { "Tapa tunnel length", "tapa.tunnel.length", FT_UINT16, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - /* TAPA tunnel remaining stuff */ - { &hf_tapa_tunnel_remaining, - { "Tapa tunnel all data", "tapa.tunnel.remaining", FT_BYTES, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + /* TAPA tunnel remaining stuff */ + { &hf_tapa_tunnel_remaining, + { "Tapa tunnel all data", "tapa.tunnel.remaining", FT_BYTES, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - }; + }; static gint *ett[] = { &ett_tapa_discover, &ett_tapa_discover_req, &ett_tapa_tunnel, }; - proto_tapa = proto_register_protocol(PROTO_LONG_NAME, PROTO_SHORT_NAME, "tapa"); - proto_register_field_array(proto_tapa, hf, array_length(hf)); + proto_tapa = proto_register_protocol(PROTO_LONG_NAME, PROTO_SHORT_NAME, "tapa"); + proto_register_field_array(proto_tapa, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); new_register_dissector("tapa", dissect_tapa_static, proto_tapa); @@ -628,6 +628,18 @@ proto_reg_handoff_tapa(void) tapa_handle = find_dissector("tapa"); dissector_add_uint("udp.port", PORT_TAPA, tapa_handle); - heur_dissector_add( "ip", dissect_tapa_heur, proto_tapa); + heur_dissector_add( "ip", dissect_tapa_heur, proto_tapa); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-teredo.c b/epan/dissectors/packet-teredo.c index 1ae394d8c9..f4d211a664 100644 --- a/epan/dissectors/packet-teredo.c +++ b/epan/dissectors/packet-teredo.c @@ -423,3 +423,15 @@ proto_reg_handoff_teredo(void) heur_dissector_add("udp", dissect_teredo_heur, proto_teredo); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-tsp.c b/epan/dissectors/packet-tsp.c index a7f830a5cc..6f62dfb08d 100644 --- a/epan/dissectors/packet-tsp.c +++ b/epan/dissectors/packet-tsp.c @@ -175,43 +175,55 @@ proto_reg_handoff_tsp(void) void proto_register_tsp(void) { - static hf_register_info hf[] = { - { &hf_tsp_type, - { "Type", "tsp.type", - FT_UINT8, BASE_DEC, VALS(names_tsp_type), 0x0, - "Packet Type", HFILL }}, - { &hf_tsp_vers, - { "Version", "tsp.version", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Protocol Version Number", HFILL }}, - { &hf_tsp_seq, - { "Sequence", "tsp.sequence", - FT_UINT16, BASE_DEC, NULL, 0x0, - "Sequence Number", HFILL }}, - { &hf_tsp_hopcnt, - { "Hop Count", "tsp.hopcnt", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_tsp_time_sec, - { "Seconds", "tsp.sec", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_tsp_time_usec, - { "Microseconds", "tsp.usec", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_tsp_name, - { "Machine Name", "tsp.name", - FT_STRINGZ, BASE_NONE, NULL, 0x0, - "Sender Machine Name", HFILL }} - }; + static hf_register_info hf[] = { + { &hf_tsp_type, + { "Type", "tsp.type", + FT_UINT8, BASE_DEC, VALS(names_tsp_type), 0x0, + "Packet Type", HFILL }}, + { &hf_tsp_vers, + { "Version", "tsp.version", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Protocol Version Number", HFILL }}, + { &hf_tsp_seq, + { "Sequence", "tsp.sequence", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Sequence Number", HFILL }}, + { &hf_tsp_hopcnt, + { "Hop Count", "tsp.hopcnt", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_tsp_time_sec, + { "Seconds", "tsp.sec", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_tsp_time_usec, + { "Microseconds", "tsp.usec", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_tsp_name, + { "Machine Name", "tsp.name", + FT_STRINGZ, BASE_NONE, NULL, 0x0, + "Sender Machine Name", HFILL }} + }; static gint *ett[] = { &ett_tsp }; proto_tsp = proto_register_protocol("Time Synchronization Protocol", - "TSP", "tsp"); + "TSP", "tsp"); proto_register_field_array(proto_tsp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-turbocell.c b/epan/dissectors/packet-turbocell.c index 8fd0947652..3ef1e5fc55 100644 --- a/epan/dissectors/packet-turbocell.c +++ b/epan/dissectors/packet-turbocell.c @@ -43,7 +43,7 @@ #include <epan/oui.h> #define TURBOCELL_TYPE_BEACON_NON_POLLING 0x00 -#define TURBOCELL_TYPE_BEACON_NORMAL 0x40 +#define TURBOCELL_TYPE_BEACON_NORMAL 0x40 #define TURBOCELL_TYPE_BEACON_POLLING 0x80 #define TURBOCELL_TYPE_BEACON_ISP 0xA0 @@ -168,77 +168,77 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre } - remaining_length=tvb_length_remaining(tvb, 0x14); + remaining_length=tvb_length_remaining(tvb, 0x14); - if (remaining_length > 6) { + if (remaining_length > 6) { - /* If the first character is a printable character that means we have a payload with network info */ - /* I couldn't find anything in the header that would definitvely indicate if payload is either data or network info */ - /* Since the frame size is limited this should work ok */ + /* If the first character is a printable character that means we have a payload with network info */ + /* I couldn't find anything in the header that would definitvely indicate if payload is either data or network info */ + /* Since the frame size is limited this should work ok */ - if (tvb_get_guint8(tvb, 0x14)>=0x20){ - name_item = proto_tree_add_item(turbocell_tree, hf_turbocell_name, tvb, 0x14, 30, ENC_ASCII|ENC_NA); - network_tree = proto_item_add_subtree(name_item, ett_network); + if (tvb_get_guint8(tvb, 0x14)>=0x20){ + name_item = proto_tree_add_item(turbocell_tree, hf_turbocell_name, tvb, 0x14, 30, ENC_ASCII|ENC_NA); + network_tree = proto_item_add_subtree(name_item, ett_network); - str_name=tvb_get_stringz_enc(wmem_packet_scope(), tvb, 0x14, &str_len, ENC_ASCII); - col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"",format_text(str_name, str_len-1)); + str_name=tvb_get_stringz_enc(wmem_packet_scope(), tvb, 0x14, &str_len, ENC_ASCII); + col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"",format_text(str_name, str_len-1)); - while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) { - proto_tree_add_item(network_tree, hf_turbocell_station[i], tvb, 0x34+8*i, 6, ENC_NA); - i++; - } + while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) { + proto_tree_add_item(network_tree, hf_turbocell_station[i], tvb, 0x34+8*i, 6, ENC_NA); + i++; + } - /*Couldn't make sense of the apparently random data in the end*/ + /*Couldn't make sense of the apparently random data in the end*/ - next_tvb = tvb_new_subset_remaining(tvb, 0x34 + 8*i); - call_dissector(data_handle, next_tvb, pinfo, tree); + next_tvb = tvb_new_subset_remaining(tvb, 0x34 + 8*i); + call_dissector(data_handle, next_tvb, pinfo, tree); - } else { - - tvbuff_t *volatile msdu_tvb = NULL; - guint32 msdu_offset = 0x04; - guint16 j = 1; - guint16 msdu_length; - - proto_item *parent_item; - proto_tree *mpdu_tree; - proto_tree *subframe_tree; - - next_tvb = tvb_new_subset(tvb, 0x14, -1, tvb_get_ntohs(tvb, 0x14)); - parent_item = proto_tree_add_protocol_format(tree, proto_aggregate, next_tvb, 0, - tvb_reported_length_remaining(next_tvb, 0), "Turbocell Aggregate Frames"); - mpdu_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_parent_tree); - proto_tree_add_item(mpdu_tree, hf_turbocell_aggregate_len, next_tvb, 0x00, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(mpdu_tree, hf_turbocell_aggregate_unknown1, next_tvb, 0x02, 2, ENC_BIG_ENDIAN); - - remaining_length=tvb_length_remaining(next_tvb, msdu_offset); - - do { - msdu_length = (tvb_get_letohs(next_tvb, msdu_offset) & 0x0FFF); - if (msdu_length==0) break; - parent_item = proto_tree_add_uint_format(mpdu_tree, hf_turbocell_aggregate_msdu_header_text, - next_tvb,msdu_offset, msdu_length + 0x02,j, "A-MSDU Subframe #%u", j); - - subframe_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_subframe_tree); - j++; - - proto_tree_add_item(subframe_tree, hf_turbocell_aggregate_msdu_len, next_tvb, msdu_offset, 2, ENC_LITTLE_ENDIAN); - proto_tree_add_item(subframe_tree, hf_turbocell_aggregate_unknown2, next_tvb, msdu_offset+1, 1, ENC_BIG_ENDIAN); - - msdu_offset += 0x02; - remaining_length -= 0x02; - msdu_tvb = tvb_new_subset(next_tvb, msdu_offset, (msdu_length>remaining_length)?remaining_length:msdu_length, msdu_length); - call_dissector(eth_handle, msdu_tvb, pinfo, subframe_tree); - msdu_offset += msdu_length; - remaining_length -= msdu_length; - } while (remaining_length > 6); - - if (remaining_length > 2) { - next_tvb = tvb_new_subset_remaining(next_tvb, msdu_offset); - call_dissector(data_handle, next_tvb, pinfo, tree); - } + } else { + + tvbuff_t *volatile msdu_tvb = NULL; + guint32 msdu_offset = 0x04; + guint16 j = 1; + guint16 msdu_length; + + proto_item *parent_item; + proto_tree *mpdu_tree; + proto_tree *subframe_tree; + + next_tvb = tvb_new_subset(tvb, 0x14, -1, tvb_get_ntohs(tvb, 0x14)); + parent_item = proto_tree_add_protocol_format(tree, proto_aggregate, next_tvb, 0, + tvb_reported_length_remaining(next_tvb, 0), "Turbocell Aggregate Frames"); + mpdu_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_parent_tree); + proto_tree_add_item(mpdu_tree, hf_turbocell_aggregate_len, next_tvb, 0x00, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(mpdu_tree, hf_turbocell_aggregate_unknown1, next_tvb, 0x02, 2, ENC_BIG_ENDIAN); + + remaining_length=tvb_length_remaining(next_tvb, msdu_offset); + + do { + msdu_length = (tvb_get_letohs(next_tvb, msdu_offset) & 0x0FFF); + if (msdu_length==0) break; + parent_item = proto_tree_add_uint_format(mpdu_tree, hf_turbocell_aggregate_msdu_header_text, + next_tvb,msdu_offset, msdu_length + 0x02,j, "A-MSDU Subframe #%u", j); + + subframe_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_subframe_tree); + j++; + + proto_tree_add_item(subframe_tree, hf_turbocell_aggregate_msdu_len, next_tvb, msdu_offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(subframe_tree, hf_turbocell_aggregate_unknown2, next_tvb, msdu_offset+1, 1, ENC_BIG_ENDIAN); + + msdu_offset += 0x02; + remaining_length -= 0x02; + msdu_tvb = tvb_new_subset(next_tvb, msdu_offset, (msdu_length>remaining_length)?remaining_length:msdu_length, msdu_length); + call_dissector(eth_handle, msdu_tvb, pinfo, subframe_tree); + msdu_offset += msdu_length; + remaining_length -= msdu_length; + } while (remaining_length > 6); + + if (remaining_length > 2) { + next_tvb = tvb_new_subset_remaining(next_tvb, msdu_offset); + call_dissector(data_handle, next_tvb, pinfo, tree); } } + } } /* Register the protocol with Wireshark */ @@ -248,50 +248,50 @@ void proto_register_turbocell(void) static hf_register_info hf[] = { { &hf_turbocell_type, - { "Packet Type", "turbocell.type", + { "Packet Type", "turbocell.type", FT_UINT8, BASE_HEX, VALS(turbocell_type_values), 0, NULL, HFILL } }, { &hf_turbocell_satmode, - { "Satellite Mode", "turbocell.satmode", + { "Satellite Mode", "turbocell.satmode", FT_UINT8, BASE_HEX, VALS(turbocell_satmode_values), 0xF0, NULL, HFILL } }, { &hf_turbocell_nwid, - { "Network ID", "turbocell.nwid", + { "Network ID", "turbocell.nwid", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL } }, { &hf_turbocell_counter, - { "Counter", "turbocell.counter", + { "Counter", "turbocell.counter", FT_UINT24, BASE_DEC_HEX, NULL, 0, "Increments every frame (per station)", HFILL } }, { &hf_turbocell_dst, - { "Destination", "turbocell.dst", + { "Destination", "turbocell.dst", FT_ETHER, BASE_NONE, NULL, 0, "Seems to be the destination", HFILL } }, { &hf_turbocell_ip, - { "IP", "turbocell.ip", + { "IP", "turbocell.ip", FT_IPv4, BASE_NONE, NULL, 0, "IP address of base station ?", HFILL } }, { &hf_turbocell_unknown, - { "Unknown", "turbocell.unknown", + { "Unknown", "turbocell.unknown", FT_UINT16, BASE_HEX, NULL, 0, "Always 0000", HFILL } }, { &hf_turbocell_timestamp, - { "Timestamp (in 10 ms)", "turbocell.timestamp", + { "Timestamp (in 10 ms)", "turbocell.timestamp", FT_UINT24, BASE_DEC_HEX, NULL, 0, "Timestamp per station (since connection?)", HFILL } }, { &hf_turbocell_name, - { "Network Name", "turbocell.name", + { "Network Name", "turbocell.name", FT_STRINGZ, BASE_NONE, NULL, 0, NULL, HFILL } }, @@ -301,31 +301,31 @@ void proto_register_turbocell(void) STATION(30),STATION(31) }; - static hf_register_info aggregate_fields[] = { + static hf_register_info aggregate_fields[] = { { &hf_turbocell_aggregate_msdu_header_text, - {"MAC Service Data Unit (MSDU)", "turbocell_aggregate.msduheader", - FT_UINT16, BASE_DEC, 0, 0x0000, NULL, HFILL } + {"MAC Service Data Unit (MSDU)", "turbocell_aggregate.msduheader", + FT_UINT16, BASE_DEC, 0, 0x0000, NULL, HFILL } }, { &hf_turbocell_aggregate_msdu_len, - {"MSDU length", "turbocell_aggregate.msdulen", - FT_UINT16, BASE_DEC_HEX, 0, 0x0FFF, NULL, HFILL } + {"MSDU length", "turbocell_aggregate.msdulen", + FT_UINT16, BASE_DEC_HEX, 0, 0x0FFF, NULL, HFILL } }, { &hf_turbocell_aggregate_len, - { "Total Length", "turbocell_aggregate.len", + { "Total Length", "turbocell_aggregate.len", FT_UINT16, BASE_DEC_HEX, NULL, 0, "Total reported length", HFILL } }, { &hf_turbocell_aggregate_unknown1, - { "Unknown", "turbocell_aggregate.unknown1", + { "Unknown", "turbocell_aggregate.unknown1", FT_UINT16, BASE_HEX, NULL, 0, "Always 0x7856", HFILL } }, { &hf_turbocell_aggregate_unknown2, - { "Unknown", "turbocell_aggregate.unknown2", + { "Unknown", "turbocell_aggregate.unknown2", FT_UINT8, BASE_HEX, NULL, 0xF0, "have the values 0x4,0xC or 0x8", HFILL } }, - }; + }; static gint *ett[] = { &ett_turbocell, @@ -337,7 +337,7 @@ void proto_register_turbocell(void) proto_turbocell = proto_register_protocol("Turbocell Header", "Turbocell", "turbocell"); proto_aggregate = proto_register_protocol("Turbocell Aggregate Data", - "Turbocell Aggregate Data", "turbocell_aggregate"); + "Turbocell Aggregate Data", "turbocell_aggregate"); proto_register_field_array(proto_aggregate, aggregate_fields, array_length(aggregate_fields)); register_dissector("turbocell", dissect_turbocell, proto_turbocell); @@ -354,3 +354,15 @@ void proto_reg_handoff_turbocell(void) data_handle = find_dissector("data"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-wassp.c b/epan/dissectors/packet-wassp.c index 608c05b79e..1d19279ae1 100644 --- a/epan/dissectors/packet-wassp.c +++ b/epan/dissectors/packet-wassp.c @@ -350,47 +350,47 @@ static int hf_config_radio_tx_power_adj = -1; /* ============= copy/paste/modify from value_string.[hc] ============== */ typedef struct _ext_value_string { - guint32 value; - const gchar *strptr; - int* hf_element; - int (*specialfunction)(tvbuff_t *, packet_info *, proto_tree *, guint32, - guint32, const struct _ext_value_string *); - const struct _ext_value_string *evs; + guint32 value; + const gchar *strptr; + int *hf_element; + int (*specialfunction)(tvbuff_t *, packet_info *, proto_tree *, guint32, + guint32, const struct _ext_value_string *); + const struct _ext_value_string *evs; } ext_value_string; -static const gchar* +static const gchar * match_strextval_idx(guint32 val, const ext_value_string *vs, gint *idx) { - gint i = 0; + gint i = 0; + + if(vs) { + while (vs[i].strptr) { + if (vs[i].value == val) { + if (idx) + *idx = i; + return(vs[i].strptr); + } + i++; + } + } - if(vs) { - while (vs[i].strptr) { - if (vs[i].value == val) { if (idx) - *idx = i; - return(vs[i].strptr); - } - i++; - } - } - - if (idx) - *idx = -1; - return NULL; + *idx = -1; + return NULL; } static const gchar* extval_to_str_idx(guint32 val, const ext_value_string *vs, gint *idx, const char *fmt) { - const gchar *ret; + const gchar *ret; - if (!fmt) - fmt="Unknown"; + if (!fmt) + fmt="Unknown"; - ret = match_strextval_idx(val, vs, idx); - if (ret != NULL) - return ret; + ret = match_strextval_idx(val, vs, idx); + if (ret != NULL) + return ret; - return wmem_strdup_printf(wmem_packet_scope(), fmt, val); + return wmem_strdup_printf(wmem_packet_scope(), fmt, val); } /* ============= end copy/paste/modify ============== */ @@ -2113,3 +2113,15 @@ proto_reg_handoff_wassp(void) ieee80211_handle = find_dissector("wlan_withoutfcs"); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-xyplex.c b/epan/dissectors/packet-xyplex.c index de401f8612..64a66944d0 100644 --- a/epan/dissectors/packet-xyplex.c +++ b/epan/dissectors/packet-xyplex.c @@ -48,109 +48,109 @@ static dissector_handle_t xyplex_handle; #define UDP_PORT_XYPLEX 173 -#define XYPLEX_REG_OK 0x00 -#define XYPLEX_REG_QUEFULL 0x05 +#define XYPLEX_REG_OK 0x00 +#define XYPLEX_REG_QUEFULL 0x05 static const value_string xyplex_reg_vals[] = { - { XYPLEX_REG_OK, "OK" }, - { XYPLEX_REG_QUEFULL, "Queue Full" }, + { XYPLEX_REG_OK, "OK" }, + { XYPLEX_REG_QUEFULL, "Queue Full" }, { 0, NULL } }; static int dissect_xyplex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - proto_tree *xyplex_tree; - proto_item *ti; - conversation_t *conversation; - gint offset = 0; - - guint8 prototype; - guint8 padding; - guint16 server_port; - guint16 return_port; - guint16 reserved; - guint16 reply; - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "XYPLEX"); - - ti = proto_tree_add_item(tree, proto_xyplex, tvb, offset, -1, ENC_NA); - xyplex_tree = proto_item_add_subtree(ti, ett_xyplex); - - if (pinfo->destport == UDP_PORT_XYPLEX) { - /* This is a registration request from a Unix server - * to the Xyplex server. The server_port indicates - * which Xyplex serial port is desired. The - * return_port tells the Xyplex server what TCP port - * to open to the Unix server. - */ - prototype = tvb_get_guint8(tvb, offset); - padding = tvb_get_guint8(tvb, offset+1); - server_port = tvb_get_ntohs(tvb, offset+2); - return_port = tvb_get_ntohs(tvb, offset+4); - reserved = tvb_get_ntohs(tvb, offset+6); - col_add_fstr(pinfo->cinfo, COL_INFO, - "Registration Request: %d Return: %d", - server_port, return_port); - - if (tree) { - proto_tree_add_uint(xyplex_tree, hf_xyplex_type, tvb, - offset, 1, prototype); - proto_tree_add_uint(xyplex_tree, hf_xyplex_pad, tvb, - offset+1, 1, padding); - proto_tree_add_uint(xyplex_tree, hf_xyplex_server_port, tvb, - offset+2, 2, server_port); - proto_tree_add_uint(xyplex_tree, hf_xyplex_return_port, tvb, - offset+4, 2, return_port); - proto_tree_add_uint(xyplex_tree, hf_xyplex_reserved, tvb, - offset+6, 2, reserved); - } - offset += 8; - - /* Look for all future TCP conversations between the - * requestiong server and the Xyplex host using the - * return_port. - */ - conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, - PT_TCP, return_port, 0, NO_PORT_B); - if (conversation == NULL) { - conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, - PT_TCP, return_port, 0, NO_PORT2); - conversation_set_dissector(conversation, xyplex_handle); - } - return offset; - } - - if (pinfo->srcport == UDP_PORT_XYPLEX) { - prototype = tvb_get_guint8(tvb, offset); - padding = tvb_get_guint8(tvb, offset+1); - reply = tvb_get_ntohs(tvb, offset+2); - col_add_fstr(pinfo->cinfo, COL_INFO, "Registration Reply: %s", - val_to_str(reply, xyplex_reg_vals, "Unknown (0x%02x)")); - - if (tree) { - proto_tree_add_uint(xyplex_tree, hf_xyplex_type, tvb, - offset, 1, prototype); - proto_tree_add_uint(xyplex_tree, hf_xyplex_pad, tvb, - offset+1, 1, padding); - proto_tree_add_uint(xyplex_tree, hf_xyplex_reply, tvb, - offset+2, 2, reply); - } - offset += 4; - return offset; - } - - /* - * This must be the TCP data stream. This will just be - * the raw data being transfered from the remote server - * and the Xyplex serial port. - */ - col_add_fstr(pinfo->cinfo, COL_INFO, "%d > %d Data", - pinfo->srcport, pinfo->destport); - - proto_tree_add_item(xyplex_tree, hf_xyplex_data, tvb, offset, -1, ENC_NA); - - return tvb_reported_length_remaining(tvb, offset); + proto_tree *xyplex_tree; + proto_item *ti; + conversation_t *conversation; + gint offset = 0; + + guint8 prototype; + guint8 padding; + guint16 server_port; + guint16 return_port; + guint16 reserved; + guint16 reply; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "XYPLEX"); + + ti = proto_tree_add_item(tree, proto_xyplex, tvb, offset, -1, ENC_NA); + xyplex_tree = proto_item_add_subtree(ti, ett_xyplex); + + if (pinfo->destport == UDP_PORT_XYPLEX) { + /* This is a registration request from a Unix server + * to the Xyplex server. The server_port indicates + * which Xyplex serial port is desired. The + * return_port tells the Xyplex server what TCP port + * to open to the Unix server. + */ + prototype = tvb_get_guint8(tvb, offset); + padding = tvb_get_guint8(tvb, offset+1); + server_port = tvb_get_ntohs(tvb, offset+2); + return_port = tvb_get_ntohs(tvb, offset+4); + reserved = tvb_get_ntohs(tvb, offset+6); + col_add_fstr(pinfo->cinfo, COL_INFO, + "Registration Request: %d Return: %d", + server_port, return_port); + + if (tree) { + proto_tree_add_uint(xyplex_tree, hf_xyplex_type, tvb, + offset, 1, prototype); + proto_tree_add_uint(xyplex_tree, hf_xyplex_pad, tvb, + offset+1, 1, padding); + proto_tree_add_uint(xyplex_tree, hf_xyplex_server_port, tvb, + offset+2, 2, server_port); + proto_tree_add_uint(xyplex_tree, hf_xyplex_return_port, tvb, + offset+4, 2, return_port); + proto_tree_add_uint(xyplex_tree, hf_xyplex_reserved, tvb, + offset+6, 2, reserved); + } + offset += 8; + + /* Look for all future TCP conversations between the + * requestiong server and the Xyplex host using the + * return_port. + */ + conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, + PT_TCP, return_port, 0, NO_PORT_B); + if (conversation == NULL) { + conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, + PT_TCP, return_port, 0, NO_PORT2); + conversation_set_dissector(conversation, xyplex_handle); + } + return offset; + } + + if (pinfo->srcport == UDP_PORT_XYPLEX) { + prototype = tvb_get_guint8(tvb, offset); + padding = tvb_get_guint8(tvb, offset+1); + reply = tvb_get_ntohs(tvb, offset+2); + col_add_fstr(pinfo->cinfo, COL_INFO, "Registration Reply: %s", + val_to_str(reply, xyplex_reg_vals, "Unknown (0x%02x)")); + + if (tree) { + proto_tree_add_uint(xyplex_tree, hf_xyplex_type, tvb, + offset, 1, prototype); + proto_tree_add_uint(xyplex_tree, hf_xyplex_pad, tvb, + offset+1, 1, padding); + proto_tree_add_uint(xyplex_tree, hf_xyplex_reply, tvb, + offset+2, 2, reply); + } + offset += 4; + return offset; + } + + /* + * This must be the TCP data stream. This will just be + * the raw data being transfered from the remote server + * and the Xyplex serial port. + */ + col_add_fstr(pinfo->cinfo, COL_INFO, "%d > %d Data", + pinfo->srcport, pinfo->destport); + + proto_tree_add_item(xyplex_tree, hf_xyplex_data, tvb, offset, -1, ENC_NA); + + return tvb_reported_length_remaining(tvb, offset); } @@ -159,39 +159,39 @@ proto_register_xyplex(void) { static hf_register_info hf[] = { { &hf_xyplex_type, - { "Type", "xyplex.type", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Protocol type", HFILL }}, + { "Type", "xyplex.type", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Protocol type", HFILL }}, { &hf_xyplex_pad, - { "Pad", "xyplex.pad", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Padding", HFILL }}, + { "Pad", "xyplex.pad", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Padding", HFILL }}, { &hf_xyplex_server_port, - { "Server Port", "xyplex.server_port", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + { "Server Port", "xyplex.server_port", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_xyplex_return_port, { "Return Port", "xyplex.return_port", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_xyplex_reserved, { "Reserved field", "xyplex.reserved", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_xyplex_reply, { "Registration Reply", "xyplex.reply", - FT_UINT16, BASE_DEC, VALS(xyplex_reg_vals), 0x0, - NULL, HFILL }}, + FT_UINT16, BASE_DEC, VALS(xyplex_reg_vals), 0x0, + NULL, HFILL }}, { &hf_xyplex_data, { "Data", "xyplex.data", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, }; static gint *ett[] = { @@ -210,3 +210,15 @@ proto_reg_handoff_xyplex(void) dissector_add_uint("udp.port", UDP_PORT_XYPLEX, xyplex_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-yami.c b/epan/dissectors/packet-yami.c index f8a2451114..d4b172e82c 100644 --- a/epan/dissectors/packet-yami.c +++ b/epan/dissectors/packet-yami.c @@ -621,3 +621,15 @@ proto_reg_handoff_yami(void) dissector_add_uint("udp.port", yami_udp_port, yami_handle); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-yppasswd.c b/epan/dissectors/packet-yppasswd.c index 90830680d4..aef1ca0851 100644 --- a/epan/dissectors/packet-yppasswd.c +++ b/epan/dissectors/packet-yppasswd.c @@ -170,3 +170,15 @@ proto_reg_handoff_yppasswd(void) rpc_init_proc_table(YPPASSWD_PROGRAM, 1, yppasswd1_proc, hf_yppasswd_procedure_v1); } +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ |