diff options
author | Gerald Combs <gerald@wireshark.org> | 2010-06-04 18:45:02 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2010-06-04 18:45:02 +0000 |
commit | f6b2458924a0fef8d513642515bdd3a297fbfee0 (patch) | |
tree | a70a146ada3498217daa4a94c3cbed76eb2e5775 /plugins | |
parent | cfe5890af7a14c01cb179a3d3cf558f9fa7fac56 (diff) | |
download | wireshark-f6b2458924a0fef8d513642515bdd3a297fbfee0.tar.gz wireshark-f6b2458924a0fef8d513642515bdd3a297fbfee0.tar.bz2 wireshark-f6b2458924a0fef8d513642515bdd3a297fbfee0.zip |
From Matt Poduska via bug 1957 (with minor changes):
New dissector (plugin) to support decode of the EPCglobal Low-Level Reader
protocol (see llrp.org for more information). This dissector has passed fuzz
testing.
svn path=/trunk/; revision=33088
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Makefile.am | 1 | ||||
-rw-r--r-- | plugins/Makefile.nmake | 5 | ||||
-rw-r--r-- | plugins/llrp/AUTHORS | 4 | ||||
-rw-r--r-- | plugins/llrp/ChangeLog | 5 | ||||
-rw-r--r-- | plugins/llrp/Makefile.am | 121 | ||||
-rw-r--r-- | plugins/llrp/Makefile.common | 50 | ||||
-rw-r--r-- | plugins/llrp/Makefile.nmake | 95 | ||||
-rw-r--r-- | plugins/llrp/llrp-1x0-def.c | 3953 | ||||
-rw-r--r-- | plugins/llrp/llrp-1x0-def.h | 532 | ||||
-rw-r--r-- | plugins/llrp/llrp-Intermec.c | 866 | ||||
-rw-r--r-- | plugins/llrp/llrp-Intermec.h | 169 | ||||
-rw-r--r-- | plugins/llrp/llrpparse.c | 751 | ||||
-rw-r--r-- | plugins/llrp/llrpparse.h | 151 | ||||
-rw-r--r-- | plugins/llrp/llrpparsehelp.c | 58 | ||||
-rw-r--r-- | plugins/llrp/llrpparsehelp.h | 41 | ||||
-rw-r--r-- | plugins/llrp/llrpparseinc.h | 33 | ||||
-rw-r--r-- | plugins/llrp/llrpparsetypes.c | 46 | ||||
-rw-r--r-- | plugins/llrp/llrpparsetypes.h | 142 | ||||
-rw-r--r-- | plugins/llrp/moduleinfo.h | 18 | ||||
-rw-r--r-- | plugins/llrp/moduleinfo.nmake | 28 | ||||
-rw-r--r-- | plugins/llrp/packet-llrp.c | 829 | ||||
-rw-r--r-- | plugins/llrp/plugin.rc.in | 33 |
22 files changed, 7929 insertions, 2 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index f7f49cf3e3..8e33478c7e 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -30,6 +30,7 @@ SUBDIRS = $(_CUSTOM_SUBDIRS_) \ gryphon \ interlink \ irda \ + llrp \ m2m \ mate \ opcua \ diff --git a/plugins/Makefile.nmake b/plugins/Makefile.nmake index c11868b542..66fee75b4a 100644 --- a/plugins/Makefile.nmake +++ b/plugins/Makefile.nmake @@ -14,6 +14,7 @@ PLUGIN_LIST = \ gryphon \ interlink \ irda \ + llrp \ m2m \ mate \ opcua \ @@ -45,8 +46,8 @@ distclean-local: clean-local maintainer-clean-local: distclean-local -checkapi: - $(MAKE) -f Makefile.nmake PLUGIN_TARGET=checkapi process-plugins +checkapi: + $(MAKE) -f Makefile.nmake PLUGIN_TARGET=checkapi process-plugins diff --git a/plugins/llrp/AUTHORS b/plugins/llrp/AUTHORS new file mode 100644 index 0000000000..5425595a45 --- /dev/null +++ b/plugins/llrp/AUTHORS @@ -0,0 +1,4 @@ +Author : +Matt Poduska <matt.poduska@intermec.com> + + diff --git a/plugins/llrp/ChangeLog b/plugins/llrp/ChangeLog new file mode 100644 index 0000000000..df86e5bbca --- /dev/null +++ b/plugins/llrp/ChangeLog @@ -0,0 +1,5 @@ +2007-12-18 Matt Poduska <matt.poduska@intermec.com> + + * initial version + + diff --git a/plugins/llrp/Makefile.am b/plugins/llrp/Makefile.am new file mode 100644 index 0000000000..f5a7a570a3 --- /dev/null +++ b/plugins/llrp/Makefile.am @@ -0,0 +1,121 @@ +# Makefile.am +# Automake file for EPCglobal Low-Level Reader Protocol plugin +# +# $Id$ +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +INCLUDES = -I$(top_srcdir) -I$(includedir) + +include Makefile.common + +plugindir = @plugindir@ + +plugin_LTLIBRARIES = llrp.la +llrp_la_SOURCES = \ + plugin.c \ + moduleinfo.h \ + $(DISSECTOR_SRC) \ + $(DISSECTOR_SUPPORT_SRC) \ + $(DISSECTOR_INCLUDES) +llrp_la_LDFLAGS = -module -avoid-version +llrp_la_LIBADD = @PLUGIN_LIBS@ + +# Libs must be cleared, or else libtool won't create a shared module. +# If your module needs to be linked against any particular libraries, +# add them here. +LIBS = + +# +# Build plugin.c, which contains the plugin version[] string, a +# function plugin_register() that calls the register routines for all +# protocols, and a function plugin_reg_handoff() that calls the handoff +# registration routines for all protocols. +# +# We do this by scanning sources. If that turns out to be too slow, +# maybe we could just require every .o file to have an register routine +# of a given name (packet-aarp.o -> proto_register_aarp, etc.). +# +# Formatting conventions: The name of the proto_register_* routines an +# proto_reg_handoff_* routines must start in column zero, or must be +# preceded only by "void " starting in column zero, and must not be +# inside #if. +# +# DISSECTOR_SRC is assumed to have all the files that need to be scanned. +# +# For some unknown reason, having a big "for" loop in the Makefile +# to scan all the files doesn't work with some "make"s; they seem to +# pass only the first few names in the list to the shell, for some +# reason. +# +# Therefore, we have a script to generate the plugin.c file. +# The shell script runs slowly, as multiple greps and seds are run +# for each input file; this is especially slow on Windows. Therefore, +# if Python is present (as indicated by PYTHON being defined), we run +# a faster Python script to do that work instead. +# +# The first argument is the directory in which the source files live. +# The second argument is "plugin", to indicate that we should build +# a plugin.c file for a plugin. +# All subsequent arguments are the files to scan. +# +plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \ + $(top_srcdir)/tools/make-dissector-reg.py + @if test -n $(PYTHON); then \ + echo Making plugin.c with python ; \ + $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \ + plugin $(DISSECTOR_SRC) ; \ + else \ + echo Making plugin.c with shell script ; \ + $(top_srcdir)/tools/make-dissector-reg $(srcdir) \ + $(plugin_src) plugin $(DISSECTOR_SRC) ; \ + fi + +# +# Currently plugin.c can be included in the distribution because +# we always build all protocol dissectors. We used to have to check +# whether or not to build the snmp dissector. If we again need to +# variably build something, making plugin.c non-portable, uncomment +# the dist-hook line below. +# +# Oh, yuk. We don't want to include "plugin.c" in the distribution, as +# its contents depend on the configuration, and therefore we want it +# to be built when the first "make" is done; however, Automake insists +# on putting *all* source into the distribution. +# +# We work around this by having a "dist-hook" rule that deletes +# "plugin.c", so that "dist" won't pick it up. +# +#dist-hook: +# @rm -f $(distdir)/plugin.c + +CLEANFILES = \ + *~ + +MAINTAINERCLEANFILES = \ + Makefile.in \ + plugin.c + +EXTRA_DIST = \ + Makefile.common \ + Makefile.nmake \ + moduleinfo.nmake \ + plugin.rc.in + diff --git a/plugins/llrp/Makefile.common b/plugins/llrp/Makefile.common new file mode 100644 index 0000000000..7e0a07a689 --- /dev/null +++ b/plugins/llrp/Makefile.common @@ -0,0 +1,50 @@ +# Makefile.common for EPCglobal Low-Level Reader Protocol plugin +# Contains the stuff from Makefile.am and Makefile.nmake that is +# a) common to both files and +# b) portable between both files +# +# $Id$ +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# the name of the plugin +PLUGIN_NAME = llrp + +# the dissector sources (without any helpers) +DISSECTOR_SRC = \ + packet-llrp.c + +# corresponding headers +DISSECTOR_INCLUDES = \ + llrp-1x0-def.h \ + llrp-Intermec.h \ + llrpparse.h \ + llrpparsehelp.h \ + llrpparseinc.h \ + llrpparsetypes.h + +# Dissector helpers. They're included in the source files in this +# directory, but they're not dissectors themselves, i.e. they're not +# used to generate "register.c"). +DISSECTOR_SUPPORT_SRC = \ + llrp-1x0-def.c \ + llrp-Intermec.c \ + llrpparsehelp.c \ + llrpparsetypes.c \ + llrpparse.c diff --git a/plugins/llrp/Makefile.nmake b/plugins/llrp/Makefile.nmake new file mode 100644 index 0000000000..c280a82517 --- /dev/null +++ b/plugins/llrp/Makefile.nmake @@ -0,0 +1,95 @@ +# Makefile.nmake +# nmake file for Wireshark plugin +# +# $Id$ +# + +include ..\..\config.nmake +include moduleinfo.nmake + +include Makefile.common + +CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \ + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) + +LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS) + +!IFDEF ENABLE_LIBWIRESHARK +LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib +CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS) + +DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj) + +DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj) + +OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj + +RESOURCE=$(PLUGIN_NAME).res + +all: $(PLUGIN_NAME).dll + +$(PLUGIN_NAME).rc : moduleinfo.nmake + sed -e s/@PLUGIN_NAME@/$(PLUGIN_NAME)/ \ + -e s/@RC_MODULE_VERSION@/$(RC_MODULE_VERSION)/ \ + -e s/@RC_VERSION@/$(RC_VERSION)/ \ + -e s/@MODULE_VERSION@/$(MODULE_VERSION)/ \ + -e s/@PACKAGE@/$(PACKAGE)/ \ + -e s/@VERSION@/$(VERSION)/ \ + -e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \ + < plugin.rc.in > $@ + +$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE) + link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \ + $(GLIB_LIBS) $(RESOURCE) +# +# Build plugin.c, which contains the plugin version[] string, a +# function plugin_register() that calls the register routines for all +# protocols, and a function plugin_reg_handoff() that calls the handoff +# registration routines for all protocols. +# +# We do this by scanning sources. If that turns out to be too slow, +# maybe we could just require every .o file to have an register routine +# of a given name (packet-aarp.o -> proto_register_aarp, etc.). +# +# Formatting conventions: The name of the proto_register_* routines an +# proto_reg_handoff_* routines must start in column zero, or must be +# preceded only by "void " starting in column zero, and must not be +# inside #if. +# +# DISSECTOR_SRC is assumed to have all the files that need to be scanned. +# +# For some unknown reason, having a big "for" loop in the Makefile +# to scan all the files doesn't work with some "make"s; they seem to +# pass only the first few names in the list to the shell, for some +# reason. +# +# Therefore, we have a script to generate the plugin.c file. +# The shell script runs slowly, as multiple greps and seds are run +# for each input file; this is especially slow on Windows. Therefore, +# if Python is present (as indicated by PYTHON being defined), we run +# a faster Python script to do that work instead. +# +# The first argument is the directory in which the source files live. +# The second argument is "plugin", to indicate that we should build +# a plugin.c file for a plugin. +# All subsequent arguments are the files to scan. +# +plugin.c: $(DISSECTOR_SRC) +!IFDEF PYTHON + @echo Making plugin.c (using python) + @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC) +!ELSE + @echo Making plugin.c (using sh) + @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC) +!ENDIF + +!ENDIF + +clean: + rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb \ + $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \ + $(PLUGIN_NAME).exp $(PLUGIN_NAME).rc + +distclean: clean + +maintainer-clean: distclean diff --git a/plugins/llrp/llrp-1x0-def.c b/plugins/llrp/llrp-1x0-def.c new file mode 100644 index 0000000000..2900e74bbb --- /dev/null +++ b/plugins/llrp/llrp-1x0-def.c @@ -0,0 +1,3953 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <stdio.h> /* for NULL */ +#include "llrpparsetypes.h" +#include "llrpparseinc.h" +/*lint -e786 -e766*/ + + +/* ----------------------------------------------------------------------------- */ +/* Enumerations (42 total) */ + +t_llrp_enumeration_item llrp_enum_list_AirProtocols[] = { + + { "Unspecified", 0 }, + { "EPCGlobalClass1Gen2", 1 }, +}; +t_llrp_enumeration llrp_enum_AirProtocols = { + llrp_enum_list_AirProtocols, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_GetReaderCapabilitiesRequestedData[] = { + + { "All", 0 }, + { "General_Device_Capabilities", 1 }, + { "LLRP_Capabilities", 2 }, + { "Regulatory_Capabilities", 3 }, + { "LLRP_Air_Protocol_Capabilities", 4 }, +}; +t_llrp_enumeration llrp_enum_GetReaderCapabilitiesRequestedData = { + llrp_enum_list_GetReaderCapabilitiesRequestedData, 5 +}; + +t_llrp_enumeration_item llrp_enum_list_CommunicationsStandard[] = { + + { "Unspecified", 0 }, + { "US_FCC_Part_15", 1 }, + { "ETSI_302_208", 2 }, + { "ETSI_300_220", 3 }, + { "Australia_LIPD_1W", 4 }, + { "Australia_LIPD_4W", 5 }, + { "Japan_ARIB_STD_T89", 6 }, + { "Hong_Kong_OFTA_1049", 7 }, + { "Taiwan_DGT_LP0002", 8 }, + { "Korea_MIC_Article_5_2", 9 }, +}; +t_llrp_enumeration llrp_enum_CommunicationsStandard = { + llrp_enum_list_CommunicationsStandard, 10 +}; + +t_llrp_enumeration_item llrp_enum_list_ROSpecState[] = { + + { "Disabled", 0 }, + { "Inactive", 1 }, + { "Active", 2 }, +}; +t_llrp_enumeration llrp_enum_ROSpecState = { + llrp_enum_list_ROSpecState, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_ROSpecStartTriggerType[] = { + + { "Null", 0 }, + { "Immediate", 1 }, + { "Periodic", 2 }, + { "GPI", 3 }, +}; +t_llrp_enumeration llrp_enum_ROSpecStartTriggerType = { + llrp_enum_list_ROSpecStartTriggerType, 4 +}; + +t_llrp_enumeration_item llrp_enum_list_ROSpecStopTriggerType[] = { + + { "Null", 0 }, + { "Duration", 1 }, + { "GPI_With_Timeout", 2 }, +}; +t_llrp_enumeration llrp_enum_ROSpecStopTriggerType = { + llrp_enum_list_ROSpecStopTriggerType, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_AISpecStopTriggerType[] = { + + { "Null", 0 }, + { "Duration", 1 }, + { "GPI_With_Timeout", 2 }, + { "Tag_Observation", 3 }, +}; +t_llrp_enumeration llrp_enum_AISpecStopTriggerType = { + llrp_enum_list_AISpecStopTriggerType, 4 +}; + +t_llrp_enumeration_item llrp_enum_list_TagObservationTriggerType[] = { + + { "Upon_Seeing_N_Tags_Or_Timeout", 0 }, + { "Upon_Seeing_No_More_New_Tags_For_Tms_Or_Timeout", 1 }, + { "N_Attempts_To_See_All_Tags_In_FOV_Or_Timeout", 2 }, +}; +t_llrp_enumeration llrp_enum_TagObservationTriggerType = { + llrp_enum_list_TagObservationTriggerType, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_RFSurveySpecStopTriggerType[] = { + + { "Null", 0 }, + { "Duration", 1 }, + { "N_Iterations_Through_Frequency_Range", 2 }, +}; +t_llrp_enumeration llrp_enum_RFSurveySpecStopTriggerType = { + llrp_enum_list_RFSurveySpecStopTriggerType, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_AccessSpecState[] = { + + { "Disabled", 0 }, + { "Active", 1 }, +}; +t_llrp_enumeration llrp_enum_AccessSpecState = { + llrp_enum_list_AccessSpecState, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_AccessSpecStopTriggerType[] = { + + { "Null", 0 }, + { "Operation_Count", 1 }, +}; +t_llrp_enumeration llrp_enum_AccessSpecStopTriggerType = { + llrp_enum_list_AccessSpecStopTriggerType, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_GetReaderConfigRequestedData[] = { + + { "All", 0 }, + { "Identification", 1 }, + { "AntennaProperties", 2 }, + { "AntennaConfiguration", 3 }, + { "ROReportSpec", 4 }, + { "ReaderEventNotificationSpec", 5 }, + { "AccessReportSpec", 6 }, + { "LLRPConfigurationStateValue", 7 }, + { "KeepaliveSpec", 8 }, + { "GPIPortCurrentState", 9 }, + { "GPOWriteData", 10 }, + { "EventsAndReports", 11 }, +}; +t_llrp_enumeration llrp_enum_GetReaderConfigRequestedData = { + llrp_enum_list_GetReaderConfigRequestedData, 12 +}; + +t_llrp_enumeration_item llrp_enum_list_IdentificationType[] = { + + { "MAC_Address", 0 }, + { "EPC", 1 }, +}; +t_llrp_enumeration llrp_enum_IdentificationType = { + llrp_enum_list_IdentificationType, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_KeepaliveTriggerType[] = { + + { "Null", 0 }, + { "Periodic", 1 }, +}; +t_llrp_enumeration llrp_enum_KeepaliveTriggerType = { + llrp_enum_list_KeepaliveTriggerType, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_GPIPortState[] = { + + { "Low", 0 }, + { "High", 1 }, + { "Unknown", 2 }, +}; +t_llrp_enumeration llrp_enum_GPIPortState = { + llrp_enum_list_GPIPortState, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_ROReportTriggerType[] = { + + { "None", 0 }, + { "Upon_N_Tags_Or_End_Of_AISpec", 1 }, + { "Upon_N_Tags_Or_End_Of_ROSpec", 2 }, +}; +t_llrp_enumeration llrp_enum_ROReportTriggerType = { + llrp_enum_list_ROReportTriggerType, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_AccessReportTriggerType[] = { + + { "Whenever_ROReport_Is_Generated", 0 }, + { "End_Of_AccessSpec", 1 }, +}; +t_llrp_enumeration llrp_enum_AccessReportTriggerType = { + llrp_enum_list_AccessReportTriggerType, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_NotificationEventType[] = { + + { "Upon_Hopping_To_Next_Channel", 0 }, + { "GPI_Event", 1 }, + { "ROSpec_Event", 2 }, + { "Report_Buffer_Fill_Warning", 3 }, + { "Reader_Exception_Event", 4 }, + { "RFSurvey_Event", 5 }, + { "AISpec_Event", 6 }, + { "AISpec_Event_With_Details", 7 }, + { "Antenna_Event", 8 }, +}; +t_llrp_enumeration llrp_enum_NotificationEventType = { + llrp_enum_list_NotificationEventType, 9 +}; + +t_llrp_enumeration_item llrp_enum_list_ROSpecEventType[] = { + + { "Start_Of_ROSpec", 0 }, + { "End_Of_ROSpec", 1 }, + { "Preemption_Of_ROSpec", 2 }, +}; +t_llrp_enumeration llrp_enum_ROSpecEventType = { + llrp_enum_list_ROSpecEventType, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_RFSurveyEventType[] = { + + { "Start_Of_RFSurvey", 0 }, + { "End_Of_RFSurvey", 1 }, +}; +t_llrp_enumeration llrp_enum_RFSurveyEventType = { + llrp_enum_list_RFSurveyEventType, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_AISpecEventType[] = { + + { "End_Of_AISpec", 0 }, +}; +t_llrp_enumeration llrp_enum_AISpecEventType = { + llrp_enum_list_AISpecEventType, 1 +}; + +t_llrp_enumeration_item llrp_enum_list_AntennaEventType[] = { + + { "Antenna_Disconnected", 0 }, + { "Antenna_Connected", 1 }, +}; +t_llrp_enumeration llrp_enum_AntennaEventType = { + llrp_enum_list_AntennaEventType, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_ConnectionAttemptStatusType[] = { + + { "Success", 0 }, + { "Failed_A_Reader_Initiated_Connection_Already_Exists", 1 }, + { "Failed_A_Client_Initiated_Connection_Already_Exists", 2 }, + { "Failed_Reason_Other_Than_A_Connection_Already_Exists", 3 }, + { "Another_Connection_Attempted", 4 }, +}; +t_llrp_enumeration llrp_enum_ConnectionAttemptStatusType = { + llrp_enum_list_ConnectionAttemptStatusType, 5 +}; + +t_llrp_enumeration_item llrp_enum_list_StatusCode[] = { + + { "M_Success", 0 }, + { "M_ParameterError", 1 }, + { "M_FieldError", 2 }, + { "M_UnexpectedParameter", 3 }, + { "M_MissingParameter", 4 }, + { "M_DuplicateParameter", 5 }, + { "M_OverflowParameter", 6 }, + { "M_OverflowField", 7 }, + { "M_UnknownParameter", 8 }, + { "M_UnknownField", 9 }, + { "M_UnsupportedMessage", 10 }, + { "M_UnsupportedVersion", 11 }, + { "M_UnsupportedParameter", 12 }, + { "P_ParameterError", 13 }, + { "P_FieldError", 14 }, + { "P_UnexpectedParameter", 15 }, + { "P_MissingParameter", 16 }, + { "P_DuplicateParameter", 17 }, + { "P_OverflowParameter", 18 }, + { "P_OverflowField", 19 }, + { "P_UnknownParameter", 20 }, + { "P_UnknownField", 21 }, + { "P_UnsupportedParameter", 22 }, + { "A_Invalid", 23 }, + { "A_OutOfRange", 24 }, + { "R_DeviceError", 25 }, +}; +t_llrp_enumeration llrp_enum_StatusCode = { + llrp_enum_list_StatusCode, 26 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2DRValue[] = { + + { "DRV_8", 0 }, + { "DRV_64_3", 1 }, +}; +t_llrp_enumeration llrp_enum_C1G2DRValue = { + llrp_enum_list_C1G2DRValue, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2MValue[] = { + + { "MV_FM0", 0 }, + { "MV_2", 1 }, + { "MV_4", 2 }, + { "MV_8", 3 }, +}; +t_llrp_enumeration llrp_enum_C1G2MValue = { + llrp_enum_list_C1G2MValue, 4 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2ForwardLinkModulation[] = { + + { "PR_ASK", 0 }, + { "SSB_ASK", 1 }, + { "DSB_ASK", 2 }, +}; +t_llrp_enumeration llrp_enum_C1G2ForwardLinkModulation = { + llrp_enum_list_C1G2ForwardLinkModulation, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2SpectralMaskIndicator[] = { + + { "Unknown", 0 }, + { "SI", 1 }, + { "MI", 2 }, + { "DI", 3 }, +}; +t_llrp_enumeration llrp_enum_C1G2SpectralMaskIndicator = { + llrp_enum_list_C1G2SpectralMaskIndicator, 4 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2TruncateAction[] = { + + { "Unspecified", 0 }, + { "Do_Not_Truncate", 1 }, + { "Truncate", 2 }, +}; +t_llrp_enumeration llrp_enum_C1G2TruncateAction = { + llrp_enum_list_C1G2TruncateAction, 3 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2StateAwareTarget[] = { + + { "SL", 0 }, + { "Inventoried_State_For_Session_S0", 1 }, + { "Inventoried_State_For_Session_S1", 2 }, + { "Inventoried_State_For_Session_S2", 3 }, + { "Inventoried_State_For_Session_S3", 4 }, +}; +t_llrp_enumeration llrp_enum_C1G2StateAwareTarget = { + llrp_enum_list_C1G2StateAwareTarget, 5 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2StateAwareAction[] = { + + { "AssertSLOrA_DeassertSLOrB", 0 }, + { "AssertSLOrA_Noop", 1 }, + { "Noop_DeassertSLOrB", 2 }, + { "NegateSLOrABBA_Noop", 3 }, + { "DeassertSLOrB_AssertSLOrA", 4 }, + { "DeassertSLOrB_Noop", 5 }, + { "Noop_AssertSLOrA", 6 }, + { "Noop_NegateSLOrABBA", 7 }, +}; +t_llrp_enumeration llrp_enum_C1G2StateAwareAction = { + llrp_enum_list_C1G2StateAwareAction, 8 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2StateUnawareAction[] = { + + { "Select_Unselect", 0 }, + { "Select_DoNothing", 1 }, + { "DoNothing_Unselect", 2 }, + { "Unselect_DoNothing", 3 }, + { "Unselect_Select", 4 }, + { "DoNothing_Select", 5 }, +}; +t_llrp_enumeration llrp_enum_C1G2StateUnawareAction = { + llrp_enum_list_C1G2StateUnawareAction, 6 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2TagInventoryStateAwareI[] = { + + { "State_A", 0 }, + { "State_B", 1 }, +}; +t_llrp_enumeration llrp_enum_C1G2TagInventoryStateAwareI = { + llrp_enum_list_C1G2TagInventoryStateAwareI, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2TagInventoryStateAwareS[] = { + + { "SL", 0 }, + { "Not_SL", 1 }, +}; +t_llrp_enumeration llrp_enum_C1G2TagInventoryStateAwareS = { + llrp_enum_list_C1G2TagInventoryStateAwareS, 2 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2LockPrivilege[] = { + + { "Read_Write", 0 }, + { "Perma_Lock", 1 }, + { "Perma_Unlock", 2 }, + { "Unlock", 3 }, +}; +t_llrp_enumeration llrp_enum_C1G2LockPrivilege = { + llrp_enum_list_C1G2LockPrivilege, 4 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2LockDataField[] = { + + { "Kill_Password", 0 }, + { "Access_Password", 1 }, + { "EPC_Memory", 2 }, + { "TID_Memory", 3 }, + { "User_Memory", 4 }, +}; +t_llrp_enumeration llrp_enum_C1G2LockDataField = { + llrp_enum_list_C1G2LockDataField, 5 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2ReadResultType[] = { + + { "Success", 0 }, + { "Nonspecific_Tag_Error", 1 }, + { "No_Response_From_Tag", 2 }, + { "Nonspecific_Reader_Error", 3 }, +}; +t_llrp_enumeration llrp_enum_C1G2ReadResultType = { + llrp_enum_list_C1G2ReadResultType, 4 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2WriteResultType[] = { + + { "Success", 0 }, + { "Tag_Memory_Overrun_Error", 1 }, + { "Tag_Memory_Locked_Error", 2 }, + { "Insufficient_Power", 3 }, + { "Nonspecific_Tag_Error", 4 }, + { "No_Response_From_Tag", 5 }, + { "Nonspecific_Reader_Error", 6 }, +}; +t_llrp_enumeration llrp_enum_C1G2WriteResultType = { + llrp_enum_list_C1G2WriteResultType, 7 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2KillResultType[] = { + + { "Success", 0 }, + { "Zero_Kill_Password_Error", 1 }, + { "Insufficient_Power", 2 }, + { "Nonspecific_Tag_Error", 3 }, + { "No_Response_From_Tag", 4 }, + { "Nonspecific_Reader_Error", 5 }, +}; +t_llrp_enumeration llrp_enum_C1G2KillResultType = { + llrp_enum_list_C1G2KillResultType, 6 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2LockResultType[] = { + + { "Success", 0 }, + { "Insufficient_Power", 1 }, + { "Nonspecific_Tag_Error", 2 }, + { "No_Response_From_Tag", 3 }, + { "Nonspecific_Reader_Error", 4 }, +}; +t_llrp_enumeration llrp_enum_C1G2LockResultType = { + llrp_enum_list_C1G2LockResultType, 5 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2BlockEraseResultType[] = { + + { "Success", 0 }, + { "Tag_Memory_Overrun_Error", 1 }, + { "Tag_Memory_Locked_Error", 2 }, + { "Insufficient_Power", 3 }, + { "Nonspecific_Tag_Error", 4 }, + { "No_Response_From_Tag", 5 }, + { "Nonspecific_Reader_Error", 6 }, +}; +t_llrp_enumeration llrp_enum_C1G2BlockEraseResultType = { + llrp_enum_list_C1G2BlockEraseResultType, 7 +}; + +t_llrp_enumeration_item llrp_enum_list_C1G2BlockWriteResultType[] = { + + { "Success", 0 }, + { "Tag_Memory_Overrun_Error", 1 }, + { "Tag_Memory_Locked_Error", 2 }, + { "Insufficient_Power", 3 }, + { "Nonspecific_Tag_Error", 4 }, + { "No_Response_From_Tag", 5 }, + { "Nonspecific_Reader_Error", 6 }, +}; +t_llrp_enumeration llrp_enum_C1G2BlockWriteResultType = { + llrp_enum_list_C1G2BlockWriteResultType, 7 +}; + + +/* ----------------------------------------------------------------------------- */ +/* Choice Definitions (unordered lists of parameters) */ + + +/* Choice: SpecParameter */ +t_llrp_compound_item *llrp_choice_items_SpecParameter[] = { + + &llrp_param_AISpec, + &llrp_param_RFSurveySpec, + &llrp_param_Custom, +}; +t_llrp_compound_item llrp_choice_SpecParameter = { + "SpecParameter", LLRP_ITEM_CHOICE, 0, 3, llrp_choice_items_SpecParameter +}; + +/* Choice: AccessCommandOpSpec */ +t_llrp_compound_item *llrp_choice_items_AccessCommandOpSpec[] = { + + &llrp_param_C1G2Read, + &llrp_param_C1G2Write, + &llrp_param_C1G2Kill, + &llrp_param_C1G2Lock, + &llrp_param_C1G2BlockErase, + &llrp_param_C1G2BlockWrite, +}; +t_llrp_compound_item llrp_choice_AccessCommandOpSpec = { + "AccessCommandOpSpec", LLRP_ITEM_CHOICE, 0, 6, llrp_choice_items_AccessCommandOpSpec +}; + +/* Choice: AccessCommandOpSpecResult */ +t_llrp_compound_item *llrp_choice_items_AccessCommandOpSpecResult[] = { + + &llrp_param_C1G2ReadOpSpecResult, + &llrp_param_C1G2WriteOpSpecResult, + &llrp_param_C1G2KillOpSpecResult, + &llrp_param_C1G2LockOpSpecResult, + &llrp_param_C1G2BlockEraseOpSpecResult, + &llrp_param_C1G2BlockWriteOpSpecResult, +}; +t_llrp_compound_item llrp_choice_AccessCommandOpSpecResult = { + "AccessCommandOpSpecResult", LLRP_ITEM_CHOICE, 0, 6, llrp_choice_items_AccessCommandOpSpecResult +}; + +/* Choice: EPCParameter */ +t_llrp_compound_item *llrp_choice_items_EPCParameter[] = { + + &llrp_param_EPCData, + &llrp_param_EPC_96, +}; +t_llrp_compound_item llrp_choice_EPCParameter = { + "EPCParameter", LLRP_ITEM_CHOICE, 0, 2, llrp_choice_items_EPCParameter +}; + +/* Choice: Timestamp */ +t_llrp_compound_item *llrp_choice_items_Timestamp[] = { + + &llrp_param_UTCTimestamp, + &llrp_param_Uptime, +}; +t_llrp_compound_item llrp_choice_Timestamp = { + "Timestamp", LLRP_ITEM_CHOICE, 0, 2, llrp_choice_items_Timestamp +}; + +/* Choice: AirProtocolLLRPCapabilities */ +t_llrp_compound_item *llrp_choice_items_AirProtocolLLRPCapabilities[] = { + + &llrp_param_C1G2LLRPCapabilities, +}; +t_llrp_compound_item llrp_choice_AirProtocolLLRPCapabilities = { + "AirProtocolLLRPCapabilities", LLRP_ITEM_CHOICE, 0, 1, llrp_choice_items_AirProtocolLLRPCapabilities +}; + +/* Choice: AirProtocolUHFRFModeTable */ +t_llrp_compound_item *llrp_choice_items_AirProtocolUHFRFModeTable[] = { + + &llrp_param_C1G2UHFRFModeTable, +}; +t_llrp_compound_item llrp_choice_AirProtocolUHFRFModeTable = { + "AirProtocolUHFRFModeTable", LLRP_ITEM_CHOICE, 0, 1, llrp_choice_items_AirProtocolUHFRFModeTable +}; + +/* Choice: AirProtocolInventoryCommandSettings */ +t_llrp_compound_item *llrp_choice_items_AirProtocolInventoryCommandSettings[] = { + + &llrp_param_C1G2InventoryCommand, +}; +t_llrp_compound_item llrp_choice_AirProtocolInventoryCommandSettings = { + "AirProtocolInventoryCommandSettings", LLRP_ITEM_CHOICE, 0, 1, llrp_choice_items_AirProtocolInventoryCommandSettings +}; + +/* Choice: AirProtocolTagSpec */ +t_llrp_compound_item *llrp_choice_items_AirProtocolTagSpec[] = { + + &llrp_param_C1G2TagSpec, +}; +t_llrp_compound_item llrp_choice_AirProtocolTagSpec = { + "AirProtocolTagSpec", LLRP_ITEM_CHOICE, 0, 1, llrp_choice_items_AirProtocolTagSpec +}; + +/* Choice: AirProtocolEPCMemorySelector */ +t_llrp_compound_item *llrp_choice_items_AirProtocolEPCMemorySelector[] = { + + &llrp_param_C1G2EPCMemorySelector, +}; +t_llrp_compound_item llrp_choice_AirProtocolEPCMemorySelector = { + "AirProtocolEPCMemorySelector", LLRP_ITEM_CHOICE, 0, 1, llrp_choice_items_AirProtocolEPCMemorySelector +}; + +/* Choice: AirProtocolTagData */ +t_llrp_compound_item *llrp_choice_items_AirProtocolTagData[] = { + + &llrp_param_C1G2_PC, + &llrp_param_C1G2_CRC, +}; +t_llrp_compound_item llrp_choice_AirProtocolTagData = { + "AirProtocolTagData", LLRP_ITEM_CHOICE, 0, 2, llrp_choice_items_AirProtocolTagData +}; + +/* Choice: AirProtocolSingulationDetails */ +t_llrp_compound_item *llrp_choice_items_AirProtocolSingulationDetails[] = { + + &llrp_param_C1G2SingulationDetails, +}; +t_llrp_compound_item llrp_choice_AirProtocolSingulationDetails = { + "AirProtocolSingulationDetails", LLRP_ITEM_CHOICE, 0, 1, llrp_choice_items_AirProtocolSingulationDetails +}; + +/* ----------------------------------------------------------------------------- */ +/* Choice List (12 total) */ + +t_llrp_compound_item *llrp_v1_0_choice_list[] = { + + &llrp_choice_SpecParameter, + &llrp_choice_AccessCommandOpSpec, + &llrp_choice_AccessCommandOpSpecResult, + &llrp_choice_EPCParameter, + &llrp_choice_Timestamp, + &llrp_choice_AirProtocolLLRPCapabilities, + &llrp_choice_AirProtocolUHFRFModeTable, + &llrp_choice_AirProtocolInventoryCommandSettings, + &llrp_choice_AirProtocolTagSpec, + &llrp_choice_AirProtocolEPCMemorySelector, + &llrp_choice_AirProtocolTagData, + &llrp_choice_AirProtocolSingulationDetails, +}; + +/* ----------------------------------------------------------------------------- */ +/* Parameter Definitions (108 total) */ + +/* Parameter: UTCTimestamp */ + +t_llrp_item llrp_param_items_UTCTimestamp[] = { + + { "Microseconds", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u64, + NULL }, + +}; + +t_llrp_compound_item llrp_param_UTCTimestamp = { + "UTCTimestamp", LLRP_ITEM_PARAMETER, 128, 1, + llrp_param_items_UTCTimestamp +}; + +/* Parameter: Uptime */ + +t_llrp_item llrp_param_items_Uptime[] = { + + { "Microseconds", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u64, + NULL }, + +}; + +t_llrp_compound_item llrp_param_Uptime = { + "Uptime", LLRP_ITEM_PARAMETER, 129, 1, + llrp_param_items_Uptime +}; + +/* Parameter: Custom */ + +t_llrp_item llrp_param_items_Custom[] = { + + { "VendorIdentifier", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "ParameterSubtype", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "Data", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_bytesToEnd, + NULL }, + +}; + +t_llrp_compound_item llrp_param_Custom = { + "Custom", LLRP_ITEM_PARAMETER, 1023, 3, + llrp_param_items_Custom +}; + +/* Parameter: GeneralDeviceCapabilities */ + +t_llrp_item llrp_param_items_GeneralDeviceCapabilities[] = { + + { "MaxNumberOfAntennaSupported", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "CanSetAntennaProperties", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "HasUTCClockCapability", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 14, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "DeviceManufacturerName", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "ModelName", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "ReaderFirmwareVersion", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "ReceiveSensitivityTableEntry", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_ReceiveSensitivityTableEntry }, + + { "PerAntennaReceiveSensitivityRange", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_PerAntennaReceiveSensitivityRange }, + + { "GPIOCapabilities", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_GPIOCapabilities }, + + { "PerAntennaAirProtocol", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_PerAntennaAirProtocol }, + +}; + +t_llrp_compound_item llrp_param_GeneralDeviceCapabilities = { + "GeneralDeviceCapabilities", LLRP_ITEM_PARAMETER, 137, 11, + llrp_param_items_GeneralDeviceCapabilities +}; + +/* Parameter: ReceiveSensitivityTableEntry */ + +t_llrp_item llrp_param_items_ReceiveSensitivityTableEntry[] = { + + { "Index", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ReceiveSensitivityValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_s16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_ReceiveSensitivityTableEntry = { + "ReceiveSensitivityTableEntry", LLRP_ITEM_PARAMETER, 139, 2, + llrp_param_items_ReceiveSensitivityTableEntry +}; + +/* Parameter: PerAntennaReceiveSensitivityRange */ + +t_llrp_item llrp_param_items_PerAntennaReceiveSensitivityRange[] = { + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ReceiveSensitivityIndexMin", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ReceiveSensitivityIndexMax", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_PerAntennaReceiveSensitivityRange = { + "PerAntennaReceiveSensitivityRange", LLRP_ITEM_PARAMETER, 149, 3, + llrp_param_items_PerAntennaReceiveSensitivityRange +}; + +/* Parameter: PerAntennaAirProtocol */ + +t_llrp_item llrp_param_items_PerAntennaAirProtocol[] = { + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ProtocolID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8v, + &llrp_enum_AirProtocols }, + +}; + +t_llrp_compound_item llrp_param_PerAntennaAirProtocol = { + "PerAntennaAirProtocol", LLRP_ITEM_PARAMETER, 140, 2, + llrp_param_items_PerAntennaAirProtocol +}; + +/* Parameter: GPIOCapabilities */ + +t_llrp_item llrp_param_items_GPIOCapabilities[] = { + + { "NumGPIs", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "NumGPOs", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_GPIOCapabilities = { + "GPIOCapabilities", LLRP_ITEM_PARAMETER, 141, 2, + llrp_param_items_GPIOCapabilities +}; + +/* Parameter: LLRPCapabilities */ + +t_llrp_item llrp_param_items_LLRPCapabilities[] = { + + { "CanDoRFSurvey", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "CanReportBufferFillWarning", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "SupportsClientRequestOpSpec", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "CanDoTagInventoryStateAwareSingulation", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "SupportsEventAndReportHolding", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 3, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "MaxNumPriorityLevelsSupported", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + + { "ClientRequestOpSpecTimeout", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "MaxNumROSpecs", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MaxNumSpecsPerROSpec", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MaxNumInventoryParameterSpecsPerAISpec", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MaxNumAccessSpecs", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MaxNumOpSpecsPerAccessSpec", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_LLRPCapabilities = { + "LLRPCapabilities", LLRP_ITEM_PARAMETER, 142, 13, + llrp_param_items_LLRPCapabilities +}; + +/* Parameter: RegulatoryCapabilities */ + +t_llrp_item llrp_param_items_RegulatoryCapabilities[] = { + + { "CountryCode", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "CommunicationsStandard", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + &llrp_enum_CommunicationsStandard }, + + { "UHFBandCapabilities", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_UHFBandCapabilities }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_RegulatoryCapabilities = { + "RegulatoryCapabilities", LLRP_ITEM_PARAMETER, 143, 4, + llrp_param_items_RegulatoryCapabilities +}; + +/* Parameter: UHFBandCapabilities */ + +t_llrp_item llrp_param_items_UHFBandCapabilities[] = { + + { "TransmitPowerLevelTableEntry", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_TransmitPowerLevelTableEntry }, + + { "FrequencyInformation", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_FrequencyInformation }, + + { "AirProtocolUHFRFModeTable", LLRP_ITEM_CHOICE, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_choice_AirProtocolUHFRFModeTable }, + +}; + +t_llrp_compound_item llrp_param_UHFBandCapabilities = { + "UHFBandCapabilities", LLRP_ITEM_PARAMETER, 144, 3, + llrp_param_items_UHFBandCapabilities +}; + +/* Parameter: TransmitPowerLevelTableEntry */ + +t_llrp_item llrp_param_items_TransmitPowerLevelTableEntry[] = { + + { "Index", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "TransmitPowerValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_s16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_TransmitPowerLevelTableEntry = { + "TransmitPowerLevelTableEntry", LLRP_ITEM_PARAMETER, 145, 2, + llrp_param_items_TransmitPowerLevelTableEntry +}; + +/* Parameter: FrequencyInformation */ + +t_llrp_item llrp_param_items_FrequencyInformation[] = { + + { "Hopping", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "FrequencyHopTable", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_FrequencyHopTable }, + + { "FixedFrequencyTable", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_FixedFrequencyTable }, + +}; + +t_llrp_compound_item llrp_param_FrequencyInformation = { + "FrequencyInformation", LLRP_ITEM_PARAMETER, 146, 4, + llrp_param_items_FrequencyInformation +}; + +/* Parameter: FrequencyHopTable */ + +t_llrp_item llrp_param_items_FrequencyHopTable[] = { + + { "HopTableID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + + { "", LLRP_ITEM_RESERVED, 8, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "Frequency", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_FrequencyHopTable = { + "FrequencyHopTable", LLRP_ITEM_PARAMETER, 147, 3, + llrp_param_items_FrequencyHopTable +}; + +/* Parameter: FixedFrequencyTable */ + +t_llrp_item llrp_param_items_FixedFrequencyTable[] = { + + { "Frequency", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_FixedFrequencyTable = { + "FixedFrequencyTable", LLRP_ITEM_PARAMETER, 148, 1, + llrp_param_items_FixedFrequencyTable +}; + +/* Parameter: ROSpec */ + +t_llrp_item llrp_param_items_ROSpec[] = { + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "Priority", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + + { "CurrentState", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_ROSpecState }, + + { "ROBoundarySpec", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_ROBoundarySpec }, + + { "SpecParameter", LLRP_ITEM_CHOICE, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_choice_SpecParameter }, + + { "ROReportSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ROReportSpec }, + +}; + +t_llrp_compound_item llrp_param_ROSpec = { + "ROSpec", LLRP_ITEM_PARAMETER, 177, 6, + llrp_param_items_ROSpec +}; + +/* Parameter: ROBoundarySpec */ + +t_llrp_item llrp_param_items_ROBoundarySpec[] = { + + { "ROSpecStartTrigger", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_ROSpecStartTrigger }, + + { "ROSpecStopTrigger", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_ROSpecStopTrigger }, + +}; + +t_llrp_compound_item llrp_param_ROBoundarySpec = { + "ROBoundarySpec", LLRP_ITEM_PARAMETER, 178, 2, + llrp_param_items_ROBoundarySpec +}; + +/* Parameter: ROSpecStartTrigger */ + +t_llrp_item llrp_param_items_ROSpecStartTrigger[] = { + + { "ROSpecStartTriggerType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_ROSpecStartTriggerType }, + + { "PeriodicTriggerValue", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_PeriodicTriggerValue }, + + { "GPITriggerValue", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_GPITriggerValue }, + +}; + +t_llrp_compound_item llrp_param_ROSpecStartTrigger = { + "ROSpecStartTrigger", LLRP_ITEM_PARAMETER, 179, 3, + llrp_param_items_ROSpecStartTrigger +}; + +/* Parameter: PeriodicTriggerValue */ + +t_llrp_item llrp_param_items_PeriodicTriggerValue[] = { + + { "Offset", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "Period", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "UTCTimestamp", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_UTCTimestamp }, + +}; + +t_llrp_compound_item llrp_param_PeriodicTriggerValue = { + "PeriodicTriggerValue", LLRP_ITEM_PARAMETER, 180, 3, + llrp_param_items_PeriodicTriggerValue +}; + +/* Parameter: GPITriggerValue */ + +t_llrp_item llrp_param_items_GPITriggerValue[] = { + + { "GPIPortNum", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "GPIEvent", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "Timeout", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_GPITriggerValue = { + "GPITriggerValue", LLRP_ITEM_PARAMETER, 181, 4, + llrp_param_items_GPITriggerValue +}; + +/* Parameter: ROSpecStopTrigger */ + +t_llrp_item llrp_param_items_ROSpecStopTrigger[] = { + + { "ROSpecStopTriggerType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_ROSpecStopTriggerType }, + + { "DurationTriggerValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "GPITriggerValue", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_GPITriggerValue }, + +}; + +t_llrp_compound_item llrp_param_ROSpecStopTrigger = { + "ROSpecStopTrigger", LLRP_ITEM_PARAMETER, 182, 3, + llrp_param_items_ROSpecStopTrigger +}; + +/* Parameter: AISpec */ + +t_llrp_item llrp_param_items_AISpec[] = { + + { "AntennaIDs", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16v, + NULL }, + + { "AISpecStopTrigger", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_AISpecStopTrigger }, + + { "InventoryParameterSpec", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_InventoryParameterSpec }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_AISpec = { + "AISpec", LLRP_ITEM_PARAMETER, 183, 4, + llrp_param_items_AISpec +}; + +/* Parameter: AISpecStopTrigger */ + +t_llrp_item llrp_param_items_AISpecStopTrigger[] = { + + { "AISpecStopTriggerType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_AISpecStopTriggerType }, + + { "DurationTrigger", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "GPITriggerValue", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_GPITriggerValue }, + + { "TagObservationTrigger", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_TagObservationTrigger }, + +}; + +t_llrp_compound_item llrp_param_AISpecStopTrigger = { + "AISpecStopTrigger", LLRP_ITEM_PARAMETER, 184, 4, + llrp_param_items_AISpecStopTrigger +}; + +/* Parameter: TagObservationTrigger */ + +t_llrp_item llrp_param_items_TagObservationTrigger[] = { + + { "TriggerType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_TagObservationTriggerType }, + + { "", LLRP_ITEM_RESERVED, 8, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "NumberOfTags", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "NumberOfAttempts", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "T", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "Timeout", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_TagObservationTrigger = { + "TagObservationTrigger", LLRP_ITEM_PARAMETER, 185, 6, + llrp_param_items_TagObservationTrigger +}; + +/* Parameter: InventoryParameterSpec */ + +t_llrp_item llrp_param_items_InventoryParameterSpec[] = { + + { "InventoryParameterSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ProtocolID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_AirProtocols }, + + { "AntennaConfiguration", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaConfiguration }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_InventoryParameterSpec = { + "InventoryParameterSpec", LLRP_ITEM_PARAMETER, 186, 4, + llrp_param_items_InventoryParameterSpec +}; + +/* Parameter: RFSurveySpec */ + +t_llrp_item llrp_param_items_RFSurveySpec[] = { + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "StartFrequency", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "EndFrequency", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "RFSurveySpecStopTrigger", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_RFSurveySpecStopTrigger }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_RFSurveySpec = { + "RFSurveySpec", LLRP_ITEM_PARAMETER, 187, 5, + llrp_param_items_RFSurveySpec +}; + +/* Parameter: RFSurveySpecStopTrigger */ + +t_llrp_item llrp_param_items_RFSurveySpecStopTrigger[] = { + + { "StopTriggerType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_RFSurveySpecStopTriggerType }, + + { "DurationPeriod", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "N", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_RFSurveySpecStopTrigger = { + "RFSurveySpecStopTrigger", LLRP_ITEM_PARAMETER, 188, 3, + llrp_param_items_RFSurveySpecStopTrigger +}; + +/* Parameter: AccessSpec */ + +t_llrp_item llrp_param_items_AccessSpec[] = { + + { "AccessSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ProtocolID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_AirProtocols }, + + { "CurrentState", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + &llrp_enum_AccessSpecState }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "AccessSpecStopTrigger", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_AccessSpecStopTrigger }, + + { "AccessCommand", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_AccessCommand }, + + { "AccessReportSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AccessReportSpec }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_AccessSpec = { + "AccessSpec", LLRP_ITEM_PARAMETER, 207, 10, + llrp_param_items_AccessSpec +}; + +/* Parameter: AccessSpecStopTrigger */ + +t_llrp_item llrp_param_items_AccessSpecStopTrigger[] = { + + { "AccessSpecStopTrigger", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_AccessSpecStopTriggerType }, + + { "OperationCountValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_AccessSpecStopTrigger = { + "AccessSpecStopTrigger", LLRP_ITEM_PARAMETER, 208, 2, + llrp_param_items_AccessSpecStopTrigger +}; + +/* Parameter: AccessCommand */ + +t_llrp_item llrp_param_items_AccessCommand[] = { + + { "AirProtocolTagSpec", LLRP_ITEM_CHOICE, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_choice_AirProtocolTagSpec }, + + { "AccessCommandOpSpec", LLRP_ITEM_CHOICE, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_choice_AccessCommandOpSpec }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_AccessCommand = { + "AccessCommand", LLRP_ITEM_PARAMETER, 209, 3, + llrp_param_items_AccessCommand +}; + +/* Parameter: LLRPConfigurationStateValue */ + +t_llrp_item llrp_param_items_LLRPConfigurationStateValue[] = { + + { "LLRPConfigurationStateValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_LLRPConfigurationStateValue = { + "LLRPConfigurationStateValue", LLRP_ITEM_PARAMETER, 217, 1, + llrp_param_items_LLRPConfigurationStateValue +}; + +/* Parameter: Identification */ + +t_llrp_item llrp_param_items_Identification[] = { + + { "IDType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_IdentificationType }, + + { "ReaderID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_Identification = { + "Identification", LLRP_ITEM_PARAMETER, 218, 2, + llrp_param_items_Identification +}; + +/* Parameter: GPOWriteData */ + +t_llrp_item llrp_param_items_GPOWriteData[] = { + + { "GPOPortNumber", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "GPOData", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_param_GPOWriteData = { + "GPOWriteData", LLRP_ITEM_PARAMETER, 219, 3, + llrp_param_items_GPOWriteData +}; + +/* Parameter: KeepaliveSpec */ + +t_llrp_item llrp_param_items_KeepaliveSpec[] = { + + { "KeepaliveTriggerType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_KeepaliveTriggerType }, + + { "PeriodicTriggerValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_KeepaliveSpec = { + "KeepaliveSpec", LLRP_ITEM_PARAMETER, 220, 2, + llrp_param_items_KeepaliveSpec +}; + +/* Parameter: AntennaProperties */ + +t_llrp_item llrp_param_items_AntennaProperties[] = { + + { "AntennaConnected", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AntennaGain", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_s16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_AntennaProperties = { + "AntennaProperties", LLRP_ITEM_PARAMETER, 221, 4, + llrp_param_items_AntennaProperties +}; + +/* Parameter: AntennaConfiguration */ + +t_llrp_item llrp_param_items_AntennaConfiguration[] = { + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "RFReceiver", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_RFReceiver }, + + { "RFTransmitter", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_RFTransmitter }, + + { "AirProtocolInventoryCommandSettings", LLRP_ITEM_CHOICE, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_choice_AirProtocolInventoryCommandSettings }, + +}; + +t_llrp_compound_item llrp_param_AntennaConfiguration = { + "AntennaConfiguration", LLRP_ITEM_PARAMETER, 222, 4, + llrp_param_items_AntennaConfiguration +}; + +/* Parameter: RFReceiver */ + +t_llrp_item llrp_param_items_RFReceiver[] = { + + { "ReceiverSensitivity", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_RFReceiver = { + "RFReceiver", LLRP_ITEM_PARAMETER, 223, 1, + llrp_param_items_RFReceiver +}; + +/* Parameter: RFTransmitter */ + +t_llrp_item llrp_param_items_RFTransmitter[] = { + + { "HopTableID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ChannelIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "TransmitPower", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_RFTransmitter = { + "RFTransmitter", LLRP_ITEM_PARAMETER, 224, 3, + llrp_param_items_RFTransmitter +}; + +/* Parameter: GPIPortCurrentState */ + +t_llrp_item llrp_param_items_GPIPortCurrentState[] = { + + { "GPIPortNum", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "Config", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "State", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_GPIPortState }, + +}; + +t_llrp_compound_item llrp_param_GPIPortCurrentState = { + "GPIPortCurrentState", LLRP_ITEM_PARAMETER, 225, 4, + llrp_param_items_GPIPortCurrentState +}; + +/* Parameter: EventsAndReports */ + +t_llrp_item llrp_param_items_EventsAndReports[] = { + + { "HoldEventsAndReportsUponReconnect", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_param_EventsAndReports = { + "EventsAndReports", LLRP_ITEM_PARAMETER, 226, 2, + llrp_param_items_EventsAndReports +}; + +/* Parameter: ROReportSpec */ + +t_llrp_item llrp_param_items_ROReportSpec[] = { + + { "ROReportTrigger", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_ROReportTriggerType }, + + { "N", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "TagReportContentSelector", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_TagReportContentSelector }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_ROReportSpec = { + "ROReportSpec", LLRP_ITEM_PARAMETER, 237, 4, + llrp_param_items_ROReportSpec +}; + +/* Parameter: TagReportContentSelector */ + +t_llrp_item llrp_param_items_TagReportContentSelector[] = { + + { "EnableROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableSpecIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableInventoryParameterSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableAntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableChannelIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnablePeakRSSI", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableFirstSeenTimestamp", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableLastSeenTimestamp", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableTagSeenCount", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableAccessSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "AirProtocolEPCMemorySelector", LLRP_ITEM_CHOICE, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_choice_AirProtocolEPCMemorySelector }, + +}; + +t_llrp_compound_item llrp_param_TagReportContentSelector = { + "TagReportContentSelector", LLRP_ITEM_PARAMETER, 238, 12, + llrp_param_items_TagReportContentSelector +}; + +/* Parameter: AccessReportSpec */ + +t_llrp_item llrp_param_items_AccessReportSpec[] = { + + { "AccessReportTrigger", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_AccessReportTriggerType }, + +}; + +t_llrp_compound_item llrp_param_AccessReportSpec = { + "AccessReportSpec", LLRP_ITEM_PARAMETER, 239, 1, + llrp_param_items_AccessReportSpec +}; + +/* Parameter: TagReportData */ + +t_llrp_item llrp_param_items_TagReportData[] = { + + { "EPCParameter", LLRP_ITEM_CHOICE, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_choice_EPCParameter }, + + { "ROSpecID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ROSpecID }, + + { "SpecIndex", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_SpecIndex }, + + { "InventoryParameterSpecID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_InventoryParameterSpecID }, + + { "AntennaID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaID }, + + { "PeakRSSI", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_PeakRSSI }, + + { "ChannelIndex", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ChannelIndex }, + + { "FirstSeenTimestampUTC", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_FirstSeenTimestampUTC }, + + { "FirstSeenTimestampUptime", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_FirstSeenTimestampUptime }, + + { "LastSeenTimestampUTC", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_LastSeenTimestampUTC }, + + { "LastSeenTimestampUptime", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_LastSeenTimestampUptime }, + + { "TagSeenCount", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_TagSeenCount }, + + { "AirProtocolTagData", LLRP_ITEM_CHOICE, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_choice_AirProtocolTagData }, + + { "AccessSpecID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AccessSpecID }, + + { "AccessCommandOpSpecResult", LLRP_ITEM_CHOICE, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_choice_AccessCommandOpSpecResult }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_TagReportData = { + "TagReportData", LLRP_ITEM_PARAMETER, 240, 16, + llrp_param_items_TagReportData +}; + +/* Parameter: EPCData */ + +t_llrp_item llrp_param_items_EPCData[] = { + + { "EPC", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_EPCData = { + "EPCData", LLRP_ITEM_PARAMETER, 241, 1, + llrp_param_items_EPCData +}; + +/* Parameter: EPC_96 */ + +t_llrp_item llrp_param_items_EPC_96[] = { + + { "EPC", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u96, + NULL }, + +}; + +t_llrp_compound_item llrp_param_EPC_96 = { + "EPC_96", LLRP_ITEM_PARAMETER, 13, 1, + llrp_param_items_EPC_96 +}; + +/* Parameter: ROSpecID */ + +t_llrp_item llrp_param_items_ROSpecID[] = { + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_ROSpecID = { + "ROSpecID", LLRP_ITEM_PARAMETER, 9, 1, + llrp_param_items_ROSpecID +}; + +/* Parameter: SpecIndex */ + +t_llrp_item llrp_param_items_SpecIndex[] = { + + { "SpecIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_SpecIndex = { + "SpecIndex", LLRP_ITEM_PARAMETER, 14, 1, + llrp_param_items_SpecIndex +}; + +/* Parameter: InventoryParameterSpecID */ + +t_llrp_item llrp_param_items_InventoryParameterSpecID[] = { + + { "InventoryParameterSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_InventoryParameterSpecID = { + "InventoryParameterSpecID", LLRP_ITEM_PARAMETER, 10, 1, + llrp_param_items_InventoryParameterSpecID +}; + +/* Parameter: AntennaID */ + +t_llrp_item llrp_param_items_AntennaID[] = { + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_AntennaID = { + "AntennaID", LLRP_ITEM_PARAMETER, 1, 1, + llrp_param_items_AntennaID +}; + +/* Parameter: PeakRSSI */ + +t_llrp_item llrp_param_items_PeakRSSI[] = { + + { "PeakRSSI", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_s8, + NULL }, + +}; + +t_llrp_compound_item llrp_param_PeakRSSI = { + "PeakRSSI", LLRP_ITEM_PARAMETER, 6, 1, + llrp_param_items_PeakRSSI +}; + +/* Parameter: ChannelIndex */ + +t_llrp_item llrp_param_items_ChannelIndex[] = { + + { "ChannelIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_ChannelIndex = { + "ChannelIndex", LLRP_ITEM_PARAMETER, 7, 1, + llrp_param_items_ChannelIndex +}; + +/* Parameter: FirstSeenTimestampUTC */ + +t_llrp_item llrp_param_items_FirstSeenTimestampUTC[] = { + + { "Microseconds", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u64, + NULL }, + +}; + +t_llrp_compound_item llrp_param_FirstSeenTimestampUTC = { + "FirstSeenTimestampUTC", LLRP_ITEM_PARAMETER, 2, 1, + llrp_param_items_FirstSeenTimestampUTC +}; + +/* Parameter: FirstSeenTimestampUptime */ + +t_llrp_item llrp_param_items_FirstSeenTimestampUptime[] = { + + { "Microseconds", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u64, + NULL }, + +}; + +t_llrp_compound_item llrp_param_FirstSeenTimestampUptime = { + "FirstSeenTimestampUptime", LLRP_ITEM_PARAMETER, 3, 1, + llrp_param_items_FirstSeenTimestampUptime +}; + +/* Parameter: LastSeenTimestampUTC */ + +t_llrp_item llrp_param_items_LastSeenTimestampUTC[] = { + + { "Microseconds", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u64, + NULL }, + +}; + +t_llrp_compound_item llrp_param_LastSeenTimestampUTC = { + "LastSeenTimestampUTC", LLRP_ITEM_PARAMETER, 4, 1, + llrp_param_items_LastSeenTimestampUTC +}; + +/* Parameter: LastSeenTimestampUptime */ + +t_llrp_item llrp_param_items_LastSeenTimestampUptime[] = { + + { "Microseconds", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u64, + NULL }, + +}; + +t_llrp_compound_item llrp_param_LastSeenTimestampUptime = { + "LastSeenTimestampUptime", LLRP_ITEM_PARAMETER, 5, 1, + llrp_param_items_LastSeenTimestampUptime +}; + +/* Parameter: TagSeenCount */ + +t_llrp_item llrp_param_items_TagSeenCount[] = { + + { "TagCount", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_TagSeenCount = { + "TagSeenCount", LLRP_ITEM_PARAMETER, 8, 1, + llrp_param_items_TagSeenCount +}; + +/* Parameter: AccessSpecID */ + +t_llrp_item llrp_param_items_AccessSpecID[] = { + + { "AccessSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_AccessSpecID = { + "AccessSpecID", LLRP_ITEM_PARAMETER, 16, 1, + llrp_param_items_AccessSpecID +}; + +/* Parameter: RFSurveyReportData */ + +t_llrp_item llrp_param_items_RFSurveyReportData[] = { + + { "ROSpecID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ROSpecID }, + + { "SpecIndex", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_SpecIndex }, + + { "FrequencyRSSILevelEntry", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_FrequencyRSSILevelEntry }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_RFSurveyReportData = { + "RFSurveyReportData", LLRP_ITEM_PARAMETER, 242, 4, + llrp_param_items_RFSurveyReportData +}; + +/* Parameter: FrequencyRSSILevelEntry */ + +t_llrp_item llrp_param_items_FrequencyRSSILevelEntry[] = { + + { "Frequency", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "Bandwidth", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "AverageRSSI", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_s8, + NULL }, + + { "PeakRSSI", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_s8, + NULL }, + + { "Timestamp", LLRP_ITEM_CHOICE, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_choice_Timestamp }, + +}; + +t_llrp_compound_item llrp_param_FrequencyRSSILevelEntry = { + "FrequencyRSSILevelEntry", LLRP_ITEM_PARAMETER, 243, 5, + llrp_param_items_FrequencyRSSILevelEntry +}; + +/* Parameter: ReaderEventNotificationSpec */ + +t_llrp_item llrp_param_items_ReaderEventNotificationSpec[] = { + + { "EventNotificationState", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_EventNotificationState }, + +}; + +t_llrp_compound_item llrp_param_ReaderEventNotificationSpec = { + "ReaderEventNotificationSpec", LLRP_ITEM_PARAMETER, 244, 1, + llrp_param_items_ReaderEventNotificationSpec +}; + +/* Parameter: EventNotificationState */ + +t_llrp_item llrp_param_items_EventNotificationState[] = { + + { "EventType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + &llrp_enum_NotificationEventType }, + + { "NotificationState", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_param_EventNotificationState = { + "EventNotificationState", LLRP_ITEM_PARAMETER, 245, 3, + llrp_param_items_EventNotificationState +}; + +/* Parameter: ReaderEventNotificationData */ + +t_llrp_item llrp_param_items_ReaderEventNotificationData[] = { + + { "Timestamp", LLRP_ITEM_CHOICE, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_choice_Timestamp }, + + { "HoppingEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_HoppingEvent }, + + { "GPIEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_GPIEvent }, + + { "ROSpecEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ROSpecEvent }, + + { "ReportBufferLevelWarningEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ReportBufferLevelWarningEvent }, + + { "ReportBufferOverflowErrorEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ReportBufferOverflowErrorEvent }, + + { "ReaderExceptionEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ReaderExceptionEvent }, + + { "RFSurveyEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_RFSurveyEvent }, + + { "AISpecEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AISpecEvent }, + + { "AntennaEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaEvent }, + + { "ConnectionAttemptEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ConnectionAttemptEvent }, + + { "ConnectionCloseEvent", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ConnectionCloseEvent }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_ReaderEventNotificationData = { + "ReaderEventNotificationData", LLRP_ITEM_PARAMETER, 246, 13, + llrp_param_items_ReaderEventNotificationData +}; + +/* Parameter: HoppingEvent */ + +t_llrp_item llrp_param_items_HoppingEvent[] = { + + { "HopTableID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "NextChannelIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_HoppingEvent = { + "HoppingEvent", LLRP_ITEM_PARAMETER, 247, 2, + llrp_param_items_HoppingEvent +}; + +/* Parameter: GPIEvent */ + +t_llrp_item llrp_param_items_GPIEvent[] = { + + { "GPIPortNumber", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "GPIEvent", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_param_GPIEvent = { + "GPIEvent", LLRP_ITEM_PARAMETER, 248, 3, + llrp_param_items_GPIEvent +}; + +/* Parameter: ROSpecEvent */ + +t_llrp_item llrp_param_items_ROSpecEvent[] = { + + { "EventType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_ROSpecEventType }, + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "PreemptingROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_ROSpecEvent = { + "ROSpecEvent", LLRP_ITEM_PARAMETER, 249, 3, + llrp_param_items_ROSpecEvent +}; + +/* Parameter: ReportBufferLevelWarningEvent */ + +t_llrp_item llrp_param_items_ReportBufferLevelWarningEvent[] = { + + { "ReportBufferPercentageFull", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + +}; + +t_llrp_compound_item llrp_param_ReportBufferLevelWarningEvent = { + "ReportBufferLevelWarningEvent", LLRP_ITEM_PARAMETER, 250, 1, + llrp_param_items_ReportBufferLevelWarningEvent +}; + +/* Parameter: ReportBufferOverflowErrorEvent */ + +t_llrp_compound_item llrp_param_ReportBufferOverflowErrorEvent = { + "ReportBufferOverflowErrorEvent", LLRP_ITEM_PARAMETER, 251, 0, + NULL +}; + +/* Parameter: ReaderExceptionEvent */ + +t_llrp_item llrp_param_items_ReaderExceptionEvent[] = { + + { "Message", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "ROSpecID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ROSpecID }, + + { "SpecIndex", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_SpecIndex }, + + { "InventoryParameterSpecID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_InventoryParameterSpecID }, + + { "AntennaID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaID }, + + { "AccessSpecID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AccessSpecID }, + + { "OpSpecID", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_OpSpecID }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_ReaderExceptionEvent = { + "ReaderExceptionEvent", LLRP_ITEM_PARAMETER, 252, 8, + llrp_param_items_ReaderExceptionEvent +}; + +/* Parameter: OpSpecID */ + +t_llrp_item llrp_param_items_OpSpecID[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_OpSpecID = { + "OpSpecID", LLRP_ITEM_PARAMETER, 17, 1, + llrp_param_items_OpSpecID +}; + +/* Parameter: RFSurveyEvent */ + +t_llrp_item llrp_param_items_RFSurveyEvent[] = { + + { "EventType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_RFSurveyEventType }, + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "SpecIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_RFSurveyEvent = { + "RFSurveyEvent", LLRP_ITEM_PARAMETER, 253, 3, + llrp_param_items_RFSurveyEvent +}; + +/* Parameter: AISpecEvent */ + +t_llrp_item llrp_param_items_AISpecEvent[] = { + + { "EventType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_AISpecEventType }, + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "SpecIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AirProtocolSingulationDetails", LLRP_ITEM_CHOICE, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_choice_AirProtocolSingulationDetails }, + +}; + +t_llrp_compound_item llrp_param_AISpecEvent = { + "AISpecEvent", LLRP_ITEM_PARAMETER, 254, 4, + llrp_param_items_AISpecEvent +}; + +/* Parameter: AntennaEvent */ + +t_llrp_item llrp_param_items_AntennaEvent[] = { + + { "EventType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_AntennaEventType }, + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_AntennaEvent = { + "AntennaEvent", LLRP_ITEM_PARAMETER, 255, 2, + llrp_param_items_AntennaEvent +}; + +/* Parameter: ConnectionAttemptEvent */ + +t_llrp_item llrp_param_items_ConnectionAttemptEvent[] = { + + { "Status", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + &llrp_enum_ConnectionAttemptStatusType }, + +}; + +t_llrp_compound_item llrp_param_ConnectionAttemptEvent = { + "ConnectionAttemptEvent", LLRP_ITEM_PARAMETER, 256, 1, + llrp_param_items_ConnectionAttemptEvent +}; + +/* Parameter: ConnectionCloseEvent */ + +t_llrp_compound_item llrp_param_ConnectionCloseEvent = { + "ConnectionCloseEvent", LLRP_ITEM_PARAMETER, 257, 0, + NULL +}; + +/* Parameter: LLRPStatus */ + +t_llrp_item llrp_param_items_LLRPStatus[] = { + + { "StatusCode", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + &llrp_enum_StatusCode }, + + { "ErrorDescription", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "FieldError", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_FieldError }, + + { "ParameterError", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ParameterError }, + +}; + +t_llrp_compound_item llrp_param_LLRPStatus = { + "LLRPStatus", LLRP_ITEM_PARAMETER, 287, 4, + llrp_param_items_LLRPStatus +}; + +/* Parameter: FieldError */ + +t_llrp_item llrp_param_items_FieldError[] = { + + { "FieldNum", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ErrorCode", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + &llrp_enum_StatusCode }, + +}; + +t_llrp_compound_item llrp_param_FieldError = { + "FieldError", LLRP_ITEM_PARAMETER, 288, 2, + llrp_param_items_FieldError +}; + +/* Parameter: ParameterError */ + +t_llrp_item llrp_param_items_ParameterError[] = { + + { "ParameterType", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ErrorCode", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + &llrp_enum_StatusCode }, + + { "FieldError", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_FieldError }, + + { "ParameterError", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ParameterError }, + +}; + +t_llrp_compound_item llrp_param_ParameterError = { + "ParameterError", LLRP_ITEM_PARAMETER, 289, 4, + llrp_param_items_ParameterError +}; + +/* Parameter: C1G2LLRPCapabilities */ + +t_llrp_item llrp_param_items_C1G2LLRPCapabilities[] = { + + { "CanSupportBlockErase", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "CanSupportBlockWrite", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "MaxNumSelectFiltersPerQuery", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2LLRPCapabilities = { + "C1G2LLRPCapabilities", LLRP_ITEM_PARAMETER, 327, 4, + llrp_param_items_C1G2LLRPCapabilities +}; + +/* Parameter: C1G2UHFRFModeTable */ + +t_llrp_item llrp_param_items_C1G2UHFRFModeTable[] = { + + { "C1G2UHFRFModeTableEntry", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2UHFRFModeTableEntry }, + +}; + +t_llrp_compound_item llrp_param_C1G2UHFRFModeTable = { + "C1G2UHFRFModeTable", LLRP_ITEM_PARAMETER, 328, 1, + llrp_param_items_C1G2UHFRFModeTable +}; + +/* Parameter: C1G2UHFRFModeTableEntry */ + +t_llrp_item llrp_param_items_C1G2UHFRFModeTableEntry[] = { + + { "ModeIdentifier", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "DRValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + &llrp_enum_C1G2DRValue }, + + { "EPCHAGTCConformance", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "MValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2MValue }, + + { "ForwardLinkModulation", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2ForwardLinkModulation }, + + { "SpectralMaskIndicator", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2SpectralMaskIndicator }, + + { "BDRValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "PIEValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MinTariValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MaxTariValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "StepTariValue", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2UHFRFModeTableEntry = { + "C1G2UHFRFModeTableEntry", LLRP_ITEM_PARAMETER, 329, 12, + llrp_param_items_C1G2UHFRFModeTableEntry +}; + +/* Parameter: C1G2InventoryCommand */ + +t_llrp_item llrp_param_items_C1G2InventoryCommand[] = { + + { "TagInventoryStateAware", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "C1G2Filter", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2Filter }, + + { "C1G2RFControl", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2RFControl }, + + { "C1G2SingulationControl", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2SingulationControl }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_param_C1G2InventoryCommand = { + "C1G2InventoryCommand", LLRP_ITEM_PARAMETER, 330, 6, + llrp_param_items_C1G2InventoryCommand +}; + +/* Parameter: C1G2Filter */ + +t_llrp_item llrp_param_items_C1G2Filter[] = { + + { "T", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u2, + &llrp_enum_C1G2TruncateAction }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "C1G2TagInventoryMask", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2TagInventoryMask }, + + { "C1G2TagInventoryStateAwareFilterAction", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2TagInventoryStateAwareFilterAction }, + + { "C1G2TagInventoryStateUnawareFilterAction", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2TagInventoryStateUnawareFilterAction }, + +}; + +t_llrp_compound_item llrp_param_C1G2Filter = { + "C1G2Filter", LLRP_ITEM_PARAMETER, 331, 5, + llrp_param_items_C1G2Filter +}; + +/* Parameter: C1G2TagInventoryMask */ + +t_llrp_item llrp_param_items_C1G2TagInventoryMask[] = { + + { "MB", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u2, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "Pointer", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "TagMask", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2TagInventoryMask = { + "C1G2TagInventoryMask", LLRP_ITEM_PARAMETER, 332, 4, + llrp_param_items_C1G2TagInventoryMask +}; + +/* Parameter: C1G2TagInventoryStateAwareFilterAction */ + +t_llrp_item llrp_param_items_C1G2TagInventoryStateAwareFilterAction[] = { + + { "Target", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2StateAwareTarget }, + + { "Action", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2StateAwareAction }, + +}; + +t_llrp_compound_item llrp_param_C1G2TagInventoryStateAwareFilterAction = { + "C1G2TagInventoryStateAwareFilterAction", LLRP_ITEM_PARAMETER, 333, 2, + llrp_param_items_C1G2TagInventoryStateAwareFilterAction +}; + +/* Parameter: C1G2TagInventoryStateUnawareFilterAction */ + +t_llrp_item llrp_param_items_C1G2TagInventoryStateUnawareFilterAction[] = { + + { "Action", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2StateUnawareAction }, + +}; + +t_llrp_compound_item llrp_param_C1G2TagInventoryStateUnawareFilterAction = { + "C1G2TagInventoryStateUnawareFilterAction", LLRP_ITEM_PARAMETER, 334, 1, + llrp_param_items_C1G2TagInventoryStateUnawareFilterAction +}; + +/* Parameter: C1G2RFControl */ + +t_llrp_item llrp_param_items_C1G2RFControl[] = { + + { "ModeIndex", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "Tari", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2RFControl = { + "C1G2RFControl", LLRP_ITEM_PARAMETER, 335, 2, + llrp_param_items_C1G2RFControl +}; + +/* Parameter: C1G2SingulationControl */ + +t_llrp_item llrp_param_items_C1G2SingulationControl[] = { + + { "Session", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u2, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "TagPopulation", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "TagTransitTime", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "C1G2TagInventoryStateAwareSingulationAction", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2TagInventoryStateAwareSingulationAction }, + +}; + +t_llrp_compound_item llrp_param_C1G2SingulationControl = { + "C1G2SingulationControl", LLRP_ITEM_PARAMETER, 336, 5, + llrp_param_items_C1G2SingulationControl +}; + +/* Parameter: C1G2TagInventoryStateAwareSingulationAction */ + +t_llrp_item llrp_param_items_C1G2TagInventoryStateAwareSingulationAction[] = { + + { "I", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + &llrp_enum_C1G2TagInventoryStateAwareI }, + + { "S", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + &llrp_enum_C1G2TagInventoryStateAwareS }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2TagInventoryStateAwareSingulationAction = { + "C1G2TagInventoryStateAwareSingulationAction", LLRP_ITEM_PARAMETER, 337, 3, + llrp_param_items_C1G2TagInventoryStateAwareSingulationAction +}; + +/* Parameter: C1G2TagSpec */ + +t_llrp_item llrp_param_items_C1G2TagSpec[] = { + + { "C1G2TargetTag", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2TargetTag }, + +}; + +t_llrp_compound_item llrp_param_C1G2TagSpec = { + "C1G2TagSpec", LLRP_ITEM_PARAMETER, 338, 1, + llrp_param_items_C1G2TagSpec +}; + +/* Parameter: C1G2TargetTag */ + +t_llrp_item llrp_param_items_C1G2TargetTag[] = { + + { "MB", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u2, + NULL }, + + { "Match", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 5, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "Pointer", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "TagMask", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1v, + NULL }, + + { "TagData", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2TargetTag = { + "C1G2TargetTag", LLRP_ITEM_PARAMETER, 339, 6, + llrp_param_items_C1G2TargetTag +}; + +/* Parameter: C1G2Read */ + +t_llrp_item llrp_param_items_C1G2Read[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AccessPassword", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MB", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u2, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "WordPointer", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "WordCount", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2Read = { + "C1G2Read", LLRP_ITEM_PARAMETER, 341, 6, + llrp_param_items_C1G2Read +}; + +/* Parameter: C1G2Write */ + +t_llrp_item llrp_param_items_C1G2Write[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AccessPassword", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MB", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u2, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "WordPointer", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "WriteData", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2Write = { + "C1G2Write", LLRP_ITEM_PARAMETER, 342, 6, + llrp_param_items_C1G2Write +}; + +/* Parameter: C1G2Kill */ + +t_llrp_item llrp_param_items_C1G2Kill[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "KillPassword", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2Kill = { + "C1G2Kill", LLRP_ITEM_PARAMETER, 343, 2, + llrp_param_items_C1G2Kill +}; + +/* Parameter: C1G2Lock */ + +t_llrp_item llrp_param_items_C1G2Lock[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AccessPassword", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "C1G2LockPayload", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_C1G2LockPayload }, + +}; + +t_llrp_compound_item llrp_param_C1G2Lock = { + "C1G2Lock", LLRP_ITEM_PARAMETER, 344, 3, + llrp_param_items_C1G2Lock +}; + +/* Parameter: C1G2LockPayload */ + +t_llrp_item llrp_param_items_C1G2LockPayload[] = { + + { "Privilege", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2LockPrivilege }, + + { "DataField", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2LockDataField }, + +}; + +t_llrp_compound_item llrp_param_C1G2LockPayload = { + "C1G2LockPayload", LLRP_ITEM_PARAMETER, 345, 2, + llrp_param_items_C1G2LockPayload +}; + +/* Parameter: C1G2BlockErase */ + +t_llrp_item llrp_param_items_C1G2BlockErase[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AccessPassword", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MB", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u2, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "WordPointer", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "WordCount", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2BlockErase = { + "C1G2BlockErase", LLRP_ITEM_PARAMETER, 346, 6, + llrp_param_items_C1G2BlockErase +}; + +/* Parameter: C1G2BlockWrite */ + +t_llrp_item llrp_param_items_C1G2BlockWrite[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AccessPassword", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MB", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u2, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "WordPointer", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "WriteData", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2BlockWrite = { + "C1G2BlockWrite", LLRP_ITEM_PARAMETER, 347, 6, + llrp_param_items_C1G2BlockWrite +}; + +/* Parameter: C1G2EPCMemorySelector */ + +t_llrp_item llrp_param_items_C1G2EPCMemorySelector[] = { + + { "EnableCRC", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnablePCBits", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 6, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2EPCMemorySelector = { + "C1G2EPCMemorySelector", LLRP_ITEM_PARAMETER, 348, 3, + llrp_param_items_C1G2EPCMemorySelector +}; + +/* Parameter: C1G2_PC */ + +t_llrp_item llrp_param_items_C1G2_PC[] = { + + { "PC_Bits", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2_PC = { + "C1G2_PC", LLRP_ITEM_PARAMETER, 12, 1, + llrp_param_items_C1G2_PC +}; + +/* Parameter: C1G2_CRC */ + +t_llrp_item llrp_param_items_C1G2_CRC[] = { + + { "CRC", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2_CRC = { + "C1G2_CRC", LLRP_ITEM_PARAMETER, 11, 1, + llrp_param_items_C1G2_CRC +}; + +/* Parameter: C1G2SingulationDetails */ + +t_llrp_item llrp_param_items_C1G2SingulationDetails[] = { + + { "NumCollisionSlots", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "NumEmptySlots", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2SingulationDetails = { + "C1G2SingulationDetails", LLRP_ITEM_PARAMETER, 18, 2, + llrp_param_items_C1G2SingulationDetails +}; + +/* Parameter: C1G2ReadOpSpecResult */ + +t_llrp_item llrp_param_items_C1G2ReadOpSpecResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2ReadResultType }, + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "ReadData", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16v, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2ReadOpSpecResult = { + "C1G2ReadOpSpecResult", LLRP_ITEM_PARAMETER, 349, 3, + llrp_param_items_C1G2ReadOpSpecResult +}; + +/* Parameter: C1G2WriteOpSpecResult */ + +t_llrp_item llrp_param_items_C1G2WriteOpSpecResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2WriteResultType }, + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "NumWordsWritten", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2WriteOpSpecResult = { + "C1G2WriteOpSpecResult", LLRP_ITEM_PARAMETER, 350, 3, + llrp_param_items_C1G2WriteOpSpecResult +}; + +/* Parameter: C1G2KillOpSpecResult */ + +t_llrp_item llrp_param_items_C1G2KillOpSpecResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2KillResultType }, + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2KillOpSpecResult = { + "C1G2KillOpSpecResult", LLRP_ITEM_PARAMETER, 351, 2, + llrp_param_items_C1G2KillOpSpecResult +}; + +/* Parameter: C1G2LockOpSpecResult */ + +t_llrp_item llrp_param_items_C1G2LockOpSpecResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2LockResultType }, + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2LockOpSpecResult = { + "C1G2LockOpSpecResult", LLRP_ITEM_PARAMETER, 352, 2, + llrp_param_items_C1G2LockOpSpecResult +}; + +/* Parameter: C1G2BlockEraseOpSpecResult */ + +t_llrp_item llrp_param_items_C1G2BlockEraseOpSpecResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2BlockEraseResultType }, + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2BlockEraseOpSpecResult = { + "C1G2BlockEraseOpSpecResult", LLRP_ITEM_PARAMETER, 353, 2, + llrp_param_items_C1G2BlockEraseOpSpecResult +}; + +/* Parameter: C1G2BlockWriteOpSpecResult */ + +t_llrp_item llrp_param_items_C1G2BlockWriteOpSpecResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_C1G2BlockWriteResultType }, + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "NumWordsWritten", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_param_C1G2BlockWriteOpSpecResult = { + "C1G2BlockWriteOpSpecResult", LLRP_ITEM_PARAMETER, 354, 3, + llrp_param_items_C1G2BlockWriteOpSpecResult +}; + +/* ----------------------------------------------------------------------------- */ +/* Parameter List (108 total) */ + +t_llrp_standard_map_item llrp_v1_0_parameter_list[] = { + + { 1, &llrp_param_AntennaID, + + }, + + { 2, &llrp_param_FirstSeenTimestampUTC, + + }, + + { 3, &llrp_param_FirstSeenTimestampUptime, + + }, + + { 4, &llrp_param_LastSeenTimestampUTC, + + }, + + { 5, &llrp_param_LastSeenTimestampUptime, + + }, + + { 6, &llrp_param_PeakRSSI, + + }, + + { 7, &llrp_param_ChannelIndex, + + }, + + { 8, &llrp_param_TagSeenCount, + + }, + + { 9, &llrp_param_ROSpecID, + + }, + + { 10, &llrp_param_InventoryParameterSpecID, + + }, + + { 11, &llrp_param_C1G2_CRC, + + }, + + { 12, &llrp_param_C1G2_PC, + + }, + + { 13, &llrp_param_EPC_96, + + }, + + { 14, &llrp_param_SpecIndex, + + }, + + { 16, &llrp_param_AccessSpecID, + + }, + + { 17, &llrp_param_OpSpecID, + + }, + + { 18, &llrp_param_C1G2SingulationDetails, + + }, + + { 128, &llrp_param_UTCTimestamp, + + }, + + { 129, &llrp_param_Uptime, + + }, + + { 137, &llrp_param_GeneralDeviceCapabilities, + + }, + + { 139, &llrp_param_ReceiveSensitivityTableEntry, + + }, + + { 140, &llrp_param_PerAntennaAirProtocol, + + }, + + { 141, &llrp_param_GPIOCapabilities, + + }, + + { 142, &llrp_param_LLRPCapabilities, + + }, + + { 143, &llrp_param_RegulatoryCapabilities, + + }, + + { 144, &llrp_param_UHFBandCapabilities, + + }, + + { 145, &llrp_param_TransmitPowerLevelTableEntry, + + }, + + { 146, &llrp_param_FrequencyInformation, + + }, + + { 147, &llrp_param_FrequencyHopTable, + + }, + + { 148, &llrp_param_FixedFrequencyTable, + + }, + + { 149, &llrp_param_PerAntennaReceiveSensitivityRange, + + }, + + { 177, &llrp_param_ROSpec, + + }, + + { 178, &llrp_param_ROBoundarySpec, + + }, + + { 179, &llrp_param_ROSpecStartTrigger, + + }, + + { 180, &llrp_param_PeriodicTriggerValue, + + }, + + { 181, &llrp_param_GPITriggerValue, + + }, + + { 182, &llrp_param_ROSpecStopTrigger, + + }, + + { 183, &llrp_param_AISpec, + + }, + + { 184, &llrp_param_AISpecStopTrigger, + + }, + + { 185, &llrp_param_TagObservationTrigger, + + }, + + { 186, &llrp_param_InventoryParameterSpec, + + }, + + { 187, &llrp_param_RFSurveySpec, + + }, + + { 188, &llrp_param_RFSurveySpecStopTrigger, + + }, + + { 207, &llrp_param_AccessSpec, + + }, + + { 208, &llrp_param_AccessSpecStopTrigger, + + }, + + { 209, &llrp_param_AccessCommand, + + }, + + { 217, &llrp_param_LLRPConfigurationStateValue, + + }, + + { 218, &llrp_param_Identification, + + }, + + { 219, &llrp_param_GPOWriteData, + + }, + + { 220, &llrp_param_KeepaliveSpec, + + }, + + { 221, &llrp_param_AntennaProperties, + + }, + + { 222, &llrp_param_AntennaConfiguration, + + }, + + { 223, &llrp_param_RFReceiver, + + }, + + { 224, &llrp_param_RFTransmitter, + + }, + + { 225, &llrp_param_GPIPortCurrentState, + + }, + + { 226, &llrp_param_EventsAndReports, + + }, + + { 237, &llrp_param_ROReportSpec, + + }, + + { 238, &llrp_param_TagReportContentSelector, + + }, + + { 239, &llrp_param_AccessReportSpec, + + }, + + { 240, &llrp_param_TagReportData, + + }, + + { 241, &llrp_param_EPCData, + + }, + + { 242, &llrp_param_RFSurveyReportData, + + }, + + { 243, &llrp_param_FrequencyRSSILevelEntry, + + }, + + { 244, &llrp_param_ReaderEventNotificationSpec, + + }, + + { 245, &llrp_param_EventNotificationState, + + }, + + { 246, &llrp_param_ReaderEventNotificationData, + + }, + + { 247, &llrp_param_HoppingEvent, + + }, + + { 248, &llrp_param_GPIEvent, + + }, + + { 249, &llrp_param_ROSpecEvent, + + }, + + { 250, &llrp_param_ReportBufferLevelWarningEvent, + + }, + + { 251, &llrp_param_ReportBufferOverflowErrorEvent, + + }, + + { 252, &llrp_param_ReaderExceptionEvent, + + }, + + { 253, &llrp_param_RFSurveyEvent, + + }, + + { 254, &llrp_param_AISpecEvent, + + }, + + { 255, &llrp_param_AntennaEvent, + + }, + + { 256, &llrp_param_ConnectionAttemptEvent, + + }, + + { 257, &llrp_param_ConnectionCloseEvent, + + }, + + { 287, &llrp_param_LLRPStatus, + + }, + + { 288, &llrp_param_FieldError, + + }, + + { 289, &llrp_param_ParameterError, + + }, + + { 327, &llrp_param_C1G2LLRPCapabilities, + + }, + + { 328, &llrp_param_C1G2UHFRFModeTable, + + }, + + { 329, &llrp_param_C1G2UHFRFModeTableEntry, + + }, + + { 330, &llrp_param_C1G2InventoryCommand, + + }, + + { 331, &llrp_param_C1G2Filter, + + }, + + { 332, &llrp_param_C1G2TagInventoryMask, + + }, + + { 333, &llrp_param_C1G2TagInventoryStateAwareFilterAction, + + }, + + { 334, &llrp_param_C1G2TagInventoryStateUnawareFilterAction, + + }, + + { 335, &llrp_param_C1G2RFControl, + + }, + + { 336, &llrp_param_C1G2SingulationControl, + + }, + + { 337, &llrp_param_C1G2TagInventoryStateAwareSingulationAction, + + }, + + { 338, &llrp_param_C1G2TagSpec, + + }, + + { 339, &llrp_param_C1G2TargetTag, + + }, + + { 341, &llrp_param_C1G2Read, + + }, + + { 342, &llrp_param_C1G2Write, + + }, + + { 343, &llrp_param_C1G2Kill, + + }, + + { 344, &llrp_param_C1G2Lock, + + }, + + { 345, &llrp_param_C1G2LockPayload, + + }, + + { 346, &llrp_param_C1G2BlockErase, + + }, + + { 347, &llrp_param_C1G2BlockWrite, + + }, + + { 348, &llrp_param_C1G2EPCMemorySelector, + + }, + + { 349, &llrp_param_C1G2ReadOpSpecResult, + + }, + + { 350, &llrp_param_C1G2WriteOpSpecResult, + + }, + + { 351, &llrp_param_C1G2KillOpSpecResult, + + }, + + { 352, &llrp_param_C1G2LockOpSpecResult, + + }, + + { 353, &llrp_param_C1G2BlockEraseOpSpecResult, + + }, + + { 354, &llrp_param_C1G2BlockWriteOpSpecResult, + + }, + + { 1023, &llrp_param_Custom, + + }, + +}; + + +/* ----------------------------------------------------------------------------- */ +/* Message Definitions (40 total) */ + +/* Message: CUSTOM_MESSAGE */ +t_llrp_item llrp_message_items_CUSTOM_MESSAGE[] = { + + { "VendorIdentifier", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "MessageSubtype", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + + { "Data", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_bytesToEnd, + NULL }, + +}; + +t_llrp_compound_item llrp_message_CUSTOM_MESSAGE = { + "CUSTOM_MESSAGE", LLRP_ITEM_MESSAGE, 1023, 3, + llrp_message_items_CUSTOM_MESSAGE +}; + +/* Message: GET_READER_CAPABILITIES */ +t_llrp_item llrp_message_items_GET_READER_CAPABILITIES[] = { + + { "RequestedData", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_GetReaderCapabilitiesRequestedData }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_message_GET_READER_CAPABILITIES = { + "GET_READER_CAPABILITIES", LLRP_ITEM_MESSAGE, 1, 2, + llrp_message_items_GET_READER_CAPABILITIES +}; + +/* Message: GET_READER_CAPABILITIES_RESPONSE */ +t_llrp_item llrp_message_items_GET_READER_CAPABILITIES_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + + { "GeneralDeviceCapabilities", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_GeneralDeviceCapabilities }, + + { "LLRPCapabilities", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPCapabilities }, + + { "RegulatoryCapabilities", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_RegulatoryCapabilities }, + + { "AirProtocolLLRPCapabilities", LLRP_ITEM_CHOICE, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_choice_AirProtocolLLRPCapabilities }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_message_GET_READER_CAPABILITIES_RESPONSE = { + "GET_READER_CAPABILITIES_RESPONSE", LLRP_ITEM_MESSAGE, 11, 6, + llrp_message_items_GET_READER_CAPABILITIES_RESPONSE +}; + +/* Message: ADD_ROSPEC */ +t_llrp_item llrp_message_items_ADD_ROSPEC[] = { + + { "ROSpec", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_ROSpec }, + +}; + +t_llrp_compound_item llrp_message_ADD_ROSPEC = { + "ADD_ROSPEC", LLRP_ITEM_MESSAGE, 20, 1, + llrp_message_items_ADD_ROSPEC +}; + +/* Message: ADD_ROSPEC_RESPONSE */ +t_llrp_item llrp_message_items_ADD_ROSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_ADD_ROSPEC_RESPONSE = { + "ADD_ROSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 30, 1, + llrp_message_items_ADD_ROSPEC_RESPONSE +}; + +/* Message: DELETE_ROSPEC */ +t_llrp_item llrp_message_items_DELETE_ROSPEC[] = { + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_message_DELETE_ROSPEC = { + "DELETE_ROSPEC", LLRP_ITEM_MESSAGE, 21, 1, + llrp_message_items_DELETE_ROSPEC +}; + +/* Message: DELETE_ROSPEC_RESPONSE */ +t_llrp_item llrp_message_items_DELETE_ROSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_DELETE_ROSPEC_RESPONSE = { + "DELETE_ROSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 31, 1, + llrp_message_items_DELETE_ROSPEC_RESPONSE +}; + +/* Message: START_ROSPEC */ +t_llrp_item llrp_message_items_START_ROSPEC[] = { + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_message_START_ROSPEC = { + "START_ROSPEC", LLRP_ITEM_MESSAGE, 22, 1, + llrp_message_items_START_ROSPEC +}; + +/* Message: START_ROSPEC_RESPONSE */ +t_llrp_item llrp_message_items_START_ROSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_START_ROSPEC_RESPONSE = { + "START_ROSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 32, 1, + llrp_message_items_START_ROSPEC_RESPONSE +}; + +/* Message: STOP_ROSPEC */ +t_llrp_item llrp_message_items_STOP_ROSPEC[] = { + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_message_STOP_ROSPEC = { + "STOP_ROSPEC", LLRP_ITEM_MESSAGE, 23, 1, + llrp_message_items_STOP_ROSPEC +}; + +/* Message: STOP_ROSPEC_RESPONSE */ +t_llrp_item llrp_message_items_STOP_ROSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_STOP_ROSPEC_RESPONSE = { + "STOP_ROSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 33, 1, + llrp_message_items_STOP_ROSPEC_RESPONSE +}; + +/* Message: ENABLE_ROSPEC */ +t_llrp_item llrp_message_items_ENABLE_ROSPEC[] = { + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_message_ENABLE_ROSPEC = { + "ENABLE_ROSPEC", LLRP_ITEM_MESSAGE, 24, 1, + llrp_message_items_ENABLE_ROSPEC +}; + +/* Message: ENABLE_ROSPEC_RESPONSE */ +t_llrp_item llrp_message_items_ENABLE_ROSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_ENABLE_ROSPEC_RESPONSE = { + "ENABLE_ROSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 34, 1, + llrp_message_items_ENABLE_ROSPEC_RESPONSE +}; + +/* Message: DISABLE_ROSPEC */ +t_llrp_item llrp_message_items_DISABLE_ROSPEC[] = { + + { "ROSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_message_DISABLE_ROSPEC = { + "DISABLE_ROSPEC", LLRP_ITEM_MESSAGE, 25, 1, + llrp_message_items_DISABLE_ROSPEC +}; + +/* Message: DISABLE_ROSPEC_RESPONSE */ +t_llrp_item llrp_message_items_DISABLE_ROSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_DISABLE_ROSPEC_RESPONSE = { + "DISABLE_ROSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 35, 1, + llrp_message_items_DISABLE_ROSPEC_RESPONSE +}; + +t_llrp_compound_item llrp_message_GET_ROSPECS = { + "GET_ROSPECS", LLRP_ITEM_MESSAGE, 26, 0, + NULL +}; + +/* Message: GET_ROSPECS_RESPONSE */ +t_llrp_item llrp_message_items_GET_ROSPECS_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + + { "ROSpec", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_ROSpec }, + +}; + +t_llrp_compound_item llrp_message_GET_ROSPECS_RESPONSE = { + "GET_ROSPECS_RESPONSE", LLRP_ITEM_MESSAGE, 36, 2, + llrp_message_items_GET_ROSPECS_RESPONSE +}; + +/* Message: ADD_ACCESSSPEC */ +t_llrp_item llrp_message_items_ADD_ACCESSSPEC[] = { + + { "AccessSpec", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_AccessSpec }, + +}; + +t_llrp_compound_item llrp_message_ADD_ACCESSSPEC = { + "ADD_ACCESSSPEC", LLRP_ITEM_MESSAGE, 40, 1, + llrp_message_items_ADD_ACCESSSPEC +}; + +/* Message: ADD_ACCESSSPEC_RESPONSE */ +t_llrp_item llrp_message_items_ADD_ACCESSSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_ADD_ACCESSSPEC_RESPONSE = { + "ADD_ACCESSSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 50, 1, + llrp_message_items_ADD_ACCESSSPEC_RESPONSE +}; + +/* Message: DELETE_ACCESSSPEC */ +t_llrp_item llrp_message_items_DELETE_ACCESSSPEC[] = { + + { "AccessSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_message_DELETE_ACCESSSPEC = { + "DELETE_ACCESSSPEC", LLRP_ITEM_MESSAGE, 41, 1, + llrp_message_items_DELETE_ACCESSSPEC +}; + +/* Message: DELETE_ACCESSSPEC_RESPONSE */ +t_llrp_item llrp_message_items_DELETE_ACCESSSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_DELETE_ACCESSSPEC_RESPONSE = { + "DELETE_ACCESSSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 51, 1, + llrp_message_items_DELETE_ACCESSSPEC_RESPONSE +}; + +/* Message: ENABLE_ACCESSSPEC */ +t_llrp_item llrp_message_items_ENABLE_ACCESSSPEC[] = { + + { "AccessSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_message_ENABLE_ACCESSSPEC = { + "ENABLE_ACCESSSPEC", LLRP_ITEM_MESSAGE, 42, 1, + llrp_message_items_ENABLE_ACCESSSPEC +}; + +/* Message: ENABLE_ACCESSSPEC_RESPONSE */ +t_llrp_item llrp_message_items_ENABLE_ACCESSSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_ENABLE_ACCESSSPEC_RESPONSE = { + "ENABLE_ACCESSSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 52, 1, + llrp_message_items_ENABLE_ACCESSSPEC_RESPONSE +}; + +/* Message: DISABLE_ACCESSSPEC */ +t_llrp_item llrp_message_items_DISABLE_ACCESSSPEC[] = { + + { "AccessSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_message_DISABLE_ACCESSSPEC = { + "DISABLE_ACCESSSPEC", LLRP_ITEM_MESSAGE, 43, 1, + llrp_message_items_DISABLE_ACCESSSPEC +}; + +/* Message: DISABLE_ACCESSSPEC_RESPONSE */ +t_llrp_item llrp_message_items_DISABLE_ACCESSSPEC_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_DISABLE_ACCESSSPEC_RESPONSE = { + "DISABLE_ACCESSSPEC_RESPONSE", LLRP_ITEM_MESSAGE, 53, 1, + llrp_message_items_DISABLE_ACCESSSPEC_RESPONSE +}; + +t_llrp_compound_item llrp_message_GET_ACCESSSPECS = { + "GET_ACCESSSPECS", LLRP_ITEM_MESSAGE, 44, 0, + NULL +}; + +/* Message: GET_ACCESSSPECS_RESPONSE */ +t_llrp_item llrp_message_items_GET_ACCESSSPECS_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + + { "AccessSpec", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_AccessSpec }, + +}; + +t_llrp_compound_item llrp_message_GET_ACCESSSPECS_RESPONSE = { + "GET_ACCESSSPECS_RESPONSE", LLRP_ITEM_MESSAGE, 54, 2, + llrp_message_items_GET_ACCESSSPECS_RESPONSE +}; + +/* Message: GET_READER_CONFIG */ +t_llrp_item llrp_message_items_GET_READER_CONFIG[] = { + + { "AntennaID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "RequestedData", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_GetReaderConfigRequestedData }, + + { "GPIPortNum", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "GPOPortNum", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_message_GET_READER_CONFIG = { + "GET_READER_CONFIG", LLRP_ITEM_MESSAGE, 2, 5, + llrp_message_items_GET_READER_CONFIG +}; + +/* Message: GET_READER_CONFIG_RESPONSE */ +t_llrp_item llrp_message_items_GET_READER_CONFIG_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + + { "Identification", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_Identification }, + + { "AntennaProperties", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaProperties }, + + { "AntennaConfiguration", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaConfiguration }, + + { "ReaderEventNotificationSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ReaderEventNotificationSpec }, + + { "ROReportSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ROReportSpec }, + + { "AccessReportSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AccessReportSpec }, + + { "LLRPConfigurationStateValue", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPConfigurationStateValue }, + + { "KeepaliveSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_KeepaliveSpec }, + + { "GPIPortCurrentState", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_GPIPortCurrentState }, + + { "GPOWriteData", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_GPOWriteData }, + + { "EventsAndReports", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_EventsAndReports }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_message_GET_READER_CONFIG_RESPONSE = { + "GET_READER_CONFIG_RESPONSE", LLRP_ITEM_MESSAGE, 12, 13, + llrp_message_items_GET_READER_CONFIG_RESPONSE +}; + +/* Message: SET_READER_CONFIG */ +t_llrp_item llrp_message_items_SET_READER_CONFIG[] = { + + { "ResetToFactoryDefault", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + + { "ReaderEventNotificationSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ReaderEventNotificationSpec }, + + { "AntennaProperties", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaProperties }, + + { "AntennaConfiguration", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaConfiguration }, + + { "ROReportSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_ROReportSpec }, + + { "AccessReportSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_AccessReportSpec }, + + { "KeepaliveSpec", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_KeepaliveSpec }, + + { "GPOWriteData", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_GPOWriteData }, + + { "GPIPortCurrentState", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_GPIPortCurrentState }, + + { "EventsAndReports", LLRP_ITEM_PARAMETER, 0, 1, LLRP_FIELDTYPE_NONE, &llrp_param_EventsAndReports }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_message_SET_READER_CONFIG = { + "SET_READER_CONFIG", LLRP_ITEM_MESSAGE, 3, 12, + llrp_message_items_SET_READER_CONFIG +}; + +/* Message: SET_READER_CONFIG_RESPONSE */ +t_llrp_item llrp_message_items_SET_READER_CONFIG_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_SET_READER_CONFIG_RESPONSE = { + "SET_READER_CONFIG_RESPONSE", LLRP_ITEM_MESSAGE, 13, 1, + llrp_message_items_SET_READER_CONFIG_RESPONSE +}; + +t_llrp_compound_item llrp_message_CLOSE_CONNECTION = { + "CLOSE_CONNECTION", LLRP_ITEM_MESSAGE, 14, 0, + NULL +}; + +/* Message: CLOSE_CONNECTION_RESPONSE */ +t_llrp_item llrp_message_items_CLOSE_CONNECTION_RESPONSE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_CLOSE_CONNECTION_RESPONSE = { + "CLOSE_CONNECTION_RESPONSE", LLRP_ITEM_MESSAGE, 4, 1, + llrp_message_items_CLOSE_CONNECTION_RESPONSE +}; + +t_llrp_compound_item llrp_message_GET_REPORT = { + "GET_REPORT", LLRP_ITEM_MESSAGE, 60, 0, + NULL +}; + +/* Message: RO_ACCESS_REPORT */ +t_llrp_item llrp_message_items_RO_ACCESS_REPORT[] = { + + { "TagReportData", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_TagReportData }, + + { "RFSurveyReportData", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_RFSurveyReportData }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_message_RO_ACCESS_REPORT = { + "RO_ACCESS_REPORT", LLRP_ITEM_MESSAGE, 61, 3, + llrp_message_items_RO_ACCESS_REPORT +}; + +t_llrp_compound_item llrp_message_KEEPALIVE = { + "KEEPALIVE", LLRP_ITEM_MESSAGE, 62, 0, + NULL +}; + +t_llrp_compound_item llrp_message_KEEPALIVE_ACK = { + "KEEPALIVE_ACK", LLRP_ITEM_MESSAGE, 72, 0, + NULL +}; + +/* Message: READER_EVENT_NOTIFICATION */ +t_llrp_item llrp_message_items_READER_EVENT_NOTIFICATION[] = { + + { "ReaderEventNotificationData", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_ReaderEventNotificationData }, + +}; + +t_llrp_compound_item llrp_message_READER_EVENT_NOTIFICATION = { + "READER_EVENT_NOTIFICATION", LLRP_ITEM_MESSAGE, 63, 1, + llrp_message_items_READER_EVENT_NOTIFICATION +}; + +t_llrp_compound_item llrp_message_ENABLE_EVENTS_AND_REPORTS = { + "ENABLE_EVENTS_AND_REPORTS", LLRP_ITEM_MESSAGE, 64, 0, + NULL +}; + +/* Message: ERROR_MESSAGE */ +t_llrp_item llrp_message_items_ERROR_MESSAGE[] = { + + { "LLRPStatus", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LLRPStatus }, + +}; + +t_llrp_compound_item llrp_message_ERROR_MESSAGE = { + "ERROR_MESSAGE", LLRP_ITEM_MESSAGE, 100, 1, + llrp_message_items_ERROR_MESSAGE +}; + +/* ----------------------------------------------------------------------------- */ +/* Message List (40 total) */ + +t_llrp_standard_map_item llrp_v1_0_message_list[] = { + + { 1, &llrp_message_GET_READER_CAPABILITIES, + + }, + + { 2, &llrp_message_GET_READER_CONFIG, + + }, + + { 3, &llrp_message_SET_READER_CONFIG, + + }, + + { 4, &llrp_message_CLOSE_CONNECTION_RESPONSE, + + }, + + { 11, &llrp_message_GET_READER_CAPABILITIES_RESPONSE, + + }, + + { 12, &llrp_message_GET_READER_CONFIG_RESPONSE, + + }, + + { 13, &llrp_message_SET_READER_CONFIG_RESPONSE, + + }, + + { 14, &llrp_message_CLOSE_CONNECTION, + + }, + + { 20, &llrp_message_ADD_ROSPEC, + + }, + + { 21, &llrp_message_DELETE_ROSPEC, + + }, + + { 22, &llrp_message_START_ROSPEC, + + }, + + { 23, &llrp_message_STOP_ROSPEC, + + }, + + { 24, &llrp_message_ENABLE_ROSPEC, + + }, + + { 25, &llrp_message_DISABLE_ROSPEC, + + }, + + { 26, &llrp_message_GET_ROSPECS, + + }, + + { 30, &llrp_message_ADD_ROSPEC_RESPONSE, + + }, + + { 31, &llrp_message_DELETE_ROSPEC_RESPONSE, + + }, + + { 32, &llrp_message_START_ROSPEC_RESPONSE, + + }, + + { 33, &llrp_message_STOP_ROSPEC_RESPONSE, + + }, + + { 34, &llrp_message_ENABLE_ROSPEC_RESPONSE, + + }, + + { 35, &llrp_message_DISABLE_ROSPEC_RESPONSE, + + }, + + { 36, &llrp_message_GET_ROSPECS_RESPONSE, + + }, + + { 40, &llrp_message_ADD_ACCESSSPEC, + + }, + + { 41, &llrp_message_DELETE_ACCESSSPEC, + + }, + + { 42, &llrp_message_ENABLE_ACCESSSPEC, + + }, + + { 43, &llrp_message_DISABLE_ACCESSSPEC, + + }, + + { 44, &llrp_message_GET_ACCESSSPECS, + + }, + + { 50, &llrp_message_ADD_ACCESSSPEC_RESPONSE, + + }, + + { 51, &llrp_message_DELETE_ACCESSSPEC_RESPONSE, + + }, + + { 52, &llrp_message_ENABLE_ACCESSSPEC_RESPONSE, + + }, + + { 53, &llrp_message_DISABLE_ACCESSSPEC_RESPONSE, + + }, + + { 54, &llrp_message_GET_ACCESSSPECS_RESPONSE, + + }, + + { 60, &llrp_message_GET_REPORT, + + }, + + { 61, &llrp_message_RO_ACCESS_REPORT, + + }, + + { 62, &llrp_message_KEEPALIVE, + + }, + + { 63, &llrp_message_READER_EVENT_NOTIFICATION, + + }, + + { 64, &llrp_message_ENABLE_EVENTS_AND_REPORTS, + + }, + + { 72, &llrp_message_KEEPALIVE_ACK, + + }, + + { 100, &llrp_message_ERROR_MESSAGE, + + }, + + { 1023, &llrp_message_CUSTOM_MESSAGE, + + }, + +}; + +/* ----------------------------------------------------------------------------- */ +/* Validator: v1_0 */ +t_llrp_parse_validator llrp_v1_0_parse_validator = { + "v1_0", + llrp_v1_0_parameter_list, 108, + NULL, 0, + llrp_v1_0_message_list, 40, + NULL, 0, +}; + + +/*end*/ diff --git a/plugins/llrp/llrp-1x0-def.h b/plugins/llrp/llrp-1x0-def.h new file mode 100644 index 0000000000..95263189c2 --- /dev/null +++ b/plugins/llrp/llrp-1x0-def.h @@ -0,0 +1,532 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _LLRP_GENERATED_v1_0_H +#define _LLRP_GENERATED_v1_0_H + +#include "llrpparsetypes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern t_llrp_parse_validator llrp_v1_0_parse_validator; + +#ifdef __cplusplus +} +#endif + + + +/* ----------------------------------------------------------------------------- */ +/* Choice Forward Declarations (12 total) */ + +extern t_llrp_compound_item llrp_choice_SpecParameter; +extern t_llrp_compound_item llrp_choice_AccessCommandOpSpec; +extern t_llrp_compound_item llrp_choice_AccessCommandOpSpecResult; +extern t_llrp_compound_item llrp_choice_EPCParameter; +extern t_llrp_compound_item llrp_choice_Timestamp; +extern t_llrp_compound_item llrp_choice_AirProtocolLLRPCapabilities; +extern t_llrp_compound_item llrp_choice_AirProtocolUHFRFModeTable; +extern t_llrp_compound_item llrp_choice_AirProtocolInventoryCommandSettings; +extern t_llrp_compound_item llrp_choice_AirProtocolTagSpec; +extern t_llrp_compound_item llrp_choice_AirProtocolEPCMemorySelector; +extern t_llrp_compound_item llrp_choice_AirProtocolTagData; +extern t_llrp_compound_item llrp_choice_AirProtocolSingulationDetails; + +/* ----------------------------------------------------------------------------- */ +/* Parameter Forward Declarations (108 total) */ + +extern t_llrp_compound_item llrp_param_UTCTimestamp; +extern t_llrp_compound_item llrp_param_Uptime; +extern t_llrp_compound_item llrp_param_Custom; +extern t_llrp_compound_item llrp_param_GeneralDeviceCapabilities; +extern t_llrp_compound_item llrp_param_ReceiveSensitivityTableEntry; +extern t_llrp_compound_item llrp_param_PerAntennaReceiveSensitivityRange; +extern t_llrp_compound_item llrp_param_PerAntennaAirProtocol; +extern t_llrp_compound_item llrp_param_GPIOCapabilities; +extern t_llrp_compound_item llrp_param_LLRPCapabilities; +extern t_llrp_compound_item llrp_param_RegulatoryCapabilities; +extern t_llrp_compound_item llrp_param_UHFBandCapabilities; +extern t_llrp_compound_item llrp_param_TransmitPowerLevelTableEntry; +extern t_llrp_compound_item llrp_param_FrequencyInformation; +extern t_llrp_compound_item llrp_param_FrequencyHopTable; +extern t_llrp_compound_item llrp_param_FixedFrequencyTable; +extern t_llrp_compound_item llrp_param_ROSpec; +extern t_llrp_compound_item llrp_param_ROBoundarySpec; +extern t_llrp_compound_item llrp_param_ROSpecStartTrigger; +extern t_llrp_compound_item llrp_param_PeriodicTriggerValue; +extern t_llrp_compound_item llrp_param_GPITriggerValue; +extern t_llrp_compound_item llrp_param_ROSpecStopTrigger; +extern t_llrp_compound_item llrp_param_AISpec; +extern t_llrp_compound_item llrp_param_AISpecStopTrigger; +extern t_llrp_compound_item llrp_param_TagObservationTrigger; +extern t_llrp_compound_item llrp_param_InventoryParameterSpec; +extern t_llrp_compound_item llrp_param_RFSurveySpec; +extern t_llrp_compound_item llrp_param_RFSurveySpecStopTrigger; +extern t_llrp_compound_item llrp_param_AccessSpec; +extern t_llrp_compound_item llrp_param_AccessSpecStopTrigger; +extern t_llrp_compound_item llrp_param_AccessCommand; +extern t_llrp_compound_item llrp_param_LLRPConfigurationStateValue; +extern t_llrp_compound_item llrp_param_Identification; +extern t_llrp_compound_item llrp_param_GPOWriteData; +extern t_llrp_compound_item llrp_param_KeepaliveSpec; +extern t_llrp_compound_item llrp_param_AntennaProperties; +extern t_llrp_compound_item llrp_param_AntennaConfiguration; +extern t_llrp_compound_item llrp_param_RFReceiver; +extern t_llrp_compound_item llrp_param_RFTransmitter; +extern t_llrp_compound_item llrp_param_GPIPortCurrentState; +extern t_llrp_compound_item llrp_param_EventsAndReports; +extern t_llrp_compound_item llrp_param_ROReportSpec; +extern t_llrp_compound_item llrp_param_TagReportContentSelector; +extern t_llrp_compound_item llrp_param_AccessReportSpec; +extern t_llrp_compound_item llrp_param_TagReportData; +extern t_llrp_compound_item llrp_param_EPCData; +extern t_llrp_compound_item llrp_param_EPC_96; +extern t_llrp_compound_item llrp_param_ROSpecID; +extern t_llrp_compound_item llrp_param_SpecIndex; +extern t_llrp_compound_item llrp_param_InventoryParameterSpecID; +extern t_llrp_compound_item llrp_param_AntennaID; +extern t_llrp_compound_item llrp_param_PeakRSSI; +extern t_llrp_compound_item llrp_param_ChannelIndex; +extern t_llrp_compound_item llrp_param_FirstSeenTimestampUTC; +extern t_llrp_compound_item llrp_param_FirstSeenTimestampUptime; +extern t_llrp_compound_item llrp_param_LastSeenTimestampUTC; +extern t_llrp_compound_item llrp_param_LastSeenTimestampUptime; +extern t_llrp_compound_item llrp_param_TagSeenCount; +extern t_llrp_compound_item llrp_param_AccessSpecID; +extern t_llrp_compound_item llrp_param_RFSurveyReportData; +extern t_llrp_compound_item llrp_param_FrequencyRSSILevelEntry; +extern t_llrp_compound_item llrp_param_ReaderEventNotificationSpec; +extern t_llrp_compound_item llrp_param_EventNotificationState; +extern t_llrp_compound_item llrp_param_ReaderEventNotificationData; +extern t_llrp_compound_item llrp_param_HoppingEvent; +extern t_llrp_compound_item llrp_param_GPIEvent; +extern t_llrp_compound_item llrp_param_ROSpecEvent; +extern t_llrp_compound_item llrp_param_ReportBufferLevelWarningEvent; +extern t_llrp_compound_item llrp_param_ReportBufferOverflowErrorEvent; +extern t_llrp_compound_item llrp_param_ReaderExceptionEvent; +extern t_llrp_compound_item llrp_param_OpSpecID; +extern t_llrp_compound_item llrp_param_RFSurveyEvent; +extern t_llrp_compound_item llrp_param_AISpecEvent; +extern t_llrp_compound_item llrp_param_AntennaEvent; +extern t_llrp_compound_item llrp_param_ConnectionAttemptEvent; +extern t_llrp_compound_item llrp_param_ConnectionCloseEvent; +extern t_llrp_compound_item llrp_param_LLRPStatus; +extern t_llrp_compound_item llrp_param_FieldError; +extern t_llrp_compound_item llrp_param_ParameterError; +extern t_llrp_compound_item llrp_param_C1G2LLRPCapabilities; +extern t_llrp_compound_item llrp_param_C1G2UHFRFModeTable; +extern t_llrp_compound_item llrp_param_C1G2UHFRFModeTableEntry; +extern t_llrp_compound_item llrp_param_C1G2InventoryCommand; +extern t_llrp_compound_item llrp_param_C1G2Filter; +extern t_llrp_compound_item llrp_param_C1G2TagInventoryMask; +extern t_llrp_compound_item llrp_param_C1G2TagInventoryStateAwareFilterAction; +extern t_llrp_compound_item llrp_param_C1G2TagInventoryStateUnawareFilterAction; +extern t_llrp_compound_item llrp_param_C1G2RFControl; +extern t_llrp_compound_item llrp_param_C1G2SingulationControl; +extern t_llrp_compound_item llrp_param_C1G2TagInventoryStateAwareSingulationAction; +extern t_llrp_compound_item llrp_param_C1G2TagSpec; +extern t_llrp_compound_item llrp_param_C1G2TargetTag; +extern t_llrp_compound_item llrp_param_C1G2Read; +extern t_llrp_compound_item llrp_param_C1G2Write; +extern t_llrp_compound_item llrp_param_C1G2Kill; +extern t_llrp_compound_item llrp_param_C1G2Lock; +extern t_llrp_compound_item llrp_param_C1G2LockPayload; +extern t_llrp_compound_item llrp_param_C1G2BlockErase; +extern t_llrp_compound_item llrp_param_C1G2BlockWrite; +extern t_llrp_compound_item llrp_param_C1G2EPCMemorySelector; +extern t_llrp_compound_item llrp_param_C1G2_PC; +extern t_llrp_compound_item llrp_param_C1G2_CRC; +extern t_llrp_compound_item llrp_param_C1G2SingulationDetails; +extern t_llrp_compound_item llrp_param_C1G2ReadOpSpecResult; +extern t_llrp_compound_item llrp_param_C1G2WriteOpSpecResult; +extern t_llrp_compound_item llrp_param_C1G2KillOpSpecResult; +extern t_llrp_compound_item llrp_param_C1G2LockOpSpecResult; +extern t_llrp_compound_item llrp_param_C1G2BlockEraseOpSpecResult; +extern t_llrp_compound_item llrp_param_C1G2BlockWriteOpSpecResult; + +/* Enumerations */ + +#define LLRP_ENUM_v1_0_AirProtocols_Unspecified 0 +#define LLRP_ENUM_v1_0_AirProtocols_EPCGlobalClass1Gen2 1 +#define LLRP_ENUM_v1_0_GetReaderCapabilitiesRequestedData_All 0 +#define LLRP_ENUM_v1_0_GetReaderCapabilitiesRequestedData_General_Device_Capabilities 1 +#define LLRP_ENUM_v1_0_GetReaderCapabilitiesRequestedData_LLRP_Capabilities 2 +#define LLRP_ENUM_v1_0_GetReaderCapabilitiesRequestedData_Regulatory_Capabilities 3 +#define LLRP_ENUM_v1_0_GetReaderCapabilitiesRequestedData_LLRP_Air_Protocol_Capabilities 4 +#define LLRP_ENUM_v1_0_CommunicationsStandard_Unspecified 0 +#define LLRP_ENUM_v1_0_CommunicationsStandard_US_FCC_Part_15 1 +#define LLRP_ENUM_v1_0_CommunicationsStandard_ETSI_302_208 2 +#define LLRP_ENUM_v1_0_CommunicationsStandard_ETSI_300_220 3 +#define LLRP_ENUM_v1_0_CommunicationsStandard_Australia_LIPD_1W 4 +#define LLRP_ENUM_v1_0_CommunicationsStandard_Australia_LIPD_4W 5 +#define LLRP_ENUM_v1_0_CommunicationsStandard_Japan_ARIB_STD_T89 6 +#define LLRP_ENUM_v1_0_CommunicationsStandard_Hong_Kong_OFTA_1049 7 +#define LLRP_ENUM_v1_0_CommunicationsStandard_Taiwan_DGT_LP0002 8 +#define LLRP_ENUM_v1_0_CommunicationsStandard_Korea_MIC_Article_5_2 9 +#define LLRP_ENUM_v1_0_ROSpecState_Disabled 0 +#define LLRP_ENUM_v1_0_ROSpecState_Inactive 1 +#define LLRP_ENUM_v1_0_ROSpecState_Active 2 +#define LLRP_ENUM_v1_0_ROSpecStartTriggerType_Null 0 +#define LLRP_ENUM_v1_0_ROSpecStartTriggerType_Immediate 1 +#define LLRP_ENUM_v1_0_ROSpecStartTriggerType_Periodic 2 +#define LLRP_ENUM_v1_0_ROSpecStartTriggerType_GPI 3 +#define LLRP_ENUM_v1_0_ROSpecStopTriggerType_Null 0 +#define LLRP_ENUM_v1_0_ROSpecStopTriggerType_Duration 1 +#define LLRP_ENUM_v1_0_ROSpecStopTriggerType_GPI_With_Timeout 2 +#define LLRP_ENUM_v1_0_AISpecStopTriggerType_Null 0 +#define LLRP_ENUM_v1_0_AISpecStopTriggerType_Duration 1 +#define LLRP_ENUM_v1_0_AISpecStopTriggerType_GPI_With_Timeout 2 +#define LLRP_ENUM_v1_0_AISpecStopTriggerType_Tag_Observation 3 +#define LLRP_ENUM_v1_0_TagObservationTriggerType_Upon_Seeing_N_Tags_Or_Timeout 0 +#define LLRP_ENUM_v1_0_TagObservationTriggerType_Upon_Seeing_No_More_New_Tags_For_Tms_Or_Timeout 1 +#define LLRP_ENUM_v1_0_TagObservationTriggerType_N_Attempts_To_See_All_Tags_In_FOV_Or_Timeout 2 +#define LLRP_ENUM_v1_0_RFSurveySpecStopTriggerType_Null 0 +#define LLRP_ENUM_v1_0_RFSurveySpecStopTriggerType_Duration 1 +#define LLRP_ENUM_v1_0_RFSurveySpecStopTriggerType_N_Iterations_Through_Frequency_Range 2 +#define LLRP_ENUM_v1_0_AccessSpecState_Disabled 0 +#define LLRP_ENUM_v1_0_AccessSpecState_Active 1 +#define LLRP_ENUM_v1_0_AccessSpecStopTriggerType_Null 0 +#define LLRP_ENUM_v1_0_AccessSpecStopTriggerType_Operation_Count 1 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_All 0 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_Identification 1 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_AntennaProperties 2 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_AntennaConfiguration 3 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_ROReportSpec 4 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_ReaderEventNotificationSpec 5 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_AccessReportSpec 6 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_LLRPConfigurationStateValue 7 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_KeepaliveSpec 8 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_GPIPortCurrentState 9 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_GPOWriteData 10 +#define LLRP_ENUM_v1_0_GetReaderConfigRequestedData_EventsAndReports 11 +#define LLRP_ENUM_v1_0_IdentificationType_MAC_Address 0 +#define LLRP_ENUM_v1_0_IdentificationType_EPC 1 +#define LLRP_ENUM_v1_0_KeepaliveTriggerType_Null 0 +#define LLRP_ENUM_v1_0_KeepaliveTriggerType_Periodic 1 +#define LLRP_ENUM_v1_0_GPIPortState_Low 0 +#define LLRP_ENUM_v1_0_GPIPortState_High 1 +#define LLRP_ENUM_v1_0_GPIPortState_Unknown 2 +#define LLRP_ENUM_v1_0_ROReportTriggerType_None 0 +#define LLRP_ENUM_v1_0_ROReportTriggerType_Upon_N_Tags_Or_End_Of_AISpec 1 +#define LLRP_ENUM_v1_0_ROReportTriggerType_Upon_N_Tags_Or_End_Of_ROSpec 2 +#define LLRP_ENUM_v1_0_AccessReportTriggerType_Whenever_ROReport_Is_Generated 0 +#define LLRP_ENUM_v1_0_AccessReportTriggerType_End_Of_AccessSpec 1 +#define LLRP_ENUM_v1_0_NotificationEventType_Upon_Hopping_To_Next_Channel 0 +#define LLRP_ENUM_v1_0_NotificationEventType_GPI_Event 1 +#define LLRP_ENUM_v1_0_NotificationEventType_ROSpec_Event 2 +#define LLRP_ENUM_v1_0_NotificationEventType_Report_Buffer_Fill_Warning 3 +#define LLRP_ENUM_v1_0_NotificationEventType_Reader_Exception_Event 4 +#define LLRP_ENUM_v1_0_NotificationEventType_RFSurvey_Event 5 +#define LLRP_ENUM_v1_0_NotificationEventType_AISpec_Event 6 +#define LLRP_ENUM_v1_0_NotificationEventType_AISpec_Event_With_Details 7 +#define LLRP_ENUM_v1_0_NotificationEventType_Antenna_Event 8 +#define LLRP_ENUM_v1_0_ROSpecEventType_Start_Of_ROSpec 0 +#define LLRP_ENUM_v1_0_ROSpecEventType_End_Of_ROSpec 1 +#define LLRP_ENUM_v1_0_ROSpecEventType_Preemption_Of_ROSpec 2 +#define LLRP_ENUM_v1_0_RFSurveyEventType_Start_Of_RFSurvey 0 +#define LLRP_ENUM_v1_0_RFSurveyEventType_End_Of_RFSurvey 1 +#define LLRP_ENUM_v1_0_AISpecEventType_End_Of_AISpec 0 +#define LLRP_ENUM_v1_0_AntennaEventType_Antenna_Disconnected 0 +#define LLRP_ENUM_v1_0_AntennaEventType_Antenna_Connected 1 +#define LLRP_ENUM_v1_0_ConnectionAttemptStatusType_Success 0 +#define LLRP_ENUM_v1_0_ConnectionAttemptStatusType_Failed_A_Reader_Initiated_Connection_Already_Exists 1 +#define LLRP_ENUM_v1_0_ConnectionAttemptStatusType_Failed_A_Client_Initiated_Connection_Already_Exists 2 +#define LLRP_ENUM_v1_0_ConnectionAttemptStatusType_Failed_Reason_Other_Than_A_Connection_Already_Exists 3 +#define LLRP_ENUM_v1_0_ConnectionAttemptStatusType_Another_Connection_Attempted 4 +#define LLRP_ENUM_v1_0_StatusCode_M_Success 0 +#define LLRP_ENUM_v1_0_StatusCode_M_ParameterError 100 +#define LLRP_ENUM_v1_0_StatusCode_M_FieldError 101 +#define LLRP_ENUM_v1_0_StatusCode_M_UnexpectedParameter 102 +#define LLRP_ENUM_v1_0_StatusCode_M_MissingParameter 103 +#define LLRP_ENUM_v1_0_StatusCode_M_DuplicateParameter 104 +#define LLRP_ENUM_v1_0_StatusCode_M_OverflowParameter 105 +#define LLRP_ENUM_v1_0_StatusCode_M_OverflowField 106 +#define LLRP_ENUM_v1_0_StatusCode_M_UnknownParameter 107 +#define LLRP_ENUM_v1_0_StatusCode_M_UnknownField 108 +#define LLRP_ENUM_v1_0_StatusCode_M_UnsupportedMessage 109 +#define LLRP_ENUM_v1_0_StatusCode_M_UnsupportedVersion 110 +#define LLRP_ENUM_v1_0_StatusCode_M_UnsupportedParameter 111 +#define LLRP_ENUM_v1_0_StatusCode_P_ParameterError 200 +#define LLRP_ENUM_v1_0_StatusCode_P_FieldError 201 +#define LLRP_ENUM_v1_0_StatusCode_P_UnexpectedParameter 202 +#define LLRP_ENUM_v1_0_StatusCode_P_MissingParameter 203 +#define LLRP_ENUM_v1_0_StatusCode_P_DuplicateParameter 204 +#define LLRP_ENUM_v1_0_StatusCode_P_OverflowParameter 205 +#define LLRP_ENUM_v1_0_StatusCode_P_OverflowField 206 +#define LLRP_ENUM_v1_0_StatusCode_P_UnknownParameter 207 +#define LLRP_ENUM_v1_0_StatusCode_P_UnknownField 208 +#define LLRP_ENUM_v1_0_StatusCode_P_UnsupportedParameter 209 +#define LLRP_ENUM_v1_0_StatusCode_A_Invalid 300 +#define LLRP_ENUM_v1_0_StatusCode_A_OutOfRange 301 +#define LLRP_ENUM_v1_0_StatusCode_R_DeviceError 401 +#define LLRP_ENUM_v1_0_C1G2DRValue_DRV_8 0 +#define LLRP_ENUM_v1_0_C1G2DRValue_DRV_64_3 1 +#define LLRP_ENUM_v1_0_C1G2MValue_MV_FM0 0 +#define LLRP_ENUM_v1_0_C1G2MValue_MV_2 1 +#define LLRP_ENUM_v1_0_C1G2MValue_MV_4 2 +#define LLRP_ENUM_v1_0_C1G2MValue_MV_8 3 +#define LLRP_ENUM_v1_0_C1G2ForwardLinkModulation_PR_ASK 0 +#define LLRP_ENUM_v1_0_C1G2ForwardLinkModulation_SSB_ASK 1 +#define LLRP_ENUM_v1_0_C1G2ForwardLinkModulation_DSB_ASK 2 +#define LLRP_ENUM_v1_0_C1G2SpectralMaskIndicator_Unknown 0 +#define LLRP_ENUM_v1_0_C1G2SpectralMaskIndicator_SI 1 +#define LLRP_ENUM_v1_0_C1G2SpectralMaskIndicator_MI 2 +#define LLRP_ENUM_v1_0_C1G2SpectralMaskIndicator_DI 3 +#define LLRP_ENUM_v1_0_C1G2TruncateAction_Unspecified 0 +#define LLRP_ENUM_v1_0_C1G2TruncateAction_Do_Not_Truncate 1 +#define LLRP_ENUM_v1_0_C1G2TruncateAction_Truncate 2 +#define LLRP_ENUM_v1_0_C1G2StateAwareTarget_SL 0 +#define LLRP_ENUM_v1_0_C1G2StateAwareTarget_Inventoried_State_For_Session_S0 1 +#define LLRP_ENUM_v1_0_C1G2StateAwareTarget_Inventoried_State_For_Session_S1 2 +#define LLRP_ENUM_v1_0_C1G2StateAwareTarget_Inventoried_State_For_Session_S2 3 +#define LLRP_ENUM_v1_0_C1G2StateAwareTarget_Inventoried_State_For_Session_S3 4 +#define LLRP_ENUM_v1_0_C1G2StateAwareAction_AssertSLOrA_DeassertSLOrB 0 +#define LLRP_ENUM_v1_0_C1G2StateAwareAction_AssertSLOrA_Noop 1 +#define LLRP_ENUM_v1_0_C1G2StateAwareAction_Noop_DeassertSLOrB 2 +#define LLRP_ENUM_v1_0_C1G2StateAwareAction_NegateSLOrABBA_Noop 3 +#define LLRP_ENUM_v1_0_C1G2StateAwareAction_DeassertSLOrB_AssertSLOrA 4 +#define LLRP_ENUM_v1_0_C1G2StateAwareAction_DeassertSLOrB_Noop 5 +#define LLRP_ENUM_v1_0_C1G2StateAwareAction_Noop_AssertSLOrA 6 +#define LLRP_ENUM_v1_0_C1G2StateAwareAction_Noop_NegateSLOrABBA 7 +#define LLRP_ENUM_v1_0_C1G2StateUnawareAction_Select_Unselect 0 +#define LLRP_ENUM_v1_0_C1G2StateUnawareAction_Select_DoNothing 1 +#define LLRP_ENUM_v1_0_C1G2StateUnawareAction_DoNothing_Unselect 2 +#define LLRP_ENUM_v1_0_C1G2StateUnawareAction_Unselect_DoNothing 3 +#define LLRP_ENUM_v1_0_C1G2StateUnawareAction_Unselect_Select 4 +#define LLRP_ENUM_v1_0_C1G2StateUnawareAction_DoNothing_Select 5 +#define LLRP_ENUM_v1_0_C1G2TagInventoryStateAwareI_State_A 0 +#define LLRP_ENUM_v1_0_C1G2TagInventoryStateAwareI_State_B 1 +#define LLRP_ENUM_v1_0_C1G2TagInventoryStateAwareS_SL 0 +#define LLRP_ENUM_v1_0_C1G2TagInventoryStateAwareS_Not_SL 1 +#define LLRP_ENUM_v1_0_C1G2LockPrivilege_Read_Write 0 +#define LLRP_ENUM_v1_0_C1G2LockPrivilege_Perma_Lock 1 +#define LLRP_ENUM_v1_0_C1G2LockPrivilege_Perma_Unlock 2 +#define LLRP_ENUM_v1_0_C1G2LockPrivilege_Unlock 3 +#define LLRP_ENUM_v1_0_C1G2LockDataField_Kill_Password 0 +#define LLRP_ENUM_v1_0_C1G2LockDataField_Access_Password 1 +#define LLRP_ENUM_v1_0_C1G2LockDataField_EPC_Memory 2 +#define LLRP_ENUM_v1_0_C1G2LockDataField_TID_Memory 3 +#define LLRP_ENUM_v1_0_C1G2LockDataField_User_Memory 4 +#define LLRP_ENUM_v1_0_C1G2ReadResultType_Success 0 +#define LLRP_ENUM_v1_0_C1G2ReadResultType_Nonspecific_Tag_Error 1 +#define LLRP_ENUM_v1_0_C1G2ReadResultType_No_Response_From_Tag 2 +#define LLRP_ENUM_v1_0_C1G2ReadResultType_Nonspecific_Reader_Error 3 +#define LLRP_ENUM_v1_0_C1G2WriteResultType_Success 0 +#define LLRP_ENUM_v1_0_C1G2WriteResultType_Tag_Memory_Overrun_Error 1 +#define LLRP_ENUM_v1_0_C1G2WriteResultType_Tag_Memory_Locked_Error 2 +#define LLRP_ENUM_v1_0_C1G2WriteResultType_Insufficient_Power 3 +#define LLRP_ENUM_v1_0_C1G2WriteResultType_Nonspecific_Tag_Error 4 +#define LLRP_ENUM_v1_0_C1G2WriteResultType_No_Response_From_Tag 5 +#define LLRP_ENUM_v1_0_C1G2WriteResultType_Nonspecific_Reader_Error 6 +#define LLRP_ENUM_v1_0_C1G2KillResultType_Success 0 +#define LLRP_ENUM_v1_0_C1G2KillResultType_Zero_Kill_Password_Error 1 +#define LLRP_ENUM_v1_0_C1G2KillResultType_Insufficient_Power 2 +#define LLRP_ENUM_v1_0_C1G2KillResultType_Nonspecific_Tag_Error 3 +#define LLRP_ENUM_v1_0_C1G2KillResultType_No_Response_From_Tag 4 +#define LLRP_ENUM_v1_0_C1G2KillResultType_Nonspecific_Reader_Error 5 +#define LLRP_ENUM_v1_0_C1G2LockResultType_Success 0 +#define LLRP_ENUM_v1_0_C1G2LockResultType_Insufficient_Power 1 +#define LLRP_ENUM_v1_0_C1G2LockResultType_Nonspecific_Tag_Error 2 +#define LLRP_ENUM_v1_0_C1G2LockResultType_No_Response_From_Tag 3 +#define LLRP_ENUM_v1_0_C1G2LockResultType_Nonspecific_Reader_Error 4 +#define LLRP_ENUM_v1_0_C1G2BlockEraseResultType_Success 0 +#define LLRP_ENUM_v1_0_C1G2BlockEraseResultType_Tag_Memory_Overrun_Error 1 +#define LLRP_ENUM_v1_0_C1G2BlockEraseResultType_Tag_Memory_Locked_Error 2 +#define LLRP_ENUM_v1_0_C1G2BlockEraseResultType_Insufficient_Power 3 +#define LLRP_ENUM_v1_0_C1G2BlockEraseResultType_Nonspecific_Tag_Error 4 +#define LLRP_ENUM_v1_0_C1G2BlockEraseResultType_No_Response_From_Tag 5 +#define LLRP_ENUM_v1_0_C1G2BlockEraseResultType_Nonspecific_Reader_Error 6 +#define LLRP_ENUM_v1_0_C1G2BlockWriteResultType_Success 0 +#define LLRP_ENUM_v1_0_C1G2BlockWriteResultType_Tag_Memory_Overrun_Error 1 +#define LLRP_ENUM_v1_0_C1G2BlockWriteResultType_Tag_Memory_Locked_Error 2 +#define LLRP_ENUM_v1_0_C1G2BlockWriteResultType_Insufficient_Power 3 +#define LLRP_ENUM_v1_0_C1G2BlockWriteResultType_Nonspecific_Tag_Error 4 +#define LLRP_ENUM_v1_0_C1G2BlockWriteResultType_No_Response_From_Tag 5 +#define LLRP_ENUM_v1_0_C1G2BlockWriteResultType_Nonspecific_Reader_Error 6 + +/* Parameters */ + +#define LLRP_PARM_v1_0_AntennaID 1 +#define LLRP_PARM_v1_0_FirstSeenTimestampUTC 2 +#define LLRP_PARM_v1_0_FirstSeenTimestampUptime 3 +#define LLRP_PARM_v1_0_LastSeenTimestampUTC 4 +#define LLRP_PARM_v1_0_LastSeenTimestampUptime 5 +#define LLRP_PARM_v1_0_PeakRSSI 6 +#define LLRP_PARM_v1_0_ChannelIndex 7 +#define LLRP_PARM_v1_0_TagSeenCount 8 +#define LLRP_PARM_v1_0_ROSpecID 9 +#define LLRP_PARM_v1_0_InventoryParameterSpecID 10 +#define LLRP_PARM_v1_0_C1G2_CRC 11 +#define LLRP_PARM_v1_0_C1G2_PC 12 +#define LLRP_PARM_v1_0_EPC_96 13 +#define LLRP_PARM_v1_0_SpecIndex 14 +#define LLRP_PARM_v1_0_AccessSpecID 16 +#define LLRP_PARM_v1_0_OpSpecID 17 +#define LLRP_PARM_v1_0_C1G2SingulationDetails 18 +#define LLRP_PARM_v1_0_UTCTimestamp 128 +#define LLRP_PARM_v1_0_Uptime 129 +#define LLRP_PARM_v1_0_GeneralDeviceCapabilities 137 +#define LLRP_PARM_v1_0_ReceiveSensitivityTableEntry 139 +#define LLRP_PARM_v1_0_PerAntennaAirProtocol 140 +#define LLRP_PARM_v1_0_GPIOCapabilities 141 +#define LLRP_PARM_v1_0_LLRPCapabilities 142 +#define LLRP_PARM_v1_0_RegulatoryCapabilities 143 +#define LLRP_PARM_v1_0_UHFBandCapabilities 144 +#define LLRP_PARM_v1_0_TransmitPowerLevelTableEntry 145 +#define LLRP_PARM_v1_0_FrequencyInformation 146 +#define LLRP_PARM_v1_0_FrequencyHopTable 147 +#define LLRP_PARM_v1_0_FixedFrequencyTable 148 +#define LLRP_PARM_v1_0_PerAntennaReceiveSensitivityRange 149 +#define LLRP_PARM_v1_0_ROSpec 177 +#define LLRP_PARM_v1_0_ROBoundarySpec 178 +#define LLRP_PARM_v1_0_ROSpecStartTrigger 179 +#define LLRP_PARM_v1_0_PeriodicTriggerValue 180 +#define LLRP_PARM_v1_0_GPITriggerValue 181 +#define LLRP_PARM_v1_0_ROSpecStopTrigger 182 +#define LLRP_PARM_v1_0_AISpec 183 +#define LLRP_PARM_v1_0_AISpecStopTrigger 184 +#define LLRP_PARM_v1_0_TagObservationTrigger 185 +#define LLRP_PARM_v1_0_InventoryParameterSpec 186 +#define LLRP_PARM_v1_0_RFSurveySpec 187 +#define LLRP_PARM_v1_0_RFSurveySpecStopTrigger 188 +#define LLRP_PARM_v1_0_AccessSpec 207 +#define LLRP_PARM_v1_0_AccessSpecStopTrigger 208 +#define LLRP_PARM_v1_0_AccessCommand 209 +#define LLRP_PARM_v1_0_LLRPConfigurationStateValue 217 +#define LLRP_PARM_v1_0_Identification 218 +#define LLRP_PARM_v1_0_GPOWriteData 219 +#define LLRP_PARM_v1_0_KeepaliveSpec 220 +#define LLRP_PARM_v1_0_AntennaProperties 221 +#define LLRP_PARM_v1_0_AntennaConfiguration 222 +#define LLRP_PARM_v1_0_RFReceiver 223 +#define LLRP_PARM_v1_0_RFTransmitter 224 +#define LLRP_PARM_v1_0_GPIPortCurrentState 225 +#define LLRP_PARM_v1_0_EventsAndReports 226 +#define LLRP_PARM_v1_0_ROReportSpec 237 +#define LLRP_PARM_v1_0_TagReportContentSelector 238 +#define LLRP_PARM_v1_0_AccessReportSpec 239 +#define LLRP_PARM_v1_0_TagReportData 240 +#define LLRP_PARM_v1_0_EPCData 241 +#define LLRP_PARM_v1_0_RFSurveyReportData 242 +#define LLRP_PARM_v1_0_FrequencyRSSILevelEntry 243 +#define LLRP_PARM_v1_0_ReaderEventNotificationSpec 244 +#define LLRP_PARM_v1_0_EventNotificationState 245 +#define LLRP_PARM_v1_0_ReaderEventNotificationData 246 +#define LLRP_PARM_v1_0_HoppingEvent 247 +#define LLRP_PARM_v1_0_GPIEvent 248 +#define LLRP_PARM_v1_0_ROSpecEvent 249 +#define LLRP_PARM_v1_0_ReportBufferLevelWarningEvent 250 +#define LLRP_PARM_v1_0_ReportBufferOverflowErrorEvent 251 +#define LLRP_PARM_v1_0_ReaderExceptionEvent 252 +#define LLRP_PARM_v1_0_RFSurveyEvent 253 +#define LLRP_PARM_v1_0_AISpecEvent 254 +#define LLRP_PARM_v1_0_AntennaEvent 255 +#define LLRP_PARM_v1_0_ConnectionAttemptEvent 256 +#define LLRP_PARM_v1_0_ConnectionCloseEvent 257 +#define LLRP_PARM_v1_0_LLRPStatus 287 +#define LLRP_PARM_v1_0_FieldError 288 +#define LLRP_PARM_v1_0_ParameterError 289 +#define LLRP_PARM_v1_0_C1G2LLRPCapabilities 327 +#define LLRP_PARM_v1_0_C1G2UHFRFModeTable 328 +#define LLRP_PARM_v1_0_C1G2UHFRFModeTableEntry 329 +#define LLRP_PARM_v1_0_C1G2InventoryCommand 330 +#define LLRP_PARM_v1_0_C1G2Filter 331 +#define LLRP_PARM_v1_0_C1G2TagInventoryMask 332 +#define LLRP_PARM_v1_0_C1G2TagInventoryStateAwareFilterAction 333 +#define LLRP_PARM_v1_0_C1G2TagInventoryStateUnawareFilterAction 334 +#define LLRP_PARM_v1_0_C1G2RFControl 335 +#define LLRP_PARM_v1_0_C1G2SingulationControl 336 +#define LLRP_PARM_v1_0_C1G2TagInventoryStateAwareSingulationAction 337 +#define LLRP_PARM_v1_0_C1G2TagSpec 338 +#define LLRP_PARM_v1_0_C1G2TargetTag 339 +#define LLRP_PARM_v1_0_C1G2Read 341 +#define LLRP_PARM_v1_0_C1G2Write 342 +#define LLRP_PARM_v1_0_C1G2Kill 343 +#define LLRP_PARM_v1_0_C1G2Lock 344 +#define LLRP_PARM_v1_0_C1G2LockPayload 345 +#define LLRP_PARM_v1_0_C1G2BlockErase 346 +#define LLRP_PARM_v1_0_C1G2BlockWrite 347 +#define LLRP_PARM_v1_0_C1G2EPCMemorySelector 348 +#define LLRP_PARM_v1_0_C1G2ReadOpSpecResult 349 +#define LLRP_PARM_v1_0_C1G2WriteOpSpecResult 350 +#define LLRP_PARM_v1_0_C1G2KillOpSpecResult 351 +#define LLRP_PARM_v1_0_C1G2LockOpSpecResult 352 +#define LLRP_PARM_v1_0_C1G2BlockEraseOpSpecResult 353 +#define LLRP_PARM_v1_0_C1G2BlockWriteOpSpecResult 354 +#define LLRP_PARM_v1_0_Custom 1023 + +/* Custom Parameters */ + + +/* Messages */ + +#define LLRP_MSG_v1_0_GET_READER_CAPABILITIES 1 +#define LLRP_MSG_v1_0_GET_READER_CONFIG 2 +#define LLRP_MSG_v1_0_SET_READER_CONFIG 3 +#define LLRP_MSG_v1_0_CLOSE_CONNECTION_RESPONSE 4 +#define LLRP_MSG_v1_0_GET_READER_CAPABILITIES_RESPONSE 11 +#define LLRP_MSG_v1_0_GET_READER_CONFIG_RESPONSE 12 +#define LLRP_MSG_v1_0_SET_READER_CONFIG_RESPONSE 13 +#define LLRP_MSG_v1_0_CLOSE_CONNECTION 14 +#define LLRP_MSG_v1_0_ADD_ROSPEC 20 +#define LLRP_MSG_v1_0_DELETE_ROSPEC 21 +#define LLRP_MSG_v1_0_START_ROSPEC 22 +#define LLRP_MSG_v1_0_STOP_ROSPEC 23 +#define LLRP_MSG_v1_0_ENABLE_ROSPEC 24 +#define LLRP_MSG_v1_0_DISABLE_ROSPEC 25 +#define LLRP_MSG_v1_0_GET_ROSPECS 26 +#define LLRP_MSG_v1_0_ADD_ROSPEC_RESPONSE 30 +#define LLRP_MSG_v1_0_DELETE_ROSPEC_RESPONSE 31 +#define LLRP_MSG_v1_0_START_ROSPEC_RESPONSE 32 +#define LLRP_MSG_v1_0_STOP_ROSPEC_RESPONSE 33 +#define LLRP_MSG_v1_0_ENABLE_ROSPEC_RESPONSE 34 +#define LLRP_MSG_v1_0_DISABLE_ROSPEC_RESPONSE 35 +#define LLRP_MSG_v1_0_GET_ROSPECS_RESPONSE 36 +#define LLRP_MSG_v1_0_ADD_ACCESSSPEC 40 +#define LLRP_MSG_v1_0_DELETE_ACCESSSPEC 41 +#define LLRP_MSG_v1_0_ENABLE_ACCESSSPEC 42 +#define LLRP_MSG_v1_0_DISABLE_ACCESSSPEC 43 +#define LLRP_MSG_v1_0_GET_ACCESSSPECS 44 +#define LLRP_MSG_v1_0_ADD_ACCESSSPEC_RESPONSE 50 +#define LLRP_MSG_v1_0_DELETE_ACCESSSPEC_RESPONSE 51 +#define LLRP_MSG_v1_0_ENABLE_ACCESSSPEC_RESPONSE 52 +#define LLRP_MSG_v1_0_DISABLE_ACCESSSPEC_RESPONSE 53 +#define LLRP_MSG_v1_0_GET_ACCESSSPECS_RESPONSE 54 +#define LLRP_MSG_v1_0_GET_REPORT 60 +#define LLRP_MSG_v1_0_RO_ACCESS_REPORT 61 +#define LLRP_MSG_v1_0_KEEPALIVE 62 +#define LLRP_MSG_v1_0_READER_EVENT_NOTIFICATION 63 +#define LLRP_MSG_v1_0_ENABLE_EVENTS_AND_REPORTS 64 +#define LLRP_MSG_v1_0_KEEPALIVE_ACK 72 +#define LLRP_MSG_v1_0_ERROR_MESSAGE 100 +#define LLRP_MSG_v1_0_CUSTOM_MESSAGE 1023 + +/* Custom Messages */ + + +#endif /* _LLRP_GENERATED_v1_0_H */ + diff --git a/plugins/llrp/llrp-Intermec.c b/plugins/llrp/llrp-Intermec.c new file mode 100644 index 0000000000..3ea99a5c1d --- /dev/null +++ b/plugins/llrp/llrp-Intermec.c @@ -0,0 +1,866 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <stdio.h> /* for NULL */ +#include "llrpparsetypes.h" +#include "llrpparseinc.h" +/*lint -e786 -e766*/ + + +/* ----------------------------------------------------------------------------- */ +/* Enumerations (3 total) */ + +t_llrp_enumeration_item llrp_enum_list_IntermecEngineCodeEnumeration[] = { + + { "Success", 0 }, + { "Insufficient_Tag_Power", 1 }, + { "NAK", 2 }, + { "Read_Error", 3 }, + { "Write_Error", 4 }, + { "Lock_Error", 5 }, + { "Unlock_Error", 6 }, + { "Query_Lock_Error", 7 }, + { "Kill_Error", 8 }, + { "Illegal_Command", 9 }, + { "Address_Range_Check_Error", 10 }, + { "Nonspecific_Error", 11 }, + { "Privilege_Error", 12 }, + { "Memory_Lock_Error", 13 }, + { "Blocked", 14 }, + { "Duty_Cycle", 15 }, + { "No_Response", 16 }, + { "CRC_Error", 17 }, + { "Collision", 18 }, + { "Memory_Overrun_Error", 19 }, + { "Erase_Error", 20 }, + { "NXP_Alarm_Error", 21 }, +}; +t_llrp_enumeration llrp_enum_IntermecEngineCodeEnumeration = { + llrp_enum_list_IntermecEngineCodeEnumeration, 22 +}; + +t_llrp_enumeration_item llrp_enum_list_IntermecNXPReadProtectResultType[] = { + + { "Success", 0 }, + { "Tag_Memory_Locked_Error", 1 }, + { "Insufficient_Power", 2 }, + { "Nonspecific_Tag_Error", 3 }, + { "No_Response_From_Tag", 4 }, + { "Nonspecific_Reader_Error", 5 }, +}; +t_llrp_enumeration llrp_enum_IntermecNXPReadProtectResultType = { + llrp_enum_list_IntermecNXPReadProtectResultType, 6 +}; + +t_llrp_enumeration_item llrp_enum_list_IntermecNXPEASResultType[] = { + + { "Success", 0 }, + { "Tag_Memory_Locked_Error", 1 }, + { "Insufficient_Power", 2 }, + { "Nonspecific_Tag_Error", 3 }, + { "No_Response_From_Tag", 4 }, + { "Nonspecific_Reader_Error", 5 }, +}; +t_llrp_enumeration llrp_enum_IntermecNXPEASResultType = { + llrp_enum_list_IntermecNXPEASResultType, 6 +}; + +/* ----------------------------------------------------------------------------- */ +/* Parameter Definitions (36 total) */ + +/* Parameter: IntermecResetStartEvent */ + +t_llrp_compound_item llrp_custparam_Intermec_IntermecResetStartEvent = { + "IntermecResetStartEvent", LLRP_ITEM_PARAMETER, 16, 0, + NULL +}; + +/* Parameter: IntermecResetCompleteEvent */ + +t_llrp_compound_item llrp_custparam_Intermec_IntermecResetCompleteEvent = { + "IntermecResetCompleteEvent", LLRP_ITEM_PARAMETER, 19, 0, + NULL +}; + +/* Parameter: IntermecLowLevelLogEvent */ + +t_llrp_item llrp_custparam_items_IntermecLowLevelLogEvent[] = { + + { "PlatformVersion", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "SoftwareVersion", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "Region", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "BuildDate", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "BuildTime", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "BuildOwner", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "BuildBaseline", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_utf8v, + NULL }, + + { "LogData", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_bytesToEnd, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecLowLevelLogEvent = { + "IntermecLowLevelLogEvent", LLRP_ITEM_PARAMETER, 18, 8, + llrp_custparam_items_IntermecLowLevelLogEvent +}; + +/* Parameter: IntermecROSpecLoopEvent */ + +t_llrp_compound_item llrp_custparam_Intermec_IntermecROSpecLoopEvent = { + "IntermecROSpecLoopEvent", LLRP_ITEM_PARAMETER, 21, 0, + NULL +}; + +/* Parameter: IntermecNXPEASAlarmEndEvent */ + +t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEASAlarmEndEvent = { + "IntermecNXPEASAlarmEndEvent", LLRP_ITEM_PARAMETER, 29, 0, + NULL +}; + +/* Parameter: IntermecNXPEASAlarmResult */ + +t_llrp_item llrp_custparam_items_IntermecNXPEASAlarmResult[] = { + + { "AlarmSeenCount", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "FirstSeenTimestampUTC", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_FirstSeenTimestampUTC }, + + { "LastSeenTimestampUTC", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_LastSeenTimestampUTC }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEASAlarmResult = { + "IntermecNXPEASAlarmResult", LLRP_ITEM_PARAMETER, 30, 3, + llrp_custparam_items_IntermecNXPEASAlarmResult +}; + +/* Parameter: IntermecEnableROSpecLoop */ + +t_llrp_item llrp_custparam_items_IntermecEnableROSpecLoop[] = { + + { "EnableSpecLooping", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableROSpecLoop = { + "IntermecEnableROSpecLoop", LLRP_ITEM_PARAMETER, 5, 2, + llrp_custparam_items_IntermecEnableROSpecLoop +}; + +/* Parameter: IntermecEnableLowLevelLogging */ + +t_llrp_item llrp_custparam_items_IntermecEnableLowLevelLogging[] = { + + { "EnableLowLevelLogging", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableLowLevelLogging = { + "IntermecEnableLowLevelLogging", LLRP_ITEM_PARAMETER, 17, 2, + llrp_custparam_items_IntermecEnableLowLevelLogging +}; + +/* Parameter: IntermecNXPEASAlarm */ + +t_llrp_item llrp_custparam_items_IntermecNXPEASAlarm[] = { + + { "AntennaIDs", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16v, + NULL }, + + { "AntennaConfiguration", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_AntennaConfiguration }, + + { "AISpecStopTrigger", LLRP_ITEM_PARAMETER, 1, 0, LLRP_FIELDTYPE_NONE, &llrp_param_AISpecStopTrigger }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEASAlarm = { + "IntermecNXPEASAlarm", LLRP_ITEM_PARAMETER, 27, 3, + llrp_custparam_items_IntermecNXPEASAlarm +}; + +/* Parameter: IntermecAISpecStopTrigger */ + +t_llrp_item llrp_custparam_items_IntermecAISpecStopTrigger[] = { + + { "Custom", LLRP_ITEM_PARAMETER, 1, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecAISpecStopTrigger = { + "IntermecAISpecStopTrigger", LLRP_ITEM_PARAMETER, 28, 1, + llrp_custparam_items_IntermecAISpecStopTrigger +}; + +/* Parameter: IntermecAISpecStopTriggerMinimumTries */ + +t_llrp_item llrp_custparam_items_IntermecAISpecStopTriggerMinimumTries[] = { + + { "MinimumTries", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecAISpecStopTriggerMinimumTries = { + "IntermecAISpecStopTriggerMinimumTries", LLRP_ITEM_PARAMETER, 31, 2, + llrp_custparam_items_IntermecAISpecStopTriggerMinimumTries +}; + +/* Parameter: IntermecAISpecStopTriggerMinimumTimeout */ + +t_llrp_item llrp_custparam_items_IntermecAISpecStopTriggerMinimumTimeout[] = { + + { "MinimumTimeout", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecAISpecStopTriggerMinimumTimeout = { + "IntermecAISpecStopTriggerMinimumTimeout", LLRP_ITEM_PARAMETER, 32, 2, + llrp_custparam_items_IntermecAISpecStopTriggerMinimumTimeout +}; + +/* Parameter: IntermecCollectExtraTagSingulationDetails */ + +t_llrp_item llrp_custparam_items_IntermecCollectExtraTagSingulationDetails[] = { + + { "EnableRNSI", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnableHighResolutionRSSI", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "EnablePhaseAngle", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 5, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecCollectExtraTagSingulationDetails = { + "IntermecCollectExtraTagSingulationDetails", LLRP_ITEM_PARAMETER, 1, 4, + llrp_custparam_items_IntermecCollectExtraTagSingulationDetails +}; + +/* Parameter: IntermecEnableABToggle */ + +t_llrp_item llrp_custparam_items_IntermecEnableABToggle[] = { + + { "EnableABToggle", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableABToggle = { + "IntermecEnableABToggle", LLRP_ITEM_PARAMETER, 7, 2, + llrp_custparam_items_IntermecEnableABToggle +}; + +/* Parameter: IntermecNXPReadProtect */ + +t_llrp_item llrp_custparam_items_IntermecNXPReadProtect[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AccessPassword", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "EnableReadProtect", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPReadProtect = { + "IntermecNXPReadProtect", LLRP_ITEM_PARAMETER, 23, 4, + llrp_custparam_items_IntermecNXPReadProtect +}; + +/* Parameter: IntermecNXPEAS */ + +t_llrp_item llrp_custparam_items_IntermecNXPEAS[] = { + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "AccessPassword", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "EnableEAS", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEAS = { + "IntermecNXPEAS", LLRP_ITEM_PARAMETER, 24, 4, + llrp_custparam_items_IntermecNXPEAS +}; + +/* Parameter: IntermecEnableReportCoalescence */ + +t_llrp_item llrp_custparam_items_IntermecEnableReportCoalescence[] = { + + { "EnableCoalescence", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableReportCoalescence = { + "IntermecEnableReportCoalescence", LLRP_ITEM_PARAMETER, 33, 2, + llrp_custparam_items_IntermecEnableReportCoalescence +}; + +/* Parameter: IntermecNXPReadProtectOpSpecResult */ + +t_llrp_item llrp_custparam_items_IntermecNXPReadProtectOpSpecResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_IntermecNXPReadProtectResultType }, + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPReadProtectOpSpecResult = { + "IntermecNXPReadProtectOpSpecResult", LLRP_ITEM_PARAMETER, 25, 2, + llrp_custparam_items_IntermecNXPReadProtectOpSpecResult +}; + +/* Parameter: IntermecNXPEASOpSpecResult */ + +t_llrp_item llrp_custparam_items_IntermecNXPEASOpSpecResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + &llrp_enum_IntermecNXPEASResultType }, + + { "OpSpecID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEASOpSpecResult = { + "IntermecNXPEASOpSpecResult", LLRP_ITEM_PARAMETER, 26, 2, + llrp_custparam_items_IntermecNXPEASOpSpecResult +}; + +/* Parameter: IntermecEnableTagInZone */ + +t_llrp_item llrp_custparam_items_IntermecEnableTagInZone[] = { + + { "Enable", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagInZone = { + "IntermecEnableTagInZone", LLRP_ITEM_PARAMETER, 3, 2, + llrp_custparam_items_IntermecEnableTagInZone +}; + +/* Parameter: IntermecEnableTagInPortal */ + +t_llrp_item llrp_custparam_items_IntermecEnableTagInPortal[] = { + + { "Enable", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagInPortal = { + "IntermecEnableTagInPortal", LLRP_ITEM_PARAMETER, 35, 2, + llrp_custparam_items_IntermecEnableTagInPortal +}; + +/* Parameter: IntermecEnableTagMoving */ + +t_llrp_item llrp_custparam_items_IntermecEnableTagMoving[] = { + + { "Enable", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagMoving = { + "IntermecEnableTagMoving", LLRP_ITEM_PARAMETER, 10, 2, + llrp_custparam_items_IntermecEnableTagMoving +}; + +/* Parameter: IntermecEnableTagNear */ + +t_llrp_item llrp_custparam_items_IntermecEnableTagNear[] = { + + { "Enable", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagNear = { + "IntermecEnableTagNear", LLRP_ITEM_PARAMETER, 11, 2, + llrp_custparam_items_IntermecEnableTagNear +}; + +/* Parameter: IntermecEnableTagSpeed */ + +t_llrp_item llrp_custparam_items_IntermecEnableTagSpeed[] = { + + { "Enable", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagSpeed = { + "IntermecEnableTagSpeed", LLRP_ITEM_PARAMETER, 14, 2, + llrp_custparam_items_IntermecEnableTagSpeed +}; + +/* Parameter: IntermecEnableTagDistance */ + +t_llrp_item llrp_custparam_items_IntermecEnableTagDistance[] = { + + { "Enable", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1, + NULL }, + + { "", LLRP_ITEM_RESERVED, 7, 0, LLRP_FIELDTYPE_NONE, NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagDistance = { + "IntermecEnableTagDistance", LLRP_ITEM_PARAMETER, 20, 2, + llrp_custparam_items_IntermecEnableTagDistance +}; + +/* Parameter: IntermecTagReportData */ + +t_llrp_item llrp_custparam_items_IntermecTagReportData[] = { + + { "ID", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u1v, + NULL }, + + { "TagSeenCount", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + + { "UTCTimestampMicroseconds", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u64, + NULL }, + + { "Custom", LLRP_ITEM_PARAMETER, 0, LLRP_REPEAT_INDEFINITELY, LLRP_FIELDTYPE_NONE, &llrp_param_Custom }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecTagReportData = { + "IntermecTagReportData", LLRP_ITEM_PARAMETER, 2, 4, + llrp_custparam_items_IntermecTagReportData +}; + +/* Parameter: IntermecAccessResult */ + +t_llrp_item llrp_custparam_items_IntermecAccessResult[] = { + + { "Result", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + &llrp_enum_IntermecEngineCodeEnumeration }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecAccessResult = { + "IntermecAccessResult", LLRP_ITEM_PARAMETER, 0, 1, + llrp_custparam_items_IntermecAccessResult +}; + +/* Parameter: IntermecRNSI */ + +t_llrp_item llrp_custparam_items_IntermecRNSI[] = { + + { "RNSI", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "LowLevelTimestamp", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecRNSI = { + "IntermecRNSI", LLRP_ITEM_PARAMETER, 4, 2, + llrp_custparam_items_IntermecRNSI +}; + +/* Parameter: IntermecPhaseAngle */ + +t_llrp_item llrp_custparam_items_IntermecPhaseAngle[] = { + + { "PhaseAngle", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_s16, + NULL }, + + { "LowLevelTimestamp", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecPhaseAngle = { + "IntermecPhaseAngle", LLRP_ITEM_PARAMETER, 6, 2, + llrp_custparam_items_IntermecPhaseAngle +}; + +/* Parameter: IntermecHighResolutionRSSI */ + +t_llrp_item llrp_custparam_items_IntermecHighResolutionRSSI[] = { + + { "HighResolutionRSSI", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + + { "LowLevelTimestamp", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u32, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecHighResolutionRSSI = { + "IntermecHighResolutionRSSI", LLRP_ITEM_PARAMETER, 8, 2, + llrp_custparam_items_IntermecHighResolutionRSSI +}; + +/* Parameter: IntermecTagInZone */ + +t_llrp_item llrp_custparam_items_IntermecTagInZone[] = { + + { "InZoneConfidence", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecTagInZone = { + "IntermecTagInZone", LLRP_ITEM_PARAMETER, 9, 1, + llrp_custparam_items_IntermecTagInZone +}; + +/* Parameter: IntermecTagInPortal */ + +t_llrp_item llrp_custparam_items_IntermecTagInPortal[] = { + + { "InPortalConfidence", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecTagInPortal = { + "IntermecTagInPortal", LLRP_ITEM_PARAMETER, 34, 1, + llrp_custparam_items_IntermecTagInPortal +}; + +/* Parameter: IntermecTagMoving */ + +t_llrp_item llrp_custparam_items_IntermecTagMoving[] = { + + { "MovingConfidence", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecTagMoving = { + "IntermecTagMoving", LLRP_ITEM_PARAMETER, 12, 1, + llrp_custparam_items_IntermecTagMoving +}; + +/* Parameter: IntermecTagNear */ + +t_llrp_item llrp_custparam_items_IntermecTagNear[] = { + + { "NearnessFactor", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u8, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecTagNear = { + "IntermecTagNear", LLRP_ITEM_PARAMETER, 13, 1, + llrp_custparam_items_IntermecTagNear +}; + +/* Parameter: IntermecTagSpeed */ + +t_llrp_item llrp_custparam_items_IntermecTagSpeed[] = { + + { "Speed", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecTagSpeed = { + "IntermecTagSpeed", LLRP_ITEM_PARAMETER, 15, 1, + llrp_custparam_items_IntermecTagSpeed +}; + +/* Parameter: IntermecTagDistance */ + +t_llrp_item llrp_custparam_items_IntermecTagDistance[] = { + + { "Distance", LLRP_ITEM_FIELD, 0, 0, LLRP_FIELDTYPE_u16, + NULL }, + +}; + +t_llrp_compound_item llrp_custparam_Intermec_IntermecTagDistance = { + "IntermecTagDistance", LLRP_ITEM_PARAMETER, 22, 1, + llrp_custparam_items_IntermecTagDistance +}; + +/* ----------------------------------------------------------------------------- */ +/* Custom Parameter List (36 total) */ + +t_llrp_custom_map_item llrp_llrp_Intermec_custom_parameter_list[] = { + + { 1963, + 0, &llrp_custparam_Intermec_IntermecAccessResult, + + }, + + { 1963, + 1, &llrp_custparam_Intermec_IntermecCollectExtraTagSingulationDetails, + + }, + + { 1963, + 2, &llrp_custparam_Intermec_IntermecTagReportData, + + }, + + { 1963, + 3, &llrp_custparam_Intermec_IntermecEnableTagInZone, + + }, + + { 1963, + 4, &llrp_custparam_Intermec_IntermecRNSI, + + }, + + { 1963, + 5, &llrp_custparam_Intermec_IntermecEnableROSpecLoop, + + }, + + { 1963, + 6, &llrp_custparam_Intermec_IntermecPhaseAngle, + + }, + + { 1963, + 7, &llrp_custparam_Intermec_IntermecEnableABToggle, + + }, + + { 1963, + 8, &llrp_custparam_Intermec_IntermecHighResolutionRSSI, + + }, + + { 1963, + 9, &llrp_custparam_Intermec_IntermecTagInZone, + + }, + + { 1963, + 10, &llrp_custparam_Intermec_IntermecEnableTagMoving, + + }, + + { 1963, + 11, &llrp_custparam_Intermec_IntermecEnableTagNear, + + }, + + { 1963, + 12, &llrp_custparam_Intermec_IntermecTagMoving, + + }, + + { 1963, + 13, &llrp_custparam_Intermec_IntermecTagNear, + + }, + + { 1963, + 14, &llrp_custparam_Intermec_IntermecEnableTagSpeed, + + }, + + { 1963, + 15, &llrp_custparam_Intermec_IntermecTagSpeed, + + }, + + { 1963, + 16, &llrp_custparam_Intermec_IntermecResetStartEvent, + + }, + + { 1963, + 17, &llrp_custparam_Intermec_IntermecEnableLowLevelLogging, + + }, + + { 1963, + 18, &llrp_custparam_Intermec_IntermecLowLevelLogEvent, + + }, + + { 1963, + 19, &llrp_custparam_Intermec_IntermecResetCompleteEvent, + + }, + + { 1963, + 20, &llrp_custparam_Intermec_IntermecEnableTagDistance, + + }, + + { 1963, + 21, &llrp_custparam_Intermec_IntermecROSpecLoopEvent, + + }, + + { 1963, + 22, &llrp_custparam_Intermec_IntermecTagDistance, + + }, + + { 1963, + 23, &llrp_custparam_Intermec_IntermecNXPReadProtect, + + }, + + { 1963, + 24, &llrp_custparam_Intermec_IntermecNXPEAS, + + }, + + { 1963, + 25, &llrp_custparam_Intermec_IntermecNXPReadProtectOpSpecResult, + + }, + + { 1963, + 26, &llrp_custparam_Intermec_IntermecNXPEASOpSpecResult, + + }, + + { 1963, + 27, &llrp_custparam_Intermec_IntermecNXPEASAlarm, + + }, + + { 1963, + 28, &llrp_custparam_Intermec_IntermecAISpecStopTrigger, + + }, + + { 1963, + 29, &llrp_custparam_Intermec_IntermecNXPEASAlarmEndEvent, + + }, + + { 1963, + 30, &llrp_custparam_Intermec_IntermecNXPEASAlarmResult, + + }, + + { 1963, + 31, &llrp_custparam_Intermec_IntermecAISpecStopTriggerMinimumTries, + + }, + + { 1963, + 32, &llrp_custparam_Intermec_IntermecAISpecStopTriggerMinimumTimeout, + + }, + + { 1963, + 33, &llrp_custparam_Intermec_IntermecEnableReportCoalescence, + + }, + + { 1963, + 34, &llrp_custparam_Intermec_IntermecTagInPortal, + + }, + + { 1963, + 35, &llrp_custparam_Intermec_IntermecEnableTagInPortal, + + }, + +}; + +/* ----------------------------------------------------------------------------- */ +/* Validator: llrp_Intermec */ +t_llrp_parse_validator llrp_llrp_Intermec_parse_validator = { + "llrp_Intermec", + NULL, 0, + llrp_llrp_Intermec_custom_parameter_list, 36, + NULL, 0, + NULL, 0, +}; + + +/*end*/ diff --git a/plugins/llrp/llrp-Intermec.h b/plugins/llrp/llrp-Intermec.h new file mode 100644 index 0000000000..ba1466b93b --- /dev/null +++ b/plugins/llrp/llrp-Intermec.h @@ -0,0 +1,169 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _LLRP_GENERATED_llrp_Intermec_H +#define _LLRP_GENERATED_llrp_Intermec_H + +#include "llrpparsetypes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern t_llrp_parse_validator llrp_llrp_Intermec_parse_validator; + +#ifdef __cplusplus +} +#endif + + + +/* ----------------------------------------------------------------------------- */ +/* Custom Parameter Forward Declarations (36 total) */ + +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecResetStartEvent; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecResetCompleteEvent; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecLowLevelLogEvent; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecROSpecLoopEvent; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEASAlarmEndEvent; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEASAlarmResult; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableROSpecLoop; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableLowLevelLogging; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEASAlarm; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecAISpecStopTrigger; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecAISpecStopTriggerMinimumTries; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecAISpecStopTriggerMinimumTimeout; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecCollectExtraTagSingulationDetails; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableABToggle; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPReadProtect; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEAS; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableReportCoalescence; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPReadProtectOpSpecResult; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecNXPEASOpSpecResult; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagInZone; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagInPortal; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagMoving; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagNear; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagSpeed; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecEnableTagDistance; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecTagReportData; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecAccessResult; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecRNSI; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecPhaseAngle; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecHighResolutionRSSI; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecTagInZone; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecTagInPortal; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecTagMoving; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecTagNear; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecTagSpeed; +extern t_llrp_compound_item llrp_custparam_Intermec_IntermecTagDistance; + +/* Enumerations */ + +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Success 0 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Insufficient_Tag_Power 1 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_NAK 3 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Read_Error 4 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Write_Error 5 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Lock_Error 7 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Unlock_Error 9 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Query_Lock_Error 10 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Kill_Error 12 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Illegal_Command 14 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Address_Range_Check_Error 15 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Nonspecific_Error 16 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Privilege_Error 17 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Memory_Lock_Error 18 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Blocked 19 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Duty_Cycle 20 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_No_Response 22 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_CRC_Error 23 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Collision 24 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Memory_Overrun_Error 25 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_Erase_Error 26 +#define LLRP_ENUM_llrp_Intermec_IntermecEngineCodeEnumeration_NXP_Alarm_Error 27 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPReadProtectResultType_Success 0 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPReadProtectResultType_Tag_Memory_Locked_Error 1 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPReadProtectResultType_Insufficient_Power 2 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPReadProtectResultType_Nonspecific_Tag_Error 3 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPReadProtectResultType_No_Response_From_Tag 4 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPReadProtectResultType_Nonspecific_Reader_Error 5 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPEASResultType_Success 0 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPEASResultType_Tag_Memory_Locked_Error 1 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPEASResultType_Insufficient_Power 2 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPEASResultType_Nonspecific_Tag_Error 3 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPEASResultType_No_Response_From_Tag 4 +#define LLRP_ENUM_llrp_Intermec_IntermecNXPEASResultType_Nonspecific_Reader_Error 5 + +/* Parameters */ + + +/* Custom Parameters */ + +#define LLRP_PARM_llrp_Intermec_IntermecAccessResult 0 +#define LLRP_PARM_llrp_Intermec_IntermecCollectExtraTagSingulationDetails 1 +#define LLRP_PARM_llrp_Intermec_IntermecTagReportData 2 +#define LLRP_PARM_llrp_Intermec_IntermecEnableTagInZone 3 +#define LLRP_PARM_llrp_Intermec_IntermecRNSI 4 +#define LLRP_PARM_llrp_Intermec_IntermecEnableROSpecLoop 5 +#define LLRP_PARM_llrp_Intermec_IntermecPhaseAngle 6 +#define LLRP_PARM_llrp_Intermec_IntermecEnableABToggle 7 +#define LLRP_PARM_llrp_Intermec_IntermecHighResolutionRSSI 8 +#define LLRP_PARM_llrp_Intermec_IntermecTagInZone 9 +#define LLRP_PARM_llrp_Intermec_IntermecEnableTagMoving 10 +#define LLRP_PARM_llrp_Intermec_IntermecEnableTagNear 11 +#define LLRP_PARM_llrp_Intermec_IntermecTagMoving 12 +#define LLRP_PARM_llrp_Intermec_IntermecTagNear 13 +#define LLRP_PARM_llrp_Intermec_IntermecEnableTagSpeed 14 +#define LLRP_PARM_llrp_Intermec_IntermecTagSpeed 15 +#define LLRP_PARM_llrp_Intermec_IntermecResetStartEvent 16 +#define LLRP_PARM_llrp_Intermec_IntermecEnableLowLevelLogging 17 +#define LLRP_PARM_llrp_Intermec_IntermecLowLevelLogEvent 18 +#define LLRP_PARM_llrp_Intermec_IntermecResetCompleteEvent 19 +#define LLRP_PARM_llrp_Intermec_IntermecEnableTagDistance 20 +#define LLRP_PARM_llrp_Intermec_IntermecROSpecLoopEvent 21 +#define LLRP_PARM_llrp_Intermec_IntermecTagDistance 22 +#define LLRP_PARM_llrp_Intermec_IntermecNXPReadProtect 23 +#define LLRP_PARM_llrp_Intermec_IntermecNXPEAS 24 +#define LLRP_PARM_llrp_Intermec_IntermecNXPReadProtectOpSpecResult 25 +#define LLRP_PARM_llrp_Intermec_IntermecNXPEASOpSpecResult 26 +#define LLRP_PARM_llrp_Intermec_IntermecNXPEASAlarm 27 +#define LLRP_PARM_llrp_Intermec_IntermecAISpecStopTrigger 28 +#define LLRP_PARM_llrp_Intermec_IntermecNXPEASAlarmEndEvent 29 +#define LLRP_PARM_llrp_Intermec_IntermecNXPEASAlarmResult 30 +#define LLRP_PARM_llrp_Intermec_IntermecAISpecStopTriggerMinimumTries 31 +#define LLRP_PARM_llrp_Intermec_IntermecAISpecStopTriggerMinimumTimeout 32 +#define LLRP_PARM_llrp_Intermec_IntermecEnableReportCoalescence 33 +#define LLRP_PARM_llrp_Intermec_IntermecTagInPortal 34 +#define LLRP_PARM_llrp_Intermec_IntermecEnableTagInPortal 35 + +/* Messages */ + + +/* Custom Messages */ + + +#endif /* _LLRP_GENERATED_llrp_Intermec_H */ + diff --git a/plugins/llrp/llrpparse.c b/plugins/llrp/llrpparse.c new file mode 100644 index 0000000000..df9a2c7379 --- /dev/null +++ b/plugins/llrp/llrpparse.c @@ -0,0 +1,751 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <stdio.h> /* For NULL */ +#include "llrpparsetypes.h" +#include "llrpparse.h" + +/* ------------------------------------------------------------------------------- */ +/* Local Function Declarations */ + +static void llrp_ParseParameter(t_llrp_parse_context *context, unsigned short usType, + int bImpliedLength, unsigned short usLength); +static void llrp_ParseCustomParameter(t_llrp_parse_context *context, unsigned short usType, + unsigned short usLength); + +static void llrp_ParseCompoundItem(t_llrp_parse_context *context, + t_llrp_compound_item *pCompoundItem, unsigned long ulTotalLength); + +static int llrp_ParseFixedItems(t_llrp_parse_context *context, t_llrp_item *pItemList, + unsigned short usTotalItems, unsigned short *pusParsedItems, unsigned long ulTotalLength, + unsigned long *pulConsumedBytes); +static int llrp_ParseVariableItems(t_llrp_parse_context *context, t_llrp_item *pItemList, + unsigned short usTotalItems, unsigned long ulTotalLength); + +static int llrp_HandleField(t_llrp_parse_context *context, t_llrp_item *pItem, + unsigned short usFieldIndex, unsigned long ulTotalLength, unsigned char *pucBitAccumulator, + unsigned char *pucAccumulatedBits); + +static int llrp_ParseGetParameterContentLength(const t_llrp_compound_item *pItem, + unsigned short *pusLength); + +#define llrp_ReportError(pContext, parameterList) \ +{ if((pContext)->parse_error_handler != NULL) (pContext)->parse_error_handler parameterList; } + +#define llrp_ReportMessage(pContext, parameterList) \ +{ if((pContext)->debug_message_handler != NULL) (pContext)->debug_message_handler parameterList; } + +#define llrp_StreamRead(pContext, readLength, readWaitForever, pReadResult) \ + (pContext)->stream_read_handler(pContext, readLength, readWaitForever, pReadResult) + +#define llrp_StreamGetOffset(pContext) \ + (pContext)->stream_get_offset_handler(pContext) + +/* ------------------------------------------------------------------------------- */ +/* Parsing */ + +int llrp_ParseMessage(t_llrp_parse_context *context) +{ + unsigned char ucVersion; + unsigned short *pusData, usValidatorIndex, usMessageIndex, usType; + unsigned long *pulData, ulLength, ulID, ulReadBytes; + t_llrp_parse_validator *validator; + int bContinueParse; + + /* Make sure the context is valid */ + if(context->stream_read_handler == NULL || context->stream_get_offset_handler == NULL) + { + llrp_ReportError(context, (context, LLRP_CONTEXT_ERROR, 0, "llrp_ParseMessage", + "Invalid context")); + return LLRP_PARSE_RESULT_FAILURE; + } + + /* Ensure the stream starts at offset 0 */ + if(llrp_StreamGetOffset(context) != 0) + { + llrp_ReportError(context, (context, LLRP_CONTEXT_ERROR, 0, "llrp_ParseMessage", + "Stream not starting at offset zero (current offset %lu)", llrp_StreamGetOffset(context))); + return LLRP_PARSE_RESULT_FAILURE; + } + + context->depth = 0; /* Messages always begin at parse depth 0 */ + + /* Bytes 0-1: Type and version */ + pusData= (unsigned short *) llrp_StreamRead(context, 2, 1, &ulReadBytes); + if(ulReadBytes != 2) + { + /* No error here - this happens when the stream read timed out */ + return LLRP_PARSE_RESULT_NO_PARSE; + } + ucVersion = (unsigned char) (((unsigned char)((llrp_ntohs(*pusData)) >> 10)) & 0x07); + usType = (unsigned short) (llrp_ntohs(*pusData) & 0x3FF); + + /* Bytes 2-5: Message length */ + pulData = (unsigned long *) llrp_StreamRead(context, 4, 0, &ulReadBytes); + if(ulReadBytes != 4) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_MESSAGE_DATA_UNDERFLOW, 0, + "llrp_ParseMessage", "Failed to read message length bytes")); + return LLRP_PARSE_RESULT_PARSE_FAILED; + } + ulLength = llrp_ntohl(*pulData); + + /* Bytes 6-9: Message ID */ + pulData = (unsigned long *) llrp_StreamRead(context, 4, 0, &ulReadBytes); + if(ulReadBytes != 4) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_MESSAGE_DATA_UNDERFLOW, 0, + "llrp_ParseMessage", "Failed to read message ID bytes")); + return LLRP_PARSE_RESULT_PARSE_FAILED; + } + ulID = llrp_ntohl(*pulData); + + /* TODO: Use the message version to select the proper validator */ + for(usValidatorIndex = 0; usValidatorIndex < context->validator_count; usValidatorIndex++) + { + validator = context->validator_list[usValidatorIndex]; + for(usMessageIndex = 0; usMessageIndex < validator->message_count; usMessageIndex++) + { + if(validator->message_list[usMessageIndex].number == usType) + { + llrp_ReportMessage(context, (context, "llrp_ParseMessage", + "Message header parsed: version %u, type %u, length %u, ID %u", + ucVersion, usType, ulLength, ulID)); + + if(context->message_start_handler != NULL) + { + bContinueParse= context->message_start_handler(context, ucVersion, usType, + ulLength, ulID, (validator->message_list[usMessageIndex].item)->name); + } + else + bContinueParse = 1; + + if(bContinueParse) + { + llrp_ParseCompoundItem(context, validator->message_list[usMessageIndex].item, + ulLength-LLRP_HEADER_LENGTH); + } + else + { + llrp_ReportMessage(context, (context, "llrp_ParseMessage", "Skipping message parse")); + + /* Consume/discard all remaining message data */ + (void)llrp_StreamRead(context, ulLength-LLRP_HEADER_LENGTH, 0, &ulReadBytes); + } + + if(context->message_finished_handler != NULL) + { + (void)context->message_finished_handler(context, ucVersion, usType, + ulLength, ulID, (validator->message_list[usMessageIndex].item)->name); + } + + return LLRP_PARSE_RESULT_SUCCESS; + } + if(validator->message_list[usMessageIndex].number > usType) + break; + } + } + + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_MESSAGE_TYPE_UNKNOWN, usType, + "llrp_ParseMessage", "Unknown message type (%u)", usType)); + + /* Consume/discard all remaining message data */ + (void)llrp_StreamRead(context, ulLength-LLRP_HEADER_LENGTH, 0, &ulReadBytes); + + return LLRP_PARSE_RESULT_PARSE_FAILED; +} + +static void llrp_ParseParameter(t_llrp_parse_context *context, unsigned short usType, + int bImpliedLength, unsigned short usLength) +{ + unsigned short usTypeIndex, usValidatorIndex; + unsigned long ulReadBytes; + t_llrp_parse_validator *validator; + t_llrp_standard_map_item *pMapItem; + t_llrp_compound_item *pItem; + + for(usValidatorIndex = 0; usValidatorIndex < context->validator_count; usValidatorIndex++) + { + validator = context->validator_list[usValidatorIndex]; + for(usTypeIndex = 0; usTypeIndex < validator->parameter_count; usTypeIndex++) + { + if(validator->parameter_list[usTypeIndex].number == usType) + { + pMapItem = &(validator->parameter_list[usTypeIndex]); + pItem = pMapItem->item; + + if(bImpliedLength) + { + /* Calculate the length of all parameter contents. Normally this means + * the parameter is TV encoded, containing only fixed-length fields + * and no sub-parameters. */ + if(!llrp_ParseGetParameterContentLength(pItem, &usLength)) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_TV_NOT_FOUND, + usType, "llrp_ParseParameter", "Failed to determine content size of parameter '%s' (ID %u)", + pItem->name, usType)); + break; + } + } + + if(context->parameter_start_handler!= NULL) + context->parameter_start_handler(context, usType, pItem->name, usLength); + + llrp_ParseCompoundItem(context, pItem, usLength); + + if(context->parameter_finished_handler!= NULL) + context->parameter_finished_handler(context, usType, pItem->name, usLength); + return; + } + + /* Since the parameter list is ordered (ascending), break out of the loop + once we've passed the usType we're looking for. */ + if(validator->parameter_list[usTypeIndex].number > usType) + break; + } + } + + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_TYPE_UNKNOWN, usType, + "llrp_ParseParameter", "Unknown parameter type (%u)", usType)); + + /* Discard the bytes in this unknown parameter */ + (void)llrp_StreamRead(context, usLength, 0, &ulReadBytes); + if(ulReadBytes != usLength) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, usType, + "llrp_ParseParameter", "Failed to read %u discarded bytes (%u read)", + usLength, ulReadBytes)); + } +} + +static void llrp_ParseCustomParameter(t_llrp_parse_context *context, unsigned short usType, + unsigned short usLength) +{ + unsigned short usTypeIndex, usValidatorIndex; + unsigned long *pulData, ulReadBytes, ulVendorID, ulSubtype; + t_llrp_parse_validator *validator; + t_llrp_custom_map_item *pMapItem; + t_llrp_compound_item *pItem; + + if(usLength < 8) + { + llrp_ReportMessage(context, (context, "llrp_ParseCustomParameter", "Invalid content length for custom parameter")); + } + else + { + /* Actual parameter length doesn't include the vendor ID or subtype */ + usLength = usLength - 8; + + pulData = (unsigned long *)llrp_StreamRead(context, 4, 0, &ulReadBytes); + if(ulReadBytes == 4) + ulVendorID = llrp_ntohl(*pulData); + else + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, usType, + "llrp_ParseCustomParameter", "Failed to read vendor ID")); + return; + } + + pulData = (unsigned long *)llrp_StreamRead(context, 4, 0, &ulReadBytes); + if(ulReadBytes == 4) + ulSubtype = llrp_ntohl(*pulData); + else + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, usType, + "llrp_ParseCustomParameter", "Failed to read subtype")); + return; + } + + for(usValidatorIndex = 0; usValidatorIndex < context->validator_count; usValidatorIndex++) + { + validator = context->validator_list[usValidatorIndex]; + for(usTypeIndex = 0; usTypeIndex < validator->custom_parameter_count; usTypeIndex++) + { + pMapItem = &(validator->custom_parameter_list[usTypeIndex]); + if(pMapItem->vendor_id == ulVendorID && pMapItem->subtype == ulSubtype) + { + pItem = pMapItem->item; + + if(context->custom_parameter_start_handler!= NULL) + { + context->custom_parameter_start_handler(context, usType, ulVendorID, + ulSubtype, pItem->name, usLength); + } + + llrp_ParseCompoundItem(context, pItem, usLength); + + if(context->custom_parameter_finished_handler!= NULL) + { + context->custom_parameter_finished_handler(context, usType, ulVendorID, + ulSubtype, pItem->name, usLength); + } + return; + } + } + } + + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_TYPE_UNKNOWN, usType, + "llrp_ParseCustomParameter", "Unknown custom parameter (type %u, vendor %lu, subtype %lu)", + usType, ulVendorID, ulSubtype)); + } + + /* Discard the bytes in this unknown parameter */ + (void)llrp_StreamRead(context, usLength, 0, &ulReadBytes); + if(ulReadBytes != usLength) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, usType, + "llrp_ParseCustomParameter", "Failed to read %u discarded bytes (%u read)", + usLength, ulReadBytes)); + } +} + +static void llrp_ParseCompoundItem(t_llrp_parse_context *context, + t_llrp_compound_item *pCompoundItem, unsigned long ulTotalLength) +{ + unsigned short usParsedItems, usItemsRemaining; + unsigned long ulStartOffset, ulConsumedBytes, ulLengthRemaining; + + ulStartOffset = llrp_StreamGetOffset(context); + + llrp_ReportMessage(context, (context, "llrp_ParseCompoundItem", + "Beginning parse of compound item '%s', type '%s', containing %u item%s, length %u bytes, stream offset %u", + pCompoundItem->name, llrp_compound_item_name[pCompoundItem->type], pCompoundItem->item_count, + (pCompoundItem->item_count == 1) ? "" : "s", ulTotalLength, ulStartOffset)); + + /* Each time a compound item is parsed, increase the depth. */ + (context->depth)++; + + /* Parse all fixed-length items. These must occur first. */ + if(!llrp_ParseFixedItems(context, (t_llrp_item *) pCompoundItem->item_list, + pCompoundItem->item_count, &usParsedItems, ulTotalLength, &ulConsumedBytes)) + { + llrp_ReportMessage(context, (context, "llrp_ParseCompoundItem", + "Error while parsing fixed items in '%s'", pCompoundItem->name)); + } + else + { + ulLengthRemaining = (unsigned long) (ulTotalLength - ulConsumedBytes); + usItemsRemaining = (unsigned short) ((pCompoundItem->item_count) - usParsedItems); + + llrp_ReportMessage(context, (context, "llrp_ParseCompoundItem", + "Finished parsing fixed items. Length remaining %lu, items remaining %u, stream offset %u", + ulLengthRemaining, usItemsRemaining, llrp_StreamGetOffset(context))); + + /* Parse all remaining data in the message */ + if(usItemsRemaining > 0) + { + (void)llrp_ParseVariableItems(context, &((t_llrp_item *) pCompoundItem->item_list)[usParsedItems], + usItemsRemaining, ulLengthRemaining); + } + } + + ulConsumedBytes = (unsigned long) (llrp_StreamGetOffset(context) - ulStartOffset); + + llrp_ReportMessage(context, (context, "llrp_ParseCompoundItems", + "Finished parsing compound item '%s'. Buffer offset %lu, consumed bytes %lu", + pCompoundItem->name, llrp_StreamGetOffset(context), ulConsumedBytes)); + + /* Make sure we've consumed the exact number of expected bytes */ + if(ulConsumedBytes < ulTotalLength) + { + unsigned long ulReadLength; + + ulLengthRemaining = (unsigned long) (ulTotalLength - ulConsumedBytes); + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_OVERFLOW, + pCompoundItem->type, "llrp_ParseCompoundItem", "%u leftover bytes in parameter %s", + ulLengthRemaining, pCompoundItem->name)); + (void)llrp_StreamRead(context, ulLengthRemaining, 0, &ulReadLength); + if(ulReadLength != ulLengthRemaining) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, + pCompoundItem->type, "llrp_ParseCompoundItem", + "Failed to read %u leftover bytes (%u read)", ulLengthRemaining, ulReadLength)); + } + } + else if(ulConsumedBytes > ulTotalLength) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_OVERFLOW, + pCompoundItem->type, "llrp_ParseCompoundItem", + "Buffer read overflow while parsing parameter %s (total: %u, consumed %u)", + pCompoundItem->name, ulTotalLength, ulConsumedBytes)); + } + + (context->depth)--; + + llrp_ReportMessage(context, (context, "llrp_ParseCompoundItem", + "Finished parsing compound item '%s'", pCompoundItem->name)); +} + +static int llrp_ParseFixedItems(t_llrp_parse_context *context, t_llrp_item *pItemList, + unsigned short usTotalItems, unsigned short *pusParsedItems, unsigned long ulTotalLength, + unsigned long *pulConsumedBytes) +{ + t_llrp_item *pItem = pItemList; + int bDone = 0, bSuccess = 1; + unsigned short usItemIndex, usFieldIndex; + unsigned char ucAccumulatedBits, ucBitAccumulator; + unsigned long ulStartOffset, ulConsumedBytes; + + usFieldIndex = 0; + usItemIndex = 0; + ucAccumulatedBits = 0; + ulConsumedBytes = 0; + ulStartOffset = llrp_StreamGetOffset(context); + while(!bDone) + { + ulConsumedBytes = (unsigned long) (llrp_StreamGetOffset(context) - ulStartOffset); + + if(usItemIndex >= usTotalItems) + bDone = 1; + else + { + llrp_ReportMessage(context, (context, "llrp_ParseFixedItems", + "Parsing fixed item index %u of %u, type %u, consumed bytes %lu, offset %lu", + usItemIndex, usTotalItems, pItem->item_type, ulConsumedBytes, + llrp_StreamGetOffset(context))); + + switch(pItem->item_type) + { + case LLRP_ITEM_FIELD: + if(!llrp_HandleField(context, pItem, usFieldIndex, + (unsigned long) (ulTotalLength-ulConsumedBytes), &ucBitAccumulator, + &ucAccumulatedBits)) + { + bSuccess = 0; + bDone = 1; + } + usFieldIndex++; + break; + case LLRP_ITEM_RESERVED: + if((pItem->min_repeat_count)%8 > ucAccumulatedBits) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_FIELD_DATA_UNDERFLOW, + usFieldIndex, "llrp_ParseFixedItems", + "Only %u accumulated bits remaining for %u bit reserved field", + ucAccumulatedBits, pItem->min_repeat_count)); + ucAccumulatedBits = 0; /* Try to zero the accumulator, problems will likely follow */ + } + else + { + if(pItem->min_repeat_count >= 8) + { + unsigned long ulReadBytes; + + /* Discard whole bytes... */ + (void)llrp_StreamRead(context, (pItem->min_repeat_count)/8, 0, &ulReadBytes); + if(ulReadBytes != (unsigned long)((pItem->min_repeat_count)/8)) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_FIELD_DATA_UNDERFLOW, + usFieldIndex, "llrp_ParseFixedItems", + "Failed to consume %u reserved bytes from message stream for reserved field of %u bits", + (pItem->min_repeat_count)/8, pItem->min_repeat_count)); + } + } + + ucAccumulatedBits = (unsigned char) (ucAccumulatedBits-((pItem->min_repeat_count)%8)); + llrp_ReportMessage(context, (context, "llrp_ParseFixedItems", + "Consumed %u reserved bits (accumulator now %u)", pItem->min_repeat_count, + ucAccumulatedBits)); + } + break; + case LLRP_ITEM_PARAMETER: + case LLRP_ITEM_CHOICE: + /* When we encounter the first variable-length item, we're done parsing + the fixed-length items. */ + bDone = 1; + break; + default: + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_FIELD_TYPE_UNKNOWN, + usFieldIndex, "llrp_ParseFixedItems", "Unknown fixed item field type (%u)", + pItem->item_type)); + break; + } + + if(!bDone) + { + usItemIndex++; + pItem++; + } + } + } + + if(context->field_complete_handler != NULL) + context->field_complete_handler(context, usFieldIndex); + + if(pusParsedItems != NULL) + *pusParsedItems = usItemIndex; + if(pulConsumedBytes != NULL) + *pulConsumedBytes = ulConsumedBytes; + + return bSuccess; +} + +static int llrp_HandleField(t_llrp_parse_context *context, t_llrp_item *pItem, + unsigned short usFieldIndex, unsigned long ulTotalLength, + unsigned char *pucBitAccumulator, unsigned char *pucAccumulatedBits) +{ + unsigned long ulItemBits, ulItemBytes, ulLeftoverBits, ulReadBytes, ulLengthRemaining; + unsigned char *pucData, ucUsedAccumulator; + + if(LLRP_FIELDTYPE_IS_VARIABLE(pItem->field_type)) + { + unsigned short *pusData; + + if(ulTotalLength < 2) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_FIELD_DATA_UNDERFLOW, usFieldIndex, + "llrp_HandleField", "Buffer underrun while reading length of variable field '%s', index %u", + pItem->name, usFieldIndex)); + return 0; /* Failed to handle this field */ + } + + pusData = (unsigned short *) llrp_StreamRead(context, 2, 0, &ulReadBytes); + if(ulReadBytes != 2) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_FIELD_DATA_UNDERFLOW, + usFieldIndex, "llrp_HandleField", + "Failed to read the length of variable field '%s', index %u", pItem->name, usFieldIndex)); + return 0; /* Failed to handle this field */ + } + ulItemBits = (unsigned long) (llrp_ntohs(*pusData)* + llrp_variable_field_bitlength[LLRP_FIELDTYPE_INDEX_VARIABLE(pItem->field_type)]); + ulLengthRemaining = (unsigned long) (ulTotalLength-2); + } + else if(pItem->field_type == LLRP_FIELDTYPE_bytesToEnd) + { + ulLengthRemaining = ulTotalLength; /* Consume the entire remaining length */ + ulItemBits = (unsigned long) (ulLengthRemaining*8); + } + else + { + ulItemBits = llrp_fixed_field_bitlength[pItem->field_type]; + ulLengthRemaining = ulTotalLength; + } + + ulItemBytes = (unsigned long) ((ulItemBits/8) + ((ulItemBits%8) ? 1 : 0)); + ulLeftoverBits = (unsigned long) ((ulItemBytes*8) - ulItemBits); + + /* Is there enough data stored in the accumulator? */ + if(ulItemBits <= *pucAccumulatedBits) + { + /* LLRP is bitwise big-endian; extract the topmost ulItemBits bits from the accumulator */ + ucUsedAccumulator = (unsigned char) ((*pucBitAccumulator) >> ((*pucAccumulatedBits)-ulItemBits)); + ucUsedAccumulator &= ((1 << ulItemBits)-1); /* Mask off unwanted bits */ + pucData = &ucUsedAccumulator; + /* No need to clear the used bits from the accumulator. They're invalidated by + * an update to pucAccumulatedBits. */ + *pucAccumulatedBits = (unsigned char) ((*pucAccumulatedBits)-ulItemBits); + ulLeftoverBits = 0; + } + else /* No, we must get the data from the message */ + { + if(ulItemBytes > ulLengthRemaining) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_FIELD_DATA_UNDERFLOW, + usFieldIndex, "llrp_HandleField", + "Data underrun for field '%s', index %u (expected %u bytes, %u remain)", + pItem->name, usFieldIndex, ulItemBytes, ulLengthRemaining)); + return 0; /* Failed to handle this field */ + } + pucData= llrp_StreamRead(context, ulItemBytes, 0, &ulReadBytes); + if(ulReadBytes!= ulItemBytes) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_FIELD_DATA_UNDERFLOW, + usFieldIndex, "llrp_HandleField", + "Failed to read %u data bytes of field '%s', index %u (%u read)", + ulItemBytes, pItem->name, usFieldIndex, ulReadBytes)); + return 0; /* Failed to handle this field */ + } + } + + if(ulLeftoverBits > 0) + { + /* If there is any data that has been read from the message, but doesn't belong to */ + /* this field, add it to the accumulator. */ + if((ulLeftoverBits+*pucAccumulatedBits) >= 8) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_FIELD_DATA_OVERFLOW, + usFieldIndex, "llrp_HandleField", + "Leftover bit accumulator overflow (accumulator bits: %u, new leftover bits: %u)", + *pucAccumulatedBits, ulLeftoverBits)); + } + else + { + /* Bits are always added to the accumulator from the right (least significant bit) side */ + *pucBitAccumulator<<= ulLeftoverBits; + *pucBitAccumulator|= pucData[ulItemBytes-1] & ((1 << ulLeftoverBits)-1); + *pucAccumulatedBits= (unsigned char) ((*pucAccumulatedBits)+ulLeftoverBits); + } + + /* Always mask-off the bits that don't belong to this field */ + if(ulItemBits <= 8) + { + ucUsedAccumulator= (unsigned char) (((*pucData) >> (8-ulItemBits)) & ((1 << ulItemBits)-1)); + pucData= &ucUsedAccumulator; + } + } + + llrp_ReportMessage(context, (context, "llrp_HandleField", + "Field '%s' parsed: fieldtype %u, bitlength %u, accumulator %u", + pItem->name, pItem->field_type, ulItemBits, *pucAccumulatedBits)); + if(context->field_handler!= NULL) + { + context->field_handler(context, usFieldIndex, pItem->field_type, pItem->name, + ulItemBits, pucData, pItem->data); + } + + return 1; /* Successfully handled */ +} + +/* Function: llrp_ParseVariableItems */ +/* Description: Parse all remaining data in the current compound item (message or parameter). + * Parsing is completed only when all data has been exhausted from the current compound item. + * It is assumed that no fixed-length items remain in the current compound item, they have + * already been parsed. */ +/* Returns: nonzero upon successful parsing of all variable items in the compound item, + * zero upon failure. */ +#define LLRP_VARIABLE_ITEM_MIN_HEADER_LENGTH 1 /* TV parameters require only one byte */ +static int llrp_ParseVariableItems(t_llrp_parse_context *context, t_llrp_item *pItemList, + unsigned short usTotalItems, unsigned long ulTotalLength) +{ + t_llrp_item *pItem = pItemList; + int bDone = 0, bImpliedLength; + unsigned long ulReadBytes, ulConsumedLength, ulStartOffset; + unsigned char *pucReadByte, ucHeaderLength; + unsigned short *pusLength, usType, usLength; + + pItem=pItem; usTotalItems=usTotalItems; + + ulStartOffset = llrp_StreamGetOffset(context); + while(!bDone) + { + ulConsumedLength = (unsigned long) (llrp_StreamGetOffset(context) - ulStartOffset); + + /* Make sure we can at least read the minimum header length */ + if((ulConsumedLength+LLRP_VARIABLE_ITEM_MIN_HEADER_LENGTH) > ulTotalLength) + bDone = 1; + else + { + /* Determine the type and length */ + ucHeaderLength = LLRP_VARIABLE_ITEM_MIN_HEADER_LENGTH; + pucReadByte = (unsigned char *) llrp_StreamRead(context, 1, 0, &ulReadBytes); + if(ulReadBytes != 1) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, + 0, "llrp_ParseVariableItems", "Failed to read first type byte of parameter")); + return 0; /* Failed to parse */ + } + usType = *pucReadByte; + if(usType & 0x80) /* Is this a TV encoded parameter? */ + { + usType &= ~0x80; + usLength = 0; + bImpliedLength = 1; /* Length is implied - make llrp_ParseParameter() derive it */ + } + else + { + ucHeaderLength = 4; /* TLV parameter headers have 2 type bytes, 2 length bytes */ + bImpliedLength = 0; + + /* Get the second byte of the TLV parameter's type */ + pucReadByte = (unsigned char *) llrp_StreamRead(context, 1, 0, &ulReadBytes); + if(ulReadBytes != 1) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, + 0, "llrp_ParseVariableItems", "Failed to read second type byte of TLV parameter")); + return 0; /* Failed to parse the variable item */ + } + usType <<= 8; + usType = (unsigned short) (usType+(*pucReadByte)); + + /* TLV parameters have 2 bytes for the length */ + pusLength = (unsigned short *) llrp_StreamRead(context, 2, 0, &ulReadBytes); + if(ulReadBytes != 2) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, + usType, "llrp_ParseVariableItems", "Failed to read length bytes of TLV parameter")); + return 0; /* Failed to parse the variable item */ + } + usLength = llrp_ntohs(*pusLength); + + /* A rather pedantic test... */ + if(usLength < ucHeaderLength) + { + llrp_ReportError(context, (context, LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW, + usType, "llrp_ParseVariableItems", + "Length underflow for variable item type %u (requires %u bytes, %u in header)", + usType, usLength, ucHeaderLength)); + return 0; /* Failed to parse the variable item */ + } + usLength = (unsigned short) (usLength-ucHeaderLength); + } + + llrp_ReportMessage(context, (context, "llrp_ParseVariableItems", + "Parsing variable item: type %u, header length %u, data length %u", + usType, ucHeaderLength, usLength)); + + /* TODO: Validate the parameter found against pItem */ + + if(usType == 1023) /* v1.0 Custom parameter type */ + llrp_ParseCustomParameter(context, usType, usLength); + else + llrp_ParseParameter(context, usType, bImpliedLength, usLength); + } + } + + if(context->all_parameters_complete_handler!= NULL) + context->all_parameters_complete_handler(context); + + return 1; /* Variable item parsed successfully */ +} + +/* Determine the length of the contents of the specified compound item. This will only succeed + * when the compound item contains nothing more than fixed-length fields. */ +static int llrp_ParseGetParameterContentLength(const t_llrp_compound_item *pItem, + unsigned short *pusLength) +{ + unsigned short usIndex, usLength; + t_llrp_item *pField; + + usLength= 0; + for(usIndex= 0; usIndex< pItem->item_count; usIndex++) + { + pField= &((t_llrp_item *) (pItem->item_list))[usIndex]; + switch(pField->item_type) + { + case LLRP_ITEM_FIELD: + if(LLRP_FIELDTYPE_IS_VARIABLE(pField->field_type)) + return 0; /* Not a constant content length, can't calculate content length */ + usLength= (unsigned short) (usLength+((llrp_fixed_field_bitlength[pField->field_type])/8)); + break; + default: + return 0; /* Contains items that are not fields, can't calculate content length */ + } + } + + if(pusLength!= NULL) + *pusLength= usLength; + return 1; /* Length calculated successfully */ +} diff --git a/plugins/llrp/llrpparse.h b/plugins/llrp/llrpparse.h new file mode 100644 index 0000000000..4ff9522dc9 --- /dev/null +++ b/plugins/llrp/llrpparse.h @@ -0,0 +1,151 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _LLRP_PARSER_H +#define _LLRP_PARSER_H + +#include "llrpparsetypes.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* --------------------------------------------------------------------------------------- */ +/* Parse error codes, passed as a parameter in t_llrp_HandleParseError */ + +#define LLRP_CONTEXT_ERROR 0x00 + +/* Message Errors */ +#define LLRP_PARSE_ERROR_MESSAGE_DATA_UNDERFLOW 0x10 +#define LLRP_PARSE_ERROR_MESSAGE_TYPE_UNKNOWN 0x11 + +/* Parameter Errors */ +#define LLRP_PARSE_ERROR_PARAMETER_TYPE_UNKNOWN 0x50 +#define LLRP_PARSE_ERROR_PARAMETER_TV_NOT_FOUND 0x51 +#define LLRP_PARSE_ERROR_PARAMETER_DATA_UNDERFLOW 0x52 +#define LLRP_PARSE_ERROR_PARAMETER_DATA_OVERFLOW 0x53 + +/* Field Errors */ +#define LLRP_PARSE_ERROR_FIELD_TYPE_UNKNOWN 0x90 +#define LLRP_PARSE_ERROR_FIELD_DATA_UNDERFLOW 0x91 +#define LLRP_PARSE_ERROR_FIELD_DATA_OVERFLOW 0x92 + +/* --------------------------------------------------------------------------------------- */ +/* Endian swappers */ +/* For portability, these functions must be defined externally. Often, they will map */ +/* directly to ntohs(). */ + +typedef unsigned short (*t_llrp_ntohs)(unsigned short value); +typedef unsigned long (*t_llrp_ntohl)(unsigned long value); + +extern t_llrp_ntohs llrp_ntohs; +extern t_llrp_ntohl llrp_ntohl; + +/* --------------------------------------------------------------------------------------- */ +/* LLRP message parsing context */ + +/* Consume 'length' bytes from the stream, set 'consumed' to the number of bytes + successfully consumed, return a pointer to the first consumed byte. */ +typedef unsigned char *(*t_llrp_StreamRead)(void *context, const unsigned long length, + const int wait_forever, unsigned long *consumed); + +/* Return the number of bytes consumed from stream */ +typedef unsigned long (*t_llrp_StreamGetOffset)(void *context); + +/* Called upon successful parsing of an LLRP message header. If the parser should continue + * parsing this message, nonzero should be returned. If the parser should abort parsing this + * message, zero should be returned. */ +typedef int (*t_llrp_HandleMessage)(void *context, const unsigned char version, + const unsigned short type, const unsigned long length, const unsigned long id, const char *name); + +/* Called upon successful parsing of an LLRP field. Note that data is in network byte order. */ +typedef void (*t_llrp_HandleField)(void *context, const unsigned short field_index, + const unsigned char type, const char *name, const unsigned long bitlength, + const unsigned char *data, t_llrp_enumeration *enumeration); + +/* Called upon completion of parsing all fields in a parameter/message */ +typedef void (*t_llrp_HandleFieldComplete)(void *context, const unsigned short field_count); + +/* Called upon successful parsing of an LLRP parameter */ +typedef void (*t_llrp_HandleParameter)(void *context, const unsigned short type, const char *name, + const unsigned short length); + +/* Called upon successful parsing of an LLRP custom parameter */ +typedef void (*t_llrp_HandleCustomParameter)(void *context, const unsigned short type, + const unsigned long vendorID, const unsigned long subtype, const char *name, + const unsigned short length); + +/* Called upon completion of parsing all parameters */ +typedef void (*t_llrp_HandleAllParametersComplete)(void *context); + +/* Called upon detection of a parsing error */ +typedef void (*t_llrp_HandleParseError)(void *context, const unsigned char code, + const unsigned short item, const char *function_name, const char *format, ...); + +/* Called by the parser to report an informational/debug message */ +typedef void (*t_llrp_HandleDebugMessage)(void *context, const char *function_name, + const char *format, ...); + +typedef struct +{ + unsigned char depth; /* Parse tree depth (message header is always parsed at depth 0) */ + + t_llrp_parse_validator **validator_list; + unsigned char validator_count; + + /* Callback functions for stream management */ + t_llrp_StreamRead stream_read_handler; + t_llrp_StreamGetOffset stream_get_offset_handler; + + /* Callback functions for handling parsing events */ + t_llrp_HandleMessage message_start_handler; + t_llrp_HandleMessage message_finished_handler; + t_llrp_HandleField field_handler; + t_llrp_HandleFieldComplete field_complete_handler; + t_llrp_HandleParameter parameter_start_handler; + t_llrp_HandleParameter parameter_finished_handler; + t_llrp_HandleCustomParameter custom_parameter_start_handler; + t_llrp_HandleCustomParameter custom_parameter_finished_handler; + t_llrp_HandleAllParametersComplete all_parameters_complete_handler; + t_llrp_HandleParseError parse_error_handler; + t_llrp_HandleDebugMessage debug_message_handler; + + void *data; /* user-defined data */ +} t_llrp_parse_context; + +/* --------------------------------------------------------------------------------------- */ +/* Exported Functions */ + +#define LLRP_PARSE_RESULT_SUCCESS 0 /* parse successful */ +#define LLRP_PARSE_RESULT_PARSE_FAILED 1 /* received message, parse failed */ +#define LLRP_PARSE_RESULT_NO_PARSE 2 /* no message received */ +#define LLRP_PARSE_RESULT_FAILURE 3 /* unspecified failure */ +int llrp_ParseMessage(t_llrp_parse_context *context); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _LLRP_PARSER_H */ diff --git a/plugins/llrp/llrpparsehelp.c b/plugins/llrp/llrpparsehelp.c new file mode 100644 index 0000000000..c4d213ced0 --- /dev/null +++ b/plugins/llrp/llrpparsehelp.c @@ -0,0 +1,58 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <stdio.h> +#include "llrpparsetypes.h" +#include "llrpparsehelp.h" + +char *llrp_field_type_to_name(unsigned char type) +{ + if(LLRP_FIELDTYPE_IS_VARIABLE(type)) + return llrp_variable_field_name[type-LLRP_FIELDTYPE_u1v]; + else if(type == LLRP_FIELDTYPE_bytesToEnd) + return "bytesToEnd"; + else + return llrp_fixed_field_name[type]; +} + +char *llrp_enumeration_to_name(t_llrp_enumeration *enumeration, unsigned short value) +{ + unsigned short usIndex; + t_llrp_enumeration_item *item; + + for(usIndex= 0; usIndex< enumeration->count; usIndex++) + { + item= &enumeration->list[usIndex]; + if(item->value== value) + return item->name; + + /* Since the enumeration list is ordered by value (ascending), short circuit is possible */ + if(item->value> value) + return NULL; + } + + return NULL; +} + diff --git a/plugins/llrp/llrpparsehelp.h b/plugins/llrp/llrpparsehelp.h new file mode 100644 index 0000000000..9455e15e77 --- /dev/null +++ b/plugins/llrp/llrpparsehelp.h @@ -0,0 +1,41 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _LLRP_MISCELLANEOUS_H +#define _LLRP_MISCELLANEOUS_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +char *llrp_field_type_to_name(unsigned char type); +char *llrp_enumeration_to_name(t_llrp_enumeration *enumeration, unsigned short value); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _LLRP_MISCELLANEOUS_H */ + diff --git a/plugins/llrp/llrpparseinc.h b/plugins/llrp/llrpparseinc.h new file mode 100644 index 0000000000..f1b012d553 --- /dev/null +++ b/plugins/llrp/llrpparseinc.h @@ -0,0 +1,33 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _LLRP_PARSER_INCLUDES_H +#define _LLRP_PARSER_INCLUDES_H + +#include "llrp-1x0-def.h" +#include "llrp-Intermec.h" + +#endif /* _LLRP_PARSER_INCLUDES_H */ + diff --git a/plugins/llrp/llrpparsetypes.c b/plugins/llrp/llrpparsetypes.c new file mode 100644 index 0000000000..77eed188a2 --- /dev/null +++ b/plugins/llrp/llrpparsetypes.c @@ -0,0 +1,46 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "llrpparsetypes.h" + +/* Length (in bits) of fixed-length field types */ +unsigned short llrp_fixed_field_bitlength[] = + { 0, 1, 2, 8, 8, 16, 16, 32, 32, 64, 64, 96 }; + +/* Length (in bits) of each item in variable-length field types */ +unsigned short llrp_variable_field_bitlength[] = + { 1, 8, 8, 8, 16, 16, 32, 32, 64, 64 }; + +/* Descriptions for each fixed-length field type */ +char *llrp_fixed_field_name[] = + { "none", "u1", "u2", "u8", "s8", "u16", "s16", "u32", "s32", "u64", "s64", "u96" }; + +/* Descriptions for each variable-length field type */ +char *llrp_variable_field_name[] = + { "u1v", "u8v", "s8v", "utf8v", "u16v", "s16v", "u32v", "s32v", "u64v", "s64v" }; + +/* Descriptions for each compound item type, indexed by LLRP_ITEM_* values */ +char *llrp_compound_item_name[] = + { "none", "field", "reserved", "parameter", "choice", "message" }; diff --git a/plugins/llrp/llrpparsetypes.h b/plugins/llrp/llrpparsetypes.h new file mode 100644 index 0000000000..105031e127 --- /dev/null +++ b/plugins/llrp/llrpparsetypes.h @@ -0,0 +1,142 @@ +/* EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _LLRP_PARSE_TYPES_H +#define _LLRP_PARSE_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define LLRP_ITEM_NONE 0x00 +#define LLRP_ITEM_FIELD 0x01 +#define LLRP_ITEM_RESERVED 0x02 +#define LLRP_ITEM_PARAMETER 0x03 +#define LLRP_ITEM_CHOICE 0x04 +#define LLRP_ITEM_MESSAGE 0x05 + +typedef struct { + char *name; + unsigned char item_type; /* one of LLRP_ITEM_* */ + unsigned short min_repeat_count; + #define LLRP_REPEAT_INDEFINITELY 0xFFFF + unsigned short max_repeat_count; + unsigned char field_type; + #define LLRP_FIELDTYPE_NONE 0x00 + #define LLRP_FIELDTYPE_u1 0x01 + #define LLRP_FIELDTYPE_u2 0x02 + #define LLRP_FIELDTYPE_u8 0x03 + #define LLRP_FIELDTYPE_s8 0x04 + #define LLRP_FIELDTYPE_u16 0x05 + #define LLRP_FIELDTYPE_s16 0x06 + #define LLRP_FIELDTYPE_u32 0x07 + #define LLRP_FIELDTYPE_s32 0x08 + #define LLRP_FIELDTYPE_u64 0x09 + #define LLRP_FIELDTYPE_s64 0x0a + #define LLRP_FIELDTYPE_u96 0x0b + #define LLRP_FIELDTYPE_u1v 0x40 + #define LLRP_FIELDTYPE_u8v 0x41 + #define LLRP_FIELDTYPE_s8v 0x42 + #define LLRP_FIELDTYPE_utf8v 0x43 + #define LLRP_FIELDTYPE_u16v 0x44 + #define LLRP_FIELDTYPE_s16v 0x45 + #define LLRP_FIELDTYPE_u32v 0x46 + #define LLRP_FIELDTYPE_s32v 0x47 + #define LLRP_FIELDTYPE_u64v 0x48 + #define LLRP_FIELDTYPE_s64v 0x49 + #define LLRP_FIELDTYPE_bytesToEnd 0x60 + void *data; /* pointer to field_type specific data */ +} t_llrp_item; +#define LLRP_FIELDTYPE_IS_VARIABLE(ft) ((ft)>= 0x40 && (ft)< 0x60) +#define LLRP_FIELDTYPE_INDEX_VARIABLE(ft) ((ft)-0x40) + +typedef struct { + char *name; + unsigned short value; +} t_llrp_enumeration_item; + +typedef struct { + t_llrp_enumeration_item *list; + unsigned short count; +} t_llrp_enumeration; + +typedef struct { + char *name; + unsigned char type; /* one of LLRP_ITEM* */ + unsigned short number; + unsigned short item_count; + void *item_list; +} t_llrp_compound_item; + +typedef struct { + unsigned short number; + t_llrp_compound_item *item; +} t_llrp_standard_map_item; + +typedef struct { + unsigned long vendor_id; + unsigned short subtype; + t_llrp_compound_item *item; +} t_llrp_custom_map_item; + +typedef struct { + char *validator_name; + + t_llrp_standard_map_item *parameter_list; + unsigned short parameter_count; + + t_llrp_custom_map_item *custom_parameter_list; + unsigned short custom_parameter_count; + + t_llrp_standard_map_item *message_list; + unsigned short message_count; + + t_llrp_custom_map_item *custom_message_list; + unsigned short custom_message_count; +} t_llrp_parse_validator; + +/* ----------------------------------------------------------------------- */ +/* Common Constants/Declarations/Functions */ + +#define LLRP_HEADER_LENGTH 10 +#define LLRP_PARAMETER_IS_TLV(usType) ((usType) > 127) +#define LLRP_PARAMETER_IS_TV(usType) ((usType) < 128) + +extern unsigned short llrp_fixed_field_bitlength[]; +extern unsigned short llrp_variable_field_bitlength[]; +extern char *llrp_fixed_field_name[]; +extern char *llrp_variable_field_name[]; +extern char *llrp_compound_item_name[]; + +/* ----------------------------------------------------------------------- */ +/* Message Versions */ + +#define LLRP_v1_0_VERSION 1 + +#ifdef __cplusplus +} +#endif + +#endif /* _LLRP_PARSE_TYPES_H */ diff --git a/plugins/llrp/moduleinfo.h b/plugins/llrp/moduleinfo.h new file mode 100644 index 0000000000..41d398b724 --- /dev/null +++ b/plugins/llrp/moduleinfo.h @@ -0,0 +1,18 @@ +/* Included *after* config.h, in order to re-define these macros */ + +#ifdef PACKAGE +#undef PACKAGE +#endif + +/* Name of package */ +#define PACKAGE "llrp" + + +#ifdef VERSION +#undef VERSION +#endif + +/* Version number of package */ +#define VERSION "1.0.0" + + diff --git a/plugins/llrp/moduleinfo.nmake b/plugins/llrp/moduleinfo.nmake new file mode 100644 index 0000000000..9397c541b0 --- /dev/null +++ b/plugins/llrp/moduleinfo.nmake @@ -0,0 +1,28 @@ +# +# $Id$ +# + +# The name +PACKAGE=llrp + +# The version +MODULE_VERSION_MAJOR=1 +MODULE_VERSION_MINOR=0 +MODULE_VERSION_MICRO=0 +MODULE_VERSION_EXTRA=0 + +# +# The RC_VERSION should be comma-separated, not dot-separated, +# as per Graham Bloice's message in +# +# http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html +# +# "The RC_VERSION variable in config.nmake should be comma separated. +# This allows the resources to be built correctly and the version +# number to be correctly displayed in the explorer properties dialog +# for the executables, and XP's tooltip, rather than 0.0.0.0." +# + +MODULE_VERSION=$(MODULE_VERSION_MAJOR).$(MODULE_VERSION_MINOR).$(MODULE_VERSION_MICRO).$(MODULE_VERSION_EXTRA) +RC_MODULE_VERSION=$(MODULE_VERSION_MAJOR),$(MODULE_VERSION_MINOR),$(MODULE_VERSION_MICRO),$(MODULE_VERSION_EXTRA) + diff --git a/plugins/llrp/packet-llrp.c b/plugins/llrp/packet-llrp.c new file mode 100644 index 0000000000..d8a99fba79 --- /dev/null +++ b/plugins/llrp/packet-llrp.c @@ -0,0 +1,829 @@ +/* packet-llrp.c + * EPCglobal Low-Level Reader Protocol Packet Dissector + * + * Copyright 2008, Intermec Technologies Corp. <matt.poduska@intermec.com> + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* Configurable Options */ +#define LLRP_RESOLVE_VENDOR_ID +#define LLRP_DISSECTOR_DEBUG +#define LLRP_PARSER_DEBUG + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <ctype.h> +#include <time.h> +#include <glib.h> +#include <epan/pint.h> /* For pntohl */ +#include <epan/filesystem.h> +#include <epan/packet.h> +#include <epan/addr_resolv.h> +#include <epan/report_err.h> +#include <epan/prefs.h> +#include <epan/sminmpec.h> +#include <epan/emem.h> +#include <epan/expert.h> + +#ifdef LLRP_RESOLVE_VENDOR_ID +#include <epan/value_string.h> +#include <epan/sminmpec.h> +#endif /* LLRP_RESOLVE_VENDOR_ID */ + +#include <epan/dissectors/packet-tcp.h> + +#include "llrpparsetypes.h" +#include "llrpparseinc.h" +#include "llrpparsehelp.h" +#include "llrpparse.h" + +#define TCP_PORT_EPC_LLRP 5084 /* IANA assigned TCP port number */ +#define PROTO_NAME_LLRP "llrp" /* must be lowercase */ +#define PROTO_SHORT_DESCRIPTION_LLRP "LLRP" +#define PROTO_DESCRIPTION_LLRP "EPCglobal RFID Low-Level Reader Protocol" +#define LLRP_MAX_PARAMETER_DEPTH 10 + +#ifdef LLRP_RESOLVE_VENDOR_ID +static const char *llrp_ws_find_vendor_id(const unsigned long vendor_id); +#endif /* LLRP_RESOLVE_VENDOR_ID */ + +static gint gbl_llrpTcpPort = TCP_PORT_EPC_LLRP; + +typedef struct +{ + proto_tree *tree[LLRP_MAX_PARAMETER_DEPTH]; + tvbuff_t *tvb; + unsigned long tvb_offset; + packet_info *pinfo; + int quiet_parse; /* When nonzero, don't display any parse info */ +} t_llrp_parse_info; +static t_llrp_parse_info llrp_parse_info; + +/* --------------------------------------------------------------------------------------- */ +/* Dissector Display Tree Information */ + +static int proto_epc_llrp = -1; + +static gint hf_llrp_message_version = -1; +static gint hf_llrp_message_type = -1; +static gint hf_llrp_message_length = -1; +static gint hf_llrp_message_id = -1; +static gint hf_llrp_message_parm = -1; +static gint hf_llrp_message_field = -1; +static gint hf_llrp_field_type = -1; +static gint hf_llrp_field_count = -1; +static gint hf_llrp_field_bitlength = -1; +static gint hf_llrp_field_value_u1 = -1; +static gint hf_llrp_field_value_u2 = -1; +static gint hf_llrp_field_value_u8 = -1; +static gint hf_llrp_field_value_s8 = -1; +static gint hf_llrp_field_value_u16 = -1; +static gint hf_llrp_field_value_s16 = -1; +static gint hf_llrp_field_value_u32 = -1; +static gint hf_llrp_field_value_s32 = -1; +static gint hf_llrp_field_value_u64 = -1; +static gint hf_llrp_field_value_s64 = -1; +static gint hf_llrp_field_value_variable = -1; +static gint hf_llrp_field_enumeration = -1; +static gint hf_llrp_parameter_type= -1; +static gint hf_llrp_parameter_length= -1; +static gint hf_llrp_custparm_vendorid= -1; +static gint hf_llrp_custparm_subtype= -1; +static hf_register_info hf_llrp[] = +{ + /* Message/header */ + { &hf_llrp_message_version, { "Version", PROTO_NAME_LLRP ".version", FT_UINT8, + BASE_DEC, NULL, 0x00, "llrp message protocol version", HFILL }}, + { &hf_llrp_message_type, { "Message Type", PROTO_NAME_LLRP ".type", FT_UINT16, + BASE_DEC, NULL, 0x00, "llrp message type", HFILL }}, + { &hf_llrp_message_length, { "Message Length", PROTO_NAME_LLRP ".length", FT_UINT32, + BASE_DEC, NULL, 0x00, "llrp message total length", HFILL }}, + { &hf_llrp_message_id, { "Message ID", PROTO_NAME_LLRP ".id", FT_UINT32, + BASE_DEC, NULL, 0x00, "llrp message ID", HFILL }}, + { &hf_llrp_message_parm, { "Parameter", PROTO_NAME_LLRP ".parameter", FT_UINT16, BASE_DEC, + NULL, 0x00, "llrp message parameter", HFILL }}, + { &hf_llrp_message_field, { "Field", PROTO_NAME_LLRP ".field", FT_UINT16, BASE_DEC, + NULL, 0x00, "llrp message field", HFILL }}, + + /* Parameter */ + { &hf_llrp_parameter_type, { "Type", PROTO_NAME_LLRP ".parameter.type", FT_UINT16, BASE_DEC, + NULL, 0x00, "llrp parameter type", HFILL }}, + { &hf_llrp_parameter_length, { "Length (bytes)", PROTO_NAME_LLRP ".parameter.length", FT_UINT16, BASE_DEC, + NULL, 0x00, "llrp parameter length", HFILL }}, + { &hf_llrp_custparm_vendorid,{ "VendorID", PROTO_NAME_LLRP ".custparam.vendorid", FT_UINT32, BASE_HEX, + NULL, 0x00, "llrp custom parameter vendor ID", HFILL }}, + { &hf_llrp_custparm_subtype, { "Subtype", PROTO_NAME_LLRP ".custparam.subtype", FT_UINT16, BASE_DEC, + NULL, 0x00, "llrp custom parameter subtype", HFILL }}, + + /* Field */ + { &hf_llrp_field_type, { "Type", PROTO_NAME_LLRP ".field.type", FT_UINT16, BASE_DEC, NULL, + 0x00, "llrp field type", HFILL }}, + { &hf_llrp_field_count, { "Count (items)", PROTO_NAME_LLRP ".field.count", FT_UINT16, + BASE_DEC, NULL, 0x00, "llrp field count", HFILL }}, + { &hf_llrp_field_bitlength, { "Length (bits)", PROTO_NAME_LLRP ".field.length", FT_UINT16, + BASE_DEC, NULL, 0x00, "llrp field bitlength", HFILL }}, + { &hf_llrp_field_value_u1, { "Value", PROTO_NAME_LLRP ".field.value", FT_UINT8, + BASE_DEC, NULL, 0x00, "llrp field u1 value", HFILL }}, + { &hf_llrp_field_value_u2, { "Value", PROTO_NAME_LLRP ".field.value", FT_UINT8, + BASE_DEC, NULL, 0x00, "llrp field u2 value", HFILL }}, + { &hf_llrp_field_value_u8, { "Value", PROTO_NAME_LLRP ".field.value", FT_UINT8, + BASE_DEC, NULL, 0x00, "llrp field u8 value", HFILL }}, + { &hf_llrp_field_value_s8, { "Value", PROTO_NAME_LLRP ".field.value", FT_INT8, + BASE_DEC, NULL, 0x00, "llrp field s8 value", HFILL }}, + { &hf_llrp_field_value_u16, { "Value", PROTO_NAME_LLRP ".field.value", FT_UINT16, + BASE_DEC, NULL, 0x00, "llrp field u16 value", HFILL }}, + { &hf_llrp_field_value_s16, { "Value", PROTO_NAME_LLRP ".field.value", FT_INT16, + BASE_DEC, NULL, 0x00, "llrp field s16 value", HFILL }}, + { &hf_llrp_field_value_u32, { "Value", PROTO_NAME_LLRP ".field.value", FT_UINT32, + BASE_DEC, NULL, 0x00, "llrp field u32 value", HFILL }}, + { &hf_llrp_field_value_s32, { "Value", PROTO_NAME_LLRP ".field.value", FT_INT32, + BASE_DEC, NULL, 0x00, "llrp field s32 value", HFILL }}, + { &hf_llrp_field_value_u64, { "Value", PROTO_NAME_LLRP ".field.value", FT_UINT64, + BASE_DEC, NULL, 0x00, "llrp field u64 value", HFILL }}, + { &hf_llrp_field_value_s64, { "Value", PROTO_NAME_LLRP ".field.value", FT_INT64, + BASE_DEC, NULL, 0x00, "llrp field s64 value", HFILL }}, + { &hf_llrp_field_value_variable, { "Value", PROTO_NAME_LLRP ".field.variable", FT_STRING, + BASE_NONE, NULL, 0x00, "llrp field variable-length value", HFILL }}, + { &hf_llrp_field_enumeration, { "Enumeration", PROTO_NAME_LLRP ".field.enumeration", FT_STRING, + BASE_NONE, NULL, 0x00, "llrp field enumeration", HFILL }}, +}; + +/* All LLRP dissection display subtrees */ +static gint ett_llrp_message = -1; +static gint ett_llrp_field = -1; +static gint ett_llrp_parameter = -1; +static gint *ett_llrp[]= +{ + &ett_llrp_message, + &ett_llrp_field, + &ett_llrp_parameter +}; + + +unsigned long llrp_ws_ntohl(unsigned long source) +{ + return pntohl(&source); +} +t_llrp_ntohl llrp_ntohl = llrp_ws_ntohl; + +unsigned short llrp_ws_ntohs(unsigned short source) +{ + return pntohs(&source); +} +t_llrp_ntohs llrp_ntohs = llrp_ws_ntohs; + +/* --------------------------------------------------------------------------------------- */ +/* WireShark-Specific Parser Callbacks */ + +static void llrp_ws_DescendParseTree(t_llrp_parse_context *context, t_llrp_parse_info *info, + proto_tree *tree) +{ + if(context->depth>= LLRP_MAX_PARAMETER_DEPTH) + { + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("Maximum parse depth exceeded (%u)", context->depth); + #endif /* LLRP_DISSECTOR_DEBUG */ + info->quiet_parse= 1; + return; + } + + info->quiet_parse= 0; + info->tree[context->depth]= tree; +} + +static void llrp_ws_AscendParseTree(t_llrp_parse_context *context, t_llrp_parse_info *info) +{ + if(context->depth< LLRP_MAX_PARAMETER_DEPTH) + info->quiet_parse= 0; +} + +unsigned char *llrp_ws_StreamRead(void *context, const unsigned long length, + const int wait_forever, unsigned long *consumed) +{ + t_llrp_parse_context *ctxt = (t_llrp_parse_context *) context; + t_llrp_parse_info *info = (t_llrp_parse_info *) ctxt->data; + unsigned char *buffer; + + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("llrp_ws_StreamRead (offset %u, length %u)", info->tvb_offset, length); + #endif /* LLRP_DISSECTOR_DEBUG */ + + buffer = (unsigned char *) tvb_get_ptr(info->tvb, info->tvb_offset, length); + if(buffer != NULL) + { + info->tvb_offset += length; + *consumed = length; + } + + return buffer; +} + +unsigned long llrp_ws_StreamGetOffset(void *context) +{ + t_llrp_parse_context *ctxt = (t_llrp_parse_context *) context; + t_llrp_parse_info *info = (t_llrp_parse_info *) ctxt->data; + + g_warning("llrp_ws_StreamGetOffset (offset %u)", info->tvb_offset); + return info->tvb_offset; +} + +int llrp_ws_HandleMessageStart(void *context, const unsigned char version, + const unsigned short type, const unsigned long length, const unsigned long id, const char *name) +{ + proto_item *item; + proto_tree *tree; + t_llrp_parse_context *ctxt = (t_llrp_parse_context *) context; + t_llrp_parse_info *info = (t_llrp_parse_info *) ctxt->data; + + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("llrp_ws_HandleMessageStart (type %d)", type); + #endif /* LLRP_DISSECTOR_DEBUG */ + + if(ctxt->depth != 0) + { + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("Invalid parse depth (%d)", ctxt->depth); + #endif /* LLRP_DISSECTOR_DEBUG */ + return 0; /* abort parsing */ + } + + if(info->tree[0] == NULL) + { + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("llrp_ws_HandleMessageStart: no display tree!", type); + #endif /* LLRP_DISSECTOR_DEBUG */ + tree = NULL; + info->quiet_parse = 1; + } + else + { + info->quiet_parse = 0; + if(check_col(info->pinfo->cinfo, COL_INFO)) + col_add_fstr(info->pinfo->cinfo, COL_INFO, "%s (type %u, ID %u)", name, type, id); + + /* Show a dissection tree node for the standard LLRP header information */ + item = proto_tree_add_item(proto_tree_get_root(info->tree[0]), proto_epc_llrp, info->tvb, 0, -1, FALSE); + proto_item_append_text(item, ": %s (ID %u)", name, id); + tree = proto_item_add_subtree(item, ett_llrp_message); + + /* Display the standard header data */ + proto_tree_add_uint(tree, hf_llrp_message_version, info->tvb, 0, 1, version); + proto_tree_add_uint(tree, hf_llrp_message_type, info->tvb, 0, 2, type); + proto_tree_add_uint(tree, hf_llrp_message_length, info->tvb, 2, 4, length); + proto_tree_add_uint(tree, hf_llrp_message_id, info->tvb, 6, 4, id); + } + + llrp_ws_DescendParseTree(ctxt, info, tree); + return 1; /* continue parsing */ +} + +void llrp_ws_HandleField(void *context, const unsigned short field_index, const unsigned char type, + const char *name, const unsigned long bitlength, const unsigned char *data, + t_llrp_enumeration *enumeration) +{ + proto_tree *tree= NULL; + const char *enumeration_name; + unsigned short enumeration_value; + t_llrp_parse_context *ctxt= (t_llrp_parse_context *) context; + t_llrp_parse_info *info= (t_llrp_parse_info *) ctxt->data; + unsigned long bytelength= (bitlength/8)+((bitlength%8) ? 1 : 0); + unsigned long total_length= bytelength+(LLRP_FIELDTYPE_IS_VARIABLE(type) ? 2 : 0); + unsigned long count= 0; + gint tvb_offset = info->tvb_offset; + + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("llrp_ws_HandleField (type %d)", type); + #endif /* LLRP_DISSECTOR_DEBUG */ + + if(ctxt->depth> 0 && !info->quiet_parse) + { + proto_item *item; + proto_tree *parent_tree= info->tree[(ctxt->depth)-1]; + + if(parent_tree!= NULL) + { + item= proto_tree_add_uint_format_value(parent_tree, hf_llrp_message_field, info->tvb, + tvb_offset-total_length, total_length, type, "%s (%s)", name, + llrp_field_type_to_name(type)); + tree= proto_item_add_subtree(item, ett_llrp_field); + proto_tree_add_uint_format_value(tree, hf_llrp_field_type, info->tvb, + tvb_offset-total_length, total_length, type, "%s (%u)", + llrp_field_type_to_name(type), type); + if(LLRP_FIELDTYPE_IS_VARIABLE(type)) + { + count= bitlength/llrp_variable_field_bitlength[LLRP_FIELDTYPE_INDEX_VARIABLE(type)]; + proto_tree_add_uint(tree, hf_llrp_field_count, info->tvb, + tvb_offset-total_length, 2, count); + } + proto_tree_add_uint(tree, hf_llrp_field_bitlength, info->tvb, + tvb_offset-total_length, total_length, bitlength); + switch(type) + { + case LLRP_FIELDTYPE_u1: + proto_tree_add_uint_format_value(tree, hf_llrp_field_value_u1, info->tvb, + tvb_offset-bytelength, bytelength, *data, "%d (%s)", *data, + (*data) ? "True" : "False"); + enumeration_value= *data; + break; + case LLRP_FIELDTYPE_u2: + proto_tree_add_uint(tree, hf_llrp_field_value_u2, info->tvb, + tvb_offset-bytelength, bytelength, *data); + enumeration_value= *data; + break; + case LLRP_FIELDTYPE_u8: + proto_tree_add_uint_format_value(tree, hf_llrp_field_value_u8, info->tvb, + tvb_offset-bytelength, bytelength, *data, "0x%02x (%u)", *data, *data); + enumeration_value= *data; + break; + case LLRP_FIELDTYPE_s8: + proto_tree_add_int_format_value(tree, hf_llrp_field_value_s8, info->tvb, + tvb_offset-bytelength, bytelength, *data, "0x%02x (%d)", *data, *data); + enumeration_value= *data; + break; + case LLRP_FIELDTYPE_u16: + { + unsigned short value= pntohs(((unsigned short*)data)); + proto_tree_add_uint_format_value(tree, hf_llrp_field_value_u16, info->tvb, + tvb_offset-bytelength, bytelength, value, "0x%04x (%u)", value, value); + enumeration_value= value; + break; + } + case LLRP_FIELDTYPE_s16: + { + unsigned short value= pntohs(((unsigned short*)data)); + proto_tree_add_int_format_value(tree, hf_llrp_field_value_s16, info->tvb, + tvb_offset-bytelength, bytelength, value, "0x%04x (%d)", value, value); + enumeration_value= value; + break; + } + case LLRP_FIELDTYPE_u32: + { + unsigned long value= pntohl(((unsigned long*)data)); + + #ifdef LLRP_RESOLVE_VENDOR_ID + /* Note: this is a little hackish - anyone could name a field + * "VendorIdentifier" in their vendor extension and potentially + * get bogus extra information... */ + if(strcmp(name, "VendorIdentifier") == 0) + { + proto_tree_add_uint_format_value(tree, hf_llrp_field_value_u32, info->tvb, + tvb_offset-bytelength, bytelength, value, "%s (0x%08x, %u)", + llrp_ws_find_vendor_id(value), value, value); + } + else + #endif /* LLRP_RESOLVE_VENDOR_ID */ + { + proto_tree_add_uint_format_value(tree, hf_llrp_field_value_u32, info->tvb, + tvb_offset-bytelength, bytelength, value, "0x%08x (%u)", value, value); + } + break; + } + case LLRP_FIELDTYPE_s32: + { + unsigned long value= pntohl(((unsigned long*)data)); + proto_tree_add_int_format_value(tree, hf_llrp_field_value_s32, info->tvb, + tvb_offset-bytelength, bytelength, value, "0x%08x (%d)", value, value); + break; + } + case LLRP_FIELDTYPE_u64: + { + guint64 value= pntoh64((guint64*)data); + proto_tree_add_uint64_format_value(tree, hf_llrp_field_value_u64, info->tvb, + tvb_offset-bytelength, bytelength, value, + "0x%0" G_GINT64_MODIFIER "x (%" G_GINT64_MODIFIER "u)", value, value); + break; + } + case LLRP_FIELDTYPE_s64: + { + guint64 value= pntoh64((guint64*)data); + proto_tree_add_int64_format_value(tree, hf_llrp_field_value_s64, info->tvb, + tvb_offset-bytelength, bytelength, value, + "0x%0" G_GINT64_MODIFIER "x (%" G_GINT64_MODIFIER "d)", value, value); + break; + } + case LLRP_FIELDTYPE_utf8v: + { + char *string; + string= (char *) malloc(bytelength+3); + if(string!= NULL) + { + memcpy(string+1, data, bytelength); + string[0]= '"'; + string[bytelength+1]= '"'; + string[bytelength+2]= '\0'; + proto_tree_add_string(tree, hf_llrp_field_value_variable, info->tvb, + tvb_offset-bytelength, bytelength, string); + free(string); + } + break; + } + case LLRP_FIELDTYPE_u8v: + case LLRP_FIELDTYPE_s8v: + { + char *string; + string= (char *) malloc(6*count); + if(string!= NULL) + { + unsigned short idx; + string[0]= '\0'; + for(idx= 0; idx< count; idx++) + { + sprintf(string+strlen(string), "%s%d", + (idx>0) ? ", " : "", data[idx]); + } + proto_tree_add_string(tree, hf_llrp_field_value_variable, info->tvb, + tvb_offset-bytelength, bytelength, string); + free(string); + } + break; + } + case LLRP_FIELDTYPE_u16v: + case LLRP_FIELDTYPE_s16v: + { + char *string; + string= (char *) malloc(8*count); + if(string!= NULL) + { + unsigned short idx; + string[0]= '\0'; + for(idx= 0; idx< count; idx++) + { + sprintf(string+strlen(string), "%s%d", + (idx>0) ? ", " : "", pntohs(&data[idx*2])); + } + proto_tree_add_string(tree, hf_llrp_field_value_variable, info->tvb, + tvb_offset-bytelength, bytelength, string); + free(string); + } + break; + } + case LLRP_FIELDTYPE_u32v: + case LLRP_FIELDTYPE_s32v: + { + char *string; + string= (char *) malloc(13*count); + if(string!= NULL) + { + unsigned short idx; + string[0]= '\0'; + for(idx= 0; idx< count; idx++) + { + sprintf(string+strlen(string), "%s%d", + (idx>0) ? ", " : "", pntohl(&data[idx*4])); + } + proto_tree_add_string(tree, hf_llrp_field_value_variable, info->tvb, + tvb_offset-bytelength, bytelength, string); + free(string); + } + break; + } + case LLRP_FIELDTYPE_u64v: + case LLRP_FIELDTYPE_s64v: + { + char *string; + string= (char *) malloc(23*count); + if(string!= NULL) + { + unsigned short idx; + string[0]= '\0'; + for(idx= 0; idx< count; idx++) + { + sprintf(string+strlen(string), "%s%d", + (idx>0) ? ", " : "", pntoh64(&data[idx*8])); + } + proto_tree_add_string(tree, hf_llrp_field_value_variable, info->tvb, + tvb_offset-bytelength, bytelength, string); + free(string); + } + break; + } + default: + break; + } + + if(enumeration!= NULL) + { + enumeration_name= llrp_enumeration_to_name(enumeration, enumeration_value); + if(enumeration_name!= NULL) + { + proto_tree_add_string(tree, hf_llrp_field_enumeration, info->tvb, + tvb_offset-bytelength, bytelength, enumeration_name); + } + } + } + } +} + +void llrp_ws_HandleParameterStart(void *context, const unsigned short type, const char *name, + const unsigned short length) +{ + proto_tree *tree = NULL; + t_llrp_parse_context *ctxt = (t_llrp_parse_context *) context; + t_llrp_parse_info *info = (t_llrp_parse_info *) ctxt->data; + gint tvb_offset, tvb_length, type_length; + + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("llrp_ws_HandleParameterStart (type %d)", type); + #endif /* LLRP_DISSECTOR_DEBUG */ + + if(ctxt->depth> 0 && !info->quiet_parse) + { + proto_item *item; + proto_tree *parent_tree = info->tree[(ctxt->depth)-1]; + + if(parent_tree!= NULL) + { + if(LLRP_PARAMETER_IS_TV(type)) + { + tvb_offset = info->tvb_offset - 1; + tvb_length = length + 1; + type_length = 1; + } + else + { + tvb_offset = info->tvb_offset - 4; + tvb_length = length + 4; + type_length = 2; + } + + item = proto_tree_add_uint_format_value(parent_tree, hf_llrp_message_parm, info->tvb, + tvb_offset, tvb_length, type, "%s (type %u)", name, type); + tree = proto_item_add_subtree(item, ett_llrp_parameter); + proto_tree_add_uint_format_value(tree, hf_llrp_parameter_type, info->tvb, + tvb_offset, type_length, type, + (LLRP_PARAMETER_IS_TV(type)) ? "%u (TV-encoded)" : "%u (TLV-encoded)", type); + if(LLRP_PARAMETER_IS_TLV(type)) + proto_tree_add_uint(tree, hf_llrp_parameter_length, info->tvb, tvb_offset+2, 2, length); + } + } + + llrp_ws_DescendParseTree(ctxt, info, tree); +} + +void llrp_ws_HandleCustomParameterStart(void *context, const unsigned short type, + const unsigned long vendorID, const unsigned long subtype, const char *name, + const unsigned short length) +{ + proto_tree *tree = NULL; + t_llrp_parse_context *ctxt = (t_llrp_parse_context *) context; + t_llrp_parse_info *info = (t_llrp_parse_info *) ctxt->data; + gint tvb_offset, tvb_length, type_length; + + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("llrp_ws_HandleCustomParameterStart (type %u, vendorID %u, subtype %u)", type, vendorID, subtype); + #endif /* LLRP_DISSECTOR_DEBUG */ + + if(ctxt->depth> 0 && !info->quiet_parse) + { + proto_item *item; + proto_tree *parent_tree = info->tree[(ctxt->depth)-1]; + + if(parent_tree!= NULL) + { + /* All custom parameters are TLV */ + tvb_offset = info->tvb_offset - 4; + tvb_length = length + 4; + type_length = 2; + + #ifdef LLRP_RESOLVE_VENDOR_ID + item = proto_tree_add_uint_format_value(parent_tree, hf_llrp_message_parm, info->tvb, + tvb_offset, tvb_length, type, "%s (%s (%u), subtype %u)", name, + llrp_ws_find_vendor_id(vendorID), vendorID, subtype); + #else + item = proto_tree_add_uint_format_value(parent_tree, hf_llrp_message_parm, info->tvb, + tvb_offset, tvb_length, type, "%s (%u, subtype %u)", name, vendorID, subtype); + #endif + tree = proto_item_add_subtree(item, ett_llrp_parameter); + + #ifdef LLRP_RESOLVE_VENDOR_ID + proto_tree_add_uint_format_value(tree, hf_llrp_custparm_vendorid, info->tvb, + tvb_offset, type_length, vendorID, "%u (%s)", vendorID, llrp_ws_find_vendor_id(vendorID)); + #else + proto_tree_add_uint_format_value(tree, hf_llrp_custparm_vendorid, info->tvb, + tvb_offset, type_length, vendorID, "%u", vendorID); + #endif /* LLRP_RESOLVE_VENDOR_ID */ + proto_tree_add_uint_format_value(tree, hf_llrp_custparm_subtype, info->tvb, + tvb_offset, type_length, subtype, "%u", subtype); + proto_tree_add_uint(tree, hf_llrp_parameter_length, info->tvb, tvb_offset+2, 2, length); + } + } + + llrp_ws_DescendParseTree(ctxt, info, tree); +} + +void llrp_ws_HandleParameterFinished(void *context, const unsigned short type, const char *name, + const unsigned short length) +{ + t_llrp_parse_context *ctxt= (t_llrp_parse_context *) context; + t_llrp_parse_info *info= (t_llrp_parse_info *) ctxt->data; + + llrp_ws_AscendParseTree(ctxt, info); +} + +void llrp_ws_HandleCustomParameterFinished(void *context, const unsigned short type, + const unsigned long vendorID, const unsigned long subtype, const char *name, + const unsigned short length) +{ + t_llrp_parse_context *ctxt= (t_llrp_parse_context *) context; + t_llrp_parse_info *info= (t_llrp_parse_info *) ctxt->data; + + llrp_ws_AscendParseTree(ctxt, info); +} + +#define LLRP_DEBUG_MAX_STRING_LENGTH 160 /* characters */ +void llrp_ws_HandleParseError(void *context, const unsigned char code, const unsigned short item, + const char *function_name, const char *format, ...) +{ + t_llrp_parse_context *ctxt= (t_llrp_parse_context *) context; + t_llrp_parse_info *info= (t_llrp_parse_info *) ctxt->data; + va_list argList; + char message[LLRP_DEBUG_MAX_STRING_LENGTH+1]; + + if(ctxt->depth> 0 && !info->quiet_parse) + { + proto_tree *parent_tree= info->tree[(ctxt->depth)-1]; + if(parent_tree!= NULL) + { + va_start(argList, format); + g_vsnprintf(message, LLRP_DEBUG_MAX_STRING_LENGTH, format, argList); + message[LLRP_DEBUG_MAX_STRING_LENGTH] = '\0'; + proto_tree_add_text(parent_tree, info->tvb, 0, 0, message); + va_end(argList); + } + } +} + +void llrp_ws_HandleDebugMessage(void *context, const char *function_name, const char *format, ...) +{ + #ifdef LLRP_PARSER_DEBUG + va_list argList; + char message[LLRP_DEBUG_MAX_STRING_LENGTH+1]; + + va_start(argList, format); + g_vsnprintf(message, LLRP_DEBUG_MAX_STRING_LENGTH, format, argList); + message[LLRP_DEBUG_MAX_STRING_LENGTH]= '\0'; + g_warning(message); + va_end(argList); + #endif /* LLRP_PARSER_DEBUG */ +} + +/* --------------------------------------------------------------------------------------- */ +/* Dissector */ + +static t_llrp_parse_validator *llrp_parse_validator_list[]= +{ + &llrp_v1_0_parse_validator, + &llrp_llrp_Intermec_parse_validator +}; + +static t_llrp_parse_context parse_context = { + 0 /*depth*/, llrp_parse_validator_list, + sizeof(llrp_parse_validator_list)/sizeof(llrp_parse_validator_list[0]), + llrp_ws_StreamRead, llrp_ws_StreamGetOffset, llrp_ws_HandleMessageStart, + NULL /*message finished*/, llrp_ws_HandleField, NULL /*field complete*/, + llrp_ws_HandleParameterStart, llrp_ws_HandleParameterFinished, + llrp_ws_HandleCustomParameterStart, llrp_ws_HandleCustomParameterFinished, + NULL /*all parameters complete*/, llrp_ws_HandleParseError, llrp_ws_HandleDebugMessage, + (void *) &llrp_parse_info +}; + +static guint get_epc_llrp_message_len(packet_info *pinfo, tvbuff_t *tvb, int offset) +{ + guint length; + /* Peek into the header to determine the total message length */ + length = (guint) tvb_get_ntohl(tvb, offset+2); + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("get_epc_llrp_message_len: offset=%d, length=%u", offset, length); + #endif /* LLRP_DISSECTOR_DEBUG */ + return length; +} + +static int dissect_epc_llrp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("dissect_epc_llrp_message start"); + #endif /* LLRP_DISSECTOR_DEBUG */ + + /* Make the protocol column in the packet list display the protocol name */ + if(check_col(pinfo->cinfo, COL_PROTOCOL)) + col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_DESCRIPTION_LLRP); + + /* Start with a clean info column */ + if(check_col(pinfo->cinfo, COL_INFO)) + col_clear(pinfo->cinfo, COL_INFO); + + if(tree) + { + memset(&llrp_parse_info, 0, sizeof(llrp_parse_info)); + + /* Dissect the contents of the message */ + llrp_parse_info.tree[0] = tree; + llrp_parse_info.tvb = tvb; + llrp_parse_info.pinfo = pinfo; + llrp_ParseMessage(&parse_context); + } + + #ifdef LLRP_DISSECTOR_DEBUG + g_warning("dissect_epc_llrp_message finished"); + #endif /* LLRP_DISSECTOR_DEBUG */ + + return 0; +} + +static int dissect_epc_llrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + /* Allow the TCP stream to be automatically reassembled. The message dissector should + * not be called until an entire message is available. */ + tcp_dissect_pdus(tvb, pinfo, tree, TRUE, LLRP_HEADER_LENGTH, get_epc_llrp_message_len, + dissect_epc_llrp_message); + return 0; +} + +void proto_reg_handoff_epc_llrp(void) +{ + static int llrp_prefs_initialized = FALSE; + static dissector_handle_t epc_llrp_handle; + + if(!llrp_prefs_initialized) + { + epc_llrp_handle = create_dissector_handle(dissect_epc_llrp, proto_epc_llrp); + llrp_prefs_initialized = TRUE; + } + else + { + dissector_delete("tcp.port", gbl_llrpTcpPort, epc_llrp_handle); + } + + /* The only binding for LLRP is TCP */ + dissector_add("tcp.port", gbl_llrpTcpPort, epc_llrp_handle); +} + +static void prefs_register_epc_llrp() +{ + module_t *llrp_module; + + /* Register a configuration option for port */ + llrp_module = prefs_register_protocol(proto_epc_llrp, proto_reg_handoff_epc_llrp); + + /* Allow specification of an alternate TCP port number */ + prefs_register_uint_preference(llrp_module, "tcp.port", "LLRP TCP Port", + "Set the TCP port for LLRP messages", 10, &gbl_llrpTcpPort); +} /* prefs_register_epc_llrp */ + +/* Filtering engine registration */ +void proto_register_epc_llrp(void) +{ + /* Register the LLRP protocol */ + if(proto_epc_llrp == -1) + { + proto_epc_llrp = proto_register_protocol(PROTO_DESCRIPTION_LLRP, + PROTO_SHORT_DESCRIPTION_LLRP, PROTO_NAME_LLRP); + } + + proto_register_field_array(proto_epc_llrp, hf_llrp, array_length(hf_llrp)); + proto_register_subtree_array(ett_llrp, array_length(ett_llrp)); + + /* Allow dissector to find be found by name. */ + new_register_dissector(PROTO_NAME_LLRP, dissect_epc_llrp, proto_epc_llrp); + + /* Register a list of settable preferences for the LLRP dissector */ + prefs_register_epc_llrp(); +} + +/* --------------------------------------------------------------------------------------- */ +/* Private Helper Functions */ + +#ifdef LLRP_RESOLVE_VENDOR_ID +static const char llrp_ws_unknown_vendor_id[] = "Unknown Vendor ID"; + +static const char *llrp_ws_find_vendor_id(const unsigned long vendor_id) +{ + return val_to_str((guint32) vendor_id, sminmpec_values, llrp_ws_unknown_vendor_id); +} +#endif /* LLRP_RESOLVE_VENDOR_ID */ + diff --git a/plugins/llrp/plugin.rc.in b/plugins/llrp/plugin.rc.in new file mode 100644 index 0000000000..bb6159ca0a --- /dev/null +++ b/plugins/llrp/plugin.rc.in @@ -0,0 +1,33 @@ +#include "winver.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @RC_MODULE_VERSION@ + PRODUCTVERSION @RC_VERSION@ + FILEFLAGSMASK 0x0L +#ifdef _DEBUG + FILEFLAGS VS_FF_PRERELEASE+VS_FF_SPECIALBUILD+VS_FF_DEBUG +#else + FILEFLAGS VS_FF_PRERELEASE+VS_FF_SPECIALBUILD +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "The Wireshark developer community, http://www.wireshark.org/\0" + VALUE "FileDescription", "@PACKAGE@ dissector\0" + VALUE "FileVersion", "@MODULE_VERSION@\0" + VALUE "InternalName", "@PACKAGE@ @MODULE_VERSION@\0" + VALUE "LegalCopyright", "Copyright © 2008 Intermec Corp. <matt.poduska@intermec.com>\0" + VALUE "OriginalFilename", "@PLUGIN_NAME@.dll\0" + VALUE "ProductName", "Wireshark\0" + VALUE "ProductVersion", "@VERSION@\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END |