Make a whole bunch of symbols static.

svn path=/trunk/; revision=35139
This commit is contained in:
Jeff Morriss 2010-12-06 23:17:43 +00:00
parent f2fc5d42fd
commit 2c6e8dfd3a
3 changed files with 68 additions and 82 deletions

View File

@ -30,26 +30,22 @@
#include "config.h"
#endif
#include <string.h>
#include <glib.h>
#include <gmodule.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/strutil.h>
#include "packet-fmp.h"
#include "packet-rpc.h"
int hf_fmp_procedure = -1;
int hf_fmp_fsID = -1;
int hf_fmp_fsBlkSz = -1;
int hf_fmp_sessionHandle = -1;
int hf_fmp_fmpFHandle = -1;
int hf_fmp_msgNum = -1;
int hf_fmp_fileSize = -1;
int hf_fmp_cookie = -1;
int hf_fmp_firstLogBlk = -1;
int hf_fmp_numBlksReq = -1;
static int hf_fmp_procedure = -1;
static int hf_fmp_fsID = -1;
static int hf_fmp_fsBlkSz = -1;
static int hf_fmp_sessionHandle = -1;
static int hf_fmp_fmpFHandle = -1;
static int hf_fmp_msgNum = -1;
static int hf_fmp_fileSize = -1;
static int hf_fmp_cookie = -1;
static int hf_fmp_firstLogBlk = -1;
static int hf_fmp_numBlksReq = -1;
static int proto_fmp = -1;
static int hf_fmp_hostID = -1;
@ -110,9 +106,9 @@ static gint ett_capabilities = -1;
static gint ett_HierVolumeDescription = -1;
static gint ett_attrs = -1;
gboolean fmp_fhandle_reqrep_matching = FALSE;
static gboolean fmp_fhandle_reqrep_matching = FALSE;
int
static int
dissect_fmp_genString(tvbuff_t *tvb, int offset, proto_tree *tree)
{
encoding mode;
@ -185,7 +181,7 @@ get_fileHandleSrc_size(tvbuff_t *tvb, int offset)
return length;
}
int
static int
dissect_fmp_fileHandleSrc(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
@ -315,7 +311,7 @@ dissect_fmp_fileHandleSrc(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
return offset;
}
int
static int
dissect_fmp_extentState(tvbuff_t *tvb, int offset, proto_tree *tree)
{
extentState state;
@ -331,7 +327,7 @@ dissect_fmp_extentState(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
int
static int
dissect_fmp_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint32 ext_num)
{
proto_item *extItem;
@ -358,7 +354,7 @@ dissect_fmp_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
return offset;
}
int
static int
dissect_fmp_extentList(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
@ -390,7 +386,7 @@ dissect_fmp_extentList(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
int
static int
dissect_fmp_extentListEx(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
@ -431,7 +427,7 @@ dissect_fmp_extentListEx(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
int
static int
dissect_plugInID(tvbuff_t *tvb, int offset, proto_tree *tree)
{
const guint8 *plugInID;
@ -446,7 +442,7 @@ dissect_plugInID(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
int
static int
dissect_fmp_flushCmd(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint32 cmd;
@ -510,7 +506,8 @@ dissect_fmp_flushCmd(tvbuff_t *tvb, int offset, proto_tree *tree)
offset += 4;
return offset;
}
int
static int
dissect_InterpretVolMgtStuff(tvbuff_t *tvb, int offset, proto_tree *tree)
{
int length,numdisks,i,j;
@ -540,7 +537,8 @@ dissect_InterpretVolMgtStuff(tvbuff_t *tvb, int offset, proto_tree *tree)
}
int
static int
dissect_fmp_capability(tvbuff_t *tvb, int offset, proto_tree *tree)
{
int vmType;
@ -592,7 +590,7 @@ dissect_fmp_capability(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
int
static int
dissect_fmp_timeval(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree, int hf_time, int hf_time_sec,
int hf_time_nsec)
@ -625,7 +623,7 @@ dissect_fmp_timeval(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
return offset;
}
int
static int
dissect_fmp_heartBeatIntv(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
@ -641,7 +639,7 @@ dissect_fmp_heartBeatIntv(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
return offset;
}
int
static int
dissect_fmp_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval)
{
fmpStat status;
@ -716,7 +714,7 @@ dissect_fmp_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval)
return offset;
}
int
static int
dissect_fmp_devSerial(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
@ -756,7 +754,8 @@ dissect_fmp_devSerial(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
int dissect_fmp_VolumeDescription(tvbuff_t *tvb, int offset, proto_tree * tree)
static int
dissect_fmp_VolumeDescription(tvbuff_t *tvb, int offset, proto_tree * tree)
{
int i,length;
proto_tree *Hietree,*hieTree;
@ -864,8 +863,8 @@ int dissect_fmp_VolumeDescription(tvbuff_t *tvb, int offset, proto_tree * tree)
}
int dissect_fmp_Hiervolume(tvbuff_t *tvb, int offset, proto_tree * tree)
static int
dissect_fmp_Hiervolume(tvbuff_t *tvb, int offset, proto_tree * tree)
{
int vollength;
@ -905,7 +904,7 @@ int dissect_fmp_Hiervolume(tvbuff_t *tvb, int offset, proto_tree * tree)
int
static int
dissect_fmp_vmInfo(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
@ -1010,7 +1009,7 @@ dissect_fmp_vmInfo(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
int
static int
dissect_fmp_notifyProtocol(tvbuff_t *tvb, int offset, proto_tree *tree)
{
@ -1046,7 +1045,7 @@ dissect_fmp_notifyProtocol(tvbuff_t *tvb, int offset, proto_tree *tree)
}
int
static int
dissect_fmp_capabilities(tvbuff_t *tvb, int offset, proto_tree *tree)
{
@ -1084,7 +1083,7 @@ dissect_fmp_capabilities(tvbuff_t *tvb, int offset, proto_tree *tree)
}
int
static int
dissect_fmp_cerrInfo(tvbuff_t *tvb, int offset, proto_tree *tree)
{
int rval;
@ -1118,7 +1117,7 @@ dissect_fmp_cerrInfo(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
int
static int
dissect_fmp_attrs(tvbuff_t *tvb, int offset, proto_tree *tree)
{
int attrs;
@ -2304,8 +2303,8 @@ proto_register_fmp(void)
prefs_register_bool_preference(fmp_module, "fhandle_find_both_reqrep",
"Fhandle filters finds both request/response",
"With this option display filters for fmp fhandle a RPC call, even if the actual fhandle is only present in one of the packets"
, &fmp_fhandle_reqrep_matching);
"With this option display filters for fmp fhandle a RPC call, even if the actual fhandle is only present in one of the packets",
&fmp_fhandle_reqrep_matching);
}
@ -2316,5 +2315,5 @@ proto_reg_handoff_fmp(void)
rpc_init_prog(proto_fmp, FMP_PROGRAM, ett_fmp);
/* Register the procedure tables */
rpc_init_proc_table(FMP_PROGRAM, FMP_VERSION_3, fmp3_proc,hf_fmp_procedure);
rpc_init_proc_table(FMP_PROGRAM, FMP_VERSION_3, fmp3_proc, hf_fmp_procedure);
}

View File

@ -1,23 +1,23 @@
/* packet-fmp.h
* Defines for fmp dissection
*
*
* $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -87,14 +87,14 @@
#define FMP_PLUG_IN_ID_SZ 16
/*
/*
* FMP Notify Protocol
*/
#define FMP_TCP 0
#define FMP_UDP 1
/*
* Capabilities
* Capabilities
*/
#define FMP_CAP_REVOKE_HANDLE_LIST 0x0001
@ -148,8 +148,8 @@ typedef enum {
FMP_CIFSV2 = 7,
FMP_UNC = 8
} nativeProtocol;
#define FMP_MAX_PATH_LEN 1024
@ -173,7 +173,7 @@ typedef enum {
FMP_VOLUME_SLICE = 1,
FMP_VOLUME_STRIPE = 2,
FMP_VOLUME_META = 3
}fmpVolumeType;
} fmpVolumeType;
/*
* Extent States
@ -197,18 +197,5 @@ typedef enum {
#define MAX_MSG_SIZE 256 /* For wireshark messages */
/*
extern int hf_fmp_fsID;
extern int hf_fmp_fsBlkSz;
extern int hf_fmp_sessionHandle;
extern int hf_fmp_fmpFHandle;
extern int hf_fmp_msgNum;
extern int hf_fmp_fileSize;
extern int hf_fmp_firstLogBlk;
extern int hf_fmp_numBlksReq;
extern int hf_fmp_cookie;
*/
int dissect_fmp_status(tvbuff_t *, int, proto_tree *, int *);
int dissect_fmp_extentList(tvbuff_t *, int, packet_info *, proto_tree *);
#endif

View File

@ -10,7 +10,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -85,9 +85,9 @@ static int hf_fmp_startOffset = -1;
static int hf_fmp_extent_state = -1;
int dissect_fmp_notify_extentList(tvbuff_t *, int, packet_info *, proto_tree *);
static int dissect_fmp_notify_extentList(tvbuff_t *, int, packet_info *, proto_tree *);
int
static int
dissect_fmp_notify_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval)
{
fmpStat status;
@ -148,7 +148,7 @@ dissect_fmp_notify_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval
case FMP_REQUEST_CANCELLED:
*rval = 1;
break;
case FMP_WRITER_ZEROED_BLK:
*rval = 0;
break;
@ -171,7 +171,7 @@ dissect_fmp_notify_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_status , offset);
return offset;
}
static int
@ -214,7 +214,7 @@ static int
dissect_handleList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
int numHandles;
int listLength;
int i;
@ -226,7 +226,7 @@ dissect_handleList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
numHandles = tvb_get_ntohl(tvb, offset);
listLength = 4;
listLength = 4;
for (i = 0; i < numHandles; i++) {
listLength += (4 + tvb_get_ntohl(tvb, offset + listLength));
@ -240,13 +240,13 @@ dissect_handleList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
offset = dissect_rpc_uint32(tvb, handleListTree,
hf_fmp_handleListLen, offset);
for (i = 0; i <= numHandles; i++) {
for (i = 0; i <= numHandles; i++) {
offset = dissect_rpc_data(tvb, handleListTree,
hf_fmp_fmpFHandle, offset);/* changed */
}
return offset;
}
}
static int
dissect_FMP_NOTIFY_DownGrade_request(tvbuff_t *tvb, int offset,
@ -410,13 +410,13 @@ dissect_FMP_NOTIFY_revokeHandleList_reply(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
int rval;
offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
return offset;
}
/*
* proc number, "proc name", dissect_request, dissect_reply
* proc number, "proc name", dissect_request, dissect_reply
* NULL as function pointer means: type of arguments is "void".
*/
static const vsff fmp_notify2_proc[] = {
@ -499,7 +499,7 @@ proto_register_fmp_notify(void)
{ &hf_fmp_notify_procedure, {
"Procedure", "fmp_notify.fmp_notify_procedure", FT_UINT32, BASE_DEC,
VALS(fmp_notify_proc_vals) , 0, NULL, HFILL }}, /* New addition */
{ &hf_fmp_status, {
"Status", "fmp_notify.status", FT_UINT32, BASE_DEC,
VALS(fmp_status_vals), 0, "Reply Status", HFILL }},
@ -528,7 +528,7 @@ proto_register_fmp_notify(void)
{ &hf_fmp_numBlksReq, {
"Number Blocks Requested", "fmp_notify.numBlksReq", FT_UINT32,
BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_fmp_msgNum, {
"Message Number", "fmp_notify.msgNum", FT_UINT32, BASE_DEC,
@ -543,7 +543,7 @@ proto_register_fmp_notify(void)
"First Logical Block", "fmp_notify.firstLogBlk", FT_UINT32,
BASE_DEC, NULL, 0, "First Logical File Block", HFILL }},
{ &hf_fmp_fileSize, {
"File Size", "fmp_notify.fileSize", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
@ -562,7 +562,7 @@ proto_register_fmp_notify(void)
&ett_fmp_notify_hlist,
};
proto_fmp_notify =
proto_fmp_notify =
proto_register_protocol("File Mapping Protocol Nofity",
"FMP/NOTIFY", "fmp_notify");
proto_register_field_array(proto_fmp_notify, hf, array_length(hf));
@ -582,7 +582,7 @@ proto_reg_handoff_fmp_notify(void)
}
int
static int
dissect_fmp_notify_extentState(tvbuff_t *tvb, int offset, proto_tree *tree)
{
extentState state;
@ -598,7 +598,7 @@ dissect_fmp_notify_extentState(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
int
static int
dissect_fmp_notify_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree, guint32 ext_num)
{
@ -612,7 +612,7 @@ dissect_fmp_notify_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
extItem = proto_tree_add_text(tree, tvb, offset, 20 ,
"Extent (%u)", (guint32) ext_num);
extTree = proto_item_add_subtree(extItem, ett_fmp_ext);
offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_firstLogBlk,
@ -628,7 +628,7 @@ dissect_fmp_notify_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
int
static int
dissect_fmp_notify_extentList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
@ -643,7 +643,7 @@ dissect_fmp_notify_extentList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
numExtents = tvb_get_ntohl(tvb, offset);
totalLength = 4 + (20 * numExtents);
totalLength = 4 + (20 * numExtents);
extListItem = proto_tree_add_text(tree, tvb, offset, totalLength,
"Extent List");