/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\

File: octvc1_common.c

Copyright (c) 2014 Octasic Inc. All rights reserved.

Description: Contain the wireshark module dissector related functions

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation; either version 3 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 Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Release: Octasic Application Development Framework OCTADF-01.00.01-B497 (2014/01/09)

$Octasic_Revision: $

\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

/*****************************  INCLUDE FILES  *******************************/

#include <config.h>
#include <epan/packet.h>
#include "../../../include/oct_ws_macro.h"
#include "../include/module.h"
#include "../include/octvc1_common.h"


#include <octvc1_cursor.h>

/****************************************************************************
	MODULE API ENUMERATION STRING VALUES
 ****************************************************************************/

const value_string  vals_tOCTVC1_OBJECT_CURSOR_ENUM[] = 
 {
	{ cOCTVC1_OBJECT_CURSOR_ENUM_DONE, "cOCTVC1_OBJECT_CURSOR_ENUM_DONE" },
	{ cOCTVC1_OBJECT_CURSOR_ENUM_SPECIFIC, "cOCTVC1_OBJECT_CURSOR_ENUM_SPECIFIC" },
	{ cOCTVC1_OBJECT_CURSOR_ENUM_FIRST, "cOCTVC1_OBJECT_CURSOR_ENUM_FIRST" },
	{ cOCTVC1_OBJECT_CURSOR_ENUM_NEXT, "cOCTVC1_OBJECT_CURSOR_ENUM_NEXT" },
	{ cOCTVC1_OBJECT_CURSOR_ENUM_SUB_OBJECT_FIRST, "cOCTVC1_OBJECT_CURSOR_ENUM_SUB_OBJECT_FIRST" },
	{ cOCTVC1_OBJECT_CURSOR_ENUM_SUB_OBJECT_NEXT, "cOCTVC1_OBJECT_CURSOR_ENUM_SUB_OBJECT_NEXT" },
	{ 0,		NULL }
 };

/****************************************************************************
	COMMON Registered 
 ****************************************************************************/

int ahf_tOCTVC1_CURSOR_HANDLE_GET[2];
tWS_ENTITY_HANDLE ws_htOCTVC1_CURSOR_HANDLE_GET;

void  register_tOCTVC1_CURSOR_HANDLE_GET(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET[0],
			{ "hObject", "octvc1.cursor.handle_get.hobject",
			FT_NONE, BASE_NONE, NULL, 0x0,
			"hObject",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET[1],
			{ "ulGetMode", "octvc1.cursor.handle_get.ulgetmode",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_OBJECT_CURSOR_ENUM), 0x0,
			"ulGetMode",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_CURSOR_HANDLE_GET.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_CURSOR_HANDLE_GET_HANDLE;

void  register_tOCTVC1_CURSOR_HANDLE_GET_HANDLE(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE[0],
			{ "hObject", "octvc1.cursor.handle_get_handle.hobject",
			FT_NONE, BASE_NONE, NULL, 0x0,
			"hObject",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE[1],
			{ "ulGetMode", "octvc1.cursor.handle_get_handle.ulgetmode",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_OBJECT_CURSOR_ENUM), 0x0,
			"ulGetMode",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE[2],
			{ "hSubObject", "octvc1.cursor.handle_get_handle.hsubobject",
			FT_NONE, BASE_NONE, NULL, 0x0,
			"hSubObject",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_CURSOR_HANDLE_GET_HANDLE.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT;

void  register_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT[0],
			{ "hObject", "octvc1.cursor.handle_get_handle_object.hobject",
			FT_NONE, BASE_NONE, NULL, 0x0,
			"hObject",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT[1],
			{ "ulGetMode", "octvc1.cursor.handle_get_handle_object.ulgetmode",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_OBJECT_CURSOR_ENUM), 0x0,
			"ulGetMode",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT[2],
			{ "hHandleObject", "octvc1.cursor.handle_get_handle_object.hhandleobject",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"hHandleObject",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID;

void  register_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID[0],
			{ "hObject", "octvc1.cursor.handle_get_sub_object_id.hobject",
			FT_NONE, BASE_NONE, NULL, 0x0,
			"hObject",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID[1],
			{ "ulGetMode", "octvc1.cursor.handle_get_sub_object_id.ulgetmode",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_OBJECT_CURSOR_ENUM), 0x0,
			"ulGetMode",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID[2],
			{ "ulSubObjectId", "octvc1.cursor.handle_get_sub_object_id.ulsubobjectid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulSubObjectId",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET[2];
tWS_ENTITY_HANDLE ws_htOCTVC1_CURSOR_HANDLE_OBJECT_GET;

void  register_tOCTVC1_CURSOR_HANDLE_OBJECT_GET(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET[0],
			{ "hObject", "octvc1.cursor.handle_object_get.hobject",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"hObject",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET[1],
			{ "ulGetMode", "octvc1.cursor.handle_object_get.ulgetmode",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_OBJECT_CURSOR_ENUM), 0x0,
			"ulGetMode",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_CURSOR_HANDLE_OBJECT_GET.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT;

void  register_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[0],
			{ "hObject", "octvc1.cursor.handle_object_get_handle_object.hobject",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"hObject",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[1],
			{ "ulGetMode", "octvc1.cursor.handle_object_get_handle_object.ulgetmode",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_OBJECT_CURSOR_ENUM), 0x0,
			"ulGetMode",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[2],
			{ "hHandleObjectGet", "octvc1.cursor.handle_object_get_handle_object.hhandleobjectget",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"hHandleObjectGet",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID;

void  register_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[0],
			{ "hObject", "octvc1.cursor.handle_object_get_sub_object_id.hobject",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"hObject",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[1],
			{ "ulGetMode", "octvc1.cursor.handle_object_get_sub_object_id.ulgetmode",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_OBJECT_CURSOR_ENUM), 0x0,
			"ulGetMode",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[2],
			{ "ulSubObjectId", "octvc1.cursor.handle_object_get_sub_object_id.ulsubobjectid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulSubObjectId",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_CURSOR_INDEX_GET[2];
tWS_ENTITY_HANDLE ws_htOCTVC1_CURSOR_INDEX_GET;

void  register_tOCTVC1_CURSOR_INDEX_GET(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_CURSOR_INDEX_GET[0],
			{ "ulIndex", "octvc1.cursor.index_get.ulindex",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulIndex",HFILL }

		},
		{
			&ahf_tOCTVC1_CURSOR_INDEX_GET[1],
			{ "ulGetMode", "octvc1.cursor.index_get.ulgetmode",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_OBJECT_CURSOR_ENUM), 0x0,
			"ulGetMode",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_CURSOR_INDEX_GET.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

/****************************************************************************
	COMMON dissectors 
 ****************************************************************************/


unsigned int  dissect_tOCTVC1_CURSOR_HANDLE_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_CURSOR_HANDLE_GET)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_CURSOR_HANDLE_GET (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_CURSOR_HANDLE_GET));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_CURSOR_HANDLE_GET);
		ti = proto_tree_add_text(field_tree, tvb, offset, 
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET, hObject), "hObject:tOCTVC1_HANDLE");
		{
			proto_tree*	sub_tree2;
			sub_tree2 = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			offset = dissect_tOCTVC1_HANDLE( tvb, pinfo, sub_tree2, offset, pExtValue );
		}
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET, ulGetMode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET, ulGetMode);

	}


	return offset;

};


unsigned int  dissect_tOCTVC1_CURSOR_HANDLE_GET_HANDLE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_CURSOR_HANDLE_GET_HANDLE)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_CURSOR_HANDLE_GET_HANDLE (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_CURSOR_HANDLE_GET_HANDLE));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_CURSOR_HANDLE_GET_HANDLE);
		ti = proto_tree_add_text(field_tree, tvb, offset, 
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE, hObject), "hObject:tOCTVC1_HANDLE");
		{
			proto_tree*	sub_tree2;
			sub_tree2 = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			offset = dissect_tOCTVC1_HANDLE( tvb, pinfo, sub_tree2, offset, pExtValue );
		}
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE, ulGetMode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE, ulGetMode);

		ti = proto_tree_add_text(field_tree, tvb, offset, 
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE, hSubObject), "hSubObject:tOCTVC1_HANDLE");
		{
			proto_tree*	sub_tree2;
			sub_tree2 = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			offset = dissect_tOCTVC1_HANDLE( tvb, pinfo, sub_tree2, offset, pExtValue );
		}
	}


	return offset;

};


unsigned int  dissect_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT);
		ti = proto_tree_add_text(field_tree, tvb, offset, 
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT, hObject), "hObject:tOCTVC1_HANDLE");
		{
			proto_tree*	sub_tree2;
			sub_tree2 = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			offset = dissect_tOCTVC1_HANDLE( tvb, pinfo, sub_tree2, offset, pExtValue );
		}
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT, ulGetMode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT, ulGetMode);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT, hHandleObject), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT, hHandleObject);

	}


	return offset;

};


unsigned int  dissect_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID);
		ti = proto_tree_add_text(field_tree, tvb, offset, 
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID, hObject), "hObject:tOCTVC1_HANDLE");
		{
			proto_tree*	sub_tree2;
			sub_tree2 = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			offset = dissect_tOCTVC1_HANDLE( tvb, pinfo, sub_tree2, offset, pExtValue );
		}
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID, ulGetMode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID, ulGetMode);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID, ulSubObjectId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID, ulSubObjectId);

	}


	return offset;

};


unsigned int  dissect_tOCTVC1_CURSOR_HANDLE_OBJECT_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_CURSOR_HANDLE_OBJECT_GET (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET, hObject), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET, hObject);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET, ulGetMode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET, ulGetMode);

	}


	return offset;

};


unsigned int  dissect_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT, hObject), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT, hObject);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT, ulGetMode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT, ulGetMode);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT, hHandleObjectGet), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT, hHandleObjectGet);

	}


	return offset;

};


unsigned int  dissect_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID, hObject), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID, hObject);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID, ulGetMode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID, ulGetMode);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID, ulSubObjectId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID, ulSubObjectId);

	}


	return offset;

};


unsigned int  dissect_tOCTVC1_CURSOR_INDEX_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_CURSOR_INDEX_GET)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_CURSOR_INDEX_GET (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_CURSOR_INDEX_GET));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_CURSOR_INDEX_GET);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_INDEX_GET[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_INDEX_GET, ulIndex), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_INDEX_GET[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_INDEX_GET, ulIndex);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_CURSOR_INDEX_GET[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_CURSOR_INDEX_GET, ulGetMode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_CURSOR_INDEX_GET[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_CURSOR_INDEX_GET, ulGetMode);

	}


	return offset;

};

#include <octvc1_buffer.h>

/****************************************************************************
	MODULE API ENUMERATION STRING VALUES
 ****************************************************************************/

const value_string  vals_tOCTVC1_BUFFER_FORMAT_ENUM[] = 
 {
	{ cOCTVC1_BUFFER_FORMAT_ENUM_UNKNOWN, "cOCTVC1_BUFFER_FORMAT_ENUM_UNKNOWN" },
	{ cOCTVC1_BUFFER_FORMAT_MAIN_ENUM_PCAP_TRACE, "cOCTVC1_BUFFER_FORMAT_MAIN_ENUM_PCAP_TRACE" },
	{ cOCTVC1_BUFFER_FORMAT_MAIN_ENUM_FILE_SYS, "cOCTVC1_BUFFER_FORMAT_MAIN_ENUM_FILE_SYS" },
	{ 0,		NULL }
 };

#include <octvc1_eth.h>

/****************************************************************************
	MODULE API ENUMERATION STRING VALUES
 ****************************************************************************/

const value_string  vals_tOCTVC1_ETH_PORT_ID_ENUM[] = 
 {
	{ cOCTVC1_ETH_PORT_ID_ENUM_0, "cOCTVC1_ETH_PORT_ID_ENUM_0" },
	{ cOCTVC1_ETH_PORT_ID_ENUM_1, "cOCTVC1_ETH_PORT_ID_ENUM_1" },
	{ cOCTVC1_ETH_PORT_ID_ENUM_2, "cOCTVC1_ETH_PORT_ID_ENUM_2" },
	{ cOCTVC1_ETH_PORT_ID_ENUM_3, "cOCTVC1_ETH_PORT_ID_ENUM_3" },
	{ cOCTVC1_ETH_PORT_ID_ENUM_INVALID, "cOCTVC1_ETH_PORT_ID_ENUM_INVALID" },
	{ 0,		NULL }
 };

#include <octvc1_ip.h>

/****************************************************************************
	MODULE API ENUMERATION STRING VALUES
 ****************************************************************************/

const value_string  vals_tOCTVC1_IP_VERSION_ENUM[] = 
 {
	{ cOCTVC1_IP_VERSION_ENUM_4, "cOCTVC1_IP_VERSION_ENUM_4" },
	{ cOCTVC1_IP_VERSION_ENUM_6, "cOCTVC1_IP_VERSION_ENUM_6" },
	{ cOCTVC1_IP_VERSION_ENUM_INVALID, "cOCTVC1_IP_VERSION_ENUM_INVALID" },
	{ 0,		NULL }
 };

#include <octvc1_udp.h>

#include <octvc1_vlan.h>

/****************************************************************************
	MODULE API ENUMERATION STRING VALUES
 ****************************************************************************/

const value_string  vals_tOCTVC1_VLAN_PROTOCOL_ID_ENUM[] = 
 {
	{ cOCTVC1_VLAN_PROTOCOL_ID_ENUM_8100, "cOCTVC1_VLAN_PROTOCOL_ID_ENUM_8100" },
	{ cOCTVC1_VLAN_PROTOCOL_ID_ENUM_88A8, "cOCTVC1_VLAN_PROTOCOL_ID_ENUM_88A8" },
	{ cOCTVC1_VLAN_PROTOCOL_ID_ENUM_9100, "cOCTVC1_VLAN_PROTOCOL_ID_ENUM_9100" },
	{ cOCTVC1_VLAN_PROTOCOL_ID_ENUM_9200, "cOCTVC1_VLAN_PROTOCOL_ID_ENUM_9200" },
	{ 0,		NULL }
 };

/****************************************************************************
	COMMON Registered 
 ****************************************************************************/

int ahf_tOCTVC1_VLAN_TAG[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_VLAN_TAG;

void  register_tOCTVC1_VLAN_TAG(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_VLAN_TAG[0],
			{ "ulPriority", "octvc1.vlan.tag.ulpriority",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulPriority",HFILL }

		},
		{
			&ahf_tOCTVC1_VLAN_TAG[1],
			{ "ulVlanId", "octvc1.vlan.tag.ulvlanid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulVlanId",HFILL }

		},
		{
			&ahf_tOCTVC1_VLAN_TAG[2],
			{ "ulProtocolId", "octvc1.vlan.tag.ulprotocolid",
			FT_UINT32,BASE_HEX, VALS(vals_tOCTVC1_VLAN_PROTOCOL_ID_ENUM), 0x0,
			"ulProtocolId",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_VLAN_TAG.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_VLAN_HEADER_INFO[2];
tWS_ENTITY_HANDLE ws_htOCTVC1_VLAN_HEADER_INFO;

void  register_tOCTVC1_VLAN_HEADER_INFO(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_VLAN_HEADER_INFO[0],
			{ "ulNumVlanTag", "octvc1.vlan.header_info.ulnumvlantag",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulNumVlanTag",HFILL }

		},
		{
			&ahf_tOCTVC1_VLAN_HEADER_INFO[1],
			{ "aVlanTag", "octvc1.vlan.header_info.avlantag",
			FT_NONE, BASE_NONE, NULL, 0x0,
			"aVlanTag",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_VLAN_HEADER_INFO.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

/****************************************************************************
	COMMON dissectors 
 ****************************************************************************/


unsigned int  dissect_tOCTVC1_VLAN_TAG(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_VLAN_TAG)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_VLAN_TAG (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_VLAN_TAG));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_VLAN_TAG);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_VLAN_TAG[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_VLAN_TAG, ulPriority), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_VLAN_TAG[0], tvb, offset,
			4, temp_data);
		if( ( (unsigned int)temp_data < 0) || ( (unsigned int)temp_data > 7 ) )
		{
			proto_item_set_expert_flags(ti, PI_MALFORMED, PI_ERROR);
			proto_item_append_text(ti," [Out of range - (0..7)]" );
		}
		}
		offset += mWS_FIELDSIZE(tOCTVC1_VLAN_TAG, ulPriority);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_VLAN_TAG[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_VLAN_TAG, ulVlanId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_VLAN_TAG[1], tvb, offset,
			4, temp_data);
		if( ( (unsigned int)temp_data < 0) || ( (unsigned int)temp_data > 4095 ) )
		{
			proto_item_set_expert_flags(ti, PI_MALFORMED, PI_ERROR);
			proto_item_append_text(ti," [Out of range - (0..4095)]" );
		}
		}
		offset += mWS_FIELDSIZE(tOCTVC1_VLAN_TAG, ulVlanId);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_VLAN_TAG[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_VLAN_TAG, ulProtocolId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_VLAN_TAG[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_VLAN_TAG, ulProtocolId);

	}


	return offset;

};


unsigned int  dissect_tOCTVC1_VLAN_HEADER_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_VLAN_HEADER_INFO)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_VLAN_HEADER_INFO (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_VLAN_HEADER_INFO));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_VLAN_HEADER_INFO);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_VLAN_HEADER_INFO[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_VLAN_HEADER_INFO, ulNumVlanTag), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_VLAN_HEADER_INFO[0], tvb, offset,
			4, temp_data);
		if( ( (unsigned int)temp_data < 0) || ( (unsigned int)temp_data > cOCTVC1_VLAN_MAX_TAG ) )
		{
			proto_item_set_expert_flags(ti, PI_MALFORMED, PI_ERROR);
			proto_item_append_text(ti," [Out of range - (0..cOCTVC1_VLAN_MAX_TAG)]" );
		}
		}
		offset += mWS_FIELDSIZE(tOCTVC1_VLAN_HEADER_INFO, ulNumVlanTag);

		ti = proto_tree_add_text(field_tree, tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_VLAN_HEADER_INFO, aVlanTag), "aVlanTag:tOCTVC1_VLAN_TAG");
		{
			int i, ofs=offset;
			proto_tree*	sub_tree = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			for( i=0; i<4; i++ )
			{
		{
			proto_tree*	sub_tree2;
			ti = proto_tree_add_text(sub_tree, tvb, offset,
				sizeof(tOCTVC1_VLAN_TAG), "[%d]:", i);
			sub_tree2 = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			offset = dissect_tOCTVC1_VLAN_TAG( tvb, pinfo, sub_tree2, offset, pExtValue );
		}
			}
		}
	}


	return offset;

};

#include <octvc1_mac.h>

#include <octvc1_list.h>

/****************************************************************************
	COMMON Registered 
 ****************************************************************************/

int ahf_tOCTVC1_LIST_HANDLE_GET[2];
tWS_ENTITY_HANDLE ws_htOCTVC1_LIST_HANDLE_GET;

void  register_tOCTVC1_LIST_HANDLE_GET(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_LIST_HANDLE_GET[0],
			{ "ulNumHandle", "octvc1.list.handle_get.ulnumhandle",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulNumHandle",HFILL }

		},
		{
			&ahf_tOCTVC1_LIST_HANDLE_GET[1],
			{ "aHandle", "octvc1.list.handle_get.ahandle",
			FT_NONE, BASE_NONE, NULL, 0x0,
			"aHandle",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_LIST_HANDLE_GET.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID;

void  register_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID[0],
			{ "hParent", "octvc1.list.handle_get_sub_object_id.hparent",
			FT_NONE, BASE_NONE, NULL, 0x0,
			"hParent",HFILL }

		},
		{
			&ahf_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID[1],
			{ "ulNumSubObjectId", "octvc1.list.handle_get_sub_object_id.ulnumsubobjectid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulNumSubObjectId",HFILL }

		},
		{
			&ahf_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID[2],
			{ "aSubObjectId", "octvc1.list.handle_get_sub_object_id.asubobjectid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"aSubObjectId",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET[2];
tWS_ENTITY_HANDLE ws_htOCTVC1_LIST_HANDLE_OBJECT_GET;

void  register_tOCTVC1_LIST_HANDLE_OBJECT_GET(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET[0],
			{ "ulNumHandleObject", "octvc1.list.handle_object_get.ulnumhandleobject",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulNumHandleObject",HFILL }

		},
		{
			&ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET[1],
			{ "aHandleObject", "octvc1.list.handle_object_get.ahandleobject",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"aHandleObject",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_LIST_HANDLE_OBJECT_GET.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID;

void  register_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[0],
			{ "hParent", "octvc1.list.handle_object_get_sub_object_id.hparent",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"hParent",HFILL }

		},
		{
			&ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[1],
			{ "ulNumSubObjectId", "octvc1.list.handle_object_get_sub_object_id.ulnumsubobjectid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulNumSubObjectId",HFILL }

		},
		{
			&ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[2],
			{ "aSubObjectId", "octvc1.list.handle_object_get_sub_object_id.asubobjectid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"aSubObjectId",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_LIST_INDEX_GET[2];
tWS_ENTITY_HANDLE ws_htOCTVC1_LIST_INDEX_GET;

void  register_tOCTVC1_LIST_INDEX_GET(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_LIST_INDEX_GET[0],
			{ "ulNumIndex", "octvc1.list.index_get.ulnumindex",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulNumIndex",HFILL }

		},
		{
			&ahf_tOCTVC1_LIST_INDEX_GET[1],
			{ "aIndex", "octvc1.list.index_get.aindex",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"aIndex",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_LIST_INDEX_GET.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

/****************************************************************************
	COMMON dissectors 
 ****************************************************************************/


unsigned int  dissect_tOCTVC1_LIST_HANDLE_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_LIST_HANDLE_GET)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_LIST_HANDLE_GET (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_LIST_HANDLE_GET));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_LIST_HANDLE_GET);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LIST_HANDLE_GET[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_GET, ulNumHandle), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LIST_HANDLE_GET[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_GET, ulNumHandle);

		ti = proto_tree_add_text(field_tree, tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_GET, aHandle), "aHandle:tOCTVC1_HANDLE");
		{
			int i, ofs=offset;
			proto_tree*	sub_tree = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			for( i=0; i<100; i++ )
			{
		{
			proto_tree*	sub_tree2;
			ti = proto_tree_add_text(sub_tree, tvb, offset,
				sizeof(tOCTVC1_HANDLE), "[%d]:", i);
			sub_tree2 = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			offset = dissect_tOCTVC1_HANDLE( tvb, pinfo, sub_tree2, offset, pExtValue );
		}
			}
		}
	}


	return offset;

};


unsigned int  dissect_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID);
		ti = proto_tree_add_text(field_tree, tvb, offset, 
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID, hParent), "hParent:tOCTVC1_HANDLE");
		{
			proto_tree*	sub_tree2;
			sub_tree2 = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			offset = dissect_tOCTVC1_HANDLE( tvb, pinfo, sub_tree2, offset, pExtValue );
		}
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID, ulNumSubObjectId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID, ulNumSubObjectId);

		ti = proto_tree_add_text(field_tree, tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID, aSubObjectId), "aSubObjectId");
		{
			int i, ofs=offset;
			proto_tree*	sub_tree = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			for( i=0; i<100; i++ )
			{
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(sub_tree, ahf_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID, aSubObjectId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint_format(sub_tree, ahf_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID[2], tvb, offset,
			4, temp_data, "[%d]: 0x%08x", i, temp_data );
		}
				offset+=4;
			}
		}
	}


	return offset;

};


unsigned int  dissect_tOCTVC1_LIST_HANDLE_OBJECT_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_LIST_HANDLE_OBJECT_GET)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_LIST_HANDLE_OBJECT_GET (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_LIST_HANDLE_OBJECT_GET));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_LIST_HANDLE_OBJECT_GET);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET, ulNumHandleObject), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET, ulNumHandleObject);

		ti = proto_tree_add_text(field_tree, tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET, aHandleObject), "aHandleObject");
		{
			int i, ofs=offset;
			proto_tree*	sub_tree = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			for( i=0; i<100; i++ )
			{
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(sub_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET, aHandleObject), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint_format(sub_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET[1], tvb, offset,
			4, temp_data, "[%d]: 0x%08x", i, temp_data );
		}
				offset+=4;
			}
		}
	}


	return offset;

};


unsigned int  dissect_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID, hParent), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID, hParent);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID, ulNumSubObjectId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID, ulNumSubObjectId);

		ti = proto_tree_add_text(field_tree, tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID, aSubObjectId), "aSubObjectId");
		{
			int i, ofs=offset;
			proto_tree*	sub_tree = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			for( i=0; i<100; i++ )
			{
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(sub_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID, aSubObjectId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint_format(sub_tree, ahf_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID[2], tvb, offset,
			4, temp_data, "[%d]: 0x%08x", i, temp_data );
		}
				offset+=4;
			}
		}
	}


	return offset;

};


unsigned int  dissect_tOCTVC1_LIST_INDEX_GET(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_LIST_INDEX_GET)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_LIST_INDEX_GET (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_LIST_INDEX_GET));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_LIST_INDEX_GET);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LIST_INDEX_GET[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_INDEX_GET, ulNumIndex), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LIST_INDEX_GET[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LIST_INDEX_GET, ulNumIndex);

		ti = proto_tree_add_text(field_tree, tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_INDEX_GET, aIndex), "aIndex");
		{
			int i, ofs=offset;
			proto_tree*	sub_tree = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			for( i=0; i<100; i++ )
			{
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(sub_tree, ahf_tOCTVC1_LIST_INDEX_GET[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LIST_INDEX_GET, aIndex), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint_format(sub_tree, ahf_tOCTVC1_LIST_INDEX_GET[1], tvb, offset,
			4, temp_data, "[%d]: 0x%08x", i, temp_data );
		}
				offset+=4;
			}
		}
	}


	return offset;

};

#include <octvc1_msg.h>

/****************************************************************************
	MODULE API ENUMERATION STRING VALUES
 ****************************************************************************/

const value_string  vals_tOCTVC1_MSG_FLAGS_MASK[] = 
 {
	{ cOCTVC1_MSG_FLAGS_MASK_RETRANSMIT, "cOCTVC1_MSG_FLAGS_MASK_RETRANSMIT" },
	{ cOCTVC1_MSG_FLAGS_MASK_NO_RESPONSE, "cOCTVC1_MSG_FLAGS_MASK_NO_RESPONSE" },
	{ cOCTVC1_MSG_FLAGS_MASK_LONG_PROCESSING, "cOCTVC1_MSG_FLAGS_MASK_LONG_PROCESSING" },
	{ 0,		NULL }
 };

/****************************************************************************
	COMMON Registered 
 ****************************************************************************/

int ahf_tOCTVC1_MSG_HEADER[6];
tWS_ENTITY_HANDLE ws_htOCTVC1_MSG_HEADER;

void  register_tOCTVC1_MSG_HEADER(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_MSG_HEADER[0],
			{ "ulLength", "octvc1.msg.header.ullength",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulLength",HFILL }

		},
		{
			&ahf_tOCTVC1_MSG_HEADER[1],
			{ "ulTransactionId", "octvc1.msg.header.ultransactionid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulTransactionId",HFILL }

		},
		{
			&ahf_tOCTVC1_MSG_HEADER[2],
			{ "ul_Type_R_CmdId", "octvc1.msg.header.ul_type_r_cmdid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ul_Type_R_CmdId",HFILL }

		},
		{
			&ahf_tOCTVC1_MSG_HEADER[3],
			{ "ulSessionId", "octvc1.msg.header.ulsessionid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulSessionId",HFILL }

		},
		{
			&ahf_tOCTVC1_MSG_HEADER[4],
			{ "ulReturnCode", "octvc1.msg.header.ulreturncode",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulReturnCode",HFILL }

		},
		{
			&ahf_tOCTVC1_MSG_HEADER[5],
			{ "ulUserInfo", "octvc1.msg.header.uluserinfo",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulUserInfo",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_MSG_HEADER.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

int ahf_tOCTVC1_EVENT_HEADER[3];
tWS_ENTITY_HANDLE ws_htOCTVC1_EVENT_HEADER;

void  register_tOCTVC1_EVENT_HEADER(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_EVENT_HEADER[0],
			{ "ulLength", "octvc1.msg.toctvc1_event_header.ullength",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulLength",HFILL }

		},
		{
			&ahf_tOCTVC1_EVENT_HEADER[1],
			{ "ulEventId", "octvc1.msg.toctvc1_event_header.uleventid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulEventId",HFILL }

		},
		{
			&ahf_tOCTVC1_EVENT_HEADER[2],
			{ "ulUserEventId", "octvc1.msg.toctvc1_event_header.ulusereventid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulUserEventId",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_EVENT_HEADER.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

/****************************************************************************
	COMMON dissectors 
 ****************************************************************************/


unsigned int  dissect_tOCTVC1_MSG_HEADER(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_MSG_HEADER)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_MSG_HEADER (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_MSG_HEADER));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_MSG_HEADER);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_MSG_HEADER[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulLength), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_MSG_HEADER[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulLength);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_MSG_HEADER[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulTransactionId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_MSG_HEADER[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulTransactionId);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_MSG_HEADER[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ul_Type_R_CmdId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_MSG_HEADER[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ul_Type_R_CmdId);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_MSG_HEADER[3], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulSessionId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_MSG_HEADER[3], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulSessionId);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_MSG_HEADER[4], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulReturnCode), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_MSG_HEADER[4], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulReturnCode);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_MSG_HEADER[5], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulUserInfo), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_MSG_HEADER[5], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_MSG_HEADER, ulUserInfo);

	}


	return offset;

};


unsigned int  dissect_tOCTVC1_EVENT_HEADER(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_EVENT_HEADER)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_EVENT_HEADER (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_EVENT_HEADER));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_EVENT_HEADER);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_EVENT_HEADER[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_EVENT_HEADER, ulLength), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_EVENT_HEADER[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_EVENT_HEADER, ulLength);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_EVENT_HEADER[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_EVENT_HEADER, ulEventId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_EVENT_HEADER[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_EVENT_HEADER, ulEventId);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_EVENT_HEADER[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_EVENT_HEADER, ulUserEventId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_EVENT_HEADER[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_EVENT_HEADER, ulUserEventId);

	}


	return offset;

};

#include <octvc1_log.h>

/****************************************************************************
	MODULE API ENUMERATION STRING VALUES
 ****************************************************************************/

const value_string  vals_tOCTVC1_LOG_TYPE_ENUM[] = 
 {
	{ cOCTVC1_LOG_TYPE_ENUM_LOG, "cOCTVC1_LOG_TYPE_ENUM_LOG" },
	{ cOCTVC1_LOG_TYPE_ENUM_TRACE, "cOCTVC1_LOG_TYPE_ENUM_TRACE" },
	{ 0,		NULL }
 };

const value_string  vals_tOCTVC1_LOG_LEVEL_ENUM[] = 
 {
	{ cOCTVC1_LOG_LEVEL_ENUM_EMERGENCY, "cOCTVC1_LOG_LEVEL_ENUM_EMERGENCY" },
	{ cOCTVC1_LOG_LEVEL_ENUM_ALERT, "cOCTVC1_LOG_LEVEL_ENUM_ALERT" },
	{ cOCTVC1_LOG_LEVEL_ENUM_CRITICAL, "cOCTVC1_LOG_LEVEL_ENUM_CRITICAL" },
	{ cOCTVC1_LOG_LEVEL_ENUM_ERROR, "cOCTVC1_LOG_LEVEL_ENUM_ERROR" },
	{ cOCTVC1_LOG_LEVEL_ENUM_WARNING, "cOCTVC1_LOG_LEVEL_ENUM_WARNING" },
	{ cOCTVC1_LOG_LEVEL_ENUM_NOTICE, "cOCTVC1_LOG_LEVEL_ENUM_NOTICE" },
	{ 0,		NULL }
 };

const value_string  vals_tOCTVC1_LOG_TRACE_MASK[] = 
 {
	{ cOCTVC1_LOG_TRACE_MASK_FNC_IN, "cOCTVC1_LOG_TRACE_MASK_FNC_IN" },
	{ cOCTVC1_LOG_TRACE_MASK_FNC_OUT, "cOCTVC1_LOG_TRACE_MASK_FNC_OUT" },
	{ cOCTVC1_LOG_TRACE_MASK_INFO, "cOCTVC1_LOG_TRACE_MASK_INFO" },
	{ cOCTVC1_LOG_TRACE_MASK_DEBUG, "cOCTVC1_LOG_TRACE_MASK_DEBUG" },
	{ cOCTVC1_LOG_TRACE_MASK_USER_0, "cOCTVC1_LOG_TRACE_MASK_USER_0" },
	{ cOCTVC1_LOG_TRACE_MASK_USER_1, "cOCTVC1_LOG_TRACE_MASK_USER_1" },
	{ cOCTVC1_LOG_TRACE_MASK_USER_2, "cOCTVC1_LOG_TRACE_MASK_USER_2" },
	{ cOCTVC1_LOG_TRACE_MASK_USER_3, "cOCTVC1_LOG_TRACE_MASK_USER_3" },
	{ cOCTVC1_LOG_TRACE_MASK_NONE, "cOCTVC1_LOG_TRACE_MASK_NONE" },
	{ cOCTVC1_LOG_TRACE_MASK_ALL, "cOCTVC1_LOG_TRACE_MASK_ALL" },
	{ 0,		NULL }
 };

/****************************************************************************
	COMMON Registered 
 ****************************************************************************/

int ahf_tOCTVC1_LOG_HEADER[4];
tWS_ENTITY_HANDLE ws_htOCTVC1_LOG_HEADER;

void  register_tOCTVC1_LOG_HEADER(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_LOG_HEADER[0],
			{ "ulId", "octvc1.log.header.ulid",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulId",HFILL }

		},
		{
			&ahf_tOCTVC1_LOG_HEADER[1],
			{ "ulTime", "octvc1.log.header.ultime",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulTime",HFILL }

		},
		{
			&ahf_tOCTVC1_LOG_HEADER[2],
			{ "hProcess", "octvc1.log.header.hprocess",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"hProcess",HFILL }

		},
		{
			&ahf_tOCTVC1_LOG_HEADER[3],
			{ "ul_Type_Info_Length", "octvc1.log.header.ul_type_info_length",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ul_Type_Info_Length",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_LOG_HEADER.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

/****************************************************************************
	COMMON dissectors 
 ****************************************************************************/


unsigned int  dissect_tOCTVC1_LOG_HEADER(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_LOG_HEADER)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_LOG_HEADER (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_LOG_HEADER));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_LOG_HEADER);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LOG_HEADER[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LOG_HEADER, ulId), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LOG_HEADER[0], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LOG_HEADER, ulId);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LOG_HEADER[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LOG_HEADER, ulTime), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LOG_HEADER[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LOG_HEADER, ulTime);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LOG_HEADER[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LOG_HEADER, hProcess), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LOG_HEADER[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LOG_HEADER, hProcess);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_LOG_HEADER[3], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_LOG_HEADER, ul_Type_Info_Length), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_LOG_HEADER[3], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_LOG_HEADER, ul_Type_Info_Length);

	}


	return offset;

};

#include <octvc1_file.h>

/****************************************************************************
	MODULE API ENUMERATION STRING VALUES
 ****************************************************************************/

const value_string  vals_tOCTVC1_FILE_TYPE_ENUM[] = 
 {
	{ cOCTVC1_FILE_TYPE_ENUM_NONE, "cOCTVC1_FILE_TYPE_ENUM_NONE" },
	{ cOCTVC1_FILE_TYPE_ENUM_TEXT, "cOCTVC1_FILE_TYPE_ENUM_TEXT" },
	{ cOCTVC1_FILE_TYPE_ENUM_BIN, "cOCTVC1_FILE_TYPE_ENUM_BIN" },
	{ 0,		NULL }
 };

const value_string  vals_tOCTVC1_FILE_FORMAT_ENUM[] = 
 {
	{ cOCTVC1_FILE_FORMAT_ENUM_NONE, "cOCTVC1_FILE_FORMAT_ENUM_NONE" },
	{ cOCTVC1_FILE_FORMAT_ENUM_LOG, "cOCTVC1_FILE_FORMAT_ENUM_LOG" },
	{ 0,		NULL }
 };

/****************************************************************************
	COMMON Registered 
 ****************************************************************************/

int ahf_tOCTVC1_FILE_HEADER[4];
tWS_ENTITY_HANDLE ws_htOCTVC1_FILE_HEADER;

void  register_tOCTVC1_FILE_HEADER(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_FILE_HEADER[0],
			{ "ulMagic", "octvc1.file.header.ulmagic",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulMagic",HFILL }

		},
		{
			&ahf_tOCTVC1_FILE_HEADER[1],
			{ "ul_Type_Ver", "octvc1.file.header.ul_type_ver",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ul_Type_Ver",HFILL }

		},
		{
			&ahf_tOCTVC1_FILE_HEADER[2],
			{ "ulReserved", "octvc1.file.header.ulreserved",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulReserved",HFILL }

		},
		{
			&ahf_tOCTVC1_FILE_HEADER[3],
			{ "ulHeaderSize", "octvc1.file.header.ulheadersize",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"ulHeaderSize",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_FILE_HEADER.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

/****************************************************************************
	COMMON dissectors 
 ****************************************************************************/


unsigned int  dissect_tOCTVC1_FILE_HEADER(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_FILE_HEADER)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_FILE_HEADER (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_FILE_HEADER));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_FILE_HEADER);
		temp_data = tvb_get_ntohl( tvb, offset );
		if( temp_data == cOCTVC1_FILE_MAGIC_BIG_ENDIAN)
		{		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_FILE_HEADER[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ulMagic),temp_data, "cOCTVC1_FILE_MAGIC_BIG_ENDIAN (0x%08x)",temp_data);
		}else {
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_FILE_HEADER[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ulMagic), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_FILE_HEADER[0], tvb, offset,
			4, temp_data);
		}
		}
		offset += mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ulMagic);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_FILE_HEADER[1], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ul_Type_Ver), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_FILE_HEADER[1], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ul_Type_Ver);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_FILE_HEADER[2], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ulReserved), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_FILE_HEADER[2], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ulReserved);

		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(field_tree, ahf_tOCTVC1_FILE_HEADER[3], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ulHeaderSize), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint(field_tree, ahf_tOCTVC1_FILE_HEADER[3], tvb, offset,
			4, temp_data);
		}
		offset += mWS_FIELDSIZE(tOCTVC1_FILE_HEADER, ulHeaderSize);

	}


	return offset;

};

#include <octvc1_handle.h>

/****************************************************************************
	COMMON Registered 
 ****************************************************************************/

int ahf_tOCTVC1_HANDLE[1];
tWS_ENTITY_HANDLE ws_htOCTVC1_HANDLE;

void  register_tOCTVC1_HANDLE(void)
{
	static hf_register_info hf[] =
	{
		{
			&ahf_tOCTVC1_HANDLE[0],
			{ "aulHandle", "octvc1.handle.toctvc1_handle.aulhandle",
			FT_UINT32,BASE_HEX, NULL, 0x0,
			"aulHandle",HFILL }

		},
	};

	static gint* ett[] =
	{
		&ws_htOCTVC1_HANDLE.ett
	};

	proto_register_field_array( proto_octvc1_ctrl, hf, array_length(hf) );

};

/****************************************************************************
	COMMON dissectors 
 ****************************************************************************/


unsigned int  dissect_tOCTVC1_HANDLE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, tWS_EXTRA_VALUE *pExtValue )
{
	proto_tree *field_tree = tree;
	unsigned int offset_0 = offset;
	gint bytes = tvb_length_remaining(tvb, offset);
	if (bytes < (gint)(sizeof(tOCTVC1_HANDLE)))
	{
		proto_tree_add_text(tree, tvb, offset, bytes,
			"tOCTVC1_HANDLE (%d byte%s) - Malformated packet...expected(%ld)",
			bytes, plurality(bytes, "", "s"),
			sizeof(tOCTVC1_HANDLE));
		return 1;
	}
	else
	{
		int  temp_data = 0;
		proto_item *ti;
		bytes = sizeof(tOCTVC1_HANDLE);
		ti = proto_tree_add_text(field_tree, tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_HANDLE, aulHandle), "aulHandle");
		{
			int i, ofs=offset;
			proto_tree*	sub_tree = proto_item_add_subtree(ti, ett_octvc1_msg_type);
			for( i=0; i<3; i++ )
			{
		temp_data = tvb_get_ntohl( tvb, offset );
		if( pExtValue && (pExtValue->lValue == temp_data ) )
		{
		ti = proto_tree_add_uint_format_value(sub_tree, ahf_tOCTVC1_HANDLE[0], tvb, offset,
			mWS_FIELDSIZE(tOCTVC1_HANDLE, aulHandle), temp_data, "%s (0x%x)",pExtValue->pszValue, temp_data );
		}else
		{
		ti = proto_tree_add_uint_format(sub_tree, ahf_tOCTVC1_HANDLE[0], tvb, offset,
			4, temp_data, "[%d]: 0x%08x", i, temp_data );
		}
				offset+=4;
			}
		}
	}


	return offset;

};
/****************************************************************************
	MODULE REGISTERED EXPORTED FUNCTION
 ****************************************************************************/

void ws_register_OCTVC1_common(void)
{
	register_tOCTVC1_CURSOR_HANDLE_GET(); 
	register_tOCTVC1_CURSOR_HANDLE_GET_HANDLE(); 
	register_tOCTVC1_CURSOR_HANDLE_GET_HANDLE_OBJECT(); 
	register_tOCTVC1_CURSOR_HANDLE_GET_SUB_OBJECT_ID(); 
	register_tOCTVC1_CURSOR_HANDLE_OBJECT_GET(); 
	register_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_HANDLE_OBJECT(); 
	register_tOCTVC1_CURSOR_HANDLE_OBJECT_GET_SUB_OBJECT_ID(); 
	register_tOCTVC1_CURSOR_INDEX_GET(); 
	register_tOCTVC1_VLAN_TAG(); 
	register_tOCTVC1_VLAN_HEADER_INFO(); 
	register_tOCTVC1_LIST_HANDLE_GET(); 
	register_tOCTVC1_LIST_HANDLE_GET_SUB_OBJECT_ID(); 
	register_tOCTVC1_LIST_HANDLE_OBJECT_GET(); 
	register_tOCTVC1_LIST_HANDLE_OBJECT_GET_SUB_OBJECT_ID(); 
	register_tOCTVC1_LIST_INDEX_GET(); 
	register_tOCTVC1_MSG_HEADER(); 
	register_tOCTVC1_EVENT_HEADER(); 
	register_tOCTVC1_LOG_HEADER(); 
	register_tOCTVC1_FILE_HEADER(); 
	register_tOCTVC1_HANDLE(); 

}


