Don't define data variables in header files included by more than one
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 1 Jun 2004 23:08:00 +0000 (23:08 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 1 Jun 2004 23:08:00 +0000 (23:08 +0000)
file - that keeps the variable from being shared, and also produces
compiler warnings if the variable isn't used by all the files that
include the header in question.

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

packet-rtp.c
rtp_pt.h

index e1b9f5730cfceb6610717e1ef00f9e96e1bb6f5f..8efe8a4208591e38898abb8d9b7dc1855d69cedc 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright 2000, Philips Electronics N.V.
  * Written by Andreas Sikkema <h323@ramdyne.nl>
  *
- * $Id: packet-rtp.c,v 1.46 2004/06/01 21:40:41 etxrab Exp $
+ * $Id: packet-rtp.c,v 1.47 2004/06/01 23:08:00 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -138,7 +138,36 @@ static const value_string rtp_version_vals[] =
 /* Payload type is the last 7 bits */
 #define RTP_PAYLOAD_TYPE(octet)        ((octet) & 0x7F)
 
-/* rtp_payload_type_vals[] defined in rtp_pt.h */
+const value_string rtp_payload_type_vals[] =
+{
+       { PT_PCMU,      "ITU-T G.711 PCMU" },
+       { PT_1016,      "USA Federal Standard FS-1016" },
+       { PT_G721,      "ITU-T G.721" },
+       { PT_GSM,       "GSM 06.10" },
+       { PT_G723,      "ITU-T G.723" },
+       { PT_DVI4_8000, "DVI4 8000 samples/s" },
+       { PT_DVI4_16000, "DVI4 16000 samples/s" },
+       { PT_LPC,       "Experimental linear predictive encoding from Xerox PARC" },
+       { PT_PCMA,      "ITU-T G.711 PCMA" },
+       { PT_G722,      "ITU-T G.722" },
+       { PT_L16_STEREO, "16-bit uncompressed audio, stereo" },
+       { PT_L16_MONO,  "16-bit uncompressed audio, monaural" },
+       { PT_QCELP,     "Qualcomm Code Excited Linear Predictive coding" },
+       { PT_CN,        "Comfort noise" },
+       { PT_MPA,       "MPEG-I/II Audio"},
+       { PT_G728,      "ITU-T G.728" },
+       { PT_DVI4_11025, "DVI4 11025 samples/s" },
+       { PT_DVI4_22050, "DVI4 22050 samples/s" },
+       { PT_G729,      "ITU-T G.729" },
+       { PT_CELB,      "Sun CellB video encoding" },
+       { PT_JPEG,      "JPEG-compressed video" },
+       { PT_NV,        "'nv' program" },
+       { PT_H261,      "ITU-T H.261" },
+       { PT_MPV,       "MPEG-I/II Video"},
+       { PT_MP2T,      "MPEG-II transport streams"},
+       { PT_H263,      "ITU-T H.263" },
+       { 0,            NULL },
+};
 
 static address fake_addr;
 static int heur_init = FALSE;
index 1ac694a1c267dee51109a2b12c199e65336ebf8c..789054886baeb5a6ca849a0a01dc172c12862670 100644 (file)
--- a/rtp_pt.h
+++ b/rtp_pt.h
@@ -1,7 +1,7 @@
 /* rtp_pt.h
  * Defines RTP payload types
  *
- * $Id: rtp_pt.h,v 1.3 2004/06/01 21:40:41 etxrab Exp $
+ * $Id: rtp_pt.h,v 1.4 2004/06/01 23:08:00 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #define PT_MP2T                33      /* RFC 2250 */
 #define PT_H263                34      /* from Chunrong Zhu of Intel; see the Web page */
 
-static const value_string rtp_payload_type_vals[] =
-{
-       { PT_PCMU,      "ITU-T G.711 PCMU" },
-       { PT_1016,      "USA Federal Standard FS-1016" },
-       { PT_G721,      "ITU-T G.721" },
-       { PT_GSM,       "GSM 06.10" },
-       { PT_G723,      "ITU-T G.723" },
-       { PT_DVI4_8000, "DVI4 8000 samples/s" },
-       { PT_DVI4_16000, "DVI4 16000 samples/s" },
-       { PT_LPC,       "Experimental linear predictive encoding from Xerox PARC" },
-       { PT_PCMA,      "ITU-T G.711 PCMA" },
-       { PT_G722,      "ITU-T G.722" },
-       { PT_L16_STEREO, "16-bit uncompressed audio, stereo" },
-       { PT_L16_MONO,  "16-bit uncompressed audio, monaural" },
-       { PT_QCELP,     "Qualcomm Code Excited Linear Predictive coding" },
-       { PT_CN,        "Comfort noise" },
-       { PT_MPA,       "MPEG-I/II Audio"},
-       { PT_G728,      "ITU-T G.728" },
-       { PT_DVI4_11025, "DVI4 11025 samples/s" },
-       { PT_DVI4_22050, "DVI4 22050 samples/s" },
-       { PT_G729,      "ITU-T G.729" },
-       { PT_CELB,      "Sun CellB video encoding" },
-       { PT_JPEG,      "JPEG-compressed video" },
-       { PT_NV,        "'nv' program" },
-       { PT_H261,      "ITU-T H.261" },
-       { PT_MPV,       "MPEG-I/II Video"},
-       { PT_MP2T,      "MPEG-II transport streams"},
-       { PT_H263,      "ITU-T H.263" },
-       { 0,            NULL },
-};
+ETH_VAR_IMPORT const value_string rtp_payload_type_vals[];
 
 #endif