Move some headers for stuff defined by a dissector into epan/dissectors

- and rename smb.h to packet-smb.h, as it's packet-smb.c's header file.

svn path=/trunk/; revision=15845
This commit is contained in:
Guy Harris 2005-09-17 00:31:15 +00:00
parent b7b80d94be
commit ab2dca9114
18 changed files with 28 additions and 30 deletions

View File

@ -125,7 +125,6 @@ LIBETHEREAL_INCLUDES = \
expert.h \
filesystem.h \
follow.h \
format-oid.h \
frame_data.h \
gnuc_format_check.h \
greproto.h \
@ -155,14 +154,12 @@ LIBETHEREAL_INCLUDES = \
reassemble.h \
report_err.h \
req_resp_hdrs.h \
rpc_defrag.h \
rtp_pt.h \
sctpppids.h \
sha1.h \
sigcomp_state_hdlr.h \
sigcomp-udvm.h \
slab.h \
smb.h \
sminmpec.h \
sna-utils.h \
stat_cmd_args.h \

View File

@ -638,6 +638,7 @@ DISSECTOR_SRC = \
# corresponding headers
DISSECTOR_INCLUDES = \
$(PIDL_DISSECTOR_INCLUDES) \
format-oid.h \
packet-acse.h \
packet-actrace.h \
packet-afp.h \
@ -837,6 +838,7 @@ DISSECTOR_INCLUDES = \
packet-ses.h \
packet-sip.h \
packet-sll.h \
packet-smb.h \
packet-smb-browse.h \
packet-smb-common.h \
packet-smb-mailslot.h \
@ -879,6 +881,7 @@ DISSECTOR_INCLUDES = \
packet-yppasswd.h \
packet-ypserv.h \
packet-ypxfr.h \
rpc_defrag.h \
$(GENERATED_HEADER_FILES)
# Dissector helpers. They're included in the source files in this

View File

@ -85,7 +85,7 @@
#endif /* HAVE_SOME_SNMP */
#include <epan/asn1.h>
#include <epan/format-oid.h>
#include <epan/dissectors/format-oid.h>
#include <epan/prefs.h>
#include <epan/emem.h>

View File

@ -46,11 +46,9 @@
#include "packet-frame.h"
#include <epan/prefs.h>
#include <epan/reassemble.h>
#include <epan/rpc_defrag.h>
#include <epan/dissectors/rpc_defrag.h>
#define TCP_PORT_NDMP 10000
#define NDMP_RM_LASTFRAG 0x80000000
#define NDMP_RM_LENGTH 0x7fffffff
static int proto_ndmp = -1;
static int hf_ndmp_lastfrag = -1;
@ -2801,7 +2799,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* Check if this is the last fragment.
*/
if (!(ndmp_rm & NDMP_RM_LASTFRAG)) {
if (!(ndmp_rm & RPC_RM_LASTFRAG)) {
/*
* This isn't the last fragment.
* If we're doing reassembly, just return
@ -2827,8 +2825,8 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hdr_item = proto_tree_add_text(ndmp_tree, tvb, 0, 4,
"Fragment header: %s%u %s",
(ndmp_rm & NDMP_RM_LASTFRAG) ? "Last fragment, " : "",
ndmp_rm & NDMP_RM_LENGTH, plurality(ndmp_rm & NDMP_RM_LENGTH, "byte", "bytes"));
(ndmp_rm & RPC_RM_LASTFRAG) ? "Last fragment, " : "",
ndmp_rm & RPC_RM_FRAGLEN, plurality(ndmp_rm & RPC_RM_FRAGLEN, "byte", "bytes"));
hdr_tree = proto_item_add_subtree(hdr_item, ett_ndmp_fraghdr);
proto_tree_add_boolean(hdr_tree, hf_ndmp_lastfrag, tvb, 0, 4, ndmp_rm);
proto_tree_add_uint(hdr_tree, hf_ndmp_fraglen, tvb, 0, 4, ndmp_rm);
@ -2867,7 +2865,7 @@ dissect_ndmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* It has to be >=24 bytes or (arbitrary limit) <1Mbyte
*/
if(len>=4){
tmp=(tvb_get_ntohl(tvb, 0)&NDMP_RM_LENGTH);
tmp=(tvb_get_ntohl(tvb, 0)&RPC_RM_FRAGLEN);
if( (tmp<24)||(tmp>1000000) ){
return 0;
}
@ -3575,10 +3573,10 @@ proto_register_ndmp(void)
NULL, 0, "Estimated time remaining", HFILL }},
{ &hf_ndmp_lastfrag, {
"Last Fragment", "ndmp.lastfrag", FT_BOOLEAN, 32,
&yesno, NDMP_RM_LASTFRAG, "Last Fragment", HFILL }},
&yesno, RPC_RM_LASTFRAG, "Last Fragment", HFILL }},
{ &hf_ndmp_fraglen, {
"Fragment Length", "ndmp.fraglen", FT_UINT32, BASE_DEC,
NULL, NDMP_RM_LENGTH, "Fragment Length", HFILL }},
NULL, RPC_RM_FRAGLEN, "Fragment Length", HFILL }},
};
static gint *ett[] = {

View File

@ -40,7 +40,7 @@
#include "packet-tcp.h"
#include <epan/prefs.h>
#include <epan/reassemble.h>
#include <epan/rpc_defrag.h>
#include <epan/dissectors/rpc_defrag.h>
#include "packet-nfs.h"
#include <epan/tap.h>
#include <epan/emem.h>

View File

@ -36,7 +36,7 @@
#include <glib.h>
#include <ctype.h>
#include <epan/packet.h>
#include <epan/smb.h>
#include <epan/dissectors/packet-smb.h>
#include "packet-smb-browse.h"
#include "packet-dcerpc.h"

View File

@ -34,7 +34,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/smb.h>
#include <epan/dissectors/packet-smb.h>
#include "packet-smb-mailslot.h"
#include "packet-smb-browse.h"
#include "packet-smb-pipe.h"

View File

@ -42,7 +42,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
#include <glib.h>
#include <ctype.h>
#include <epan/packet.h>
#include <epan/smb.h>
#include <epan/dissectors/packet-smb.h>
#include "packet-smb-pipe.h"
#include "packet-smb-browse.h"
#include "packet-smb-common.h"

View File

@ -37,7 +37,7 @@
#include "packet-dcerpc.h"
#include "packet-dcerpc-nt.h"
#include "register.h"
#include <epan/smb.h>
#include <epan/dissectors/packet-smb.h>
#include "packet-smb-sidsnooping.h"
static int hf_lsa = -1;

View File

@ -38,7 +38,7 @@
#include <ctype.h>
#include <epan/packet.h>
#include <epan/conversation.h>
#include <epan/smb.h>
#include <epan/dissectors/packet-smb.h>
#include <epan/strutil.h>
#include <epan/prefs.h>
#include <epan/reassemble.h>

View File

@ -1,5 +1,5 @@
/* smb.h
* Defines for smb packet dissection
/* packet-smb.h
* Defines for SMB packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id$
@ -23,8 +23,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _SMB_H
#define _SMB_H
#ifndef __PACKET_SMB_H__
#define __PACKET_SMB_H__
ETH_VAR_IMPORT gboolean sid_name_snooping;

View File

@ -112,7 +112,7 @@
#include <epan/asn1.h>
#include "packet-snmp.h"
#include <epan/format-oid.h>
#include <epan/dissectors/format-oid.h>
/* Take a pointer that may be null and return a pointer that's not null
by turning null pointers into pointers to the above null string,

View File

@ -33,7 +33,7 @@
#include "packet-dcerpc.h"
#include "packet-smb-sidsnooping.h"
#include "packet-windows-common.h"
#include <epan/smb.h> /* for "sid_name_snooping" */
#include <epan/dissectors/packet-smb.h> /* for "sid_name_snooping" */
static int hf_nt_sec_desc_revision = -1;
static int hf_nt_sec_desc_type_owner_defaulted = -1;

View File

@ -28,8 +28,8 @@
/*
* RPC-over-TCP fragmentation.
*/
#define RPC_RM_LASTFRAG 0x80000000L
#define RPC_RM_FRAGLEN 0x7fffffffL
#define RPC_RM_LASTFRAG 0x80000000U
#define RPC_RM_FRAGLEN 0x7fffffffU
typedef gboolean (*rec_dissector_t)(tvbuff_t *, packet_info *, proto_tree *,
tvbuff_t *, fragment_data *, gboolean, guint32, gboolean);

View File

@ -39,7 +39,7 @@
#include <epan/value_string.h>
#include <epan/tap.h>
#include <epan/smb.h>
#include <epan/dissectors/packet-smb.h>
#include "../register.h"
#include "../timestats.h"
#include "compat_macros.h"

View File

@ -39,7 +39,7 @@
#include <epan/tap.h>
#include <epan/stat_cmd_args.h>
#include "epan/value_string.h"
#include <epan/smb.h>
#include <epan/dissectors/packet-smb.h>
static int

View File

@ -37,7 +37,7 @@
#include <epan/tap.h>
#include <epan/stat_cmd_args.h>
#include "epan/value_string.h"
#include <epan/smb.h>
#include <epan/dissectors/packet-smb.h>
#include "register.h"
#include "timestats.h"