Move some headers for stuff defined by a dissector into epan/dissectors
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 17 Sep 2005 00:31:15 +0000 (00:31 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 17 Sep 2005 00:31:15 +0000 (00:31 +0000)
- and rename smb.h to packet-smb.h, as it's packet-smb.c's header file.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15845 f5534014-38df-0310-8fa8-9805f1628bb7

18 files changed:
epan/Makefile.common
epan/dissectors/Makefile.common
epan/dissectors/format-oid.h [moved from epan/format-oid.h with 100% similarity]
epan/dissectors/packet-cops.c
epan/dissectors/packet-ndmp.c
epan/dissectors/packet-rpc.c
epan/dissectors/packet-smb-browse.c
epan/dissectors/packet-smb-mailslot.c
epan/dissectors/packet-smb-pipe.c
epan/dissectors/packet-smb-sidsnooping.c
epan/dissectors/packet-smb.c
epan/dissectors/packet-smb.h [moved from epan/smb.h with 99% similarity]
epan/dissectors/packet-snmp.c
epan/dissectors/packet-windows-common.c
epan/dissectors/rpc_defrag.h [moved from epan/rpc_defrag.h with 95% similarity]
gtk/smb_stat.c
tap-smbsids.c
tap-smbstat.c

index d985485cca2a011c7648ae4853ad906c66c94c08..fb1adb9dfa88374425b0922fc7299728f4f33344 100644 (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         \
index 7fc3e122b91592dd0bb1b981f7b620c35e6f9508..f0e00d74142d87feeb5cd079ce673b7b223081ea 100644 (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
index ea6e9cdedd9cda8d0214a713b3f3351c08609b67..8c3861a5e22643c3b0ee74515c0c7fbe79d2bf3b 100644 (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>
 
index 12ddfa13b97b6b09edb66718c2e711a091b02449..4a70e2d8d103c17a6b4f2ef71736e9826c240ec1 100644 (file)
 #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[] = {
index 2676ac25256ca2de6b7fdd9c0970f2a13b445bcc..7b8b22ff73532f7c728420eea167e2abf60f1c44 100644 (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>
index 0edf5f43220640008f06d1d89ce549cf439bd3c9..b97e3eae61e2314d3160d869116755faff7e6333 100644 (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"
index 53e23435b51ca0aa25a2bde8327a2552df75777f..9fedb355520b64f55a761e381d8842e85f7bce64 100644 (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"
index 77bf1340ad60ada8c88be1e391f2c928b01464e9..d7a3d36cf0409412e1129739a1d648933e3f3d8d 100644 (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"
index d3dd92140297e0affb40ef884399539376eb4164..19dd5261269f70c5053e0579f8bf48a4acbb8145 100644 (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;
index 3714429bdd08fc1d771ab3c86374fd8b3c0ecbe9..22514d9d6b380531633db0a72c9418ecb5fddba2 100644 (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>
similarity index 99%
rename from epan/smb.h
rename to epan/dissectors/packet-smb.h
index a7d825643aeefaafc58718565265bc5ae67ffc6b..cb545ca3105fb088ca8d67344fdcb9dee8ad365f 100644 (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;
 
index 284bf96ff4c8628cb9fddd7e0ca635a740f31c5a..91bd31e8cd60e85f268a7636d57226249d9dc9b6 100644 (file)
 #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,
index 45d30981491d8886aec099bb3233e6e867725f74..7a46b2b122342b8ff798438ba759d618b2951c5b 100644 (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;
similarity index 95%
rename from epan/rpc_defrag.h
rename to epan/dissectors/rpc_defrag.h
index c84317c467d3f2308535cf113a3a603d275adc33..3190221864a170053a48ecfc7dabc7166e7f0770 100644 (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);
index f63d262063568d3ba7b9033376689d435de3a68d..4c22787482f6d0477d5a52e930a37b4edc0db0d0 100644 (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"
index 51b39e1637b2da25dce6b1225a4c7fd6355c9e56..cb601a7c1990f30b5e20d385a2869e30ed5c76cf 100644 (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
index a1ff557ca9b02693d65e0d8302781ea38cad4727..c8c6c88594a2c7e7833e0ae6585122f33516bffe 100644 (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"