diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-12-17 22:07:32 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-12-17 22:07:32 +0000 |
commit | e6d09c163454627e8caedc8b58836f9071073c6e (patch) | |
tree | f7dd74e1d7000bdf1fcc3730f894157f53b7c68e | |
parent | be09c39208963340b9e4aad210facbeeeffd2d46 (diff) |
Make local functions static. Include *.h when needed.
svn path=/trunk/; revision=54201
-rw-r--r-- | asn1/h225/packet-h225-template.c | 1 | ||||
-rw-r--r-- | asn1/h248/packet-h248-template.c | 6 | ||||
-rw-r--r-- | asn1/h248/packet-h248-template.h | 1 | ||||
-rw-r--r-- | asn1/h450-ros/packet-h450-ros-template.c | 1 | ||||
-rw-r--r-- | asn1/idmp/packet-idmp-template.c | 4 | ||||
-rw-r--r-- | asn1/p7/packet-p7-template.c | 1 | ||||
-rw-r--r-- | asn1/q932/packet-q932-template.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-h225.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-h248.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-h248.h | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-h450-ros.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-idmp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-nhrp.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-pdcp-lte.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-per.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-pw-oam.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-q932.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-reload.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-selfm.c | 2 |
19 files changed, 47 insertions, 36 deletions
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c index 1671118341..6099eeb7a1 100644 --- a/asn1/h225/packet-h225-template.c +++ b/asn1/h225/packet-h225-template.c @@ -67,6 +67,7 @@ #define TCP_PORT_CS 1720 #define TLS_PORT_CS 1300 +void proto_register_h225(void); static void reset_h225_packet_info(h225_packet_info *pi); static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, h225_packet_info *pi); diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index 7d18842906..253b9fbf7a 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -39,6 +39,8 @@ #define PSNAME "H248" #define PFNAME "h248" +void proto_register_h248(void); + /* Initialize the protocol and registered fields */ static int proto_h248 = -1; static int hf_248_magic_num = -1; @@ -879,7 +881,7 @@ static int dissect_h248_ctx_id(gboolean implicit_tag, packet_info *pinfo, proto_ return offset; } -s_h248_package_t *s_find_package_id(guint16 pkgid) { +static s_h248_package_t *s_find_package_id(guint16 pkgid) { s_h248_package_t *s_pkg = NULL; s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid))); return s_pkg; @@ -896,7 +898,7 @@ static gint32 comparePkgID(gconstpointer a, gconstpointer b) { return GPOINTER_TO_UINT(b) - GPOINTER_TO_UINT(a); } -gboolean is_pkg_default(guint16 pkgid) { +static gboolean is_pkg_default(guint16 pkgid) { s_h248_package_t *s_pkg = NULL; s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid))); if(! s_pkg ) return TRUE; diff --git a/asn1/h248/packet-h248-template.h b/asn1/h248/packet-h248-template.h index 6833475f3a..96e87f35e0 100644 --- a/asn1/h248/packet-h248-template.h +++ b/asn1/h248/packet-h248-template.h @@ -42,6 +42,7 @@ extern void h248_param_ber_octetstring(proto_tree*, tvbuff_t*, packet_info* , in extern void h248_param_ber_boolean(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void external_dissector(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* dissector_handle); extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u _U_, void* dissector_hdl); +extern void h248_param_external_dissector(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u _U_, void* dissector_hdl); typedef enum { ADD_PKG, /* add package at registration ONLY if no matching package ID */ diff --git a/asn1/h450-ros/packet-h450-ros-template.c b/asn1/h450-ros/packet-h450-ros-template.c index ee31ab6411..b73ee538e2 100644 --- a/asn1/h450-ros/packet-h450-ros-template.c +++ b/asn1/h450-ros/packet-h450-ros-template.c @@ -32,6 +32,7 @@ #include <epan/wmem/wmem.h> #include "packet-per.h" +#include "packet-h450-ros.h" #define PNAME "H.450 Remote Operations Apdus" #define PSNAME "H450.ROS" diff --git a/asn1/idmp/packet-idmp-template.c b/asn1/idmp/packet-idmp-template.c index 5cb9a2f020..287aed952d 100644 --- a/asn1/idmp/packet-idmp-template.c +++ b/asn1/idmp/packet-idmp-template.c @@ -49,6 +49,8 @@ void proto_register_idmp(void); void proto_reg_handoff_idm(void); +static void prefs_register_idmp(void); /* forward declaration for use in preferences registration */ +void register_idmp_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name); static gboolean idmp_desegment = TRUE; static guint global_idmp_tcp_port = 1102; /* made up for now */ @@ -61,8 +63,6 @@ static const char *protocolID = NULL; static const char *saved_protocolID = NULL; static guint32 opcode = -1; -static void prefs_register_idmp(void); /* forward declaration for use in preferences registration */ - /* Initialize the protocol and registered fields */ int proto_idmp = -1; diff --git a/asn1/p7/packet-p7-template.c b/asn1/p7/packet-p7-template.c index 36cb8789ca..e23fc71f88 100644 --- a/asn1/p7/packet-p7-template.c +++ b/asn1/p7/packet-p7-template.c @@ -35,6 +35,7 @@ #include "packet-acse.h" #include "packet-ros.h" #include "packet-rtse.h" +#include "packet-p7.h" #include "packet-p1.h" #include <epan/strutil.h> diff --git a/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c index 7578582192..51559f4817 100644 --- a/asn1/q932/packet-q932-template.c +++ b/asn1/q932/packet-q932-template.c @@ -135,7 +135,7 @@ static const value_string str_nd[] = { #include "packet-q932-fn.c" /*--- dissect_q932_facility_ie -------------------------------------------------------*/ -/*static*/ void +static void dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { gint8 appclass; gboolean pc; diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index 83a672fdc7..d2ea09eb6a 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -75,6 +75,7 @@ #define TCP_PORT_CS 1720 #define TLS_PORT_CS 1300 +void proto_register_h225(void); static void reset_h225_packet_info(h225_packet_info *pi); static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, h225_packet_info *pi); @@ -886,7 +887,7 @@ static int hf_h225_stopped = -1; /* NULL */ static int hf_h225_notAvailable = -1; /* NULL */ /*--- End of included file: packet-h225-hf.c ---*/ -#line 107 "../../asn1/h225/packet-h225-template.c" +#line 108 "../../asn1/h225/packet-h225-template.c" /* Initialize the subtree pointers */ static gint ett_h225 = -1; @@ -1134,7 +1135,7 @@ static gint ett_h225_ServiceControlResponse = -1; static gint ett_h225_T_result = -1; /*--- End of included file: packet-h225-ett.c ---*/ -#line 111 "../../asn1/h225/packet-h225-template.c" +#line 112 "../../asn1/h225/packet-h225-template.c" /* Preferences */ static guint h225_tls_port = TLS_PORT_CS; @@ -7511,7 +7512,7 @@ static int dissect_RasMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro /*--- End of included file: packet-h225-fn.c ---*/ -#line 135 "../../asn1/h225/packet-h225-template.c" +#line 136 "../../asn1/h225/packet-h225-template.c" /* Forward declaration we need below */ @@ -10693,7 +10694,7 @@ void proto_register_h225(void) { NULL, HFILL }}, /*--- End of included file: packet-h225-hfarr.c ---*/ -#line 232 "../../asn1/h225/packet-h225-template.c" +#line 233 "../../asn1/h225/packet-h225-template.c" }; /* List of subtrees */ @@ -10943,7 +10944,7 @@ void proto_register_h225(void) { &ett_h225_T_result, /*--- End of included file: packet-h225-ettarr.c ---*/ -#line 238 "../../asn1/h225/packet-h225-template.c" +#line 239 "../../asn1/h225/packet-h225-template.c" }; module_t *h225_module; diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c index c319deff10..4fcc3de3a5 100644 --- a/epan/dissectors/packet-h248.c +++ b/epan/dissectors/packet-h248.c @@ -47,6 +47,8 @@ #define PSNAME "H248" #define PFNAME "h248" +void proto_register_h248(void); + /* Initialize the protocol and registered fields */ static int proto_h248 = -1; static int hf_248_magic_num = -1; @@ -398,7 +400,7 @@ static int hf_h248_NotifyCompletion_otherReason = -1; static int hf_h248_NotifyCompletion_onIteration = -1; /*--- End of included file: packet-h248-hf.c ---*/ -#line 75 "../../asn1/h248/packet-h248-template.c" +#line 77 "../../asn1/h248/packet-h248-template.c" /* Initialize the subtree pointers */ static gint ett_h248 = -1; @@ -563,7 +565,7 @@ static gint ett_h248_EventParameterV1 = -1; static gint ett_h248_SigParameterV1 = -1; /*--- End of included file: packet-h248-ett.c ---*/ -#line 92 "../../asn1/h248/packet-h248-template.c" +#line 94 "../../asn1/h248/packet-h248-template.c" static expert_field ei_h248_errored_command = EI_INIT; static expert_field ei_h248_transactionId64 = EI_INIT; @@ -1354,7 +1356,7 @@ static int dissect_h248_ctx_id(gboolean implicit_tag, packet_info *pinfo, proto_ return offset; } -s_h248_package_t *s_find_package_id(guint16 pkgid) { +static s_h248_package_t *s_find_package_id(guint16 pkgid) { s_h248_package_t *s_pkg = NULL; s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid))); return s_pkg; @@ -1371,7 +1373,7 @@ static gint32 comparePkgID(gconstpointer a, gconstpointer b) { return GPOINTER_TO_UINT(b) - GPOINTER_TO_UINT(a); } -gboolean is_pkg_default(guint16 pkgid) { +static gboolean is_pkg_default(guint16 pkgid) { s_h248_package_t *s_pkg = NULL; s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid))); if(! s_pkg ) return TRUE; @@ -5369,7 +5371,7 @@ dissect_h248_ValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U /*--- End of included file: packet-h248-fn.c ---*/ -#line 1413 "../../asn1/h248/packet-h248-template.c" +#line 1415 "../../asn1/h248/packet-h248-template.c" static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle); @@ -6791,7 +6793,7 @@ void proto_register_h248(void) { NULL, HFILL }}, /*--- End of included file: packet-h248-hfarr.c ---*/ -#line 1578 "../../asn1/h248/packet-h248-template.c" +#line 1580 "../../asn1/h248/packet-h248-template.c" GCP_HF_ARR_ELEMS("h248",h248_arrel) @@ -6957,7 +6959,7 @@ void proto_register_h248(void) { &ett_h248_SigParameterV1, /*--- End of included file: packet-h248-ettarr.c ---*/ -#line 1596 "../../asn1/h248/packet-h248-template.c" +#line 1598 "../../asn1/h248/packet-h248-template.c" }; static ei_register_info ei[] = { diff --git a/epan/dissectors/packet-h248.h b/epan/dissectors/packet-h248.h index e6b166ce0d..8d7d8ed3f3 100644 --- a/epan/dissectors/packet-h248.h +++ b/epan/dissectors/packet-h248.h @@ -50,6 +50,7 @@ extern void h248_param_ber_octetstring(proto_tree*, tvbuff_t*, packet_info* , in extern void h248_param_ber_boolean(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void external_dissector(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* dissector_handle); extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u _U_, void* dissector_hdl); +extern void h248_param_external_dissector(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u _U_, void* dissector_hdl); typedef enum { ADD_PKG, /* add package at registration ONLY if no matching package ID */ diff --git a/epan/dissectors/packet-h450-ros.c b/epan/dissectors/packet-h450-ros.c index 1f42d59291..d653f42bf4 100644 --- a/epan/dissectors/packet-h450-ros.c +++ b/epan/dissectors/packet-h450-ros.c @@ -40,6 +40,7 @@ #include <epan/wmem/wmem.h> #include "packet-per.h" +#include "packet-h450-ros.h" #define PNAME "H.450 Remote Operations Apdus" #define PSNAME "H450.ROS" @@ -75,7 +76,7 @@ static int hf_h450_ros_returnResultProblem = -1; /* ReturnResultProblem */ static int hf_h450_ros_returnErrorProblem = -1; /* ReturnErrorProblem */ /*--- End of included file: packet-h450-ros-hf.c ---*/ -#line 46 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 47 "../../asn1/h450-ros/packet-h450-ros-template.c" /* Initialize the subtree pointers */ @@ -91,7 +92,7 @@ static gint ett_h450_ros_Reject = -1; static gint ett_h450_ros_T_problem = -1; /*--- End of included file: packet-h450-ros-ett.c ---*/ -#line 49 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 50 "../../asn1/h450-ros/packet-h450-ros-template.c" static expert_field ei_ros_undecoded = EI_INIT; @@ -584,7 +585,7 @@ dissect_h450_ros_ROS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr /*--- End of included file: packet-h450-ros-fn.c ---*/ -#line 78 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 79 "../../asn1/h450-ros/packet-h450-ros-template.c" /*--- proto_register_h450_ros -----------------------------------------------*/ void proto_register_h450_ros(void) { @@ -676,7 +677,7 @@ void proto_register_h450_ros(void) { "ReturnErrorProblem", HFILL }}, /*--- End of included file: packet-h450-ros-hfarr.c ---*/ -#line 85 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 86 "../../asn1/h450-ros/packet-h450-ros-template.c" }; /* List of subtrees */ @@ -694,7 +695,7 @@ void proto_register_h450_ros(void) { &ett_h450_ros_T_problem, /*--- End of included file: packet-h450-ros-ettarr.c ---*/ -#line 90 "../../asn1/h450-ros/packet-h450-ros-template.c" +#line 91 "../../asn1/h450-ros/packet-h450-ros-template.c" }; static ei_register_info ei[] = { diff --git a/epan/dissectors/packet-idmp.c b/epan/dissectors/packet-idmp.c index 5627cdd45e..084b49d586 100644 --- a/epan/dissectors/packet-idmp.c +++ b/epan/dissectors/packet-idmp.c @@ -57,6 +57,8 @@ void proto_register_idmp(void); void proto_reg_handoff_idm(void); +static void prefs_register_idmp(void); /* forward declaration for use in preferences registration */ +void register_idmp_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name); static gboolean idmp_desegment = TRUE; static guint global_idmp_tcp_port = 1102; /* made up for now */ @@ -69,8 +71,6 @@ static const char *protocolID = NULL; static const char *saved_protocolID = NULL; static guint32 opcode = -1; -static void prefs_register_idmp(void); /* forward declaration for use in preferences registration */ - /* Initialize the protocol and registered fields */ int proto_idmp = -1; diff --git a/epan/dissectors/packet-nhrp.c b/epan/dissectors/packet-nhrp.c index bc913caed9..2d63946be1 100644 --- a/epan/dissectors/packet-nhrp.c +++ b/epan/dissectors/packet-nhrp.c @@ -286,7 +286,7 @@ static guint16 nhrp_checksum(const guint8 *ptr, int len) return in_cksum(&cksum_vec[0], 1); } -void dissect_nhrp_hdr(tvbuff_t *tvb, +static void dissect_nhrp_hdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *pOffset, @@ -454,7 +454,7 @@ void dissect_nhrp_hdr(tvbuff_t *tvb, } } -void dissect_cie_list(tvbuff_t *tvb, +static void dissect_cie_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, @@ -570,7 +570,7 @@ void dissect_cie_list(tvbuff_t *tvb, } } -void dissect_nhrp_mand(tvbuff_t *tvb, +static void dissect_nhrp_mand(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *pOffset, @@ -821,7 +821,7 @@ void dissect_nhrp_mand(tvbuff_t *tvb, *pOffset = mandEnd; } -void dissect_nhrp_ext(tvbuff_t *tvb, +static void dissect_nhrp_ext(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint *pOffset, @@ -979,7 +979,7 @@ skip_switch: *pOffset = extEnd; } -void dissect_nhrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void dissect_nhrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { _dissect_nhrp(tvb, pinfo, tree, FALSE, TRUE); } diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index fa55217aa5..2422c8c09a 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -1210,7 +1210,7 @@ static guchar hex_ascii_to_binary(gchar c) #if HAVE_LIBGCRYPT /* Decipher payload if algorithm is supported and plausible inputs are available */ -tvbuff_t* decipher_payload(tvbuff_t *tvb, packet_info *pinfo, int *offset, pdu_security_settings_t *pdu_security_settings, +static tvbuff_t* decipher_payload(tvbuff_t *tvb, packet_info *pinfo, int *offset, pdu_security_settings_t *pdu_security_settings, enum pdcp_plane plane, gboolean *deciphered) { const char *k = pdu_security_settings->key; diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index fbee1bb242..dc9467926a 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -942,7 +942,7 @@ DEBUG_ENTRY("dissect_per_set_of"); /* 23 Encoding the object identifier type */ -guint32 +static guint32 dissect_per_any_oid(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, tvbuff_t **value_tvb, gboolean is_absolute) { @@ -986,7 +986,7 @@ dissect_per_relative_oid(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_ return dissect_per_any_oid(tvb, offset, actx, tree, hf_index, value_tvb, FALSE); } -guint32 +static guint32 dissect_per_any_oid_str(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, const char **value_stringx, gboolean is_absolute) { diff --git a/epan/dissectors/packet-pw-oam.c b/epan/dissectors/packet-pw-oam.c index 3d2270c511..35aa86e017 100644 --- a/epan/dissectors/packet-pw-oam.c +++ b/epan/dissectors/packet-pw-oam.c @@ -57,7 +57,7 @@ static const value_string pw_oam_code[] = { }; /* PW-Status TLV dissector */ -void +static void dissect_pw_status_tlv (tvbuff_t *tvb, proto_tree *tree, gint offset) { proto_item *ti; diff --git a/epan/dissectors/packet-q932.c b/epan/dissectors/packet-q932.c index 21972a9311..96464ce4bb 100644 --- a/epan/dissectors/packet-q932.c +++ b/epan/dissectors/packet-q932.c @@ -649,7 +649,7 @@ static void dissect_InterpretationComponent_PDU(tvbuff_t *tvb _U_, packet_info * #line 136 "../../asn1/q932/packet-q932-template.c" /*--- dissect_q932_facility_ie -------------------------------------------------------*/ -/*static*/ void +static void dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { gint8 appclass; gboolean pc; diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c index 25d5ecd3a7..fa36da7bab 100644 --- a/epan/dissectors/packet-reload.c +++ b/epan/dissectors/packet-reload.c @@ -722,7 +722,7 @@ static kind_t * kindidlist_uats = NULL; static guint nreloadkinds = 0; -kind_t * getKindFromId(guint32 id) { +static kind_t * getKindFromId(guint32 id) { guint i; /* user defined kinds have precedence */ for (i = 0; i < nreloadkinds; i++) { diff --git a/epan/dissectors/packet-selfm.c b/epan/dissectors/packet-selfm.c index c43f78aab8..86f094286c 100644 --- a/epan/dissectors/packet-selfm.c +++ b/epan/dissectors/packet-selfm.c @@ -932,7 +932,7 @@ static fastser_dataregion* fastser_dataregion_save(tvbuff_t *tvb, int offset) /********************************************************************************************************/ /* Lookup region name using current base address & saved conversation data. Return ptr to gchar string */ /********************************************************************************************************/ -const gchar* +static const gchar* region_lookup(packet_info *pinfo, guint32 base_addr) { fm_conversation *conv; |