-/* ------------------------------------------------
-Copyright 2014 AT&T Intellectual Property
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ------------------------------------------- */
-
-#ifndef __INTERFACE_LIB_INCLUDED__
-#define __INTERFACE_LIB_INCLUDED__
-#include "gsconfig.h"
-#include "gstypes.h"
-
-#include<stdio.h>
-#include "byteswap.h"
-#include "type_indicators.h"
-#include "fta.h"
-#include <fta_stat.h>
-/* #include"type_objects.h" */
-/* #include"parse_fta.h" */
-
-
-/*//////////////////////////////////////////////////////
-//// Include data type definitions. */
-
-/* Include vstring.h to get the vstring definition. */
-
-/* XXXX OS This data definitions and prototypes are mirrored in schemaparser.h
- * any changes have to be reflected there !!
- */
-
-#include"vstring.h"
-
-#include<sys/time.h>
-/*
-#ifndef _TIMEVAL_T
-#define _TIMEVAL_T
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#endif
-*/
-
-struct fstring_str{
- gs_int32_t size;
- gs_sp_t data; // gs_int8_t *
-};
-
-/* Universal result holder. */
-#ifndef _struct_access_result_defined_
-#define _struct_access_result_defined_
-struct access_result {
- int field_data_type; // as defined
- union {
- gs_int32_t i;
- gs_uint32_t ui;
- gs_int64_t l;
- gs_uint64_t ul;
- gs_float_t f;
- struct timeval t; // defined in sys/time.h
- struct vstring vs;
- struct fstring_str fs;
- struct hfta_ipv6_str ip6;
- } r;
-};
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*//////////////////////////////////////
-//// Version functions */
-
-gs_int32_t get_schemaparser_version();
-gs_int32_t *get_schemaparser_accepted_versions(); // returns zero-terminated array
-gs_int32_t schemaparser_accepts_version(gs_int32_t v); // 1 if true, 0 o'wise.
-
-
-/*/////////////////////////////////////////////////
-//// Helper functions */
-
-// int fta_field_size(int dt, int *is_udef);
-
-
-/*///////////////////////////////////////////////////
-//// Interface functions */
-
-
-/*/// FTA management ////////////// */
-
-/* Create a new schema representation, return
- an integer handle.
- Input is a char array with the stream schema.
- returns -1 on error.
- Diagnostics written to stderr.
- use the _prot version to also to accept a PROTOCOL (table)
-*/
-
-gs_schemahandle_t ftaschema_parse_string(gs_csp_t f); // gs_csp_t is const char *
-gs_schemahandle_t ftaschema_parse_string_prot(gs_csp_t f); // gs_csp_t is const char *
-
-/* Create a new schema representation, return
- an integer handle.
- Input is a STREAM schema in a file.
- use the _prot version to also to accept a PROTOCOL (table)
- returns -1 on error.
- Diagnostics written to stderr.
-*/
-gs_schemahandle_t ftaschema_parse_file(FILE *f);
-gs_schemahandle_t ftaschema_parse_file_prot(FILE *f);
-
-/* Release memory used by the schema representation.
- return non-zero on error.
-*/
-gs_int32_t ftaschema_free(gs_schemahandle_t sh); // gs_sp_t is char *
-
-/* name of fta schema null terminated */
-/* Returns NULL if sh is out of bounds. */
-/* NO ALLOCATION IS PERFORMED! Must treat result as const. */
-gs_sp_t ftaschema_name(gs_schemahandle_t sh);
-
-/* key of fta
- This function is omitted because we are using name only.
-FTAkey * ftaschema_key(schema_handle sh);
-*/
-
-/*///// Tuple management //////////////////// */
-
-/* number of entries in a tuple */
-/* Return -1 if the schema handle is out of range. */
-gs_int32_t ftaschema_tuple_len(gs_schemahandle_t sh);
-
-
-/* tuple entry name */
-/* Returns NULL if sh or index is out of bounds. */
-/* NO ALLOCATION IS PERFORMED! Must treat result as const. */
-gs_sp_t ftaschema_field_name(gs_schemahandle_t sh, gs_uint32_t index);
-
-
-/* returns field offset by name (for direct access) */
-/* if sh is out of bounds, or if fieldname is not the name of a field,
- or len is too small,
- return value is -1 (field_offset) / UNDEFINED_TYPE (field_type)
- gs_sp_t is char *
-*/
-gs_int32_t ftaschema_get_field_offset_by_name(gs_schemahandle_t sh, gs_csp_t fieldname);
-gs_int32_t ftaschema_get_field_type_by_name(gs_schemahandle_t sh, gs_csp_t fieldname);
-
-/* get field_offset, field_type bu index instead of name */
-gs_int32_t ftaschema_get_field_offset_by_index(gs_schemahandle_t sh, gs_int32_t index);
-gs_int32_t ftaschema_get_field_type_by_index(gs_schemahandle_t sh, gs_int32_t index);
-
-
-/* returns field value based on name */
-/* if sh is out of bounds, or if fieldname is not the name of a field,
- or len is too small,
- return value is of type UNDEFINED_TYPE
- NO COPYING IS PERFORMED FOR vstring TYPES.
- gs_sp_t is char *
-*/
-struct access_result ftaschema_get_field_by_name(gs_schemahandle_t sh,
- gs_csp_t fieldname, void * data, gs_int32_t len);
-
-/* return field value by index */
-/* if sh is out of bounds, or if fieldname is not the name of a field,
- or len is too small,
- return value is of type UNDEFINED_TYPE
- NO COPYING IS PERFORMED FOR vstring TYPES.
-*/
-struct access_result ftaschema_get_field_by_index(gs_schemahandle_t sh,
- gs_uint32_t index, void * data, gs_uint32_t len);
-
-/* The following functions deals with temporal status tuples */
-
-// Get location of eof, temporal-tuple metadata.
-gs_int32_t ftaschema_get_tuple_metadata_offset(gs_schemahandle_t sh);
-
-/* checks whether tuple is temporal
- return value 1 indicates that tuple istemporal, 0 - not temporal
-*/
-gs_int32_t ftaschema_is_temporal_tuple(gs_int32_t schema_handle, void *data);
-//gs_int32_t ftaschema_is_temporal_tuple_offset(int metadata_offset, void *data) ;
-#define ftaschema_is_temporal_tuple_offset(metadata_offset,data) (*((gs_sp_t)(data) + (metadata_offset)) == TEMPORAL_TUPLE)
-
-/* checks whether tuple is special end-of_file tuple
- return value 1 indicates that tuple is eof_tuple, 0 - otherwise
-*/
-gs_int32_t ftaschema_is_eof_tuple(gs_int32_t schema_handle, void *data);
-gs_int32_t ftaschema_is_eof_tuple_offset(int metadata_offset, void *data) ;
-
-
-
-
-
-/* extracts the trace from the temporal tuple */
-gs_int32_t ftaschema_get_trace(gs_int32_t schema_handle, void* data,
- gs_int32_t len,
- gs_uint64_t * trace_id, gs_uint32_t* sz, fta_stat** trace );
-
-
-/* The following functions operate directly on the tuple
- to return field values. Problem set to 1 if the len is too small.
- unpack_vstr does not make a copy of the buffer.
- Neither does unpack_fstring
-*/
-gs_uint32_t fta_unpack_uint(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_uint32_t fta_unpack_ushort(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_uint32_t fta_unpack_bool(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_int32_t fta_unpack_int(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_uint64_t fta_unpack_ullong(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_int64_t fta_unpack_llong(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_float_t fta_unpack_float(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-struct timeval fta_unpack_timeval(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-struct vstring fta_unpack_vstr(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-struct hfta_ipv6_str fta_unpack_ipv6(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_sp_t fta_unpack_fstring(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-
-gs_uint32_t fta_unpack_uint_nocheck(void *data, gs_uint32_t offset);
-gs_uint32_t fta_unpack_ushort_nocheck(void *data, gs_uint32_t offset);
-gs_uint32_t fta_unpack_bool_nocheck(void *data, gs_uint32_t offset);
-gs_int32_t fta_unpack_int_nocheck(void *data, gs_uint32_t offset);
-gs_uint64_t fta_unpack_ullong_nocheck(void *data, gs_uint32_t offset);
-gs_int64_t fta_unpack_llong_nocheck(void *data, gs_uint32_t offset);
-gs_float_t fta_unpack_float_nocheck(void *data, gs_uint32_t offset);
-struct timeval fta_unpack_timeval_nocheck(void *data, gs_uint32_t offset);
-struct hfta_ipv6_str fta_unpack_ipv6_nocheck(void *data, gs_uint32_t offset);
-
-// THe same as above, but no ntoh xform
-gs_uint32_t fta_unpack_uint_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_uint32_t fta_unpack_ushort_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_uint32_t fta_unpack_bool_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_int32_t fta_unpack_int_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_uint64_t fta_unpack_ullong_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_int64_t fta_unpack_llong_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_float_t fta_unpack_float_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-struct timeval fta_unpack_timeval_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-struct hfta_ipv6_str fta_unpack_ipv6_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-struct vstring fta_unpack_vstr_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-gs_sp_t fta_unpack_fstring_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);
-
-gs_uint32_t fta_unpack_uint_noxf_nocheck(void *data, gs_uint32_t offset);
-gs_uint32_t fta_unpack_ushort_noxf_nocheck(void *data, gs_uint32_t offset);
-gs_uint32_t fta_unpack_bool_noxf_nocheck(void *data, gs_uint32_t offset);
-gs_int32_t fta_unpack_int_noxf_nocheck(void *data, gs_uint32_t offset);
-gs_uint64_t fta_unpack_ullong_noxf_nocheck(void *data, gs_uint32_t offset);
-gs_int64_t fta_unpack_llong_noxf_nocheck(void *data, gs_uint32_t offset);
-gs_float_t fta_unpack_float_noxf_nocheck(void *data, gs_uint32_t offset);
-struct timeval fta_unpack_timeval_noxf_nocheck(void *data, gs_uint32_t offset);
-struct hfta_ipv6_str fta_unpack_ipv6_noxf_nocheck(void *data, gs_uint32_t offset);
-
-
-
-/*/////// Param block management ///////////////*/
-
-
-/* number of parameters */
-/* Return -1 if sh is out of bounds */
-gs_int32_t ftaschema_parameter_len(gs_schemahandle_t sh);
-
-/* parameter entry name */
-/* Return NULL if sh or index is out of bounds. */
-/* NO COPYING IS PERFORMED */
-gs_sp_t ftaschema_parameter_name(gs_schemahandle_t sh, gs_uint32_t index);
-
-/*
- No need to create param handles, it is done at schema parse time.
- (downside: must be careful to set all parameters if
- the user sends param blocks to multiple instances)
-
- creates a parameter structure handle for a particular schema
-paramhandle ftaschema_create_paramhandle(schema_handle sh);
-
- frees a parameter structure handle
-int ftaschema_free_paramhandle(paramhandle ph);
-*/
-
-
-/* set parameter value for parameter handle */
-/* Pass in the parameter in its char string representation. */
-/* Return value is -1 on error, else 0 */
-gs_int32_t ftaschema_setparam_by_name(gs_schemahandle_t sh, gs_sp_t param_name,
- gs_sp_t param_val, gs_int32_t len);
-
-/* set parameter value for parameter handle */
-/* Pass in the parameter in its char string representation. */
-/* Return value is -1 on error, else 0 */
-gs_int32_t ftaschema_setparam_by_index(gs_schemahandle_t sh, gs_int32_t index,
- gs_sp_t param_val, gs_int32_t len);
-
-/* creates the parameter block which can be passed in control and
- init operations. The function allocates the memory returned and
- the caller is responsible to free it.
- Return value is -1 on error, else 0.
- ALL VALUES CONVERTED TO NETWORK BYTE ORDER
- */
-
-gs_int32_t ftaschema_create_param_block(gs_schemahandle_t sh, void ** block, gs_int32_t * size);
-
-//void ftaschema_debugdump(int handle);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
-
+/* ------------------------------------------------\r
+Copyright 2014 AT&T Intellectual Property\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+ ------------------------------------------- */\r
+\r
+#ifndef __INTERFACE_LIB_INCLUDED__\r
+#define __INTERFACE_LIB_INCLUDED__\r
+#include "gsconfig.h"\r
+#include "gstypes.h"\r
+\r
+#include<stdio.h>\r
+#include "byteswap.h"\r
+#include "type_indicators.h"\r
+#include "fta.h"\r
+#include <fta_stat.h>\r
+/* #include"type_objects.h" */\r
+/* #include"parse_fta.h" */\r
+\r
+\r
+/*//////////////////////////////////////////////////////\r
+//// Include data type definitions. */\r
+\r
+/* Include vstring.h to get the vstring definition. */\r
+\r
+/* XXXX OS This data definitions and prototypes are mirrored in schemaparser.h\r
+ * any changes have to be reflected there !!\r
+ */\r
+\r
+#include"vstring.h"\r
+\r
+#include<sys/time.h>\r
+/*\r
+#ifndef _TIMEVAL_T\r
+#define _TIMEVAL_T\r
+struct timeval {\r
+ long tv_sec;\r
+ long tv_usec;\r
+};\r
+#endif\r
+*/\r
+\r
+struct fstring_str{\r
+ gs_int32_t size;\r
+ gs_sp_t data; // gs_int8_t *\r
+};\r
+\r
+/* Universal result holder. */\r
+#ifndef _struct_access_result_defined_\r
+#define _struct_access_result_defined_\r
+struct access_result {\r
+ int field_data_type; // as defined\r
+ union {\r
+ gs_int32_t i;\r
+ gs_uint32_t ui;\r
+ gs_int64_t l;\r
+ gs_uint64_t ul;\r
+ gs_float_t f;\r
+ struct timeval t; // defined in sys/time.h\r
+ struct vstring vs;\r
+ struct fstring_str fs;\r
+ struct hfta_ipv6_str ip6;\r
+ } r;\r
+};\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+\r
+/*//////////////////////////////////////\r
+//// Version functions */\r
+\r
+gs_int32_t get_schemaparser_version();\r
+gs_int32_t *get_schemaparser_accepted_versions(); // returns zero-terminated array\r
+gs_int32_t schemaparser_accepts_version(gs_int32_t v); // 1 if true, 0 o'wise.\r
+\r
+\r
+/*/////////////////////////////////////////////////\r
+//// Helper functions */\r
+\r
+// int fta_field_size(int dt, int *is_udef);\r
+\r
+\r
+/*///////////////////////////////////////////////////\r
+//// Interface functions */\r
+\r
+\r
+/*/// FTA management ////////////// */\r
+\r
+/* Create a new schema representation, return\r
+ an integer handle.\r
+ Input is a char array with the stream schema.\r
+ returns -1 on error.\r
+ Diagnostics written to stderr.\r
+ use the _prot version to also to accept a PROTOCOL (table)\r
+*/\r
+\r
+gs_schemahandle_t ftaschema_parse_string(gs_csp_t f); // gs_csp_t is const char *\r
+gs_schemahandle_t ftaschema_parse_string_prot(gs_csp_t f); // gs_csp_t is const char *\r
+\r
+/* Create a new schema representation, return\r
+ an integer handle.\r
+ Input is a STREAM schema in a file.\r
+ use the _prot version to also to accept a PROTOCOL (table)\r
+ returns -1 on error.\r
+ Diagnostics written to stderr.\r
+*/\r
+gs_schemahandle_t ftaschema_parse_file(FILE *f);\r
+gs_schemahandle_t ftaschema_parse_file_prot(FILE *f);\r
+\r
+/* Release memory used by the schema representation.\r
+ return non-zero on error.\r
+*/\r
+gs_int32_t ftaschema_free(gs_schemahandle_t sh); // gs_sp_t is char *\r
+\r
+/* name of fta schema null terminated */\r
+/* Returns NULL if sh is out of bounds. */\r
+/* NO ALLOCATION IS PERFORMED! Must treat result as const. */\r
+gs_sp_t ftaschema_name(gs_schemahandle_t sh);\r
+\r
+/* key of fta\r
+ This function is omitted because we are using name only.\r
+FTAkey * ftaschema_key(schema_handle sh);\r
+*/\r
+\r
+/*///// Tuple management //////////////////// */\r
+\r
+/* number of entries in a tuple */\r
+/* Return -1 if the schema handle is out of range. */\r
+gs_int32_t ftaschema_tuple_len(gs_schemahandle_t sh);\r
+\r
+\r
+/* tuple entry name */\r
+/* Returns NULL if sh or index is out of bounds. */\r
+/* NO ALLOCATION IS PERFORMED! Must treat result as const. */\r
+gs_sp_t ftaschema_field_name(gs_schemahandle_t sh, gs_uint32_t index);\r
+\r
+\r
+/* returns field offset by name (for direct access) */\r
+/* if sh is out of bounds, or if fieldname is not the name of a field,\r
+ or len is too small,\r
+ return value is -1 (field_offset) / UNDEFINED_TYPE (field_type)\r
+ gs_sp_t is char *\r
+*/\r
+gs_int32_t ftaschema_get_field_offset_by_name(gs_schemahandle_t sh, gs_csp_t fieldname);\r
+gs_int32_t ftaschema_get_field_type_by_name(gs_schemahandle_t sh, gs_csp_t fieldname);\r
+\r
+/* get field_offset, field_type bu index instead of name */\r
+gs_int32_t ftaschema_get_field_offset_by_index(gs_schemahandle_t sh, gs_int32_t index);\r
+gs_int32_t ftaschema_get_field_type_by_index(gs_schemahandle_t sh, gs_int32_t index);\r
+\r
+\r
+/* returns field value based on name */\r
+/* if sh is out of bounds, or if fieldname is not the name of a field,\r
+ or len is too small,\r
+ return value is of type UNDEFINED_TYPE\r
+ NO COPYING IS PERFORMED FOR vstring TYPES.\r
+ gs_sp_t is char *\r
+*/\r
+struct access_result ftaschema_get_field_by_name(gs_schemahandle_t sh,\r
+ gs_csp_t fieldname, void * data, gs_int32_t len);\r
+\r
+/* return field value by index */\r
+/* if sh is out of bounds, or if fieldname is not the name of a field,\r
+ or len is too small,\r
+ return value is of type UNDEFINED_TYPE\r
+ NO COPYING IS PERFORMED FOR vstring TYPES.\r
+*/\r
+struct access_result ftaschema_get_field_by_index(gs_schemahandle_t sh,\r
+ gs_uint32_t index, void * data, gs_uint32_t len);\r
+\r
+/* The following functions deals with temporal status tuples */\r
+\r
+// Get location of eof, temporal-tuple metadata.\r
+gs_int32_t ftaschema_get_tuple_metadata_offset(gs_schemahandle_t sh);\r
+\r
+/* checks whether tuple is temporal\r
+ return value 1 indicates that tuple istemporal, 0 - not temporal\r
+*/\r
+gs_int32_t ftaschema_is_temporal_tuple(gs_int32_t schema_handle, void *data);\r
+//gs_int32_t ftaschema_is_temporal_tuple_offset(int metadata_offset, void *data) ;\r
+#define ftaschema_is_temporal_tuple_offset(metadata_offset,data) (*((gs_sp_t)(data) + (metadata_offset)) == TEMPORAL_TUPLE)\r
+\r
+/* checks whether tuple is special end-of_file tuple\r
+ return value 1 indicates that tuple is eof_tuple, 0 - otherwise\r
+*/\r
+gs_int32_t ftaschema_is_eof_tuple(gs_int32_t schema_handle, void *data);\r
+gs_int32_t ftaschema_is_eof_tuple_offset(int metadata_offset, void *data) ;\r
+\r
+\r
+\r
+\r
+\r
+/* extracts the trace from the temporal tuple */\r
+gs_int32_t ftaschema_get_trace(gs_int32_t schema_handle, void* data,\r
+ gs_int32_t len,\r
+ gs_uint64_t * trace_id, gs_uint32_t* sz, fta_stat** trace );\r
+\r
+\r
+/* The following functions operate directly on the tuple\r
+ to return field values. Problem set to 1 if the len is too small.\r
+ unpack_vstr does not make a copy of the buffer.\r
+ Neither does unpack_fstring\r
+*/\r
+gs_uint32_t fta_unpack_uint(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_uint32_t fta_unpack_ushort(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_uint32_t fta_unpack_bool(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_int32_t fta_unpack_int(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_uint64_t fta_unpack_ullong(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_int64_t fta_unpack_llong(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_float_t fta_unpack_float(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+struct timeval fta_unpack_timeval(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+struct vstring fta_unpack_vstr(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+struct hfta_ipv6_str fta_unpack_ipv6(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_sp_t fta_unpack_fstring(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+\r
+gs_uint32_t fta_unpack_uint_nocheck(void *data, gs_uint32_t offset);\r
+gs_uint32_t fta_unpack_ushort_nocheck(void *data, gs_uint32_t offset);\r
+gs_uint32_t fta_unpack_bool_nocheck(void *data, gs_uint32_t offset);\r
+gs_int32_t fta_unpack_int_nocheck(void *data, gs_uint32_t offset);\r
+gs_uint64_t fta_unpack_ullong_nocheck(void *data, gs_uint32_t offset);\r
+gs_int64_t fta_unpack_llong_nocheck(void *data, gs_uint32_t offset);\r
+gs_float_t fta_unpack_float_nocheck(void *data, gs_uint32_t offset);\r
+struct timeval fta_unpack_timeval_nocheck(void *data, gs_uint32_t offset);\r
+struct hfta_ipv6_str fta_unpack_ipv6_nocheck(void *data, gs_uint32_t offset);\r
+\r
+// THe same as above, but no ntoh xform\r
+gs_uint32_t fta_unpack_uint_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_uint32_t fta_unpack_ushort_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_uint32_t fta_unpack_bool_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_int32_t fta_unpack_int_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_uint64_t fta_unpack_ullong_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_int64_t fta_unpack_llong_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_float_t fta_unpack_float_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+struct timeval fta_unpack_timeval_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+struct hfta_ipv6_str fta_unpack_ipv6_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+struct vstring fta_unpack_vstr_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+gs_sp_t fta_unpack_fstring_noxf(void *data, gs_int32_t len, gs_uint32_t offset, gs_int32_t *problem);\r
+\r
+gs_uint32_t fta_unpack_uint_noxf_nocheck(void *data, gs_uint32_t offset);\r
+gs_uint32_t fta_unpack_ushort_noxf_nocheck(void *data, gs_uint32_t offset);\r
+gs_uint32_t fta_unpack_bool_noxf_nocheck(void *data, gs_uint32_t offset);\r
+gs_int32_t fta_unpack_int_noxf_nocheck(void *data, gs_uint32_t offset);\r
+gs_uint64_t fta_unpack_ullong_noxf_nocheck(void *data, gs_uint32_t offset);\r
+gs_int64_t fta_unpack_llong_noxf_nocheck(void *data, gs_uint32_t offset);\r
+gs_float_t fta_unpack_float_noxf_nocheck(void *data, gs_uint32_t offset);\r
+struct timeval fta_unpack_timeval_noxf_nocheck(void *data, gs_uint32_t offset);\r
+struct hfta_ipv6_str fta_unpack_ipv6_noxf_nocheck(void *data, gs_uint32_t offset);\r
+\r
+\r
+\r
+/*/////// Param block management ///////////////*/\r
+\r
+\r
+/* number of parameters */\r
+/* Return -1 if sh is out of bounds */\r
+gs_int32_t ftaschema_parameter_len(gs_schemahandle_t sh);\r
+\r
+/* parameter entry name */\r
+/* Return NULL if sh or index is out of bounds. */\r
+/* NO COPYING IS PERFORMED */\r
+gs_sp_t ftaschema_parameter_name(gs_schemahandle_t sh, gs_uint32_t index);\r
+\r
+/*\r
+ No need to create param handles, it is done at schema parse time.\r
+ (downside: must be careful to set all parameters if\r
+ the user sends param blocks to multiple instances)\r
+\r
+ creates a parameter structure handle for a particular schema\r
+paramhandle ftaschema_create_paramhandle(schema_handle sh);\r
+\r
+ frees a parameter structure handle\r
+int ftaschema_free_paramhandle(paramhandle ph);\r
+*/\r
+\r
+\r
+/* set parameter value for parameter handle */\r
+/* Pass in the parameter in its char string representation. */\r
+/* Return value is -1 on error, else 0 */\r
+gs_int32_t ftaschema_setparam_by_name(gs_schemahandle_t sh, gs_sp_t param_name,\r
+ gs_sp_t param_val, gs_int32_t len);\r
+\r
+/* set parameter value for parameter handle */\r
+/* Pass in the parameter in its char string representation. */\r
+/* Return value is -1 on error, else 0 */\r
+gs_int32_t ftaschema_setparam_by_index(gs_schemahandle_t sh, gs_int32_t index,\r
+ gs_sp_t param_val, gs_int32_t len);\r
+\r
+/* creates the parameter block which can be passed in control and\r
+ init operations. The function allocates the memory returned and\r
+ the caller is responsible to free it.\r
+ Return value is -1 on error, else 0.\r
+ ALL VALUES CONVERTED TO NETWORK BYTE ORDER\r
+ */\r
+\r
+gs_int32_t ftaschema_create_param_block(gs_schemahandle_t sh, void ** block, gs_int32_t * size);\r
+\r
+//void ftaschema_debugdump(int handle);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+\r
+#endif\r
+\r