diff options
author | Martin Mathieson <martin.mathieson@keysight.com> | 2021-02-01 23:12:35 +0000 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2021-02-02 09:26:55 +0000 |
commit | 9e7168e476eeb11223027afb0b8f24a9a91f110a (patch) | |
tree | 246696001ed99a43d4c0e5ba260f58479450ced9 /epan/dissectors | |
parent | 7f23130fc02bd0f0d7a64a16ac85f3f7798130bc (diff) |
Address more non-static, non-shared symbols.
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-s101.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-scsi.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-sdh.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-smb.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-smb2.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-tcp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-thrift.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-tipc.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-tpm20.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ua3g.c | 12 | ||||
-rwxr-xr-x | epan/dissectors/packet-udpcp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_rlc.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-usb-hid.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-usb.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-usb.h | 4 |
15 files changed, 37 insertions, 40 deletions
diff --git a/epan/dissectors/packet-s101.c b/epan/dissectors/packet-s101.c index f0b73f3d66..9b91cb694e 100644 --- a/epan/dissectors/packet-s101.c +++ b/epan/dissectors/packet-s101.c @@ -75,10 +75,10 @@ typedef struct _s101_fragment_t { /* (Required to prevent [-Wmissing-prototypes] warnings */ void proto_reg_handoff_S101(void); void proto_register_S101(void); -tvbuff_t *decode_s101_escaped_buffer(tvbuff_t *tvb, packet_info *pinfo, int *offset, guint16 *crc); -guint32 get_fragment_pdu_id(packet_info *pinfo); -s101_fragment_t* new_fragment_info(packet_info *pinfo); -void display_expert_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int len); +static tvbuff_t *decode_s101_escaped_buffer(tvbuff_t *tvb, packet_info *pinfo, int *offset, guint16 *crc); +static guint32 get_fragment_pdu_id(packet_info *pinfo); +static s101_fragment_t* new_fragment_info(packet_info *pinfo); +static void display_expert_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int len); /* Initialize the protocol and registered fields */ static int proto_S101 = -1; @@ -141,7 +141,7 @@ static const fragment_items msg_frag_items = { | SRCPORT (16) | SRC_ADDRESS (16) | SRC_ADDRESS is last 2 bytes of the src address. */ -guint32 get_fragment_pdu_id(packet_info *pinfo) { +static guint32 get_fragment_pdu_id(packet_info *pinfo) { guint32 id = pinfo->srcport << 16; const guint8 *data = (const guint8*)pinfo->src.data; if (pinfo->src.len >= 2) { @@ -152,7 +152,7 @@ guint32 get_fragment_pdu_id(packet_info *pinfo) { static wmem_map_t* s101_fragment_info_hash = NULL; -s101_fragment_t* new_fragment_info(packet_info *pinfo) { +static s101_fragment_t* new_fragment_info(packet_info *pinfo) { s101_fragment_t* fi = wmem_new(wmem_file_scope(), s101_fragment_t); if (NULL == fi) { return fi; } fi->id = pinfo->num; @@ -212,7 +212,7 @@ static const value_string dtd_type_vs[] = { -void +static void display_expert_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int len) { proto_item* pi; proto_tree *error_tree; @@ -287,7 +287,7 @@ find_s101_packet_header(tvbuff_t *tvb, int* offset, guint8 *start, guint8 *slot, return 1; } -tvbuff_t * +static tvbuff_t * decode_s101_escaped_buffer(tvbuff_t *tvb, packet_info *pinfo, int *offset, guint16 *crc) { tvbuff_t *next_tvb; int len; diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c index e828f73755..4d4c9e7f36 100644 --- a/epan/dissectors/packet-scsi.c +++ b/epan/dissectors/packet-scsi.c @@ -2743,7 +2743,7 @@ const value_string scsi_status_val[] = { }; -const value_string scsi_wb_mode_val[] = { +static const value_string scsi_wb_mode_val[] = { {0x0, "Write combined header and data"}, {0x1, "Vendor specific"}, {0x2, "Write data"}, @@ -2758,7 +2758,7 @@ const value_string scsi_wb_mode_val[] = { {0, NULL}, }; -const value_string scsi_senddiag_st_code_val[] = { +static const value_string scsi_senddiag_st_code_val[] = { {0, ""}, {0x1, "Start short self-test in background"}, {0x2, "Start extended self-test in background"}, @@ -2770,7 +2770,7 @@ const value_string scsi_senddiag_st_code_val[] = { {0, NULL}, }; -const true_false_string scsi_senddiag_pf_val = { +static const true_false_string scsi_senddiag_pf_val = { "Standard Page Format", "Vendor-specific Page Format", }; @@ -5312,13 +5312,13 @@ dissect_spc_reportluns(tvbuff_t *tvb_a, packet_info *pinfo _U_, } } -const value_string mpi_action_vals[] = { +static const value_string mpi_action_vals[] = { {MPI_MANAGEMENT_PROTOCOL_IN , "Management Protocol In"}, {MPI_REPORT_SUPPORTED_OPERATION_CODES , "Report Supported Opcodes"}, {0, NULL} }; -const value_string report_opcodes_options_vals[] = { +static const value_string report_opcodes_options_vals[] = { {0, "Report ALL opcodes"}, {1, "Report ONE opcode, NO service action"}, {2, "Report ONE opcode, WITH service action"}, diff --git a/epan/dissectors/packet-sdh.c b/epan/dissectors/packet-sdh.c index 12f8f4cd51..f060d8c520 100644 --- a/epan/dissectors/packet-sdh.c +++ b/epan/dissectors/packet-sdh.c @@ -69,7 +69,7 @@ static const enum_val_t data_rates[] = { {NULL, NULL, -1} }; -const value_string sdh_s1_vals[] = { +static const value_string sdh_s1_vals[] = { { 0, "Quality unknown" }, { 1, "Reserved" }, { 2, "Rec G.811" }, diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index 66f0349ac6..fc2d4f9883 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -1907,7 +1907,7 @@ smb_file_specific_rights(tvbuff_t *tvb, gint offset, proto_tree *tree, guint32 m proto_tree_add_bitmask_list_value(tree, tvb, offset, 4, mask_flags, mask); } -struct access_mask_info smb_file_access_mask_info = { +static struct access_mask_info smb_file_access_mask_info = { "FILE", /* Name of specific rights */ smb_file_specific_rights, /* Dissection function */ NULL, /* Generic mapping table */ @@ -1938,7 +1938,7 @@ smb_dir_specific_rights(tvbuff_t *tvb, gint offset, proto_tree *tree, guint32 ma proto_tree_add_bitmask_list_value(tree, tvb, offset, 4, mask_flags, mask); } -struct access_mask_info smb_dir_access_mask_info = { +static struct access_mask_info smb_dir_access_mask_info = { "DIR", /* Name of specific rights */ smb_dir_specific_rights, /* Dissection function */ NULL, /* Generic mapping table */ @@ -2487,7 +2487,7 @@ dissect_file_ext_attr_bits(tvbuff_t *tvb, proto_tree *parent_tree, int offset, } /* 3.11 */ -int +static int dissect_file_ext_attr(tvbuff_t *tvb, proto_tree *parent_tree, int offset) { guint32 mask; diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index 05d6e4cfb2..f5839f5fa9 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -4998,7 +4998,7 @@ typedef struct _smb2_find_dissector_t { void (*dissector)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, smb2_info_t *si); } smb2_find_dissector_t; -smb2_find_dissector_t smb2_find_dissectors[] = { +static smb2_find_dissector_t smb2_find_dissectors[] = { {SMB2_FIND_DIRECTORY_INFO, dissect_smb2_file_directory_info}, {SMB2_FIND_FULL_DIRECTORY_INFO, dissect_smb2_full_directory_info}, {SMB2_FIND_BOTH_DIRECTORY_INFO, dissect_smb2_both_directory_info}, diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 8f1ca7e2a2..cc96293a3e 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -41,7 +41,7 @@ void proto_register_tcp(void); void proto_reg_handoff_tcp(void); -void conversation_completeness_fill(gchar*, guint32); +static void conversation_completeness_fill(gchar*, guint32); static int tcp_tap = -1; static int tcp_follow_tap = -1; @@ -1353,7 +1353,7 @@ handle_export_pdu_conversation(packet_info *pinfo, tvbuff_t *tvb, int src_port, * we of course pay much attention on complete conversations but also incomplete ones which * have a regular start, as in practice we are often looking for such thing */ -void conversation_completeness_fill(gchar *buf, guint32 value) +static void conversation_completeness_fill(gchar *buf, guint32 value) { switch(value) { case TCP_COMPLETENESS_SYNSENT: diff --git a/epan/dissectors/packet-thrift.h b/epan/dissectors/packet-thrift.h index 2613618ae9..4ae35c78f0 100644 --- a/epan/dissectors/packet-thrift.h +++ b/epan/dissectors/packet-thrift.h @@ -45,7 +45,7 @@ typedef struct _thrift_struct_t { } thrift_struct_t; /* -These functions are to be used by dissectors dissecting Thrift based protocols sinilar to packet-ber.c +These functions are to be used by dissectors dissecting Thrift based protocols similar to packet-ber.c */ WS_DLL_PUBLIC int dissect_thrift_t_stop(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset); diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index d7a2e45310..76d87c0710 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -250,7 +250,7 @@ static const fragment_items tipc_msg_frag_items = { #define TIPC_LINK_PROTOCO_STATE_MSG 0 -const value_string tipc_user_values[] = { +static const value_string tipc_user_values[] = { { TIPC_DATA_PRIO_0, "DATA_PRIO_0"}, { TIPC_DATA_PRIO_1, "DATA_PRIO_1"}, { TIPC_DATA_PRIO_2, "DATA_PRIO_2"}, @@ -284,7 +284,7 @@ const value_string tipc_user_values[] = { #define TIPCv2_USER_FRAGMENT 1 #define TIPCv2_USER_LAST_FRAGMENT 2 -const value_string tipcv2_user_values[] = { +static const value_string tipcv2_user_values[] = { { TIPCv2_DATA_LOW, "Low Priority Payload Data"}, { TIPCv2_DATA_NORMAL, "Normal Priority Payload Data"}, { TIPCv2_DATA_HIGH, "High Priority Payload Data"}, @@ -301,7 +301,7 @@ const value_string tipcv2_user_values[] = { { 0, NULL} }; -const value_string tipcv2_user_short_str_vals[] = { +static const value_string tipcv2_user_short_str_vals[] = { { TIPCv2_DATA_LOW, "Payld:Low"}, { TIPCv2_DATA_NORMAL, "Payld:Normal"}, { TIPCv2_DATA_HIGH, "Payld:High"}, @@ -427,7 +427,7 @@ static const value_string tipc_cng_prot_msg_type_values[] = { /* SEGMENTATION_MANAGER */ #define TIPC_FIRST_SEGMENT 1 #define TIPC_SEGMENT 2 -const value_string tipc_sm_msg_type_values[] = { +static const value_string tipc_sm_msg_type_values[] = { { 1, "FIRST_SEGMENT"}, { 2, "SEGMENT"}, { 0, NULL} diff --git a/epan/dissectors/packet-tpm20.c b/epan/dissectors/packet-tpm20.c index aaf68e25cf..4b943f474c 100644 --- a/epan/dissectors/packet-tpm20.c +++ b/epan/dissectors/packet-tpm20.c @@ -135,7 +135,7 @@ struct num_handles { int *resp_pd[MAX_HNDL]; }; -struct num_handles tpm_handles_map[] = { +static struct num_handles tpm_handles_map[] = { { 0x11f, 2, { &hf_tpmi_rh_provision, &hf_tpmi_dh_object, 0 }, 0, { 0, 0, 0}}, /* CC_NV_UndefineSpaceSpecial */ { 0x120, 2, { &hf_tpmi_rh_provision, &hf_tpmi_dh_object, 0 }, 0, { 0, 0, 0}}, /* CC_EvictControl */ { 0x121, 1, { &hf_tpmi_rh_hierarhy, 0, 0 }, 0, { 0, 0, 0 }}, /* CC_HierarchyControl */ diff --git a/epan/dissectors/packet-ua3g.c b/epan/dissectors/packet-ua3g.c index a8b0d3891b..bfd5855d6c 100644 --- a/epan/dissectors/packet-ua3g.c +++ b/epan/dissectors/packet-ua3g.c @@ -831,7 +831,7 @@ decode_super_msg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, /*----------------------------------------------------------------------------- SEGMENT MESSAGE - 0Ch (MESSAGE FROM THE TERMINAL AND FROM THE SYSTEM) ---------------------------------------------------------------------------*/ -const true_false_string tfs_segment_msg_segment = { "First Segment", "Subsequent Segment" }; +static const true_false_string tfs_segment_msg_segment = { "First Segment", "Subsequent Segment" }; static void decode_segment_msg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, @@ -2712,8 +2712,8 @@ static const value_string str_device_configuration[] = { { 0, NULL } }; -const true_false_string tfs_audio_config_handsfree_return = { "Return Loss Active", "Return Loss Normal" }; -const true_false_string tfs_audio_config_handsfree_handsfree = { "More Full Duplex", "Handsfree Normal" }; +static const true_false_string tfs_audio_config_handsfree_return = { "Return Loss Active", "Return Loss Normal" }; +static const true_false_string tfs_audio_config_handsfree_handsfree = { "More Full Duplex", "Handsfree Normal" }; static void decode_audio_config(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, @@ -3964,9 +3964,9 @@ decode_i_m_here(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, guint o RESPONSE STATUS INQUIRY - 23h (MESSAGE FROM THE TERMINAL) SPECIAL KEY STATUS - 29h (MESSAGE FROM THE TERMINAL) ---------------------------------------------------------------------------*/ -const true_false_string tfs_special_key_parameters = { "Not Received Default In Effect", "Downloaded Values In Effect" }; -const true_false_string tfs_hookswitch_status = {"On Hook", "Off Hook"}; -const true_false_string tfs_released_pressed = { "Released", "Pressed" }; +static const true_false_string tfs_special_key_parameters = { "Not Received Default In Effect", "Downloaded Values In Effect" }; +static const true_false_string tfs_hookswitch_status = {"On Hook", "Off Hook"}; +static const true_false_string tfs_released_pressed = { "Released", "Pressed" }; static void decode_special_key(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, diff --git a/epan/dissectors/packet-udpcp.c b/epan/dissectors/packet-udpcp.c index ecc9a001c4..439f1b29e7 100755 --- a/epan/dissectors/packet-udpcp.c +++ b/epan/dissectors/packet-udpcp.c @@ -135,7 +135,7 @@ static void udpcp_free_persistent_key(gpointer ptr _U_) { } -reassembly_table_functions udpcp_reassembly_table_functions = +static reassembly_table_functions udpcp_reassembly_table_functions = { g_direct_hash, g_direct_equal, diff --git a/epan/dissectors/packet-umts_rlc.c b/epan/dissectors/packet-umts_rlc.c index e453c77ac3..04b3253416 100644 --- a/epan/dissectors/packet-umts_rlc.c +++ b/epan/dissectors/packet-umts_rlc.c @@ -960,6 +960,7 @@ reassemble_sequence(struct rlc_frag ** frags, struct rlc_seqlist * endlist, /* Reset the specified channel's reassembly data, useful for when a sequence * resets on transport channel swap. */ +/* TODO: not currently called */ void rlc_reset_channel(enum rlc_mode mode, guint8 rbid, guint8 dir, guint32 ueid, struct atm_phdr *atm) diff --git a/epan/dissectors/packet-usb-hid.c b/epan/dissectors/packet-usb-hid.c index 76513bda95..e09770fbae 100644 --- a/epan/dissectors/packet-usb-hid.c +++ b/epan/dissectors/packet-usb-hid.c @@ -3310,7 +3310,7 @@ static const value_string keycode_vals[] = { {0, NULL} }; -value_string_ext keycode_vals_ext = VALUE_STRING_EXT_INIT(keycode_vals); +static value_string_ext keycode_vals_ext = VALUE_STRING_EXT_INIT(keycode_vals); static guint32 hid_unpack_value(guint8 *data, unsigned int idx, unsigned int size) diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index c28ef6415f..a8576e174d 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -1117,7 +1117,7 @@ static const value_string win32_urb_function_vals[] = { {0x0034, "URB_FUNCTION_RESERVE_0X0034"}, {0, NULL} }; -value_string_ext win32_urb_function_vals_ext = VALUE_STRING_EXT_INIT(win32_urb_function_vals); +static value_string_ext win32_urb_function_vals_ext = VALUE_STRING_EXT_INIT(win32_urb_function_vals); static const value_string win32_usbd_status_vals[] = { {0x00000000, "USBD_STATUS_SUCCESS"}, @@ -4112,7 +4112,7 @@ dissect_darwin_buffer_packet_header(tvbuff_t *tvb, packet_info *pinfo, proto_tre } /* Set the usb_address_t fields based on the direction of the urb */ -void +static void usb_set_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint16 bus_id, guint16 device_address, int endpoint, gboolean req) { diff --git a/epan/dissectors/packet-usb.h b/epan/dissectors/packet-usb.h index 79ef0ab16e..a652c4adb9 100644 --- a/epan/dissectors/packet-usb.h +++ b/epan/dissectors/packet-usb.h @@ -275,10 +275,6 @@ dissect_usb_unknown_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, int dissect_urb_transfer_flags(tvbuff_t *tvb, int offset, proto_tree* tree, int hf, int endian); -void -usb_set_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint16 bus_id, guint16 device_address, - int endpoint, gboolean req); - struct mausb_header; void |