Move the definition of TEXT_LAYER_LENGTH to packet-tpkt.c.
authorGuy Harris <guy@alum.mit.edu>
Tue, 12 Jan 2016 05:02:22 +0000 (21:02 -0800)
committerGuy Harris <guy@alum.mit.edu>
Tue, 12 Jan 2016 05:02:52 +0000 (05:02 +0000)
It's not used by anything outside the TPKT dissector - and probably
*shouldn't* be used by anything outside the TPKT dissector.

Clean up some white space while we're at it.

Change-Id: I9bb9642a002fb9e8bd6c36d80d7653ef9af615d4
Reviewed-on: https://code.wireshark.org/review/13204
Reviewed-by: Guy Harris <guy@alum.mit.edu>
epan/dissectors/packet-tpkt.c
epan/dissectors/packet-tpkt.h

index f844af51968cc3c95ae85e2870abdce0400b1e1f..080340d9f10ca14413e7d9abb896e4dd8c555e19 100644 (file)
@@ -198,6 +198,12 @@ parseReservedText ( guint8* pTpktData )
 
     return value;
 }
+
+/*
+ * Length of the TPKT text-layer header.
+ */
+static const int TEXT_LAYER_LENGTH   = 9;
+
 /*
  * Dissect ASCII TPKT-encapsulated data in a TCP stream.
  */
index 59df5562a558651d58191927d8d6cf08f8f1abbd..cc81381f956a5ff7af1c2e59ae0777bb50629484 100644 (file)
@@ -35,8 +35,6 @@
  * TPKT header must be at least "4+min_len" in order for this to be a
  * valid TPKT PDU for the protocol in question.
  */
-static const int TEXT_LAYER_LENGTH   = 9;
-
 WS_DLL_PUBLIC int is_tpkt(tvbuff_t *tvb, int min_len);
 
 /*
@@ -46,7 +44,6 @@ WS_DLL_PUBLIC void dissect_tpkt_encap(tvbuff_t *tvb, packet_info *pinfo,
     proto_tree *tree, gboolean desegment,
     dissector_handle_t subdissector_handle);
 
-
 /*
  * Check whether this could be a ASCII TPKT-encapsulated PDU.
  * Returns -1 if it's not, and the PDU length from the TPKT header
@@ -56,7 +53,6 @@ WS_DLL_PUBLIC void dissect_tpkt_encap(tvbuff_t *tvb, packet_info *pinfo,
  * TPKT header must be at least "8+min_len" in order for this to be a
  * valid TPKT PDU for the protocol in question.
  */
-
 extern guint16 is_asciitpkt(tvbuff_t *tvb);
 
 /*
@@ -64,4 +60,3 @@ extern guint16 is_asciitpkt(tvbuff_t *tvb);
  */
 extern void dissect_asciitpkt(tvbuff_t *tvb, packet_info *pinfo,
     proto_tree *tree, dissector_handle_t subdissector_handle);
-