Make local functions static. Include *.h when needed.

svn path=/trunk/; revision=54201
This commit is contained in:
Anders Broman 2013-12-17 22:07:32 +00:00
parent be09c39208
commit e6d09c1634
19 changed files with 47 additions and 36 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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 */

View File

@ -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"

View File

@ -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;

View File

@ -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>

View File

@ -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;

View File

@ -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;

View File

@ -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[] = {

View File

@ -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 */

View File

@ -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[] = {

View File

@ -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;

View File

@ -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);
}

View File

@ -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;

View File

@ -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)
{

View File

@ -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;

View File

@ -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;

View File

@ -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++) {

View File

@ -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;