RDM: Made PID array global (can be reused in packet-artnet.c)

Fixed deprecated API warning

Change-Id: I761181baf9f5ae31a8a3807eb27d791d8868dcde
Reviewed-on: https://code.wireshark.org/review/5786
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
zeuz 2014-12-16 19:08:53 +01:00 committed by Anders Broman
parent 2d6adb2466
commit 201840477f
3 changed files with 41 additions and 3 deletions

View File

@ -1608,6 +1608,7 @@ DISSECTOR_INCLUDES = \
packet-radius.h \
packet-ranap.h \
packet-raw.h \
packet-rdm.h \
packet-rdt.h \
packet-reload.h \
packet-rlc.h \

View File

@ -44,6 +44,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/dissectors/packet-rdm.h>
void proto_register_rdm(void);
@ -133,7 +134,7 @@ static const value_string rdm_rt_vals[] = {
#define RDM_PARAM_ID_CAPTURE_PRESET 0x1030
#define RDM_PARAM_ID_PRESET_PLAYBACK 0x1031
static const value_string rdm_param_id_vals[] = {
const value_string rdm_param_id_vals[] = {
{ RDM_PARAM_ID_DISC_UNIQUE_BRANCH, "DISC_UNIQUE_BRANCH" },
{ RDM_PARAM_ID_DISC_MUTE, "DISC_MUTE" },
{ RDM_PARAM_ID_DISC_UN_MUTE, "DISC_UN_MUTE" },
@ -188,7 +189,8 @@ static const value_string rdm_param_id_vals[] = {
{ RDM_PARAM_ID_PRESET_PLAYBACK, "PRESET_PLAYBACK" },
{ 0, NULL },
};
static value_string_ext rdm_param_id_vals_ext = VALUE_STRING_EXT_INIT(rdm_param_id_vals);
value_string_ext rdm_param_id_vals_ext = VALUE_STRING_EXT_INIT(rdm_param_id_vals);
#define RDM_STATUS_NONE 0x00
#define RMD_STATUS_GET_LAST_MESSAGE 0x01
@ -2122,7 +2124,7 @@ dissect_rdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 2;
if (offset < tvb_length(tvb))
if (offset < tvb_reported_length(tvb))
proto_tree_add_item(rdm_tree, hf_rdm_trailer, tvb,
offset, -1, ENC_NA);
}

View File

@ -0,0 +1,35 @@
/* packet-rdm.h
* Declarations for dissecting RDM PIDs
* Copyright 2014, Claudius Zingerli <czingerl@gmail.com>
*
* RDM Parameter IDs (PIDs) are used in
* - packet-rdm.c (Ansi E1.20,E1.33 (ACN))
* - packet-artnet.c (Art-Net3)
* -> Declarations remain in packet-rdm.c
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __PACKET_RDM_H__
#define __PACKET_RDM_H__
extern value_string_ext rdm_param_id_vals_ext;
#endif /* #ifndef __PACKET_RDM_H__ */