diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_as.c tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_as.c
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_as.c	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_as.c	2007-10-16 11:48:28.000000000 +0200
@@ -35,6 +35,7 @@
 -----------------------------------------------------------------------
  */
 #include <string.h>
+#include <sys/types.h>		 /* for types compatibility */
 
 #include <tsp_sys_headers.h>
 #include <tsp_abs_types.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_as.c~ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_as.c~
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_as.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_as.c~	2006-10-18 11:58:48.000000000 +0200
@@ -0,0 +1,126 @@
+/*
+
+$Id: tsp_common_as.c,v 1.2 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Main implementation for the producer module
+
+-----------------------------------------------------------------------
+ */
+#include <string.h>
+
+#include <tsp_sys_headers.h>
+#include <tsp_abs_types.h>
+#include <tsp_datastruct.h>
+#include <tsp_simple_trace.h>
+#include <tsp_const_def.h>
+#include <tsp_common_macros.h>
+#define TSP_COMMON_AS_C
+#include <tsp_common_as.h>
+#include <tsp_common_ssi.h>
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
+TSP_answer_sample_t*
+TSP_AS_new(int32_t version_id,
+	   uint32_t channel_id,
+	   int32_t p_timeout,
+	   int32_t pgn,
+	   double base_frequency,
+	   int32_t max_period,
+	   int32_t max_consumer_number,
+	   int32_t current_consumer_number,
+	   TSP_status_t status) {
+  
+  TSP_answer_sample_t* as;
+  
+  as = calloc(1,sizeof(TSP_answer_sample_t));
+
+  if (NULL!=as) {
+    TSP_AS_initialize(as,
+		      version_id,channel_id,
+		      p_timeout,
+		      pgn,
+		      base_frequency,max_period,max_consumer_number,
+		      current_consumer_number,
+		      status);
+  }
+  return as;
+} /* end of TSP_AS_new */
+
+TSP_TYPE_DELETE_IMPLEMENT(TSP_answer_sample_t,AS)
+
+int32_t
+TSP_AS_initialize(TSP_answer_sample_t* as,
+		  int32_t version_id,
+		  uint32_t channel_id,
+		  int32_t p_timeout,
+		  int32_t pgn,
+		  double base_frequency,
+		  int32_t max_period,
+		  int32_t max_consumer_number,
+		  int32_t current_consumer_number,
+		  TSP_status_t status) {
+  
+  int32_t retcode = TSP_STATUS_OK;
+  assert(as);
+
+  as->version_id             = version_id;
+  as->channel_id             = channel_id;
+  as->provider_timeout       = p_timeout;
+  as->provider_group_number  = pgn;
+  retcode = TSP_SSIList_finalize(&(as->symbols));    
+  as->base_frequency         = base_frequency;
+  as->max_period             = max_period;
+  as->max_client_number      = max_consumer_number;
+  as->current_client_number  = current_consumer_number;
+  as->status                 = status;
+
+  return retcode;
+} /* end of TSP_AS_initialize */
+
+int32_t
+TSP_AS_finalize(TSP_answer_sample_t* as) {
+  
+  int32_t retcode = TSP_STATUS_OK;
+  assert(as);
+  
+  TSP_AS_initialize(as,
+		    TSP_UNDEFINED_VERSION_ID,
+		    -1,-1,-1,
+		    0.0,
+		    -1,-1,-1,
+		    TSP_STATUS_ERROR_UNKNOWN);
+  
+  return retcode;
+} /* end of retcode */
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common.c tsp-0.8.3-Source-Rtems/src/core/common/tsp_common.c
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common.c	2006-11-24 19:15:38.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common.c	2007-10-16 11:47:25.000000000 +0200
@@ -35,6 +35,7 @@
 -----------------------------------------------------------------------
  */
 #include <string.h>
+#include <sys/types.h>		 /* for types compatibility */
 
 #include <tsp_sys_headers.h>
 #include <tsp_abs_types.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common.c~ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common.c~
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common.c~	2006-11-24 19:15:38.000000000 +0100
@@ -0,0 +1,51 @@
+/*
+
+$Id: tsp_common.c,v 1.9 2006/11/24 18:15:38 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Main implementation for the producer module
+
+-----------------------------------------------------------------------
+ */
+#include <string.h>
+
+#include <tsp_sys_headers.h>
+#include <tsp_abs_types.h>
+#include <tsp_datastruct.h>
+#include <tsp_simple_trace.h>
+#include <tsp_const_def.h>
+#define TSP_COMMON_C
+#include <tsp_common.h>
+
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_request.c tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_request.c
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_request.c	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_request.c	2007-10-16 11:49:18.000000000 +0200
@@ -35,6 +35,7 @@
 -----------------------------------------------------------------------
  */
 #include <string.h>
+#include <sys/types.h>		 /* for types compatibility */
 
 #include <tsp_sys_headers.h>
 #include <tsp_abs_types.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_request.c~ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_request.c~
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_request.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_request.c~	2006-10-18 11:58:48.000000000 +0200
@@ -0,0 +1,58 @@
+/*
+
+$Id: tsp_common_request.c,v 1.2 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Main implementation for the producer module
+
+-----------------------------------------------------------------------
+ */
+#include <string.h>
+
+#include <tsp_sys_headers.h>
+#include <tsp_abs_types.h>
+#include <tsp_datastruct.h>
+#include <tsp_simple_trace.h>
+#include <tsp_const_def.h>
+#define TSP_COMMON_REQUEST_C
+#include <tsp_common_request.h>
+
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
+void TSP_request_create(TSP_request_t* req, TSP_request_type_t req_type) {
+  assert(req);
+  req->version_id = TSP_PROTOCOL_VERSION;
+  req->req_type   = req_type;
+  req->req_data   = NULL;
+} /* end of TSP_request_create */
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_ssei.c tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_ssei.c
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_ssei.c	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_ssei.c	2007-10-16 11:49:37.000000000 +0200
@@ -35,6 +35,7 @@
 -----------------------------------------------------------------------
  */
 #include <string.h>
+#include <sys/types.h>		 /* for types compatibility */
 
 #include <tsp_sys_headers.h>
 #include <tsp_abs_types.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_ssei.c~ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_ssei.c~
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_ssei.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_ssei.c~	2006-10-18 11:58:48.000000000 +0200
@@ -0,0 +1,486 @@
+/*
+
+$Id: tsp_common_ssei.c,v 1.10 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD,Robert PAGNOT and Arnaud MORVAN
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Main implementation for the producer module
+
+-----------------------------------------------------------------------
+ */
+#include <string.h>
+
+#include <tsp_sys_headers.h>
+#include <tsp_abs_types.h>
+#include <tsp_datastruct.h>
+#include <tsp_simple_trace.h>
+#include <tsp_const_def.h>
+#define TSP_COMMON_SSEI_C
+#include <tsp_common_ssei.h>
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
+TSP_extended_info_t*
+TSP_EI_new(const char *key,const char *value) {
+  TSP_extended_info_t* ei;
+  
+  ei = calloc(1,sizeof(TSP_extended_info_t));
+ 
+  if(NULL!=ei)
+    TSP_EI_initialize(ei,key,value);
+
+  return ei;
+}  /* end of TSP_EI_new */
+
+int32_t
+TSP_EI_delete(TSP_extended_info_t** ei) {
+  int32_t ret;
+
+  assert(ei); 
+
+  ret=TSP_STATUS_OK;
+
+  if(NULL==*ei)
+  {
+
+    ret=TSP_EI_finalize(*ei);
+    free(*ei);
+    *ei=NULL;
+  }
+
+  return ret;
+} /* end of TSP_EI_delete */
+
+int32_t
+TSP_EI_initialize(TSP_extended_info_t* ei, const char* key, const char* value) {
+
+  assert(ei);  
+  
+  if(NULL!=ei->key)
+  {
+    free(ei->key);
+    ei->key=NULL;
+  }
+
+  if(NULL!=key)
+     ei->key = strdup(key);
+
+ if(NULL!=ei->value)
+  {
+    free(ei->value);
+    ei->value=NULL;
+  }
+
+  if(NULL!=value)
+    ei->value = strdup(value);
+
+  return TSP_STATUS_OK;
+} /* end of TSP_EI_initialize */
+
+int32_t
+TSP_EI_update(TSP_extended_info_t* ei, const char* key, const char* value){
+
+  return TSP_EI_initialize(ei,key,value);
+
+} /* end of TSP_EI_update */
+
+int32_t
+TSP_EI_finalize(TSP_extended_info_t* ei) {
+
+  assert(ei);
+
+  if(NULL!=ei->key)
+  {
+    free(ei->key); 
+    ei->key = NULL;
+  }
+
+  if(NULL!=ei->value)
+  {
+    free(ei->value); 
+    ei->value = NULL;
+  }
+
+  return TSP_STATUS_OK;
+
+} /* end of TSP_EI_finalize */
+
+int32_t
+TSP_EI_copy(TSP_extended_info_t* dest_EI, const TSP_extended_info_t src_EI){
+  int32_t ret;
+
+  assert(dest_EI);
+
+  ret= TSP_STATUS_OK;
+
+  
+  ret=TSP_EI_finalize(dest_EI);
+  
+  if (TSP_STATUS_OK!=ret) {
+    return ret; 
+  }  
+
+  ret=TSP_EI_initialize(dest_EI,src_EI.key, src_EI.value);
+
+  return ret;
+} /* end of TSP_EI_copy */
+
+
+TSP_extended_info_list_t*
+TSP_EIList_new(int32_t len) {
+
+  TSP_extended_info_list_t* ei_list;
+
+  ei_list = (TSP_extended_info_list_t*) calloc(1,sizeof(TSP_extended_info_list_t));
+  if(NULL!=ei_list)
+  {
+    TSP_EIList_initialize(ei_list,len);
+  }
+
+  return ei_list;
+} /* end TSP_EIList_new */
+
+int32_t
+TSP_EIList_delete(TSP_extended_info_list_t** eil) {
+  int32_t ret;
+
+  assert(eil);
+
+  ret=TSP_STATUS_OK;
+
+  if ( NULL!=*eil ) {
+    ret=TSP_EIList_finalize(*eil);
+    free(*eil);
+    *eil=NULL;
+  }
+  return ret;
+} /* end TSP_EIList_delete */
+
+
+int32_t
+TSP_EIList_initialize(TSP_extended_info_list_t* eil, const int32_t len){
+  int32_t ret;
+  int32_t i;
+
+  assert(eil);
+
+  ret=TSP_STATUS_OK;
+
+  if(NULL!=eil->TSP_extended_info_list_t_val)
+  {
+    for(i=0;i<eil->TSP_extended_info_list_t_len;++i)
+    {
+       ret=TSP_EI_finalize(&(eil->TSP_extended_info_list_t_val[i]));
+      
+    }
+  }
+
+  eil->TSP_extended_info_list_t_len=len;
+  eil->TSP_extended_info_list_t_val=calloc(len,sizeof(TSP_extended_info_t));
+  
+  if(NULL!=eil->TSP_extended_info_list_t_val)
+  {
+    for (i=0;i<len;++i) {
+       ret=TSP_EI_initialize(&(eil->TSP_extended_info_list_t_val[i]),"","");
+    }
+  }
+  else
+  {
+    ret=TSP_STATUS_ERROR_MEMORY_ALLOCATION;
+  }
+ 
+  return ret;
+ 
+} /* end TSP_EIList_initialize */
+
+int32_t
+TSP_EIList_finalize(TSP_extended_info_list_t* eil) {
+  int32_t ret;
+  int32_t i;
+
+  assert(eil);
+
+  ret= TSP_STATUS_OK;
+
+  for (i=0;i<eil->TSP_extended_info_list_t_len;++i) {
+    ret=TSP_EI_finalize(&(eil->TSP_extended_info_list_t_val[i]));
+  }
+
+  eil->TSP_extended_info_list_t_len=0;
+  free(eil->TSP_extended_info_list_t_val);
+  eil->TSP_extended_info_list_t_val=NULL;
+
+  return ret;
+
+} /* end of TSP_EIList_finalize */
+
+const TSP_extended_info_t*
+TSP_EIList_findEIByKey(const TSP_extended_info_list_t* eil, const char* key) {
+
+  int32_t i;
+
+  for (i=0;i<eil->TSP_extended_info_list_t_len;++i)
+  {
+    if(!strcmp(eil->TSP_extended_info_list_t_val[i].key,key))
+    {
+      return &(eil->TSP_extended_info_list_t_val[i]);
+    }
+  }
+  return NULL;
+} /* end of TSP_EIList_findEIByKey */
+
+int32_t
+TSP_EIList_copy(TSP_extended_info_list_t* eil_dest,
+		const TSP_extended_info_list_t eil_src){
+  int32_t i;
+  int32_t ret;
+
+  assert(eil_dest);
+
+  ret= TSP_STATUS_OK;
+ 
+  ret=TSP_EIList_finalize(eil_dest);
+  if(TSP_STATUS_OK!=ret){
+    return ret;
+  }
+
+  ret=TSP_EIList_initialize(eil_dest,eil_src.TSP_extended_info_list_t_len);
+  if(TSP_STATUS_OK!=ret){
+    return ret;
+  }
+
+  /* loop over symbol_info to copy */
+  for (i=0;i<eil_dest->TSP_extended_info_list_t_len;++i) {
+      ret=TSP_EI_copy(&(eil_dest->TSP_extended_info_list_t_val[i]),
+			  eil_src.TSP_extended_info_list_t_val[i]);
+  }
+  return ret;
+} /* end of TSP_EIList_copy */
+
+TSP_sample_symbol_extended_info_t*
+TSP_SSEI_new(const int32_t pgi, const int32_t nei) {
+
+  TSP_sample_symbol_extended_info_t* ssei;
+
+  ssei = calloc(1,sizeof(TSP_sample_symbol_extended_info_t));
+
+  if(NULL!=ssei)
+  {
+    TSP_SSEI_initialize(ssei,pgi,nei);
+  }
+  return ssei;
+} /* end of TSP_SSEI_new */
+
+int32_t
+TSP_SSEI_delete(TSP_sample_symbol_extended_info_t** ssei) {
+  int32_t ret;
+
+  assert(ssei);
+
+  ret=TSP_STATUS_OK;
+
+  if(NULL!=*ssei)
+    {
+      ret=TSP_SSEI_finalize(*ssei);
+      if(TSP_STATUS_OK!=ret){
+	return ret;
+      }
+
+      free(*ssei);
+      *ssei=NULL;
+    }
+
+    return ret;
+} /* end of TSP_SSEI_delete */
+
+int32_t
+TSP_SSEI_initialize(TSP_sample_symbol_extended_info_t* ssei, const int32_t pgi, const int32_t nei) {
+  
+  assert(ssei);
+  ssei->provider_global_index=pgi;
+  return TSP_EIList_initialize(&(ssei->info), nei);
+
+} /* end of TSP_SSEI_initialize */
+
+
+int32_t
+TSP_SSEI_finalize(TSP_sample_symbol_extended_info_t* ssei){
+
+  assert(ssei);
+  return  TSP_EIList_finalize(&(ssei->info));
+} /* end of TSP_SSEI_finalize */
+
+int32_t
+TSP_SSEI_copy(TSP_sample_symbol_extended_info_t* ssei_dest,
+  	      const TSP_sample_symbol_extended_info_t ssei_src){
+  int32_t ret;
+
+  assert(ssei_dest);
+
+  ret=TSP_STATUS_OK;
+
+  ret=TSP_SSEI_finalize(ssei_dest);
+  if(TSP_STATUS_OK!=ret){
+    return ret;
+  }
+
+  ret=TSP_SSEI_initialize(ssei_dest,ssei_src. provider_global_index,ssei_src.info.TSP_extended_info_list_t_len);
+  if(TSP_STATUS_OK!=ret){
+    return ret;
+  }
+  ssei_dest->provider_global_index=ssei_src.provider_global_index;
+
+  ret=TSP_EIList_copy( &(ssei_dest->info),ssei_src.info);
+ 
+  return TSP_STATUS_OK;
+} /* end TSP_SSEI_copy */
+
+TSP_sample_symbol_extended_info_list_t*
+TSP_SSEIList_new(int32_t len) {
+  TSP_sample_symbol_extended_info_list_t* ssei_list;
+
+  ssei_list = calloc(1,sizeof(TSP_sample_symbol_extended_info_list_t));
+  
+
+  if(NULL!=ssei_list)
+  {    
+    TSP_SSEIList_initialize(ssei_list,len);
+  }
+  return ssei_list;
+} /* end of TSP_SSEIList_new */
+
+int32_t
+TSP_SSEIList_delete(TSP_sample_symbol_extended_info_list_t** ssei_list) {
+
+  int32_t ret;
+
+  assert(ssei_list);
+
+  ret=TSP_STATUS_OK;
+
+  if(NULL!=*ssei_list)
+    {
+      ret=TSP_SSEIList_finalize(*ssei_list);
+      free(*ssei_list);
+      *ssei_list=NULL;
+    }
+
+    return ret;
+} /* end of TSP_SSEI_delete */
+
+int32_t
+TSP_SSEIList_initialize(TSP_sample_symbol_extended_info_list_t* ssei_list,int32_t len) {
+  int32_t i;
+  int32_t ret;
+
+  assert(ssei_list);
+  ret=TSP_STATUS_OK;
+
+  if(NULL!=ssei_list->TSP_sample_symbol_extended_info_list_t_val)
+  {
+    for(i=0;i<ssei_list->TSP_sample_symbol_extended_info_list_t_len;++i)
+    {
+      ret=TSP_SSEI_finalize(&(ssei_list->TSP_sample_symbol_extended_info_list_t_val[i]));
+    }
+  }
+
+  ssei_list->TSP_sample_symbol_extended_info_list_t_len=len;
+  ssei_list->TSP_sample_symbol_extended_info_list_t_val=calloc(len,sizeof(TSP_sample_symbol_extended_info_t));
+  TSP_CHECK_ALLOC(ssei_list->TSP_sample_symbol_extended_info_list_t_val,TSP_STATUS_ERROR_MEMORY_ALLOCATION);
+
+  return ret;
+
+} /* end of TSP_SSEI_initialize */
+
+int32_t
+TSP_SSEIList_finalize(TSP_sample_symbol_extended_info_list_t* ssei_list){
+  int32_t ret;
+  int32_t i;
+
+  assert(ssei_list);
+  ret=TSP_STATUS_OK;
+
+  for (i=0;i<ssei_list->TSP_sample_symbol_extended_info_list_t_len;++i) {
+    ret=TSP_SSEI_finalize(&(ssei_list->TSP_sample_symbol_extended_info_list_t_val[i]));
+  }
+
+  free(ssei_list->TSP_sample_symbol_extended_info_list_t_val);
+
+  ssei_list->TSP_sample_symbol_extended_info_list_t_val = NULL;
+  ssei_list->TSP_sample_symbol_extended_info_list_t_len = 0;
+
+  return ret;
+} /* end of TSP_SSEI_finalize */
+
+
+int32_t
+TSP_SSEIList_copy(TSP_sample_symbol_extended_info_list_t* dest_ssei_list,
+                  const TSP_sample_symbol_extended_info_list_t src_ssei_list){
+
+  int32_t ret;
+  int32_t i;
+
+  assert(dest_ssei_list);
+ 
+  ret=TSP_SSEIList_finalize(dest_ssei_list);
+  if(TSP_STATUS_OK!=ret){
+    return ret;
+  }
+
+  ret= TSP_SSEIList_initialize(dest_ssei_list,src_ssei_list.TSP_sample_symbol_extended_info_list_t_len); 
+  if(TSP_STATUS_OK!=ret){
+    return ret;
+  }
+  /* loop over symbol_info to copy */
+  for (i=0;i<dest_ssei_list->TSP_sample_symbol_extended_info_list_t_len;++i) {
+     ret= TSP_SSEI_copy(&(dest_ssei_list->TSP_sample_symbol_extended_info_list_t_val[i]),
+			  src_ssei_list.TSP_sample_symbol_extended_info_list_t_val[i]);
+  }
+
+  return ret;
+
+} /* end of TSP_SSEI_copy */
+
+TSP_extended_info_list_t*
+TSP_SSEIList_getEIList(const TSP_sample_symbol_extended_info_list_t SSEIList, uint32_t index) {
+
+  if ((index >= 0) &&
+      (index < SSEIList.TSP_sample_symbol_extended_info_list_t_len)) {
+    return &(SSEIList.TSP_sample_symbol_extended_info_list_t_val[index].info);
+  } else {
+    return NULL;
+  }
+}
+
+
+
+
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_ssi.c tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_ssi.c
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_ssi.c	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_ssi.c	2007-10-16 11:49:53.000000000 +0200
@@ -35,6 +35,7 @@
 -----------------------------------------------------------------------
  */
 #include <string.h>
+#include <sys/types.h>		 /* for types compatibility */
 
 #include <tsp_sys_headers.h>
 #include <tsp_abs_types.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_ssi.c~ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_ssi.c~
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_ssi.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_ssi.c~	2006-10-18 11:58:48.000000000 +0200
@@ -0,0 +1,336 @@
+/*
+
+$Id: tsp_common_ssi.c,v 1.8 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Main implementation for the producer module
+
+-----------------------------------------------------------------------
+ */
+#include <string.h>
+
+#include <tsp_sys_headers.h>
+#include <tsp_abs_types.h>
+#include <tsp_datastruct.h>
+#include <tsp_simple_trace.h>
+#include <tsp_const_def.h>
+#define TSP_COMMON_SSI_C
+#include <tsp_common_ssi.h>
+
+TSP_sample_symbol_info_t*
+TSP_SSI_new(const char* name,
+	    int32_t pgi,
+	    int32_t pgridx,
+	    int32_t pgrank,
+	    int32_t type,
+	    int32_t dimension,
+	    int32_t offset,
+	    int32_t nelem,
+	    int32_t period,
+	    int32_t phase) {
+  TSP_sample_symbol_info_t* ssi;
+
+  ssi = calloc(1,sizeof(TSP_sample_symbol_info_t));
+
+  if(NULL!=ssi)
+  {
+    TSP_SSI_initialize(ssi,
+		       name,
+		       pgi,pgridx,pgrank,
+		       type,
+		       dimension,offset,nelem,
+		       period,phase);
+  }
+  return ssi;
+} /* end of TSP_SSI_new */
+
+int32_t
+TSP_SSI_delete(TSP_sample_symbol_info_t** ssi) {
+  int32_t retcode;
+
+  assert(ssi);
+
+  retcode=TSP_STATUS_OK;
+
+  if(NULL!=*ssi) {
+    retcode=TSP_SSI_finalize(*ssi);
+    if (TSP_STATUS_OK!=retcode){
+      return retcode;
+    }
+    
+    free(*ssi);
+    *ssi=NULL;
+  }
+  return retcode;
+} /* end of TSP_SSI_delete */
+
+int32_t 
+TSP_SSI_initialize(TSP_sample_symbol_info_t* ssi,
+		   const char* name,
+		   int32_t pgi,
+		   int32_t pgridx,
+		   int32_t pgrank,
+		   int32_t type,
+		   int32_t dimension,
+		   int32_t offset,
+		   int32_t nelem,
+		   int32_t period,
+		   int32_t phase) {
+  
+  int32_t retcode = TSP_STATUS_OK;
+  assert(ssi);  
+
+  if (NULL!=ssi->name) {
+    free(ssi->name);    
+  }
+  if (NULL!=name) {
+    ssi->name                 = strdup(name);
+    if (NULL==ssi->name) {
+      retcode = TSP_STATUS_ERROR_MEMORY_ALLOCATION;
+      STRACE_ERROR(("Cannot strdup <%s>",name));
+    }
+  } else {
+    ssi->name                 = NULL;
+  }
+  ssi->provider_global_index  = pgi;
+  ssi->provider_group_index   = pgridx;
+  ssi->provider_group_rank    = pgrank;
+  ssi->type                   = type;
+  ssi->dimension              = dimension;
+  ssi->offset                 = offset;
+  ssi->nelem                  = nelem;
+  ssi->period                 = period;
+  ssi->phase                  = phase;
+
+  return retcode;
+} /* end of TSP_SSI_initialize */
+
+int32_t
+TSP_SSI_finalize(TSP_sample_symbol_info_t* ssi) {
+  
+  int32_t retcode = TSP_STATUS_OK;
+  assert(ssi);
+
+  TSP_SSI_initialize(ssi,
+		     NULL,
+		     -1,-1,-1,
+		     -1,
+		     -1,-1,-1,
+		     -1,-1);
+  
+  return retcode;
+} /* end of retcode */
+
+int32_t 
+TSP_SSI_initialize_default(TSP_sample_symbol_info_t* ssi) {
+  
+  return TSP_SSI_initialize(ssi,
+			    NULL,
+			    0,0,0,
+			    TSP_TYPE_DOUBLE,
+			    1,0,1,
+			    0,0);
+		     
+} /* end of TSP_SSI_initialize_default */
+
+int32_t 
+TSP_SSI_initialize_request_minimal(TSP_sample_symbol_info_t* ssi,
+				   const char* name,
+				   int32_t period) {
+  assert(name);
+  return TSP_SSI_initialize(ssi,
+			    name,
+			    0,0,0,
+			    TSP_TYPE_DOUBLE,
+			    0,0,0,
+			    period,0);
+} /* TSP_SSI_initialize_request_minimal */
+
+int32_t 
+TSP_SSI_initialize_request_full(TSP_sample_symbol_info_t* ssi,
+				const char* name,
+				int32_t type,
+				int32_t dimension,
+				int32_t offset,
+				int32_t nelem,
+				int32_t period,
+				int32_t phase) {
+  assert(name);
+  return TSP_SSI_initialize(ssi,
+			    name,
+			    0,0,0,
+			    type,
+			    dimension,offset,nelem,
+			    period,phase);
+} /* TSP_SSI_initialize_request_full */
+
+int32_t
+TSP_SSI_copy(TSP_sample_symbol_info_t* dst_ssi, 
+	     const TSP_sample_symbol_info_t src_ssi) {
+  
+  int32_t retcode = TSP_STATUS_OK;
+
+  assert(dst_ssi);
+   
+  /* free name if not null */
+  if (NULL!=dst_ssi->name) { 
+    free(dst_ssi->name);
+  }
+  /* Raw memory copy (should be faster than calling initialize) */
+  memcpy(dst_ssi,&src_ssi,sizeof(TSP_sample_symbol_info_t));
+  /* Then strdup string (name) member */
+  if (NULL!=src_ssi.name) {
+    dst_ssi->name = strdup(src_ssi.name);
+  } else {
+    dst_ssi->name = NULL;
+  }
+
+  return retcode;
+} /* end of TSP_SSI_copy */
+
+TSP_sample_symbol_info_list_t*
+TSP_SSIList_new(int32_t nbSSI) {
+ 
+  TSP_sample_symbol_info_list_t* ssil;
+
+  ssil = (TSP_sample_symbol_info_list_t*) calloc(1,sizeof(TSP_sample_symbol_info_list_t));
+  if (NULL!=ssil) {
+    TSP_SSIList_initialize(ssil,nbSSI);
+  }
+
+  return ssil;
+} /* end of TSP_SSIList_new */
+
+int32_t
+TSP_SSIList_delete(TSP_sample_symbol_info_list_t** ssil) {
+  int32_t retcode;
+
+  assert(ssil);
+
+  retcode=TSP_STATUS_OK;
+
+  if (NULL!=*ssil) {
+    retcode=TSP_SSIList_finalize(*ssil);
+    free(*ssil);
+    *ssil=NULL;
+  }
+
+  return retcode;
+} /* end of TSP_SSI_delete */
+
+int32_t
+TSP_SSIList_initialize(TSP_sample_symbol_info_list_t* ssil,int32_t nbSSI) {
+
+  int32_t retcode = TSP_STATUS_OK;
+  int32_t i;
+  assert(ssil);
+  
+  ssil->TSP_sample_symbol_info_list_t_len = nbSSI;
+  ssil->TSP_sample_symbol_info_list_t_val = (TSP_sample_symbol_info_t*) calloc (nbSSI,sizeof(TSP_sample_symbol_info_t));
+  TSP_CHECK_ALLOC(ssil->TSP_sample_symbol_info_list_t_val,TSP_STATUS_ERROR_MEMORY_ALLOCATION);
+
+  for (i=0;i<ssil->TSP_sample_symbol_info_list_t_len;++i) {    
+    retcode=TSP_SSI_initialize_default(&(ssil->TSP_sample_symbol_info_list_t_val[i]));
+    /* give-up on first error */
+    if (TSP_STATUS_OK!=retcode) {
+      break;
+    }
+  }
+  return retcode;
+} /* end of TSP_SSIList_initialize */
+
+int32_t 
+TSP_SSIList_finalize(TSP_sample_symbol_info_list_t* ssil) {
+  int32_t retcode = TSP_STATUS_OK;
+  int32_t i;
+
+  assert(ssil);
+
+  for (i=0;i<ssil->TSP_sample_symbol_info_list_t_len;++i) {
+    retcode=TSP_SSI_finalize(&(ssil->TSP_sample_symbol_info_list_t_val[i]));
+    /* Give-up on first error */
+    if (TSP_STATUS_OK!=retcode) {
+      break;
+    }
+  }
+
+  if (TSP_STATUS_OK==retcode) {
+    free(ssil->TSP_sample_symbol_info_list_t_val);
+
+    ssil->TSP_sample_symbol_info_list_t_val = NULL;
+    ssil->TSP_sample_symbol_info_list_t_len = 0;
+  }
+
+  return retcode;
+} /* end of TSP_SSIList_finalize */
+
+
+int32_t
+TSP_SSIList_copy(TSP_sample_symbol_info_list_t* dst_ssil, 
+		 const TSP_sample_symbol_info_list_t  src_ssil) {
+  int32_t retcode = TSP_STATUS_OK;
+  int i;
+
+  assert(dst_ssil);
+
+  if (0 == src_ssil.TSP_sample_symbol_info_list_t_len) {
+    /* Quick return nothing to copy from */
+    return retcode;
+  }
+
+  TSP_SSIList_finalize(dst_ssil);
+  TSP_SSIList_initialize(dst_ssil,src_ssil.TSP_sample_symbol_info_list_t_len);
+
+  /* loop over symbol_info to copy */
+  for (i=0;i<dst_ssil->TSP_sample_symbol_info_list_t_len;++i) {
+    retcode= TSP_SSI_copy(&(dst_ssil->TSP_sample_symbol_info_list_t_val[i]),
+			  src_ssil.TSP_sample_symbol_info_list_t_val[i]);
+    if (TSP_STATUS_OK!=retcode) {
+      break;
+    }
+  }
+
+  return retcode;
+} /* end of TSP_SSIList_copy */
+
+TSP_sample_symbol_info_t*
+TSP_SSIList_getSSI(TSP_sample_symbol_info_list_t ssil, uint32_t index) {
+  if ((index >= 0) &&
+      (index < ssil.TSP_sample_symbol_info_list_t_len)) {
+    return &(ssil.TSP_sample_symbol_info_list_t_val[index]);
+  } else {
+    return NULL;
+  }
+} /* end of TSP_SSIList_getSSI */
+
+uint32_t
+TSP_SSIList_getSize(const TSP_sample_symbol_info_list_t ssil) {
+  return ssil.TSP_sample_symbol_info_list_t_len;
+}
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_status.c tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_status.c
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_status.c	2007-04-26 19:51:30.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_status.c	2007-10-16 11:52:16.000000000 +0200
@@ -35,6 +35,7 @@
 -----------------------------------------------------------------------
  */
 #include <string.h>
+#include <sys/types.h>		 /* for types compatibility */
 
 #include <tsp_sys_headers.h>
 #include <tsp_abs_types.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/common/tsp_common_status.c~ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_status.c~
--- tsp-0.8.3-Source-Reference/src/core/common/tsp_common_status.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/common/tsp_common_status.c~	2007-04-26 19:51:30.000000000 +0200
@@ -0,0 +1,165 @@
+/*
+
+$Id: tsp_common_status.c,v 1.3 2007/04/26 17:51:30 deweerdt Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MER%CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Main implementation for the producer module
+
+-----------------------------------------------------------------------
+ */
+#include <string.h>
+
+#include <tsp_sys_headers.h>
+#include <tsp_abs_types.h>
+#include <tsp_datastruct.h>
+#include <tsp_simple_trace.h>
+#include <tsp_const_def.h>
+#include <tsp_common_macros.h>
+#define TSP_COMMON_STATUS_C
+#include <tsp_common_status.h>
+#ifdef WIN32
+    #include <stdio.h>
+    #define snprintf	(int) _snprintf
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
+#define TSP_STATUS_MSG_MAX_LENGTH 1024
+
+int32_t
+TSP_STATUS_print(FILE* fs, int32_t TSPStatus) {
+  char statusMsg[TSP_STATUS_MSG_MAX_LENGTH];
+  int32_t retcode = 0;
+
+  retcode = TSP_STATUS_sprint(statusMsg,TSP_STATUS_MSG_MAX_LENGTH,TSPStatus);
+  if (0==retcode) {
+    retcode = fprintf(fs,"%s",statusMsg);
+  }
+
+  return retcode;
+} /* end of TSP_STATUS_print */
+
+int32_t
+TSP_STATUS_sprint(char* buffer, int32_t buffer_len, int32_t TSPStatus) {
+  int32_t retcode = 0;
+  switch (TSPStatus) {
+  case TSP_STATUS_OK:
+    retcode = snprintf(buffer,buffer_len,"OK");
+    break;
+  case TSP_STATUS_NOK:
+    retcode = snprintf(buffer,buffer_len,"NOK (generic error)");
+    break;
+  case TSP_STATUS_ERROR_PROVIDER_UNREACHABLE:
+    retcode = snprintf(buffer,buffer_len,"TSP Provider unreachable or connection lost");
+    break;
+  case TSP_STATUS_ERROR_UNKNOWN:
+    retcode = snprintf(buffer,buffer_len,"Unknow Error");
+    break;
+  case TSP_STATUS_ERROR_SEE_STRING:
+    retcode = snprintf(buffer,buffer_len,"See Error String");
+    break;
+  case TSP_STATUS_ERROR_VERSION:
+    retcode = snprintf(buffer,buffer_len,"TSP Version Mismatch");
+    break;
+  case TSP_STATUS_ERROR_SYMBOLS:
+    retcode = snprintf(buffer,buffer_len,"Requested TSP Symbols may not be satisfied");
+    break;
+  case TSP_STATUS_ERROR_SYMBOL_FILTER:
+    retcode = snprintf(buffer,buffer_len,"Filter string or filter kind is invalid (TSP_REQUEST_FILTERED)");
+    break;
+  case TSP_STATUS_ERROR_NOT_SUPPORTED:
+    retcode = snprintf(buffer,buffer_len,"Requested feature Not Supported (provider specific)");
+    break;
+  case TSP_STATUS_ERROR_NOT_IMPLEMENTED:
+    retcode = snprintf(buffer,buffer_len,"Requested feature Not Implemented (provider specific)");
+    break;
+  case TSP_STATUS_ERROR_PGI_UNKNOWN:
+    retcode = snprintf(buffer,buffer_len,"Requested PGI does not exists");
+    break;
+  case TSP_STATUS_ERROR_ASYNC_READ_NOT_ALLOWED:
+    retcode = snprintf(buffer,buffer_len,"ASYNC Read not allowed (for this PGI/Provider)");
+    break;
+  case TSP_STATUS_ERROR_ASYNC_WRITE_NOT_ALLOWED:
+    retcode = snprintf(buffer,buffer_len,"ASYNC Write not allowed (for this PGI/Provider)");
+    break;
+  case TSP_STATUS_ERROR_ASYNC_READ_NOT_SUPPORTED:
+    retcode = snprintf(buffer,buffer_len,"ASYNC Read not supported by this Provider");
+    break;
+  case TSP_STATUS_ERROR_ASYNC_WRITE_NOT_SUPPORTED:
+    retcode = snprintf(buffer,buffer_len,"ASYNC Write not supported by this Provider");
+    break;
+  case TSP_STATUS_ERROR_MEMORY_ALLOCATION:
+    retcode = snprintf(buffer,buffer_len,"MEMORY allocation failed");
+    break;
+  case TSP_STATUS_ERROR_INVALID_CHANNEL_ID:
+    retcode = snprintf(buffer,buffer_len,"Channel Id is invalid");
+    break;
+  case TSP_STATUS_ERROR_NO_MORE_GLU:
+    retcode = snprintf(buffer,buffer_len,"Cannot instantiate more GLU (provider-side)");
+    break;
+  case TSP_STATUS_ERROR_NO_MORE_SESSION:
+    retcode = snprintf(buffer,buffer_len,"Maximum number of TSP session reached");
+    break;
+  case TSP_STATUS_ERROR_GLU_START:
+    retcode = snprintf(buffer,buffer_len,"Cannot start GLU (provider-side)");
+    break;
+  case TSP_STATUS_ERROR_GLU_INITIALIZE:
+    retcode = snprintf(buffer,buffer_len,"Cannot initialize GLU (provider-side)");
+    break;
+  case TSP_STATUS_ERROR_BAD_REQUEST_ORDER:
+    retcode = snprintf(buffer,buffer_len,"Bad TSP request ordering");
+    break;
+  case TSP_STATUS_ERROR_DATAPOOL_INSTANTIATE:
+    retcode = snprintf(buffer,buffer_len,"Cannot instantiate Datapool (provider-side)");
+    break;
+  case TSP_STATUS_ERROR_THREAD_CREATE:
+    retcode = snprintf(buffer,buffer_len,"Cannot create thread");
+    break;
+  case TSP_STATUS_ERROR_NOT_INITIALIZED:
+    retcode = snprintf(buffer,buffer_len,"TSP not initialized");
+    break;
+  case TSP_STATUS_ERROR_INVALID_REQUEST:
+    retcode = snprintf(buffer,buffer_len,"TSP request content is invalid");
+    break;
+  case TSP_STATUS_ERROR_EMPTY_REQUEST_SAMPLE:
+    retcode = snprintf(buffer,buffer_len,"0 symbol request sample");
+    break;
+  case TSP_STATUS_ERROR_CUSTOM_BEGIN:
+    /* 
+     * value greater than TSP_STATUS_ERROR_CUSTOM_BEGIN are custom TSP STATUS
+     * values that may be used by specific consumer or provider
+     */
+  default:
+    retcode = snprintf(buffer,buffer_len,"TSP unknown/unhandled/custom STATUS status <%d>",TSPStatus);
+    break;
+  }
+  return retcode;
+} /* end of TSP_STATUS_sprint */
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_datapool.c tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_datapool.c
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_datapool.c	2007-03-23 20:52:15.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_datapool.c	2007-10-29 10:48:18.000000000 +0100
@@ -43,6 +43,10 @@
     #include <assert.h>
 #endif
 
+#ifdef TSP_RTEMS
+# include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* _TSP_RTEMS_ */ 
+
 #include <tsp_sys_headers.h>
 #include <tsp_datapool.h>
 #include <tsp_datastruct.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_datapool.c~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_datapool.c~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_datapool.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_datapool.c~	2007-03-23 20:52:15.000000000 +0100
@@ -0,0 +1,275 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl/tsp_datapool.c,v 1.32 2007/03/23 19:52:15 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer: tsp@astrium.eads.net 
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Datapool implementation
+FIXME : the global/local datapool cases could have been avoided. Somehow plenty of code
+may be unified in this source .
+
+-----------------------------------------------------------------------
+ */
+
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
+#include <tsp_sys_headers.h>
+#include <tsp_datapool.h>
+#include <tsp_datastruct.h>
+#include <tsp_session.h>
+#include <tsp_time.h>
+#include <tsp_common.h>
+
+/* Poll time waiting for  consumer connection (us) */
+#define TSP_LOCAL_WORKER_CONNECTION_POLL_TIME ((int)(1e5))
+
+/* Data Poll period (us) */
+#define TSP_DATAPOOL_POLL_PERIOD ((int)(1e4))
+
+
+/*-----------------------------------------------------*/
+
+
+
+/*-----------------------------------------------------*/
+
+TSP_datapool_t X_global_datapool = {FALSE,FALSE,0,0,0};
+
+/*-----------------------------------------------------*/
+
+#define TSP_CHECK_PROVIDER_GLOBAL_INDEX(obj, index, ret) \
+{ \
+	if( (index) >= (obj).size ) \
+	{ \
+		STRACE_ERROR(("ERROR :-->OUT : provider_global_index %d does not exist !",(index))) \
+		return ret; \
+	} \
+}
+
+
+void 
+TSP_datapool_get_reverse_list (TSP_datapool_t* this, int *nb, int **list) {
+  assert(nb!=NULL);
+  assert(list!=NULL);
+  assert(this);
+  *nb = this->nb_wanted_items;
+  *list = this->reverse_index;
+}
+
+int 
+TSP_datapool_push_next_item(TSP_datapool_t* datapool, glu_item_t* item) {
+  assert(datapool);
+  memcpy((*datapool).items[item->provider_global_index].raw_value,
+	 item->raw_value,
+	 item->size);
+  return 0;
+} /* end of TSP_datapool_push_next_item */
+
+int 
+TSP_datapool_push_commit(TSP_datapool_t* datapool, time_stamp_t time_stamp, GLU_get_state_t state) {
+  assert(datapool);
+
+  /* Send end status message */
+  switch(state) {
+  case GLU_GET_NO_ITEM :
+      /* nothing to do */
+    break;
+    
+  case GLU_GET_NEW_ITEM :
+    /* Yep ! throw data to all clients */
+    /* For a global datapool, the thread must not end, even if a client is disconnected, so
+       we do not check any returned value from TSP_session_all_session_send_data */
+    TSP_session_all_session_send_data(time_stamp);		  
+    break;
+    
+  case GLU_GET_EOF :
+    TSP_session_all_session_send_msg_ctrl(TSP_MSG_CTRL_EOF);
+    STRACE_INFO(("GLU sent EOF"));
+    /* End of flow. Our datapool is dead */
+    datapool->terminated = TRUE;
+    break;
+    
+  case GLU_GET_RECONF :
+    TSP_session_all_session_send_msg_ctrl(TSP_MSG_CTRL_RECONF);
+    STRACE_INFO(("GLU sent RECONF"));
+    /* End of flow. Our datapool is dead */
+    datapool->terminated = TRUE;
+    break;
+    
+  case GLU_GET_DATA_LOST :
+    TSP_session_all_session_send_msg_ctrl(TSP_MSG_CTRL_GLU_DATA_LOST);
+    STRACE_INFO(("GLU sent DATA_LOST"));
+    break;
+    
+  default:
+    STRACE_ERROR(("?"));
+    assert(0);
+  }    
+  return 0;  
+} /* end of TSP_datapool_push_commit */
+
+int32_t 
+TSP_datapool_initialize(TSP_datapool_t* datapool, GLU_handle_t* glu) {
+	 
+  TSP_sample_symbol_info_list_t symbols;
+  int32_t i;
+  int32_t retcode = TSP_STATUS_OK;
+
+  assert(datapool);
+  assert(glu);
+	
+  /* Link datapool and glu */
+  datapool->h_glu = glu;   
+
+  glu->get_ssi_list(glu,&symbols);
+
+  /* Allocate datapool items */
+  datapool->size  = symbols.TSP_sample_symbol_info_list_t_len;
+  datapool->items = 
+    (TSP_datapool_item_t*)calloc(datapool->size, sizeof(TSP_datapool_item_t));
+  TSP_CHECK_ALLOC(datapool->items, TSP_STATUS_ERROR_MEMORY_ALLOCATION);
+
+  for(i=0;i<symbols.TSP_sample_symbol_info_list_t_len;++i) {
+   
+    /* 
+     * The raw_value should be able to hold the 
+     * value of the TSP symbol, if the symbol is an array
+     * then the raw_value hold ALL the values of the array
+     */ 
+    datapool->items[i].raw_value = 
+      calloc(symbols.TSP_sample_symbol_info_list_t_val[i].dimension,
+	     tsp_type_size[symbols.TSP_sample_symbol_info_list_t_val[i].type]);
+    TSP_CHECK_ALLOC(datapool->items[i].raw_value, TSP_STATUS_ERROR_MEMORY_ALLOCATION); 
+  }
+
+  /* Allocate PGI reverse index */
+  datapool->reverse_index = (int*)calloc(datapool->size, sizeof(int));
+  TSP_CHECK_ALLOC(datapool->reverse_index, TSP_STATUS_ERROR_MEMORY_ALLOCATION);
+  datapool->nb_wanted_items = 0;
+  datapool->initialized     = TRUE;
+  datapool->terminated      = FALSE;
+    
+  return retcode;
+} /* end of TSP_datapool_initialize */
+
+int32_t
+TSP_datapool_finalize(TSP_datapool_t* obj_datapool) {
+     free(obj_datapool->items);
+     obj_datapool->items = 0;
+     free(obj_datapool->reverse_index);
+     obj_datapool->reverse_index = 0;
+     obj_datapool->nb_wanted_items = 0;
+     return TSP_STATUS_OK;
+}
+
+void 
+TSP_datapool_delete(TSP_datapool_t** datapool) {
+
+   TSP_datapool_finalize(*datapool);
+   free(*datapool);
+   *datapool=NULL;
+} /* End of TSP_datapool_delete */
+
+
+TSP_datapool_t* 
+TSP_datapool_new(GLU_handle_t* h_glu) {
+  TSP_datapool_t* datapool;
+  assert(h_glu);
+     
+  datapool = (TSP_datapool_t*)calloc(1,sizeof(TSP_datapool_t));
+  TSP_CHECK_ALLOC(datapool, NULL);
+
+  TSP_datapool_initialize(datapool,h_glu);
+    
+  return datapool;
+} /* end of TSP_datapool_new */
+
+
+void* 
+TSP_datapool_get_symbol_value(TSP_datapool_t* datapool, int provider_global_index) {
+	
+  TSP_CHECK_PROVIDER_GLOBAL_INDEX(*datapool, provider_global_index, 0);
+
+  /* Someone will ask for this symbols */
+  if (datapool->items[provider_global_index].is_wanted == FALSE) {
+    datapool->items[provider_global_index].is_wanted = TRUE; 
+    datapool->reverse_index[datapool->nb_wanted_items++] = provider_global_index;
+  }
+  
+  /* 
+   * History; we add planned to 
+   * handle raw --> user calibration
+   * here this is NOT done for now
+   * FIXME: we should re-think about this.
+   */
+  return datapool->items[provider_global_index].raw_value;
+} /* End of TSP_datapool_get_symbol_value */
+
+
+TSP_datapool_t* 
+TSP_datapool_instantiate(GLU_handle_t* glu) {
+
+  assert(glu);
+
+  if (GLU_SERVER_TYPE_ACTIVE==glu->type) {
+    /* Act like a singleton. */ 
+    /* Was the datapool terminated ? */
+    if( TRUE == X_global_datapool.terminated ) {
+      /* Yes, clean up previous datapool */
+      TSP_datapool_finalize(&X_global_datapool);
+      /* Now, the datapool is not initialized anymore */
+      X_global_datapool.initialized = FALSE;
+    }
+    
+    /* Was the datapool initialized  ? */
+    if(FALSE == X_global_datapool.initialized) {
+      /* Now initialize */
+      TSP_datapool_initialize(&X_global_datapool,glu);
+    }
+  
+    /* link to provided GLU */
+    glu->datapool = &X_global_datapool;
+  } else {
+    /* PASSIVE GLU CASE */
+    /* 
+     * Do not re-instantiate datapool 
+     * (multi-consumer same datapool case)
+     */
+    if (NULL==glu->datapool) {
+      glu->datapool = TSP_datapool_new(glu);
+    }
+  }
+
+  return glu->datapool;
+} /* end of TSP_datapool_instantiate */
+
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_data_sender.c tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_data_sender.c
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_data_sender.c	2007-02-11 22:45:56.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_data_sender.c	2007-10-29 10:46:50.000000000 +0100
@@ -42,6 +42,11 @@
     #include <assert.h>
 #endif
 
+#ifdef TSP_RTEMS
+#include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#include <tsp_abs_types.h>
+#endif /* RTEMS */ 
+
 #include <tsp_sys_headers.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_data_sender.c~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_data_sender.c~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_data_sender.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_data_sender.c~	2007-10-16 14:31:39.000000000 +0200
@@ -0,0 +1,370 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl/tsp_data_sender.c,v 1.27 2007/02/11 21:45:56 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   :  Implementation for the functions used to encode and send the data
+stream  for the asked symbols
+
+-----------------------------------------------------------------------
+ */
+
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
+#ifdef RTEMS
+#include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* RTEMS */ 
+
+#include <tsp_sys_headers.h>
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+#include <tsp_data_sender.h>
+#include <tsp_datastruct.h>
+#include <tsp_group_algo.h>
+#include <tsp_group_algo_data.h>
+#include <tsp_stream_sender.h>
+#include <tsp_const_def.h>
+
+#define TSP_XDR_BUF_SIZE 8192
+
+struct TSP_struct_data_sender_t {
+  /** The stream sender object used to send data thrue the network*/
+  TSP_stream_sender_t stream_sender;  
+
+  /** do we use the fifo or a simple buffer ? */
+  int use_fifo;
+
+  /** FIFO used to send the data stream when there is no buffer (threaded send)*/
+  TSP_stream_sender_ringbuf_t* out_fifo;
+
+  /** Buffer used to create the data stream when there is no fifo*/
+  TSP_stream_sender_item_t* out_item;
+
+  /** Max buffer size available to send data */
+  int buffer_size;
+
+  /** flag that tells if data were lost for the consumer 'coz' the fifo was full */
+  int fifo_full;
+  
+};
+
+typedef struct TSP_struct_data_sender_t TSP_struct_data_sender_t;
+
+
+TSP_data_sender_t 
+TSP_data_sender_create(int fifo_size, uint32_t group_max_byte_size) {
+  
+  TSP_struct_data_sender_t* sender;
+  
+  sender = (TSP_struct_data_sender_t*)calloc(1, sizeof(TSP_struct_data_sender_t));
+  TSP_CHECK_ALLOC(sender, NULL);
+
+  /* init */
+  sender->fifo_full   = FALSE;
+  sender->buffer_size = TSP_DATA_STREAM_MAX_BUFFER_SIZE(group_max_byte_size);
+
+  STRACE_DEBUG(("Data Sender buffer size is: <%d> byte(s)",sender->buffer_size));
+  /* Create the sender stream with its fifo size*/
+  sender->stream_sender = (TSP_data_sender_t)TSP_stream_sender_create(fifo_size, sender->buffer_size);
+  if (sender->stream_sender) {      
+    /* Check if the user wants any fifo */
+    sender->use_fifo = fifo_size > 0 ? TRUE : FALSE ;
+    if (sender->use_fifo) {
+      sender->out_item = 0;
+      sender->out_fifo = TSP_stream_sender_get_ringbuf(sender->stream_sender);
+      assert(sender->out_fifo);
+    }
+    else {
+      sender->out_fifo = 0;
+      sender->out_item = TSP_stream_sender_get_buffer(sender->stream_sender);
+      assert(sender->out_item);      
+    }
+  }
+  else {
+    STRACE_ERROR(("Function TSP_stream_sender_create failed"));
+    free(sender);
+    sender = NULL;
+  }
+  return sender;
+} /* end of TSP_data_sender_create */
+
+void 
+TSP_data_sender_destroy(TSP_data_sender_t sender) {
+
+  TSP_struct_data_sender_t* data_sender = (TSP_struct_data_sender_t*)sender;
+  TSP_stream_sender_destroy(data_sender->stream_sender);
+  free(data_sender);
+}
+
+void 
+TSP_data_sender_stop(TSP_data_sender_t sender) {
+
+  TSP_struct_data_sender_t* data_sender = (TSP_struct_data_sender_t*)sender;
+  TSP_stream_sender_stop(data_sender->stream_sender);
+}
+
+
+static TSP_stream_sender_item_t* TSP_data_sender_get_out_item(TSP_struct_data_sender_t* data_sender)
+{
+
+  TSP_stream_sender_item_t* ret_item = 0;
+  if(data_sender->use_fifo)
+    {
+      /* Check if fifo was full last time */
+      if(!(data_sender->fifo_full))
+	{
+	  /* Was not full. We try to take an element */
+	  ret_item = RINGBUF_PTR_PUTBYADDR(data_sender->out_fifo);
+	  if(!ret_item)
+	    {
+	      /* Arg! It is is full now */
+	      data_sender->fifo_full = TRUE;
+	    }
+	}
+      else
+	{
+	  /* FIFO was full. We must wait for two available items :
+	     one for the error message, one for the next item */
+	  if( RINGBUF_PTR_ITEMS_LEFT(data_sender->out_fifo) > 2 )
+	    {
+
+	      /* not full anymore */
+	      data_sender->fifo_full = FALSE; 
+
+	      /* First, add the error message :  we do some recursive magic here ;),
+		 there must not be any infinite loop...*/
+	      TSP_data_sender_send_msg_ctrl(data_sender,  TSP_MSG_CTRL_CONSUMER_DATA_LOST);
+
+	      /* And now there must be one item left */
+	      ret_item = RINGBUF_PTR_PUTBYADDR(data_sender->out_fifo);
+	      assert(ret_item);
+	    }
+	  else
+	    {
+	      data_sender->fifo_full = TRUE;	  
+	    }
+	  
+	}
+    }
+  else  /* not ringbuffer, use direct buffer */
+    {
+      ret_item = data_sender->out_item;
+    }
+
+  return ret_item;
+}
+
+static int 
+TSP_data_sender_to_stream_sender(TSP_struct_data_sender_t* data_sender,
+				 TSP_stream_sender_item_t* tosend) {
+
+  /* First check for a valid connection */
+  int ret = TSP_stream_sender_is_connection_ok(data_sender->stream_sender);
+  if(ret) {
+    if (data_sender->use_fifo) {
+      /* we use a fifo */
+      RINGBUF_PTR_PUTBYADDR_COMMIT(data_sender->out_fifo);
+    }
+    else {            
+      /* 
+       * no fifo. send data now (SEND should block if socket buffer is full) 
+       * this should be the case for PASSIVE GLU.
+       */
+      if(!TSP_stream_sender_send(data_sender->stream_sender,
+				 TSP_STREAM_SENDER_ITEM_BUF(tosend),
+				 tosend->len) ) {
+	  STRACE_WARNING(("Function TSP_stream_sender_send failed "));
+	  ret = FALSE;
+	}  
+    }
+  }
+  return ret;
+} /* end of TSP_data_sender_to_stream_sender */
+
+
+/**
+ * Send message control.
+ * @param sender sender used to send the data
+ * The special group ID groupe EOF indicate the End of Stream for the consumer
+ * @param msg_ctrl The message that must be sent
+ * @return TRUE = OK
+ */
+int TSP_data_sender_send_msg_ctrl(TSP_data_sender_t sender, TSP_msg_ctrl_t msg_ctrl)
+{
+  TSP_struct_data_sender_t* data_sender = (TSP_struct_data_sender_t*)sender;
+  int* buf_int = 0;
+  int tsp_reserved_group;
+  int ret = TRUE;
+  TSP_stream_sender_item_t* tosend;
+
+  /*---------------------------*/
+  /* Traduce enum */
+  switch(msg_ctrl)
+    {
+    case TSP_MSG_CTRL_EOF :
+      tsp_reserved_group = TSP_RESERVED_GROUP_EOF;
+      break;
+    case TSP_MSG_CTRL_RECONF :
+      tsp_reserved_group = TSP_RESERVED_GROUP_RECONF;
+      break;
+    case TSP_MSG_CTRL_GLU_DATA_LOST :
+      tsp_reserved_group = TSP_RESERVED_GROUP_GLU_DATA_LOST;
+      break;
+    case TSP_MSG_CTRL_CONSUMER_DATA_LOST :
+      tsp_reserved_group = TSP_RESERVED_GROUP_CONSUMER_DATA_LOST;
+      break;
+    default:
+      STRACE_ERROR(("We should not be there..."));
+      assert(0);
+      return FALSE;
+    }
+
+  /* get out buffer if it is available */
+  tosend = TSP_data_sender_get_out_item(data_sender);
+    
+  /* If it is not available, try net time */
+
+  /* FIXME : uses packet format as described in the protocol spec */
+  if(tosend)
+    {
+      buf_int = (int*)(TSP_STREAM_SENDER_ITEM_BUF(tosend));
+      buf_int[0] = TSP_ENCODE_INT(-1); /* Dummy time stamp */
+      buf_int[1] = TSP_ENCODE_INT(tsp_reserved_group);
+  
+      tosend->len = sizeof(int)*2;
+
+      /* We send it */
+      ret = TSP_data_sender_to_stream_sender(data_sender, tosend);
+    }
+  
+  return ret; 
+}
+
+/*
+ * For a given time stamp, send data to a client.
+ * @param _sender sender used to send the data
+ * @param _groups groups used to calculate the data
+ * @param time_stamp sent with the data
+ * @return TRUE = OK
+ */
+int 
+TSP_data_sender_send(TSP_data_sender_t _sender, TSP_groups_t _groups, time_stamp_t time_stamp) {    
+
+  TSP_struct_data_sender_t* data_sender = (TSP_struct_data_sender_t*)_sender;
+  TSP_algo_table_t* groups_table = (TSP_algo_table_t*) _groups;
+
+  char* buf_main;
+  int* buf_int;
+  char* buf_char;    
+  TSP_algo_group_t* group;
+  int group_index;
+  int i;
+  int ret = TRUE;
+  int size;
+  TSP_stream_sender_item_t* tosend;
+
+  /* 
+   * Time stamp is the TSP time stamp 
+   * cycle counter
+   * so that the TSP group index 
+   * whose data is to be sent at this "times_tamp"  
+   * only depends on the current time stamp.
+   */
+  group_index = time_stamp % groups_table->table_len;
+  group       = &(groups_table->groups[group_index]);
+
+  /* get out buffer if it is available */
+  tosend = TSP_data_sender_get_out_item(data_sender);
+    
+  /* 
+   * If it is not available, try next time 
+   * FIXME erk: why? could we just skip a cycle?
+   */
+
+  /* FIXME : uses packet format as described in the protocol spec */
+  if (tosend) {
+      buf_main = TSP_STREAM_SENDER_ITEM_BUF(tosend);
+      buf_int = (int*)(buf_main);
+      *( buf_int++ ) = TSP_ENCODE_INT(time_stamp);
+      *( buf_int++ ) = TSP_ENCODE_INT(group_index);
+      buf_char = (char*)(buf_int);
+  
+      if( group->group_len > 0) {
+	for ( i = 0 ; i < group->group_len ; i++) {
+	  /* 
+	   * FIXME : we cannot STRACE_DEBUG value simply due
+	   * to multi-type handling 
+	   */
+	  /* STRACE_DEBUG(("Gr=%d V=%f", group_index, *(double*)(group->items[i].data))); */
+	  STRACE_DEBUG(("Gr=%d Ne=%d", group_index, group->items[i].nelem));
+	  
+	  /* Call encode function */
+	  assert(group->items[i].data_encoder);
+	  size = (group->items[i].data_encoder)(group->items[i].data,
+						group->items[i].nelem,
+						buf_char,
+						data_sender->buffer_size - ( buf_char - buf_main) );
+	  if ( 0 == size ) {
+	    STRACE_ERROR(("data_encoder failed"));	    
+	    ret = FALSE;
+	    break;
+	  }
+	  
+	  buf_char += size;
+	  
+	} /*for*/
+	
+	  /* We send it */
+	tosend->len = buf_char - buf_main;
+	ret = TSP_data_sender_to_stream_sender(data_sender, tosend);
+      }
+  }
+  
+  return ret;        
+} /* TSP_data_sender_send */
+
+const char* TSP_data_sender_get_data_address_string(TSP_data_sender_t sender)
+{
+  TSP_struct_data_sender_t* data_sender = (TSP_struct_data_sender_t*)sender;
+  return TSP_stream_sender_get_data_address_string(data_sender->stream_sender);
+}
+
+
+
+int TSP_data_sender_is_consumer_connected(TSP_data_sender_t sender)
+{
+   TSP_struct_data_sender_t* data_sender = (TSP_struct_data_sender_t*)sender;
+
+   return TSP_stream_sender_is_client_connected(data_sender->stream_sender);
+}
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_default_glu.c tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_default_glu.c
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_default_glu.c	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_default_glu.c	2007-10-29 10:47:59.000000000 +0100
@@ -42,6 +42,11 @@
 #else
     #include <assert.h>
 #endif
+
+#ifdef TSP_RTEMS
+# include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* _TSP_RTEMS_ */ 
+
 #include <stdlib.h>
 #include <pthread.h>
 
@@ -147,7 +152,7 @@
 
 GLU_handle_t* 
 GLU_get_instance_default(GLU_handle_t* this,
-			 int custom_argc,
+			 int32_t custom_argc,
 			 char* custom_argv[],
 			 char** error_info) {
   
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_default_glu.c~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_default_glu.c~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_default_glu.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_default_glu.c~	2007-10-16 14:44:49.000000000 +0200
@@ -0,0 +1,450 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl/tsp_default_glu.c,v 1.21 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD,Robert PAGNOT and Arnaud MORVAN
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium.eads.net
+Component : Provider / GLU server
+
+-----------------------------------------------------------------------
+
+Purpose   : Implementation for the object GLU_handle_t
+            which contains some basic GLU informations and default
+            function pointer values.
+
+-----------------------------------------------------------------------
+ */
+
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
+#ifdef RTEMS
+#include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* RTEMS */ 
+
+#include <stdlib.h>
+#include <pthread.h>
+
+#include <tsp_glu.h>
+#include <tsp_common.h>
+#include <tsp_sys_headers.h>
+#include <tsp_default_glu.h>
+
+
+int32_t GLU_handle_create(GLU_handle_t** glu, const char* name, const GLU_server_type_t type, const double base_frequency) {
+  int32_t retcode = FALSE;
+
+  /* allocate structure */
+  *glu = calloc(1,sizeof(GLU_handle_t));
+  assert(*glu);
+  /* set up field values */
+#if defined (WIN32)
+  /* structure pthread_t different under Windows */
+  (*glu)->tid.p           = 0;
+#else
+  (*glu)->tid             = 0;
+#endif
+  (*glu)->name            = strdup(name);
+  (*glu)->type            = type;
+  (*glu)->base_frequency  = base_frequency;
+  (*glu)->nb_max_consumer = TSP_MAX_CLIENT_NUMBER;
+  (*glu)->nb_connected_consumer = 0;
+  (*glu)->private_data    = NULL;
+  (*glu)->datapool        = NULL;
+  /* provides default method implementation  and NULLIFY others */
+  (*glu)->get_name            = &GLU_get_server_name_default;
+  (*glu)->get_type            = &GLU_get_server_type_default;
+  (*glu)->get_base_frequency  = &GLU_get_base_frequency_default;
+  (*glu)->get_nb_max_consumer = &GLU_get_nb_max_consumer_default;
+
+  if (GLU_SERVER_TYPE_ACTIVE==type) {
+    (*glu)->get_instance = &GLU_get_instance_default;
+    retcode = TRUE;
+  } else if (GLU_SERVER_TYPE_PASSIVE==type) {
+    /* we may not provide default get_instance for passive GLU */
+    (*glu)->get_instance = NULL;    
+    retcode = TRUE;
+  } else {
+    /* 
+     * note that we have been providing an invalid type... 
+     * retcode will be false.
+     */    
+  }
+
+  /*
+   * initialize, run and get_ssi_list do not have default
+   * start and get_pgi does.
+   */
+  (*glu)->start                 = &GLU_start_default;
+  (*glu)->get_pgi               = &GLU_get_pgi_default;
+  (*glu)->get_filtered_ssi_list = &GLU_get_filtered_ssi_list_default;
+  (*glu)->get_ssi_list_fromPGI  = &GLU_get_ssi_list_fromPGI_default;
+  (*glu)->get_ssei_list_fromPGI = &GLU_get_ssei_list_fromPGI_default;
+  (*glu)->get_nb_symbols        = &GLU_get_nb_symbols_default;
+  (*glu)->async_read            = &GLU_async_sample_read_default;
+  (*glu)->async_write           = &GLU_async_sample_write_default;
+  
+  return retcode;
+} /* end if GLU_handle_create */
+
+int32_t GLU_handle_destroy(GLU_handle_t** glu) {
+  int32_t retcode = FALSE;
+  
+  free((*glu)->name);
+  free((*glu));
+  *glu = NULL;
+  retcode = TRUE;
+  return retcode;
+} /* end if GLU_handle_destroy */
+
+int32_t 
+GLU_handle_check(GLU_handle_t* glu) {
+  return TSP_STATUS_OK;
+}
+
+
+/* ====== You'll find hereafter some default implementation GLU methods ====== */
+
+char* 
+GLU_get_server_name_default(struct GLU_handle_t* this) {
+  return this->name;
+}
+
+GLU_server_type_t 
+GLU_get_server_type_default(struct GLU_handle_t* this) {
+  return this->type;
+} /* end of GLU_get_server_type_default */
+
+double 
+GLU_get_base_frequency_default(struct GLU_handle_t* this) {
+  return this->base_frequency;
+} /* end of GLU_get_base_frequency_default */
+
+int32_t
+GLU_get_nb_max_consumer_default(struct GLU_handle_t* this) {
+  return this->nb_max_consumer;
+} /* end of GLU_get_nb_max_consumer_default */
+
+GLU_handle_t* 
+GLU_get_instance_default(GLU_handle_t* this,
+			 int custom_argc,
+			 char* custom_argv[],
+			 char** error_info) {
+  
+  if (GLU_SERVER_TYPE_ACTIVE == (this->type)) {
+    return this;
+  } else {
+    return NULL;
+  }
+} /* end of GLU_get_instance_default */
+
+
+int32_t
+GLU_start_default(GLU_handle_t* this) {
+#if defined (WIN32)
+  /* structure pthread_t different under Windows */
+  if (0==this->tid.p) {
+#else
+  if (0==this->tid) {
+#endif
+    return pthread_create(&(this->tid), NULL, this->run, this); 
+  } else {
+    return 0;
+  }
+} /* GLU_start_default */
+
+int32_t
+GLU_get_pgi_default(GLU_handle_t* this, TSP_sample_symbol_info_list_t* symbol_list, int* pg_indexes) {
+  int retcode = TRUE;
+  TSP_sample_symbol_info_list_t complete_symbol_list;
+  TSP_sample_symbol_info_t* compared=NULL;
+  int i;
+  int j;
+
+  this->get_ssi_list(this,&complete_symbol_list);
+    
+  /* now do the infamous double search loop */
+  /* For each requested symbols, check by name, and find the provider global index */
+  for( i = 0 ; i < symbol_list->TSP_sample_symbol_info_list_t_len ; i++) {
+    int found = FALSE;
+    TSP_sample_symbol_info_t* looked_for = &(symbol_list->TSP_sample_symbol_info_list_t_val[i]);
+    
+    for( j = 0 ; j < complete_symbol_list.TSP_sample_symbol_info_list_t_len ; j++) {
+      compared = &(complete_symbol_list.TSP_sample_symbol_info_list_t_val[j]);
+      if(!strcmp(looked_for->name, compared->name)) {
+	found = TRUE;
+	looked_for->provider_global_index = compared->provider_global_index;
+	pg_indexes[i]=looked_for->provider_global_index;
+      }
+      if(found) {
+	STRACE_INFO(("Found symbol <%s> pgi=<%d> ",  looked_for->name, looked_for->provider_global_index));	   
+	break;
+      }
+      
+    }
+    if(!found) {
+      retcode = FALSE;
+      pg_indexes[i]= -1;
+      STRACE_INFO(("Unable to find symbol '%s'",  looked_for->name));	   
+    }
+    
+    found = FALSE;     
+    found = GLU_validate_sample_default(looked_for,compared,&pg_indexes[i]);
+    
+    if(!found) {
+      retcode = FALSE;
+      STRACE_INFO(("No good data in symbol '%s'",  looked_for->name));	   
+    }
+  }
+  return retcode;
+} /* end of GLU_get_pgi_default */
+
+
+int32_t  
+GLU_get_nb_symbols_default(GLU_handle_t* this) {
+  int retval = 0;
+  TSP_sample_symbol_info_list_t complete_symbol_list;
+  this->get_ssi_list(this,&complete_symbol_list);
+
+  retval = complete_symbol_list.TSP_sample_symbol_info_list_t_len;
+  return retval;
+} /* end of GLU_get_nb_symbols_default */
+
+int32_t 
+GLU_get_filtered_ssi_list_default(GLU_handle_t* this, int filter_kind, char* filter_string, TSP_answer_sample_t* answer_sample) {
+
+  TSP_sample_symbol_info_list_t complete_symbol_list;
+  int32_t nb_match;
+  int32_t i;
+  int32_t* matched_index;
+
+  /* 
+   * Get the complete list of symbols
+   * this is sub-optimal but this GLU-side operation
+   * should be made as a zero copy operation
+   * with NO network transfert.
+   * We will return a filtered list in answer_sample->symbols 
+   * that will be transmitted to provider lib and then to consumer
+   * side accross network.
+   */
+  this->get_ssi_list(this,&complete_symbol_list);
+
+  switch (filter_kind) {
+  case TSP_FILTER_SIMPLE:
+    STRACE_INFO(("Requested filter kind <%d>, filter string = <%s>",filter_kind,filter_string));
+    /* first loop to count matching symbols */
+    nb_match      = 0;
+    matched_index = calloc(complete_symbol_list.TSP_sample_symbol_info_list_t_len,sizeof(int32_t));
+    for (i=0;i<complete_symbol_list.TSP_sample_symbol_info_list_t_len;i++) {
+      if (NULL != strstr(complete_symbol_list.TSP_sample_symbol_info_list_t_val[i].name,filter_string)) {
+	matched_index[nb_match] = i; 
+	nb_match++;	
+      }
+    }
+    STRACE_INFO(("Nb Match(es) is <%d>",nb_match));
+    /* second loop if nb_match > 0 */
+    if (nb_match>0) {
+      TSP_SSIList_finalize(&(answer_sample->symbols));
+      TSP_SSIList_initialize(&(answer_sample->symbols),nb_match);
+      for (i=0;i<nb_match;i++) {
+	STRACE_DEBUG(("Adding <%s> to answer_sample...",complete_symbol_list.TSP_sample_symbol_info_list_t_val[matched_index[i]].name));
+	TSP_SSI_copy(&(answer_sample->symbols.TSP_sample_symbol_info_list_t_val[i]),
+		     complete_symbol_list.TSP_sample_symbol_info_list_t_val[matched_index[i]]);
+      }
+    }
+    free(matched_index);
+    answer_sample->status = TSP_STATUS_OK;
+    break;
+  case TSP_FILTER_REGEX:
+  case TSP_FILTER_XPATH:
+  case TSP_FILTER_SQL:
+    answer_sample->status = TSP_STATUS_ERROR_NOT_SUPPORTED;
+  default:
+    answer_sample->status = TSP_STATUS_ERROR_SYMBOL_FILTER;
+    break;
+  } /* end switch filter_kind */
+  return -1;
+}
+
+int32_t
+GLU_get_ssi_list_fromPGI_default(struct GLU_handle_t* this, 
+				 int32_t* pgis, int32_t pgis_len, 
+				 TSP_sample_symbol_info_list_t* SSI_list) {
+  /* FIXME */
+  int32_t i,ret;
+  TSP_sample_symbol_info_list_t complete_symbol_list; 
+ 
+  this->get_ssi_list(this,&complete_symbol_list);
+  ret=TSP_STATUS_OK;
+
+  /* Store all global indexes into list including NOT FOUND ones */
+  for ( i=0 ; i < pgis_len;++i) {
+    
+    if(-1!=pgis[i]) {
+      TSP_SSI_copy(&(SSI_list->TSP_sample_symbol_info_list_t_val[i]), 
+		   complete_symbol_list.TSP_sample_symbol_info_list_t_val[pgis[i]]);
+      
+    }
+    else {
+      SSI_list->TSP_sample_symbol_info_list_t_val[i].provider_global_index=-1;      
+      STRACE_INFO(("Unable to find symbol '%s'",  SSI_list->TSP_sample_symbol_info_list_t_val[i].name));      
+      ret=TSP_STATUS_ERROR_SYMBOLS;      
+    }
+  }
+  return  ret;
+} /* end of GLU_get_ssi_list_fromPGI_default */
+
+int32_t
+GLU_get_ssei_list_fromPGI_default(struct GLU_handle_t* this, 
+				  int32_t* pgis, int32_t pgis_len, 
+				  TSP_sample_symbol_extended_info_list_t* SSEI_list) {
+
+  int32_t i,ret;
+  ret=TSP_STATUS_OK;
+
+  /* Store all global indexes into list including NOT FOUND ones */
+  for ( i=0 ; i < pgis_len;++i) {
+    
+    if (-1!=pgis[i]) {
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].provider_global_index=pgis[i]; 
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_len=0;
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val=NULL;
+    } else {
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].provider_global_index=-1;      
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_len=0;
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val=NULL;
+      ret=TSP_STATUS_ERROR_PGI_UNKNOWN;      
+    }
+  } /*end for*/
+  return  ret;
+
+} /* end of GLU_get_ssei_list_fromPGI_default */
+
+int32_t
+GLU_async_sample_read_default(struct GLU_handle_t* this, 
+			      int32_t pgi, 
+			      void* value_ptr, uint32_t* value_size) {
+  /* default GLU does not authorize async read for any symbol */  
+  return TSP_STATUS_ERROR_ASYNC_READ_NOT_SUPPORTED;
+} /* end of GLU_async_sample_read_default */
+
+int32_t
+GLU_async_sample_write_default(struct GLU_handle_t* this, 
+			       int pgi, 
+			       void* value_ptr, uint32_t value_size) {
+  /* default GLU does not authorize async write for any symbol */
+  return TSP_STATUS_ERROR_ASYNC_WRITE_NOT_SUPPORTED;
+} /* end of GLU_async_sample_write_default */
+
+
+int32_t
+GLU_validate_sample_default( TSP_sample_symbol_info_t* looked_for, 
+			     TSP_sample_symbol_info_t* compared,
+			     int* pg_indexes){
+
+  /* Quick return if symbol is already not found */
+  if (-1 == *pg_indexes) {
+    looked_for->provider_global_index = *pg_indexes; 
+    return FALSE;
+  }
+
+  /* validate period and phase range */	   
+  if(looked_for->period < 1) 
+  {
+    *pg_indexes=-1;
+    STRACE_DEBUG(("Invalid period"));
+    return FALSE;
+  }
+
+  if(looked_for->phase < 0) 
+  {
+    *pg_indexes=-1;
+    STRACE_DEBUG(("Invalid phase"));
+    return FALSE;
+  }
+	  
+      		     
+ if(looked_for->type != TSP_TYPE_UNKNOWN)
+ {
+    if(looked_for->type != compared->type)
+    {
+      *pg_indexes=-1;
+       STRACE_DEBUG(("Invalid type"));
+      return FALSE;
+
+    }
+ }
+ else
+ {
+   looked_for->type = compared->type;
+
+ }
+
+ if(looked_for->offset != 0)
+ {	    
+    if(looked_for->offset >= compared->dimension)
+    {
+      *pg_indexes=-1;
+      STRACE_DEBUG(("Invalid offset"));
+      return FALSE;
+    }
+ }
+
+ if(looked_for->nelem != 0)
+ {
+    if((looked_for->offset + looked_for->nelem - 1) >= compared->dimension)
+    {
+      *pg_indexes=-1;
+      STRACE_DEBUG(("Invalid nelem"));
+      return FALSE;
+    }
+ }
+ else
+ {
+   looked_for->nelem =compared->dimension;
+ }
+
+
+ if(looked_for->dimension != 0)
+ {
+    if(looked_for->dimension != compared->dimension)
+    {
+      *pg_indexes=-1;
+      STRACE_DEBUG(("Invalid dimension"));
+      return FALSE;
+    }
+ }
+ else
+ {
+   looked_for->dimension =compared->dimension;
+ }
+
+ /* update PGI after validation */
+ looked_for->provider_global_index = *pg_indexes; 
+ return TRUE;
+} 
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_default_glu.h tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_default_glu.h
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_default_glu.h	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_default_glu.h	2007-10-22 11:06:09.000000000 +0200
@@ -109,7 +109,7 @@
  */ 
 GLU_handle_t* 
 GLU_get_instance_default(GLU_handle_t* cthis,
-			 int custom_argc,
+			 int32_t custom_argc,
 			 char* custom_argv[],
 			 char** error_info);
 
@@ -135,19 +135,29 @@
 				  int filter_kind, char* filter_string, 
 				  TSP_answer_sample_t* answer_sample);
 
-int32_t
+/*int32_t
 GLU_get_ssi_list_fromPGI_default(struct GLU_handle_t* cthis, 
 				 int* pgis, int pgis_len, 
-				 TSP_sample_symbol_info_list_t* SSI_list);
-
+				 TSP_sample_symbol_info_list_t* SSI_list);*/
 int32_t
+GLU_get_ssi_list_fromPGI_default(struct GLU_handle_t* this, 
+				 int32_t* pgis, int32_t pgis_len, 
+				 TSP_sample_symbol_info_list_t* SSI_list);
+/*int32_t
 GLU_get_ssei_list_fromPGI_default(struct GLU_handle_t* cthis, 
 				  int* pgis, int pgis_len, 
-  				  TSP_sample_symbol_extended_info_list_t* SSEI_list);
-
+  				  TSP_sample_symbol_extended_info_list_t* SSEI_list);*/
 int32_t
+GLU_get_ssei_list_fromPGI_default(struct GLU_handle_t* this, 
+				  int32_t* pgis, int32_t pgis_len, 
+				  TSP_sample_symbol_extended_info_list_t* SSEI_list);
+/*int32_t
 GLU_async_sample_read_default(struct GLU_handle_t* cthis, 
 			      int pgi, 
+			      void* value_ptr, uint32_t* value_size);*/
+int32_t
+GLU_async_sample_read_default(struct GLU_handle_t* this, 
+			      int32_t pgi, 
 			      void* value_ptr, uint32_t* value_size);
 
 int32_t
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_default_glu.h~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_default_glu.h~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_default_glu.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_default_glu.h~	2007-10-17 10:48:42.000000000 +0200
@@ -0,0 +1,185 @@
+/*
+
+$Id: tsp_default_glu.h,v 1.8 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD,Robert PAGNOT and Arnaud MORVAN
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer: tsp@astrium.eads.net
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Interface for the glue server : the data producer
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef _TSP_DEFAULT_GLU_H
+#define _TSP_DEFAULT_GLU_H
+
+#include <tsp_glu.h>
+/**
+ * @defgroup TSP_DefaultGLU GLU Default Instance
+ * @ingroup TSP_GLULib
+ * The default GLU API implements
+ * default function that are suitable for a 'simple'
+ * GLU object.
+ * @{
+ */
+
+BEGIN_C_DECLS
+
+/** 
+ * Default GLU server name.
+ * @param cthis the GLU object
+ * @return GLU name.
+ */
+char* GLU_get_server_name_default(GLU_handle_t* cthis);
+
+/**
+ * Default GLU server type.
+ * @param[in] cthis the GLU object
+ * @return GLU server type.
+ */
+GLU_server_type_t GLU_get_server_type_default(GLU_handle_t* cthis);
+
+/**
+ * Default GLU base frequency.
+ * @param[in] cthis the GLU object
+ * @return GLU base frequency (Hz)
+ */
+double GLU_get_base_frequency_default(GLU_handle_t* cthis);
+
+int32_t 
+GLU_get_nb_max_consumer_default(struct GLU_handle_t* cthis);
+
+/**
+ * Default GLU start.
+ * @param[in] cthis the GLU object
+ * @return true or false
+ */
+int32_t 
+GLU_start_default(GLU_handle_t* cthis);
+
+/** 
+ * Default GLU_get_pgi.
+ * The default implementation use the mandatory GLU_get_sample_symbol_info_list
+ * and does a linear search in it.
+ * @param[in] cthis the GLU object 
+ * @param[in] symbol_list the symbol list to validate
+ * @param[out] pg_indexes array containing corresponding provider global indexes or -1 if not found 
+ * @return TRUE if all symbol found, else return FALSE 
+ */
+int32_t
+GLU_get_pgi_default(GLU_handle_t* cthis, 
+		    TSP_sample_symbol_info_list_t* symbol_list, 
+		    int* pg_indexes);
+
+/**
+ * Default GLU_get_instance.
+ * The default implementation is only valid for an ACTIVE GLU.
+ * In this case this function always return this.
+ * PASSIVE GLU should reimplement this function.
+ * @param[in,out] cthis  the GLU object
+ * @param[in] custom_argc
+ * @param[in] custom_argv
+ * @param[in,out] error_info
+ * @return the GLU handle  
+ */ 
+GLU_handle_t* 
+GLU_get_instance_default(GLU_handle_t* cthis,
+			 int custom_argc,
+			 char* custom_argv[],
+			 char** error_info);
+
+/**
+ * Return the number of (static) available symbols.
+ * @param[in] cthis the GLU object
+ * @return the number of (static) available symbols.
+ */
+int32_t
+GLU_get_nb_symbols_default(GLU_handle_t* cthis);
+
+/**
+ * Return the filtered list of sample symbols.
+ * @param[in] cthis the GLU object
+ * @param[in] filter_kind the filter kind
+ * @param[in] filter_string the filter string
+ * @param[out] answer_sample the Answer Sample containing the list of symbols
+ *             matching specified filter.
+ * @return the number of (static) available symbols.
+ */
+int32_t
+GLU_get_filtered_ssi_list_default(GLU_handle_t* cthis, 
+				  int filter_kind, char* filter_string, 
+				  TSP_answer_sample_t* answer_sample);
+
+/*int32_t
+GLU_get_ssi_list_fromPGI_default(struct GLU_handle_t* cthis, 
+				 int* pgis, int pgis_len, 
+				 TSP_sample_symbol_info_list_t* SSI_list);*/
+int32_t
+GLU_get_ssi_list_fromPGI_default(struct GLU_handle_t* this, 
+				 int32_t* pgis, int32_t pgis_len, 
+				 TSP_sample_symbol_info_list_t* SSI_list);
+/*int32_t
+GLU_get_ssei_list_fromPGI_default(struct GLU_handle_t* cthis, 
+				  int* pgis, int pgis_len, 
+  				  TSP_sample_symbol_extended_info_list_t* SSEI_list);*/
+int32_t
+GLU_get_ssei_list_fromPGI_default(struct GLU_handle_t* this, 
+				  int32_t* pgis, int32_t pgis_len, 
+				  TSP_sample_symbol_extended_info_list_t* SSEI_list);
+/*int32_t
+GLU_async_sample_read_default(struct GLU_handle_t* cthis, 
+			      int pgi, 
+			      void* value_ptr, uint32_t* value_size);*/
+int32_t
+GLU_async_sample_read_default(struct GLU_handle_t* this, 
+			      int32_t pgi, 
+			      void* value_ptr, uint32_t* value_size);
+
+int32_t
+GLU_async_sample_write_default(struct GLU_handle_t* cthis, 
+			       int pgi, 
+			       void* value_ptr, uint32_t value_size);
+
+/**
+ * Test if the asked symbol is the same symbol of the complete symbol list.
+ * @param[in] looked_for asked symbol
+ * @param[in] compared symbol of the complete list
+ * @param[out] pg_indexes provider global index (-1 if symbol is NOK)
+ *             matching specified filter.
+ * @return true if symbol is correct.
+ */
+int32_t
+GLU_validate_sample_default( TSP_sample_symbol_info_t* looked_for, 
+			     TSP_sample_symbol_info_t* compared,
+			     int* pg_indexes);
+
+/** @} */
+
+END_C_DECLS
+
+#endif /* _TSP_DEFAULT_GLU_H */
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_filter_symbol.c tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_filter_symbol.c
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_filter_symbol.c	2006-06-28 14:59:04.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_filter_symbol.c	2007-10-29 10:48:52.000000000 +0100
@@ -35,6 +35,10 @@
 -----------------------------------------------------------------------
  */
 
+#ifdef TSP_RTEMS
+# include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* _TSP_RTEMS_ */ 
+
 #include <tsp_sys_headers.h>
 #include <tsp_filter_symbol.h>
 #include <tsp_session.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_filter_symbol.c~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_filter_symbol.c~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_filter_symbol.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_filter_symbol.c~	2007-10-16 14:31:29.000000000 +0200
@@ -0,0 +1,72 @@
+/*
+
+$Id: tsp_filter_symbol.c,v 1.3 2006/06/28 12:59:04 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Symbol filtering module
+
+-----------------------------------------------------------------------
+ */
+
+#ifdef RTEMS
+#include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* RTEMS */ 
+
+#include <tsp_sys_headers.h>
+#include <tsp_filter_symbol.h>
+#include <tsp_session.h>
+#include <tsp_common.h>
+
+void TSP_filter_symbol_none(TSP_request_information_t* req_info,
+			    char* filter_string,
+			    TSP_answer_sample_t* ans_sample) {
+  if(TSP_session_get_sample_symbol_info_list_by_channel(req_info->channel_id,
+							&(ans_sample->symbols))) {
+    ans_sample->status = TSP_STATUS_OK;
+  } else {
+    ans_sample->status = TSP_STATUS_ERROR_SYMBOLS;
+  }
+
+}
+
+void TSP_filter_symbol_minimal(TSP_request_information_t* req_info,
+			       char* filter_string,
+			       TSP_answer_sample_t* ans_sample) {
+  
+  ans_sample->status = TSP_STATUS_ERROR_NOT_IMPLEMENTED;
+  if (0==strncmp(filter_string,MINIMAL_STRING,strlen(MINIMAL_STRING))) {
+    /* nothing to do for MINIMAL */
+    ans_sample->status = TSP_STATUS_OK;
+  } else {
+    ans_sample->status = TSP_STATUS_ERROR_SYMBOL_FILTER;
+  }
+}
+
+
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_group_algo.c tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_group_algo.c
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_group_algo.c	2007-02-11 22:45:56.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_group_algo.c	2007-10-16 14:19:39.000000000 +0200
@@ -38,6 +38,8 @@
  */
 
 #include <string.h>
+#include <sys/types.h>		 /* for types compatibility with RTEMS*/
+
 #ifdef WIN32
     #define assert(exp)     ((void)0)
 #else
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_group_algo.c~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_group_algo.c~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_group_algo.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_group_algo.c~	2007-10-16 14:19:24.000000000 +0200
@@ -0,0 +1,378 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl/tsp_group_algo.c,v 1.23 2007/02/11 21:45:56 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD, Robert PAGNOT and Arnaud MORVAN
+
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Implementation for the function used to calculate
+and use groups
+
+-----------------------------------------------------------------------
+ */
+
+#include <string.h>
+#include <sys/types.h>		 /* for types compatibility */
+
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+#include "tsp_sys_headers.h"
+
+#include "tsp_group_algo.h"
+#include "tsp_group_algo_data.h"
+
+#include "tsp_datapool.h"
+#include "tsp_data_sender.h"
+#include <tsp_encoder.h>
+#include <tsp_decoder.h>
+
+/** pgcd will be equal to the GCD od n1 and n2 */
+#define PGCD(n1, n2, pgcd) \
+{ \
+    int ln2 = n2; \
+    pgcd = n1; \
+    if ( pgcd != ln2 ) \
+        {for(;pgcd != ln2; (pgcd > ln2) ? (pgcd -= ln2) : (ln2 -= pgcd )); }\
+}
+
+/** ppcm will be equal to the LCM of n1 and n2 */
+#define PPCM(n1, n2, ppcm) \
+{ \
+    int pgcd; \
+    PGCD(n1, n2, pgcd); \
+    ppcm = (n1 * n2) / pgcd ; \
+}
+
+/* True, if a given symbol with frequency_ratio and phase belongs to groupe
+number group_number */
+#define BELONGS_TO_GROUP(frequency_ratio, phase , group_number) \
+    (!((group_number - NORMALIZED_PHASE(frequency_ratio, phase) ) % frequency_ratio))
+    
+/* Phase normalisation */
+#define NORMALIZED_PHASE(frequency_ratio, phase) (phase % frequency_ratio )
+
+/*-----------------------------------------------*/
+
+/**
+ * Get the total number of groups.
+ * @param symbols list of symbols on which the number of groups must be calculated
+ * @return Total Number of groups for the list
+ */
+int TSP_group_algo_get_nb_groups(const TSP_sample_symbol_info_list_t* symbols)
+{
+	
+  uint32_t nb_symbols ;
+  uint32_t i;
+  int nb_groups       = 0;
+   
+  assert(symbols);
+
+  nb_symbols  = symbols->TSP_sample_symbol_info_list_t_len;
+    
+  if( nb_symbols > 0 ) {
+    
+    /* We calculate the LCM for the period of all symbols */
+    int ppcm = (symbols->TSP_sample_symbol_info_list_t_val[0].period);
+    STRACE_DEBUG(("Frequency_ratio No0= %d", ppcm));
+    
+    for( i = 1 ; i < nb_symbols ; i++) {	
+      
+      int frequency_ratio =
+	(symbols->TSP_sample_symbol_info_list_t_val[i].period);
+      
+      STRACE_DEBUG(("Frequency_ratio No%u= %d", i, frequency_ratio));
+      
+      /* LCM */         
+      PPCM(ppcm,frequency_ratio, ppcm); 
+    }
+    
+    nb_groups = ppcm;
+    
+  }
+  else {
+    STRACE_WARNING(("No symbols in list !"));    
+  }
+  STRACE_INFO(("Found <%d> group(s) for request with <%d> symbol(s)",nb_groups,nb_symbols));
+  return nb_groups;    
+}
+
+/**
+ * Get the size of a given group.
+ * @symbols list of symbols on which the group size must be calculated
+ * @group_id Id of the group that must be processed
+ * @return Number of symbols in the group group_id;
+ */
+static int 
+TSP_group_algo_get_group_size(const TSP_sample_symbol_info_list_t* symbols, 
+			      int group_id, uint32_t* group_byte_size) {
+    
+  int group_size = 0;
+  uint32_t nb_symbols = symbols->TSP_sample_symbol_info_list_t_len;
+  uint32_t i;
+
+  assert(symbols);
+  assert(group_byte_size);
+
+  *group_byte_size = 0;
+    
+  /* We search all symbols that belong to the group group_number*/
+  for( i = 0 ; i < nb_symbols ; i++ ) {
+      int frequency_ratio = symbols->TSP_sample_symbol_info_list_t_val[i].period;
+      int phase           = symbols->TSP_sample_symbol_info_list_t_val[i].phase;
+      /* Does - it belong to the group */
+      if(BELONGS_TO_GROUP(frequency_ratio, phase , group_id) ) {
+	/*Yes ! */
+	group_size++;
+	*group_byte_size +=  TSP_data_channel_get_encoded_size(symbols->TSP_sample_symbol_info_list_t_val[i].type)*symbols->TSP_sample_symbol_info_list_t_val[i].nelem;
+      }      
+    }
+    
+  STRACE_INFO(("Group_size for group[%d] is %d", group_id, group_size));    
+  return group_size;
+}
+
+/**
+* Get the summed size of all groups.
+* @symbols list of symbols on which the group size must be calculated
+* @nb_groups Total number of groups
+* @return The summed size of all groups
+*/
+static int 
+TSP_group_algo_get_groups_summed_size(const TSP_sample_symbol_info_list_t* symbols,
+				      int nb_groups) {
+    
+  int groups_summed_size = 0;
+  int group_id;
+  uint32_t group_byte_size = 0;
+
+  assert(symbols);
+    
+  /* For all groups, get the size and sum the result */
+  for( group_id = 0 ; group_id < nb_groups ; group_id++ ) {    
+    groups_summed_size += TSP_group_algo_get_group_size(symbols, group_id,&group_byte_size); 
+  }
+    
+  STRACE_INFO(("Groups_summed_size is %d", groups_summed_size));
+    
+  return groups_summed_size;
+} /* end of TSP_group_algo_get_groups_summed_size */
+
+
+/**
+ * Allocate the group table.
+ * This function initialize several size informations located in the structures
+ * @symbols list of symbols on which the group table must be calculated
+ * @return The allocated table of groups, NULL on error.
+ */
+static TSP_algo_table_t*
+TSP_group_algo_allocate_group_table(const TSP_sample_symbol_info_list_t* symbols)
+{
+    
+  int group_id;
+    
+  TSP_algo_table_t*      table       = NULL;
+  TSP_algo_group_item_t* items_table = NULL;
+    
+  assert(symbols);
+    
+  table = (TSP_algo_table_t*)calloc(1, sizeof(TSP_algo_table_t));
+  TSP_CHECK_ALLOC(table, NULL);
+    
+  /* Get total number of groups */
+  table->table_len = TSP_group_algo_get_nb_groups(symbols);
+
+  /* Allocate room for all groups */
+  table->groups = (TSP_algo_group_t*)calloc(table->table_len, sizeof(TSP_algo_group_t));
+  TSP_CHECK_ALLOC(table->groups, NULL);
+    
+  /* 
+   * Allocate room for all group items 
+   * Note that a group item correspond to a requested symbol
+   * which means each item in a group may not have the same SIZE (in byte)
+   * nevertheless the "group size" is its number of item not
+   * its "byte" size.
+   */
+  table->groups_summed_size = TSP_group_algo_get_groups_summed_size(symbols, table->table_len);
+  items_table = (TSP_algo_group_item_t*)calloc(table->groups_summed_size, sizeof(TSP_algo_group_item_t));
+  table->all_items = items_table;
+  TSP_CHECK_ALLOC(items_table, NULL);
+        
+  /* Initialize groups items */
+  /* And make them point at the right place in the item list */
+  for(group_id = 0 ;
+      group_id < table->table_len ;
+      group_id++) {
+            
+      /* Get size of group i */
+      table->groups[group_id].group_len = TSP_group_algo_get_group_size(symbols,
+                                                                        group_id,
+									&(table->groups[group_id].group_byte_size));
+      /* Correct items pointer */
+      table->groups[group_id].items = items_table;
+
+      /* Memorize max group len */
+      if (table->max_group_len <  table->groups[group_id].group_len) {
+	table->max_group_len = table->groups[group_id].group_len;
+      }
+
+      /* Same with byte size */
+      if (table->group_max_byte_size < table->groups[group_id].group_byte_size) {
+	table->group_max_byte_size = table->groups[group_id].group_byte_size;
+      }
+                     
+      /* Get ready for next round ! */        
+      items_table += table->groups[group_id].group_len;
+
+    }
+
+  STRACE_INFO(("Max group size      = %d", table->max_group_len));  
+  STRACE_INFO(("Group max byte size = %d", table->group_max_byte_size));
+  return table;
+} /* TSP_group_algo_allocate_group_table */
+                                                             
+void 
+TSP_group_algo_destroy_symbols_table(TSP_groups_t* groups) {
+
+   TSP_algo_table_t* table = (TSP_algo_table_t*)groups;
+
+   if (NULL!=table) {
+       free(table->all_items);
+       free(table->groups);
+       free(table);
+   }
+} /* TSP_group_algo_destroy_symbols_table */
+
+int32_t 
+TSP_group_algo_create_symbols_table(const TSP_sample_symbol_info_list_t* in_symbols,
+				    TSP_sample_symbol_info_list_t* out_symbols,
+				    TSP_groups_t* out_groups,
+				    TSP_datapool_t* datapool) {
+  
+  TSP_algo_table_t* table;
+    
+  int rank;     /* rank in a group */
+  int group_id; /* id for a group  */
+    
+  /* Total number of IN symbols 
+   * (should be requested from incoming request_sample) 
+   */
+  uint32_t nb_symbols = in_symbols->TSP_sample_symbol_info_list_t_len;
+    
+  uint32_t out_current_info, in_current_info;
+  TSP_sample_symbol_info_t* in_info;
+  TSP_sample_symbol_info_t* out_info;
+    
+  /* Allocate group table from requested symbols */
+  table = TSP_group_algo_allocate_group_table(in_symbols);
+  *out_groups = table;
+
+  /* Short circuit if allocation failed */
+  TSP_CHECK_POINTER(table,TSP_STATUS_ERROR_MEMORY_ALLOCATION,"Unable to allocate group table");
+    
+  /* Allocate memory for the out_symbols */
+  out_symbols->TSP_sample_symbol_info_list_t_len = table->groups_summed_size;
+  out_symbols->TSP_sample_symbol_info_list_t_val = 
+    (TSP_sample_symbol_info_t*)calloc(table->groups_summed_size, sizeof(TSP_sample_symbol_info_t));
+  TSP_CHECK_ALLOC(out_symbols->TSP_sample_symbol_info_list_t_val, TSP_STATUS_ERROR_MEMORY_ALLOCATION);
+  
+  /* For each group...*/
+  for( out_current_info = 0, group_id = 0 ; 
+       group_id < table->table_len ; 
+       group_id++) {
+    
+    /* For each symbol, does it belong to the group ? */
+    /* Start at first rank */
+    for(rank = 0, in_current_info = 0 ; 
+	in_current_info < nb_symbols ; 
+	in_current_info++) {
+      
+      out_info = &(out_symbols->TSP_sample_symbol_info_list_t_val[out_current_info]);
+      in_info = &(in_symbols->TSP_sample_symbol_info_list_t_val[in_current_info]);
+      
+      /* Does - it belong to the group */
+      if (BELONGS_TO_GROUP(in_info->period, in_info->phase , group_id) ) {		
+	/*Yes, we add it*/
+	STRACE_DEBUG(("Adding provider_global_index %d at group %d and rank %d",in_info->provider_global_index,group_id,rank));
+	/* 1 - In the out group table */
+	
+	/* find the encoder of the data type */
+	table->groups[group_id].items[rank].data_encoder = TSP_data_channel_get_encoder(in_info->type);
+	table->groups[group_id].items[rank].dimension    = in_info->dimension;
+	table->groups[group_id].items[rank].offset       = in_info->offset;
+	table->groups[group_id].items[rank].nelem        = in_info->nelem;
+	
+	/* complete les infos */
+        /* cast en int32_t pour Windows : WIN32 ?FIXME erk: pourquoi? */
+	table->groups[group_id].items[rank].data = 
+	  (int32_t)TSP_datapool_get_symbol_value(datapool, in_info->provider_global_index)
+	  + in_info->offset * TSP_data_channel_get_encoded_size(in_info->type);
+	
+	/* 2 - In the out symbol table */
+	
+	(*out_info) = (*in_info);
+        
+	out_info->name = strdup(in_info->name);
+	TSP_CHECK_ALLOC(out_info->name, TSP_STATUS_ERROR_MEMORY_ALLOCATION);
+        
+	out_info->provider_group_index = group_id;
+	out_info->provider_group_rank  = rank;
+        
+	/* inc */
+	rank++;
+	out_current_info++;
+        
+	/* Some optimization  : the group might be full*/
+	if(rank == table->groups[group_id].group_len) break;
+      }      
+    }
+  }
+    
+  return TSP_STATUS_OK;
+} /* end of TSP_group_algo_create_symbols_table */
+
+int 
+TSP_group_algo_get_group_number(TSP_groups_t* groups) {
+       
+  TSP_algo_table_t* group_table = (TSP_algo_table_t*)groups;    
+  assert(groups);
+  return group_table->table_len;
+}
+
+uint32_t 
+TSP_group_algo_get_biggest_group_size(TSP_groups_t* groups) {
+    
+  TSP_algo_table_t* group_table = (TSP_algo_table_t*)groups;
+  int i;
+  assert(groups);
+
+  return group_table->group_max_byte_size;
+}
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_group_algo.h tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_group_algo.h
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_group_algo.h	2007-02-11 22:45:56.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_group_algo.h	2007-10-17 10:52:44.000000000 +0200
@@ -54,10 +54,15 @@
  * to the value in the group table
  * @return TRUE=OK
  */
-int TSP_group_algo_create_symbols_table(const TSP_sample_symbol_info_list_t* symbols,
+/*int TSP_group_algo_create_symbols_table(const TSP_sample_symbol_info_list_t* symbols,
 					TSP_sample_symbol_info_list_t* out_symbols,
 					TSP_groups_t* out_groups,
-					TSP_datapool_t* datapool);
+					TSP_datapool_t* datapool);*/
+int32_t 
+TSP_group_algo_create_symbols_table(const TSP_sample_symbol_info_list_t* in_symbols,
+				    TSP_sample_symbol_info_list_t* out_symbols,
+				    TSP_groups_t* out_groups,
+				    TSP_datapool_t* datapool);
 /**
  * Destroy the group table
  * @param groups List allocated by TSP_group_algo_create_symbols_table
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_group_algo.h~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_group_algo.h~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_group_algo.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_group_algo.h~	2007-02-11 22:45:56.000000000 +0100
@@ -0,0 +1,79 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl/tsp_group_algo.h,v 1.11 2007/02/11 21:45:56 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Interface for the function used to calculate
+and use symbols groups
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef _TSP_GROUP_ALGO_H
+#define _TSP_GROUP_ALGO_H
+
+#include <tsp_prjcfg.h>
+#include <tsp_datastruct.h>
+#include <tsp_datapool.h>
+
+typedef  void* TSP_groups_t;
+
+/**
+ * Create the groups table for  a given symbol list 
+ * @param symbols The required symbol list
+ * @param out_symbols The required symbol list with information added (group id ...)
+ * @param out_groups The computed group table
+ * @param datapool The associated datapool used to link the datapool suymbols address
+ * to the value in the group table
+ * @return TRUE=OK
+ */
+int TSP_group_algo_create_symbols_table(const TSP_sample_symbol_info_list_t* symbols,
+					TSP_sample_symbol_info_list_t* out_symbols,
+					TSP_groups_t* out_groups,
+					TSP_datapool_t* datapool);
+/**
+ * Destroy the group table
+ * @param groups List allocated by TSP_group_algo_create_symbols_table
+ */
+void TSP_group_algo_destroy_symbols_table(TSP_groups_t* groups);
+
+/**
+ * Get the total number of computed groups
+ * @return Groups number
+ */                                       
+int TSP_group_algo_get_group_number(TSP_groups_t* groups);
+
+/**
+ * Get the biggest group size of all computed groups
+ * @return Biggest group size
+ */                                       
+uint32_t TSP_group_algo_get_biggest_group_size(TSP_groups_t* groups);
+                                       
+#endif /* _TSP_GROUP_ALGO_H */
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_provider.h tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_provider.h
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_provider.h	2006-10-18 23:23:51.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_provider.h	2007-10-17 10:59:16.000000000 +0200
@@ -60,9 +60,9 @@
  * @param[in,out] argc   the number of argument of the main
  * @param[in,out] argv   array of argument of size argc.
  */
-int TSP_provider_private_init(GLU_handle_t* theGLU, int* argc, char** argv[]);
+int32_t TSP_provider_private_init(GLU_handle_t* theGLU, int* argc, char** argv[]);// int changed to int32_t
 
-int TSP_provider_private_run();
+int32_t TSP_provider_private_run();	// int changed to int32_t
 
 const char* TSP_provider_get_name();
 
@@ -93,9 +93,9 @@
 int TSP_provider_get_server_number();
 int TSP_provider_get_server_base_number( );
 
-int TSP_provider_request_async_sample_write(TSP_async_sample_t* async_sample_write);
+int32_t TSP_provider_request_async_sample_write(TSP_async_sample_t* async_sample_write); // int changed to int32_t
 
-int TSP_provider_request_async_sample_read(TSP_async_sample_t* async_sample_read);
+int32_t TSP_provider_request_async_sample_read(TSP_async_sample_t* async_sample_read); // int changed to int32_t
 
 void  TSP_provider_request_extended_information(TSP_request_extended_information_t* req_extinfo, 
 						TSP_answer_extended_information_t* ans_extinfo);
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_provider.h~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_provider.h~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_provider.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_provider.h~	2007-10-17 10:58:32.000000000 +0200
@@ -0,0 +1,106 @@
+/*
+
+$Id: tsp_provider.h,v 1.23 2006/10/18 21:23:51 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Main interface for the producer module
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef _TSP_PROVIDER_H
+#define _TSP_PROVIDER_H
+
+#include <tsp_prjcfg.h>
+#include <tsp_abs_types.h>
+#include <tsp_datastruct.h>
+#include <tsp_glu.h>
+
+/**
+ * @defgroup TSP_ProviderLib Provider Core Library
+ * @ingroup  TSP_CoreLib
+ * The Provider module is the set of all 
+ * provider library interface.
+ * @{
+ */
+
+BEGIN_C_DECLS
+
+/**
+ * Initialize TSP provider library.
+ * One should call this before any other TSP provider lib call.
+ * @param[in,out] theGLU the GLU to be registered into the TSP Provider Library.
+ * @param[in,out] argc   the number of argument of the main
+ * @param[in,out] argv   array of argument of size argc.
+ */
+int32_t TSP_provider_private_init(GLU_handle_t* theGLU, int* argc, char** argv[]);// int changed to int32_t
+
+int32_t TSP_provider_private_run();	// int changed to int32_t
+
+const char* TSP_provider_get_name();
+
+
+void TSP_provider_request_open(const TSP_request_open_t* req_open,
+		      TSP_answer_open_t* ans_open);
+		      
+void TSP_provider_request_close(const TSP_request_close_t* req_close);
+
+void  TSP_provider_request_information(TSP_request_information_t* req_info, 
+				       TSP_answer_sample_t* ans_sample);
+
+void  TSP_provider_request_filtered_information(TSP_request_information_t* req_info, 
+						int filter_kind, char* filter_string,
+						TSP_answer_sample_t* ans_sample);
+
+void  TSP_provider_request_sample(TSP_request_sample_t* req_sample, 
+				  TSP_answer_sample_t* ans_sample);
+
+void  TSP_provider_request_sample_init(TSP_request_sample_init_t* req_sample_init, 
+				       TSP_answer_sample_init_t* ans_sample);
+
+void  TSP_provider_request_sample_destroy(TSP_request_sample_destroy_t* req_sample_destroy, 
+					  TSP_answer_sample_destroy_t* ans_sample);
+
+int TSP_provider_is_initialized();
+
+int TSP_provider_get_server_number();
+int TSP_provider_get_server_base_number( );
+
+int32_t TSP_provider_request_async_sample_write(TSP_async_sample_t* async_sample_write); // int changed to int32_t
+
+int TSP_provider_request_async_sample_read(TSP_async_sample_t* async_sample_read);
+
+void  TSP_provider_request_extended_information(TSP_request_extended_information_t* req_extinfo, 
+						TSP_answer_extended_information_t* ans_extinfo);
+
+END_C_DECLS
+/** @} end group Provider */ 
+
+#endif /* _TSP_PROVIDER_H */
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_session.c tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_session.c
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_session.c	2007-03-01 18:36:41.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_session.c	2007-10-16 14:18:39.000000000 +0200
@@ -47,6 +47,8 @@
     #include <assert.h>
 #endif
 
+#include <sys/types.h>		 /* for types compatibility */
+
 #include <tsp_sys_headers.h>
 #include <tsp_time.h>
 #include <tsp_session.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_session.c~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_session.c~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_session.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_session.c~	2007-10-16 14:17:27.000000000 +0200
@@ -0,0 +1,768 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl/tsp_session.c,v 1.37 2007/03/01 17:36:41 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium.eads.net
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Implementation for the object TSP_session_t that embody the
+opened session from a client
+
+-----------------------------------------------------------------------
+ */
+
+#ifdef __OpenBSD__
+#include <machine/types.h> 
+#include <machine/endian.h>
+#endif /* __OpenBSD__ */
+
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
+#include <tsp_sys_headers.h>
+#include <tsp_time.h>
+#include <tsp_session.h>
+#include <tsp_group_algo.h>
+#include <tsp_data_sender.h>
+#include <tsp_datapool.h>
+
+#include <sys/types.h>		 /* for types compatibility */
+
+#define TSP_GET_SESSION(session, channel_id, ret)			\
+  {									\
+    if( NULL == (session = TSP_get_session(channel_id) ) )		\
+      {									\
+	STRACE_ERROR(("Unable to get session for channel_id=%u",channel_id)); \
+	TSP_UNLOCK_MUTEX(&X_session_list_mutex,ret);			\
+      }									\
+  }
+
+typedef struct TSP_session_data {
+	
+  version_id_t version_id;
+    
+  TSP_groups_t groups;
+    
+  TSP_data_sender_t sender;
+
+  TSP_datapool_t* datapool;
+
+  /** Handle on glu server instance (could be global or specific to session ) */
+  GLU_handle_t* glu_h;
+
+  /** Total number of symbols in glu server */
+  int symbols_number;
+	
+} TSP_session_data_t;
+
+
+/** Session Object  */
+typedef struct TSP_session {
+	
+  channel_id_t channel_id;
+  /** the session state */
+  TSP_session_state_t state;
+  /** the session data */
+  TSP_session_data_t* session_data;
+	
+} TSP_session_t ;
+
+static TSP_session_t X_session_t[TSP_MAX_CLIENT_NUMBER];
+
+/** Memorize the highest session in X_session_t */
+int X_session_nb = 0;
+
+/** Used to create new channel_id for each client */
+static channel_id_t X_count_channel_id = 0;
+
+static int X_initialized = FALSE;
+
+static pthread_mutex_t X_session_list_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+
+static TSP_session_t* 
+TSP_get_session(channel_id_t channel_id) {
+	
+  TSP_session_t* session = NULL;
+  int i = 0;
+	
+  for( i = 0 ;  i < X_session_nb ; i++) {
+    if( X_session_t[i].channel_id == channel_id ) {
+      STRACE_DEBUG(("Channel_id = <%d> is session Idx <%d>", channel_id,i));
+      assert(X_session_t[i].session_data);
+      session = &(X_session_t[i]);
+      break;			
+    }
+  }
+  
+  if( NULL == session ) { 
+    STRACE_ERROR(("No session found for channel_id=%u", channel_id));    
+  }
+	
+  return session ;
+} /* end of TSP_get_session */
+
+static int32_t 
+TSP_session_change_stateTo(TSP_session_t* session, TSP_session_state_t newState) {
+  int32_t retcode = TSP_STATUS_OK; 
+  assert(session);
+
+   /* FIXME for now we do not check invalid transition */
+  switch(newState) {
+  case TSP_SESSION_STATE_UNKNOWN:
+  case TSP_SESSION_STATE_OPENED:
+  case TSP_SESSION_STATE_CLOSED:
+  case TSP_SESSION_STATE_REQUEST_SAMPLE_OK:
+  case TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK:
+  case TSP_SESSION_STATE_SAMPLING:
+  case TSP_SESSION_STATE_REQUEST_SAMPLE_DESTROY_OK:
+  case TSP_SESSION_STATE_BROKEN_LINK:
+  case TSP_SESSION_STATE_CLOSE_ON_EOF:
+    STRACE_INFO(("Session was in state <%d> goes to <%d>",session->state,newState))
+    session->state = newState;
+    break;
+  default:
+    STRACE_ERROR(("Unknown transition from state <%d> to <%d> IGNORED.",session->state,newState));
+    retcode = TSP_STATUS_ERROR_UNKNOWN; 
+    break;
+  }
+  
+  return retcode;
+} /* end of TSP_session_change_stateTo */
+
+
+static void 
+TSP_session_close_session(channel_id_t channel_id) {
+  int ret = FALSE;
+  TSP_session_t* session = NULL;
+  STRACE_DEBUG(("Request Closing session channel_id = %d", channel_id));
+  session = TSP_get_session(channel_id);
+  if (NULL != session) {
+    assert(session->session_data);
+    free(session->session_data);
+    TSP_session_change_stateTo(session,TSP_SESSION_STATE_CLOSED);
+    /* Fill the hole with latest element */
+    *session = X_session_t[X_session_nb - 1];
+    X_session_nb--;
+    STRACE_DEBUG(("X_session_nb now = %d.", X_session_nb));
+    ret = TRUE;
+  }
+
+  if(!ret) {
+    STRACE_WARNING(("Unable to find session number %d", channel_id));
+  }
+
+} /* end of TSP_session_close_session */
+
+
+static void 
+TSP_session_destroy_symbols_table(TSP_session_t* session) {
+  /* If there was a local datapool, we erase it */
+  if(NULL != session->session_data->datapool) {
+    TSP_datapool_delete(&(session->session_data->datapool));
+  }
+  
+  /* Erase the group table */
+  TSP_group_algo_destroy_symbols_table(session->session_data->groups);
+} /* end of TSP_session_destroy_symbols_table */
+
+void 
+TSP_session_init() {
+  if( FALSE == X_initialized )
+    {
+      /* Mise a 0 de la zone memoire */
+      memset(X_session_t, 0, TSP_MAX_CLIENT_NUMBER*sizeof(TSP_session_t));
+      X_initialized = TRUE;
+    }
+} /* end of TSP_session_init */
+
+GLU_handle_t* 
+TSP_session_get_GLU_by_channel(channel_id_t channel_id) {
+  TSP_session_t* session = NULL;
+  TSP_LOCK_MUTEX(&X_session_list_mutex,NULL);
+  TSP_GET_SESSION(session,channel_id,NULL);  
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,NULL);
+  return session->session_data->glu_h;
+} /* end of TSP_session_get_GLU_by_channel */
+
+void 
+TSP_session_close_session_by_channel(channel_id_t channel_id) {
+  TSP_LOCK_MUTEX(&X_session_list_mutex,);
+
+  TSP_session_close_session(channel_id);
+
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,);
+} /* end of TSP_session_close_session_by_channel */
+
+TSP_session_state_t 
+TSP_session_get_state(channel_id_t channel_id) {
+
+  TSP_session_t*      session;
+  TSP_session_state_t retval=TSP_SESSION_STATE_UNKNOWN;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,retval);
+
+  session = TSP_get_session(channel_id);
+  if (NULL!=session) {
+    retval= session->state;
+  } 
+  
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,retval);
+  return retval;
+} /* end of TSP_session_get_state */
+
+
+int 
+TSP_session_get_nb_session() {
+  int client_number;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,-1);  
+  client_number = X_session_nb;  
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,-1);
+  return client_number;
+} /* end of TSP_session_get_nb_session */
+
+int32_t
+TSP_add_session(channel_id_t* new_channel_id, GLU_handle_t* glu_h) {
+  
+  *new_channel_id = (channel_id_t)(TSP_UNDEFINED_CHANNEL_ID);
+	
+  TSP_LOCK_MUTEX(&X_session_list_mutex,TSP_STATUS_ERROR_UNKNOWN);
+
+  /* Is there room left for the new session ? */
+  if( X_session_nb == TSP_MAX_CLIENT_NUMBER) {
+    STRACE_ERROR(("Max session number reached : %d", TSP_MAX_CLIENT_NUMBER));
+    /* do not forget to unlock!! */
+    TSP_UNLOCK_MUTEX(&X_session_list_mutex,TSP_STATUS_ERROR_UNKNOWN);
+    return TSP_STATUS_ERROR_NO_MORE_SESSION;
+  }
+  
+  /* Create a new channel Id*/
+  *new_channel_id = X_count_channel_id++;
+  
+  STRACE_DEBUG(("I've found room in X_session_t for the new session. Id in X_session_t is %d", X_session_nb));
+  
+  /* The position is always X_session_nb, 
+   * 'coz' any holes in array are filled during session removal 
+   * see : TSP_close_session_by_channel */
+  X_session_t[X_session_nb].state        = TSP_SESSION_STATE_UNKNOWN;
+  X_session_t[X_session_nb].session_data = calloc(1, sizeof(TSP_session_data_t));
+  X_session_t[X_session_nb].channel_id   = *new_channel_id;
+  TSP_CHECK_ALLOC(X_session_t[X_session_nb].session_data, TSP_STATUS_ERROR_MEMORY_ALLOCATION);
+  
+  /* Initialize members */
+  
+  X_session_t[X_session_nb].session_data->datapool    = NULL; 
+  X_session_t[X_session_nb].session_data->glu_h       = glu_h; 
+
+  /* Get symbols number */
+  X_session_t[X_session_nb].session_data->symbols_number =
+    X_session_t[X_session_nb].session_data->glu_h->get_nb_symbols(X_session_t[X_session_nb].session_data->glu_h);
+  
+  /* OK, there's a new session*/
+  X_session_nb++;
+  
+  STRACE_INFO(("New consumer registered with TSP channel_id=%u", *new_channel_id ));
+  	
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+  return TSP_STATUS_OK;
+} /* end of TSP_add_session */
+
+int32_t 
+TSP_session_change_stateTo_byChannel(channel_id_t channel_id, TSP_session_state_t newState) {
+
+  TSP_session_t * session;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,TSP_STATUS_ERROR_UNKNOWN);
+  TSP_GET_SESSION(session,channel_id,TSP_STATUS_ERROR_INVALID_CHANNEL_ID);  
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,TSP_STATUS_ERROR_UNKNOWN) ;   
+  return TSP_session_change_stateTo(session, newState);
+
+} /* TSP_session_change_stateTo_byChannel */
+
+
+void 
+TSP_session_destroy_symbols_table_by_channel(channel_id_t channel_id) {
+  TSP_session_t* session = 0;
+   
+  TSP_LOCK_MUTEX(&X_session_list_mutex,);    
+  TSP_GET_SESSION(session, channel_id,); 
+  TSP_session_destroy_symbols_table(session);  
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,);
+
+} /* TSP_session_destroy_symbols_table_by_channel */
+
+
+int32_t 
+TSP_session_create_symbols_table_by_channel(const TSP_request_sample_t* req_sample,
+					    TSP_answer_sample_t* ans_sample)
+
+{
+  int             retcode         = TSP_STATUS_ERROR_NO_MORE_SESSION;
+  TSP_session_t*  session         = 0;
+  TSP_datapool_t* target_datapool = NULL;    
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+  TSP_GET_SESSION(session, req_sample->channel_id, FALSE)
+
+  /* The functions could have been called several time, so clean up first */
+  TSP_session_destroy_symbols_table(session);    
+      
+  /* 
+   * Get datapool instance for this GLU 
+   * ACTIVE   GLU will get global datapool singleton instance
+   * PASSIVE  GLU will get their own local datapool instance
+   */
+  target_datapool = TSP_datapool_instantiate(session->session_data->glu_h);
+
+  /* Creating group table*/
+  retcode  = TSP_group_algo_create_symbols_table(&(req_sample->symbols),
+						 &(ans_sample->symbols), 
+						 &(session->session_data->groups),
+						 target_datapool);   
+  
+  /* Set total group number */
+  if(TSP_STATUS_OK==retcode) {
+    ans_sample->provider_group_number = 
+      TSP_group_algo_get_group_number(session->session_data->groups);
+  }
+  else {
+    STRACE_ERROR(("Function TSP_group_algo_create_symbols_table failed"));    
+  }
+    
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+  return retcode;
+} /* end of TSP_session_create_symbols_table_by_channel */
+
+int  
+TSP_session_get_sample_symbol_info_list_by_channel(channel_id_t channel_id,
+						   TSP_sample_symbol_info_list_t* symbol_list) {
+
+  TSP_session_t* session;
+  int ret;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,FALSE);
+	
+  TSP_GET_SESSION(session, channel_id, FALSE);
+
+  ret = (session->session_data->glu_h)->get_ssi_list(session->session_data->glu_h, symbol_list);
+  
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,FALSE);
+  
+  return ret;
+
+}
+
+int TSP_session_send_msg_ctrl_by_channel(channel_id_t channel_id, TSP_msg_ctrl_t msg_ctrl)
+{
+  TSP_session_t* session;
+  int ret = TRUE;
+
+  /* The mutex can not be kept 'coz' we are going to block other sessions */
+  /* So, be carefull : the session must not be suppressed when the send is active */
+  TSP_LOCK_MUTEX(&X_session_list_mutex,-1);
+  TSP_GET_SESSION(session, channel_id,-1);
+  if (session->state == TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK) {
+    if (TRUE==TSP_data_sender_is_consumer_connected(session->session_data->sender)) {
+      TSP_session_change_stateTo(session,TSP_SESSION_STATE_SAMPLING);
+    }
+  }
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,-1);
+
+  if( (session->state == TSP_SESSION_STATE_SAMPLING)  &&
+      (NULL!=session->session_data->groups) &&
+      (NULL!=session->session_data->sender)
+      ) {
+
+    if(!TSP_data_sender_send_msg_ctrl(session->session_data->sender, msg_ctrl)) {
+      STRACE_WARNING(("Data link broken for session No %d",channel_id ));
+      session->state = TSP_SESSION_STATE_BROKEN_LINK;
+    }
+  } else {
+    ret = FALSE;
+  }
+
+  return ret;  
+}
+
+void 
+TSP_session_all_session_send_data(time_stamp_t t) {
+  int i;
+  TSP_session_t* currentSession;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,);
+
+  /* Loop over all ACTIVE sessions */
+  for (i = 0 ; i< X_session_nb ; ++i) {
+
+    /* promote session to SAMPLING if consumer is connected */
+    if (TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK == X_session_t[i].state) {
+      if (TRUE==TSP_data_sender_is_consumer_connected(X_session_t[i].session_data->sender)) {
+	TSP_session_change_stateTo(&(X_session_t[i]),TSP_SESSION_STATE_SAMPLING);
+      }
+    }
+    /* 
+     * If GLU is PASSIVE this should block until 
+     * socket is ready or session is garbage collected.
+     */
+    if ( GLU_SERVER_TYPE_PASSIVE == X_session_t[i].session_data->glu_h->type) {
+      int32_t waitconsumer = 1;
+      currentSession = &X_session_t[i];
+      while (1==waitconsumer) {
+
+	if (TSP_SESSION_STATE_BROKEN_LINK==currentSession->state) {
+	  STRACE_DEBUG(("Data link broken (during wait loop) for session = %d / idx = %d.",currentSession->channel_id,i));
+	  waitconsumer = 0;
+	  continue;
+	}
+	
+	if (TSP_SESSION_STATE_CLOSED==currentSession->state) {
+	  STRACE_DEBUG(("Session closed (during wait loop) for session = %d / idx = %d.",currentSession->channel_id,i));
+	  waitconsumer = 0;
+	  continue;
+	}
+
+	if (TSP_SESSION_STATE_SAMPLING == currentSession->state) {
+	  /* OK sampling running go out of wait loop */
+	  waitconsumer = 0;	  
+	  continue;
+	}		
+
+	/* Dangerous but should be OK for passive GLU though */
+	TSP_UNLOCK_MUTEX(&X_session_list_mutex,);
+	tsp_usleep(500000);	
+	TSP_LOCK_MUTEX(&X_session_list_mutex,);
+
+	STRACE_DEBUG(("Waiting session (session = %d / idx = %d) to reach SAMPLING state now %d...",currentSession->channel_id,i,currentSession->state));
+
+	if (TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK == currentSession->state) {
+	  if (TRUE==TSP_data_sender_is_consumer_connected(currentSession->session_data->sender)) {
+	    TSP_session_change_stateTo(currentSession,TSP_SESSION_STATE_SAMPLING);
+	  }
+	}
+      }
+    }
+    
+    /* We go for real send */
+    if ((NULL != X_session_t[i].session_data->groups) && /* The request sample was done */
+	(NULL != X_session_t[i].session_data->sender) && /* The request sample init was done */
+	(X_session_t[i].state == TSP_SESSION_STATE_SAMPLING) /* Session is valid */
+	) {
+	if(!TSP_data_sender_send(X_session_t[i].session_data->sender, 
+				 X_session_t[i].session_data->groups, 
+				 t))
+	  {
+	    STRACE_WARNING(("Data link broken for session No %d",X_session_t[i].channel_id ));
+	    X_session_t[i].state = TSP_SESSION_STATE_BROKEN_LINK;		  
+	  }
+      }
+  }
+
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,);
+}
+
+
+void 
+TSP_session_all_session_send_msg_ctrl(TSP_msg_ctrl_t msg_ctrl) {
+  int i;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,);
+
+  for( i = 0 ; i< X_session_nb ; i++) {
+    if( X_session_t[i].session_data->groups /* The sample request was done */
+	&& X_session_t[i].session_data->sender /* The sample request init was done */
+	&& (X_session_t[i].state == TSP_SESSION_STATE_SAMPLING))
+      {
+	
+	if(!TSP_data_sender_send_msg_ctrl(X_session_t[i].session_data->sender, msg_ctrl)) {
+	  STRACE_WARNING(("Data link broken for session No %d",X_session_t[i].channel_id ));
+	  X_session_t[i].state = TSP_SESSION_STATE_BROKEN_LINK;	      
+	} else if (TSP_MSG_CTRL_EOF==msg_ctrl) {
+	  /* terminate session on EOF (passive GLU case) please */
+	  X_session_t[i].state = TSP_SESSION_STATE_CLOSE_ON_EOF;
+	}
+      }
+  }
+
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,);
+} /* end of TSP_session_all_session_send_msg_ctrl */
+
+
+int32_t
+TSP_session_create_data_sender_by_channel(channel_id_t channel_id) {
+
+  TSP_session_t* session;
+  int retcode = TSP_STATUS_OK;
+  int ringbuf_size;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,TSP_STATUS_ERROR_UNKNOWN);
+	
+  TSP_GET_SESSION(session, channel_id, TSP_STATUS_ERROR_INVALID_CHANNEL_ID);
+
+  /* 
+   * Quick return since No Request Sample has been done on this session 
+   * FIX bug #16430 
+   */
+  if (NULL==session->session_data->groups) {
+    retcode = TSP_STATUS_ERROR_BAD_REQUEST_ORDER;
+    return retcode;
+  }
+
+  session->session_data->sender = NULL;
+
+  /* Calculate fifo depth */
+  if (GLU_SERVER_TYPE_PASSIVE==session->session_data->glu_h->type) {
+    /* 
+     * PASSIVE GLU do not need FIFO since
+     * there is no RINGBUF between glu and datapool
+     * and the datapool is local (i.e. private) for
+     * each GLU instance.
+     */
+    ringbuf_size = 0;
+  }
+  else {
+    /* There is one single data pool, ask for a ringbuf to the socket layer */
+    /* We calculate it with the server frequency */
+    double base_frequency = (session->session_data->glu_h)->get_base_frequency(session->session_data->glu_h);
+    if ( base_frequency > 0.0 ) {
+      ringbuf_size = TSP_STREAM_SENDER_RINGBUF_SIZE * base_frequency;
+      
+      STRACE_DEBUG(("Stream sender ringbuf size will be : %d items (i.e. %d seconds)",
+		    ringbuf_size,
+		    TSP_STREAM_SENDER_RINGBUF_SIZE));
+    }
+    else {
+      STRACE_ERROR(("GLU return base frequency = %f", base_frequency));
+      retcode = TSP_STATUS_ERROR_UNKNOWN;
+    }
+  }
+  
+  /*--------------------*/
+  /* Create data sender */
+  /*--------------------*/
+  if (TSP_STATUS_OK==retcode) {
+    uint32_t max_group_size = TSP_group_algo_get_biggest_group_size(session->session_data->groups);
+    STRACE_DEBUG(("Channel Id <%d> has Max TSP Group Size <%d> byte(s)",
+		  channel_id,max_group_size));
+    STRACE_DEBUG(("Using RINBUF size of <%d> byte(s)",
+		  ringbuf_size));
+    session->session_data->sender = TSP_data_sender_create(ringbuf_size, max_group_size);      
+    if(NULL != session->session_data->sender) {
+      /* If there's no fifo, 
+       * we must start a new thread per client, 
+       * because there's one datapool per client 
+       */
+      if (GLU_SERVER_TYPE_PASSIVE==session->session_data->glu_h->type) {
+	/* 
+	 * Should start GLU now 
+	 * Note that multi-consumer PASSIVE GLU should protect themselves
+	 * against multiple start (this is the case of the default GLU_start_default)
+	 */
+	if (0!=(session->session_data->glu_h->start(session->session_data->glu_h))) {
+	  retcode = TSP_STATUS_ERROR_GLU_START;
+	  STRACE_ERROR(("Unable to start GLU (PASSIVE case)"));
+	} else {
+	  STRACE_DEBUG(("PASSIVE GLU started."));
+	  retcode = TSP_STATUS_OK;
+	}
+      }
+    }
+    else {
+      retcode = TSP_STATUS_ERROR_UNKNOWN;
+      STRACE_ERROR(("function TSP_data_sender_create failed"));      
+    }
+  }
+  
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,FALSE);  
+  return retcode;
+}
+
+int32_t 
+TSP_session_destroy_data_sender_by_channel(channel_id_t channel_id) {
+  TSP_session_t* session;
+  int retcode = TSP_STATUS_OK;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,TSP_STATUS_ERROR_UNKNOWN);
+	
+  TSP_GET_SESSION(session, channel_id, TSP_STATUS_ERROR_INVALID_CHANNEL_ID);
+
+  /* Stop the session */
+  TSP_data_sender_stop(session->session_data->sender);
+
+  /* For a passive server we must wait for the session thread to end */
+  if (GLU_SERVER_TYPE_PASSIVE==session->session_data->glu_h->type) {
+    /*TSP_local_datapool_wait_for_end_thread(session->session_data->datapool);*/
+  }
+  
+  TSP_data_sender_destroy(session->session_data->sender);
+  session->session_data->sender = NULL;
+
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,TSP_STATUS_ERROR_UNKNOWN);
+
+  return retcode;
+}
+
+const char* TSP_session_get_data_address_string_by_channel(channel_id_t channel_id)
+{
+
+  TSP_session_t* session;
+  const char* data_address;
+
+  TSP_LOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+	
+  TSP_GET_SESSION(session, channel_id, FALSE);
+
+  data_address = TSP_data_sender_get_data_address_string(session->session_data->sender);
+    
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+  STRACE_DEBUG_MORE(("data_address='%s'",data_address ));
+
+    
+  return data_address;
+
+}
+
+
+int TSP_session_is_consumer_connected_by_channel(channel_id_t channel_id)
+{
+  TSP_session_t* session;
+  int consumer_is_connected;
+    
+  TSP_LOCK_MUTEX(&X_session_list_mutex,FALSE);
+  TSP_GET_SESSION(session, channel_id, FALSE);
+
+  consumer_is_connected = TSP_data_sender_is_consumer_connected(session->session_data->sender);
+
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+  return consumer_is_connected;
+
+}
+
+
+int 
+TSP_session_get_symbols_global_index_by_channel(channel_id_t channel_id,
+						TSP_sample_symbol_info_list_t* symbol_list)
+{
+    TSP_session_t* session;
+    GLU_handle_t* myGLU;
+    int ret=TRUE;
+    int* pg_indexes = calloc( symbol_list->TSP_sample_symbol_info_list_t_len, sizeof(int) );
+    TSP_LOCK_MUTEX(&X_session_list_mutex,FALSE);
+    TSP_GET_SESSION(session, channel_id, FALSE);    
+    
+    if (pg_indexes == NULL) {
+      STRACE_ERROR(("Unable to allocate memory for global provider index"));
+      return FALSE;
+    }
+  
+    /* Get global provider indexes */
+    myGLU = session->session_data->glu_h;
+    if (myGLU->get_pgi(myGLU,symbol_list,pg_indexes) == FALSE) {
+      STRACE_ERROR(("Some symbols have not been found"));
+      ret=FALSE;
+    }
+     
+    TSP_UNLOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+  return ret;
+
+}
+
+int 
+TSP_session_get_garbage_session(channel_id_t* channel_id) {
+  int i;
+  int found;
+	
+  TSP_LOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+  found = FALSE;
+  /* There is multiple criterion for session garbage collection */  
+  for( i = 0 ;  i < X_session_nb ; i++) {
+
+    /* Do not garbage collect session in the following state */
+    if ((X_session_t[i].state == TSP_SESSION_STATE_UNKNOWN) ||
+	(X_session_t[i].state == TSP_SESSION_STATE_CLOSED)
+	) {
+      continue;
+    }
+
+    /* Garbage collect Data link broken session */
+    if (X_session_t[i].state == TSP_SESSION_STATE_BROKEN_LINK ) {
+      found = TRUE;
+      STRACE_INFO(("Garbage Collector thread found broken link session <%d>",X_session_t[i].channel_id));
+      *channel_id = X_session_t[i].channel_id;
+      break;
+    } 
+
+    /* 
+     * Garbage collect datapool terminated session
+     * either in SAMPLING or SAMPLE_DESTROY_OK state
+     */
+    if (NULL != X_session_t[i].session_data) {
+      /* Datapool has been deleted */
+      if (NULL == X_session_t[i].session_data->datapool) { 
+	/* FIXME nothing to do here */
+        /* X_session_t[i].session_data->datapool
+	 * is the LOCAL datapool which is used when
+	 * a provider (possibly PASSIVE) is giving
+	 * ONE datapool per session 
+	 * In the case of GLOBAL datapool this datapool
+	 * is ALWAYS NULL and never used in fact.
+	 * see bug #19179
+	 */
+	continue;
+      }
+      /* Datapool has been terminated */ 
+      else {
+	if ( (TRUE==X_session_t[i].session_data->datapool->terminated) &&
+	    ((TSP_SESSION_STATE_SAMPLING                  == X_session_t[i].state)  || 
+	     (TSP_SESSION_STATE_REQUEST_SAMPLE_DESTROY_OK == X_session_t[i].state)
+	     )
+	    ){
+	  STRACE_INFO(("Garbage Collector thread found Datapool TERMINATED for session <%d>",X_session_t[i].channel_id));
+	  found = TRUE;
+	  *channel_id = X_session_t[i].channel_id;
+	}
+      }
+    }
+    /* FIXME to be added like 'timeout on idle consumer' */
+  }
+	
+  TSP_UNLOCK_MUTEX(&X_session_list_mutex,FALSE);
+
+  return found;
+} /* end of TSP_session_get_garbage_session */
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_session.h tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_session.h
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_session.h	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_session.h	2007-10-17 11:00:58.000000000 +0200
@@ -50,7 +50,7 @@
  * @param glu_h The GLU handled that will be linked to the session
  * @return TRUE or FALSE. TRUE = OK.
  */
-int TSP_add_session(channel_id_t* new_channel_id, GLU_handle_t* glu_h);
+int32_t TSP_add_session(channel_id_t* new_channel_id, GLU_handle_t* glu_h); // int changed to int32_t
 
 /**
  * Session initialisation.
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_session.h~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_session.h~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_session.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_session.h~	2007-10-17 11:00:52.000000000 +0200
@@ -0,0 +1,192 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl/tsp_session.h,v 1.20 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Interface for the object TSP_session_t that embody the
+opened session from a client
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef _TSP_SESSION_H
+#define _TSP_SESSION_H
+
+#include <tsp_prjcfg.h>
+
+#include <tsp_datastruct.h>
+#include <tsp_glu.h>
+
+/**
+ * Add a new session.
+ * @param new_channel_id The created session number
+ * @param glu_h The GLU handled that will be linked to the session
+ * @return TRUE or FALSE. TRUE = OK.
+ */
+int32_t TSP_add_session(channel_id_t* new_channel_id, GLU_handle_t* glu_h); // int changed to int32_t
+
+/**
+ * Session initialisation.
+ */
+void TSP_session_init();
+
+/**
+ * Close a session.
+ * @param channel_id The channel id that must be close
+ */
+void TSP_session_close_session_by_channel(channel_id_t channel_id);
+
+/**
+ * Calculate the symbol table.
+ * FIXME : remove thoses RPC struct for this function
+ * @param req_sample The symbols list
+ * @param ans_sample The computed answer
+ * @return TRUE or FALSE. TRUE = OK.
+ */
+int32_t 
+TSP_session_create_symbols_table_by_channel(const TSP_request_sample_t* req_sample,
+					    TSP_answer_sample_t* ans_sample);
+
+
+/**
+ * destroy a session.
+ * @param channel_id The channel id that must be destroyed
+ */
+void TSP_session_destroy_symbols_table_by_channel(channel_id_t channel_id);
+
+/**
+ * Send data to all connected clients.
+ * @param t current time stamp sent with the data
+ */
+void TSP_session_all_session_send_data(time_stamp_t t);
+
+
+/**
+ * Send control message to all connected clients.
+ * @param msg_ctrl Control message to that must be sent
+ */
+void TSP_session_all_session_send_msg_ctrl(TSP_msg_ctrl_t msg_ctrl);
+
+/**
+ * Send control message to one client.
+ * @param channel_id Session id for this client
+ * @param msg_ctrl Control message to that must be sent
+ * @return TRUE or FALSE. TRUE = OK
+ */
+int TSP_session_send_msg_ctrl_by_channel(channel_id_t channel_id, TSP_msg_ctrl_t msg_ctrl);
+
+/**
+ * Get the address string to which the client must connect
+ * to receive data.(format depends on the used protocol ; for
+ * TCP/IP it is 'hostname : port')
+ * @param channel_id The session id matching the asked adresse
+ * @return data address. An error return 0;
+ */
+const char* TSP_session_get_data_address_string_by_channel(channel_id_t channel_id);
+
+/**
+ * Create the data sender object for a session.
+ * @param channel_id The session id for which the data sender must be created.
+ * @return TSP_STATUS_OK on success.
+ */
+int32_t 
+TSP_session_create_data_sender_by_channel(channel_id_t channel_id);
+
+/**
+ * Destroy the data sender object for a session.
+ * @param channel_id The session id for which the data sender must be destroyed.
+ * @return TSP_STATUS_OK on success.
+ */
+int32_t 
+TSP_session_destroy_data_sender_by_channel(channel_id_t channel_id);
+
+/**
+ * Get the whole list of symbols managed by the GLU.
+ * @param channel_id The session id for the list must be known
+ * @param symbol_list The GLU symbol list for this session
+ * @return TRUE or FALSE. TRUE = OK
+ */
+int  TSP_session_get_sample_symbol_info_list_by_channel(channel_id_t channel_id,
+							TSP_sample_symbol_info_list_t* symbol_list);
+
+/**
+ * Get the provider global index for a list of symbols.
+ * The each symbol will be recongnized with its string name,
+ * and the provider global id will be set in the symbol structure
+ * @param channel_id The session id
+ * @param symbol_list The list of symbol that must be updated
+ * @return TRUE or FALSE. TRUE = OK
+ */
+int TSP_session_get_symbols_global_index_by_channel(channel_id_t channel_id,
+						   TSP_sample_symbol_info_list_t* symbol_list);
+
+/**
+ * Is a consumer already connected for the session ?
+ * @return TRUE or FALSE. TRUE = A consumer is connected
+ */
+int TSP_session_is_consumer_connected_by_channel(channel_id_t channel_id);
+
+/**
+ * Get the GLU handle of the specified sessions.
+ * @param channel_id the TSP channel id
+ * @return the GLU handle attached to the session
+ *         may be NULL if session is invalid
+ */
+GLU_handle_t* TSP_session_get_GLU_by_channel(channel_id_t channel_id);
+
+/**
+ * Returns a session that must be destroyed.
+ * For each call this function returns a channel_id for which the 
+ * session must be destoyed (ex : consumer disconnected)
+ * @param channel_id The session that must be destroyed
+ * @return FALSE = there isn't any session that must be destroyed
+ */
+int TSP_session_get_garbage_session(channel_id_t* channel_id);
+
+
+/**
+ * Get current total number of session.
+ * @return Total number of session
+ */
+int TSP_session_get_nb_session();
+
+/**
+ * Change session state to target newState.
+ * @param channel_id the TSP channel id
+ * @param newState the new state for the concerned session
+ *  @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxxx on failure.
+ */ 
+int32_t 
+TSP_session_change_stateTo_byChannel(channel_id_t channel_id, TSP_session_state_t newState);
+
+TSP_session_state_t 
+TSP_session_get_state(channel_id_t channel_id);
+
+#endif /* _TSP_SESSION_H */
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_stream_sender.c tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_stream_sender.c
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_stream_sender.c	2006-10-21 10:48:00.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_stream_sender.c	2007-10-29 10:49:48.000000000 +0100
@@ -35,6 +35,10 @@
 -----------------------------------------------------------------------
  */
 
+#ifdef TSP_RTEMS
+# include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* _TSP_RTEMS_ */ 
+
 #include <signal.h>
 #include <pthread.h>
 #ifdef WIN32
@@ -51,7 +55,7 @@
     #include <assert.h>
 #endif
 
-#if !defined (VXWORKS) && !defined(WIN32)
+#if !defined (VXWORKS) && !defined(WIN32) && !defined(TSP_RTEMS)
 #include <strings.h> /* for bzero */
 #endif
 #include <string.h>  /* for bzero too :=} */
@@ -330,8 +334,8 @@
     myu.addr = (uint32_t)ntohl(*((uint32_t*)myhost->h_addr_list[0]));
     sprintf(host,"%d.%d.%d.%d",myu.parts[3], myu.parts[2], myu.parts[1], myu.parts[0]);
   }
-     
-  sock = (TSP_socket_t*)calloc(1, sizeof(TSP_socket_t));
+  
+	sock = (TSP_socket_t*)calloc(1, sizeof(TSP_socket_t));
   TSP_CHECK_ALLOC(sock, 0);
 
   sock->hClient = 0;
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_stream_sender.c~ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_stream_sender.c~
--- tsp-0.8.3-Source-Reference/src/core/ctrl/tsp_stream_sender.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl/tsp_stream_sender.c~	2007-10-29 09:27:49.000000000 +0100
@@ -0,0 +1,609 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl/tsp_stream_sender.c,v 1.23 2006/10/21 08:48:00 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Implementation for the low level functions that send the data
+stream  to the consumers. 
+-----------------------------------------------------------------------
+ */
+
+#ifdef RTEMS
+#include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* RTEMS */ 
+
+#include <signal.h>
+#include <pthread.h>
+#ifdef WIN32
+    #include <Windows.h>
+    #include <WinSock2.h>
+    #include <ws2tcpip.h>
+    #define assert(exp)     ((void)0)
+#else
+    #include <netdb.h>
+    #include <unistd.h>  
+    #include <netinet/in.h>
+    #include <netinet/tcp.h>
+    #include <sys/socket.h>
+    #include <assert.h>
+#endif
+
+#if !defined (VXWORKS) && !defined(WIN32) && !defined(RTEMS)
+#include <strings.h> /* for bzero */
+#endif
+#include <string.h>  /* for bzero too :=} */
+
+#ifndef SHUT_RDWR
+#define SHUT_RDWR 2
+#endif
+
+#include "tsp_sys_headers.h"
+#include "tsp_stream_sender.h"
+#include "tsp_time.h"
+
+#define TSP_DATA_ADDRESS_STRING_SIZE 256
+
+/* (�s) */
+#define TSP_STREAM_SENDER_CONNECTION_POLL_TIME ((int)(1e5))
+
+/* (�s) */
+#define TSP_STREAM_SENDER_FIFO_POLL_TIME       ((int)(1e5))
+
+struct TSP_socket_t
+{
+  int socketId;
+  int hClient;
+    
+  /** String for the data address ex: Myhost:Port */
+  char data_address[TSP_DATA_ADDRESS_STRING_SIZE + 1];
+
+  /**
+   * client connection status.
+   * If TRUE, the client is connected to the socket
+   */
+  int client_is_connected;
+
+  /**
+   * Fifo for outgoing data
+   */
+  TSP_stream_sender_ringbuf_t* out_ringbuf;
+
+  /**
+   * Buffer for outgoing data
+   */
+  TSP_stream_sender_item_t* out_item;
+
+  /** 
+   * When fifo size is > 0, a thread is created to send data
+   */
+  int fifo_size;
+
+  /** 
+   * Buffer size to prepare data for the socket
+   */
+  int buffer_size;
+
+
+  /** 
+   * Thread used when fifo size > 0
+   */
+  pthread_t thread_id;
+
+  /** 
+   * Tell if the stop function was called 
+   */
+  int is_stopped;
+
+  /** 
+   * When the send fails, connection_ok = FALSE;
+   */
+  int connection_ok;
+
+
+};
+
+typedef struct TSP_socket_t TSP_socket_t;
+
+/* Signal functions */
+#if defined (WIN32)
+    /* no SIGPIPE signal uner Windows (waitforsingle obect insteed) */
+#else
+typedef void Sigfunc(int);
+
+Sigfunc* MySignal(int signo, Sigfunc* func)
+{    
+  struct sigaction act, oact;
+  
+  act.sa_handler = func;
+  sigemptyset(&act.sa_mask);
+  act.sa_flags = 0;
+  if(signo == SIGALRM )
+    {
+#ifdef SA_INTERRUPT
+      act.sa_flags |= SA_INTERRUPT; /*SunOS 4;x */
+#endif
+    }
+  else
+    {
+#ifdef SA_RESTART
+      act.sa_flags |= SA_RESTART; /*SVR4, 4.4BSD*/
+#endif
+    }
+  if(sigaction(signo, &act, &oact) < 0)
+    return(SIG_ERR);
+  return (oact.sa_handler);
+} 
+#endif
+
+void* TSP_streamer_sender_thread_sender(void* arg)
+{
+  TSP_socket_t* sock = (TSP_socket_t*)arg;
+  TSP_stream_sender_item_t* item = 0;
+  int connection_ok = TRUE;
+  static int status = 0;
+     
+  /* Wait for consumer connection before we send data */  
+
+  STRACE_DEBUG(("Thread stream sender created : waiting for client to connect..."));
+  while(!sock->client_is_connected)
+    {
+      tsp_usleep(TSP_STREAM_SENDER_CONNECTION_POLL_TIME);
+     
+    }
+  STRACE_DEBUG(("Client connected ! Send loop starts !"));
+
+  item = RINGBUF_PTR_GETBYADDR(sock->out_ringbuf);
+  /* FIXME : gerer l'arret */
+  /* Gerer l'impossibilit� d'envoyer */
+  while(connection_ok && !sock->is_stopped)
+    {
+      while (item && connection_ok)
+	{
+	 
+	  connection_ok =  TSP_stream_sender_send(sock, TSP_STREAM_SENDER_ITEM_BUF(item), item->len);
+	  RINGBUF_PTR_GETBYADDR_COMMIT(sock->out_ringbuf);
+	  item = RINGBUF_PTR_GETBYADDR(sock->out_ringbuf);      
+
+	}
+      	  tsp_usleep(TSP_STREAM_SENDER_FIFO_POLL_TIME);
+	  item = RINGBUF_PTR_GETBYADDR(sock->out_ringbuf);      
+    }
+
+  if(!sock->is_stopped)
+    {
+      STRACE_DEBUG(("Connection with client was lost ! "));
+    }
+
+  STRACE_DEBUG(("End of fifo thread stream sender"));
+  return &status;
+}
+
+
+/**
+* When a fifo is needed create a fifo and a thread to send the data from the fifo 
+* @param sock The data stream object instance
+* @return OK or KO. TRUE = OK
+*/
+static int TSP_stream_sender_init_bufferized(TSP_socket_t* sock)
+{
+
+  int status;
+
+  RINGBUF_PTR_INIT(TSP_stream_sender_ringbuf_t,
+		   sock->out_ringbuf,
+		   TSP_stream_sender_item_t, 
+		   sock->buffer_size,
+		   RINGBUF_SZ(sock->fifo_size) );
+  
+  /* Memory Exhausted */
+  if (NULL==sock->out_ringbuf) {    
+    return FALSE;
+  }
+  assert(sock->out_ringbuf);
+
+  status = pthread_create(&sock->thread_id, NULL, TSP_streamer_sender_thread_sender,  sock);
+  TSP_CHECK_THREAD(status, FALSE);
+ 
+  return TRUE;
+  
+}
+
+static void TSP_stream_sender_save_address_string(TSP_socket_t* sock, 
+					     char* host, unsigned short port)
+{   
+  char strPort[10];
+    
+  sprintf(strPort,"%u",(int)port);
+  strcpy(sock->data_address, host);
+  strcat(sock->data_address, ":");    
+  strcat(sock->data_address, strPort);
+    
+  STRACE_DEBUG_MORE(("address='%s'", sock->data_address));
+}
+
+static void* TSP_streamer_sender_connector(void* arg)
+{
+  /* FIXME : When the client can't find us (somehow, ex : routing error on the network)
+     this function badly leaks */
+    
+  TSP_socket_t* sock = (TSP_socket_t*)arg;
+  socklen_t Len = 0;
+  sock->client_is_connected = FALSE;
+    
+  pthread_detach(pthread_self());
+    
+  /* Accept connection on socket */
+  STRACE_DEBUG(("Thread acceptor started waiting for client to connect %d", sock->hClient));
+#if defined (WIN32)  
+  sock->hClient = accept(sock->socketId, NULL, NULL);
+#else
+  /* FIXME */
+  sock->hClient = accept(sock->socketId, NULL, &Len);
+#endif
+
+  if(sock->hClient > 0) {
+    /* OK, the client is connected */
+    sock->client_is_connected = TRUE;
+    STRACE_DEBUG(("New connection accepted on socket client socket %d", sock->hClient));
+  }
+  else {
+    STRACE_ERROR(("Accept error"));
+    close(sock->socketId);
+    return 0;
+  }
+    
+  return 0;
+}
+
+const char* TSP_stream_sender_get_data_address_string(TSP_stream_sender_t sender)
+{   
+    
+  TSP_socket_t* sock = (TSP_socket_t*)sender;
+    
+  STRACE_INFO(("-->address='%s'", sock->data_address));
+
+  return sock->data_address;
+}
+
+TSP_stream_sender_t TSP_stream_sender_create(int fifo_size, int buffer_size)
+{
+
+  int status = 0;
+  int OptInt = 0;
+  char host[TSP_MAXHOSTNAMELEN+1];
+  TSP_socket_t* sock;
+  pthread_t thread_connect_id;
+  struct hostent*  myhost;
+  union {
+    uint32_t    addr;
+    uint8_t     parts[4];
+  } myu;
+
+#if defined (WIN32)
+  /* no SIGPIPE signal under Windows (waitforsingleobject insteed) */
+#else
+  /* First disable SIGPIPE signal to avoir being crashed by a disconnected client*/
+  if( SIG_ERR == MySignal(SIGPIPE, SIG_IGN)) {
+    STRACE_ERROR(("Unable to disable SIGPIPE signal"));
+    return 0;
+  }
+#endif
+  if( -1 == gethostname(host, TSP_MAXHOSTNAMELEN))
+    {
+      STRACE_ERROR(("gethostname error"));
+
+      return 0;
+    }
+  myhost = gethostbyname(host);
+  if (myhost == NULL) {
+    STRACE_ERROR(("Cannot gethostbyname '(hostname --> @IP)' for host <%s> check your /etc/hosts file.\n",host));
+    /* be tolerant we keep going with hostname but... consumer may not handle this properly */    
+  } else {
+     /* 
+      * Now translate hostname to @IP in order
+      * to avoid name -> IP resolution on consumer side 
+      */
+    memset(host,0,sizeof(host));
+    myu.addr = (uint32_t)ntohl(*((uint32_t*)myhost->h_addr_list[0]));
+    sprintf(host,"%d.%d.%d.%d",myu.parts[3], myu.parts[2], myu.parts[1], myu.parts[0]);
+  }
+  
+	#if (defined RTEMS)
+    memset(host,0,sizeof(host));
+    myu.addr = (uint32_t)ntohl(*((uint32_t*)myhost->h_addr_list[0]));
+    sprintf(host,"%d.%d.%d.%d",myu.parts[3], myu.parts[2], myu.parts[1], myu.parts[0]);
+    printf("host: %s \n", host);
+  #endif
+  
+     
+  sock = (TSP_socket_t*)calloc(1, sizeof(TSP_socket_t));
+  TSP_CHECK_ALLOC(sock, 0);
+
+  sock->hClient = 0;
+  sock->socketId = 0;
+  sock->fifo_size = fifo_size;
+  sock->buffer_size = buffer_size;
+  sock->out_ringbuf = 0;
+  sock->client_is_connected = FALSE;
+  sock->is_stopped = FALSE;
+  sock->connection_ok = TRUE;
+  
+  /* Init socket */
+  sock->socketId = socket(AF_INET, SOCK_STREAM, 0);
+
+  if (sock->socketId > 0)
+    {
+      OptInt = TSP_DATA_STREAM_SOCKET_FIFO_SIZE;
+      status = setsockopt(sock->socketId, SOL_SOCKET, SO_SNDBUF, (void * )&OptInt, sizeof(OptInt));
+      if (status == -1)
+	{
+	  STRACE_ERROR(("Probleme with set socket size"));
+
+	  close(sock->socketId);
+	  return 0;
+	}
+ 
+      /* Local address reuse */
+
+      OptInt = 1;
+      status = setsockopt(sock->socketId, SOL_SOCKET, SO_REUSEADDR,
+			  (void *) &OptInt, sizeof(OptInt));
+      if (status == -1)
+	{
+          STRACE_ERROR(("pb set local address reuse"));
+	  close(sock->socketId);
+	  return 0;
+	}
+
+      /* No periodic connection state control */
+      OptInt = 0;
+      status = setsockopt(sock->socketId, SOL_SOCKET, SO_KEEPALIVE,
+			  (void *) &OptInt, sizeof(OptInt));
+      if (status == -1)
+	{
+	  STRACE_ERROR(("pb set periodic state control"));
+
+	  close(sock->socketId);
+	  return 0;
+	}
+
+      /* TCP No delay */
+      OptInt = 1;
+      status = setsockopt(sock->socketId, IPPROTO_TCP, TCP_NODELAY, (void *) &OptInt,
+			  sizeof(OptInt));
+      if (status == -1)
+	{
+	  STRACE_ERROR(("pb set TCP no delay"));
+
+	  close(sock->socketId);
+	  return 0;
+	}
+
+      /* Bind to socket : */
+      {
+
+	struct sockaddr_in ListenAddr;
+
+	/* Bind to socket */
+	bzero((char *) &ListenAddr, sizeof(struct sockaddr_in));
+	ListenAddr.sin_family = AF_INET;
+#ifdef _SOCKADDR_LEN
+	ListenAddr.sin_len = sizeof(ListenAddr);
+#endif
+	ListenAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+
+	/* The kernel will choose a free port */
+	status = bind(sock->socketId, (struct sockaddr*) &ListenAddr, sizeof (struct sockaddr_in));
+
+	if (status != -1)
+	  {
+	    /* Find the chosen port*/
+	    struct sockaddr_in buf_addr;
+	    socklen_t len = sizeof(buf_addr);
+	    if( 0 ==  getsockname(sock->socketId, (struct sockaddr*) &buf_addr, &len) )
+	      {
+		/* Save the address in the tsp_socket struct */
+		unsigned short port =  ntohs(buf_addr.sin_port);
+		TSP_stream_sender_save_address_string(sock, host, port);
+	      }
+	    else
+	      {
+		STRACE_ERROR(("getsockname failed"));
+		  
+		close(sock->socketId);
+		return 0;
+	      }
+	  }
+	else
+	  {
+	    STRACE_ERROR(("pb bind to socket"));
+	    
+	    close(sock->socketId);
+	    return 0;
+	  }
+      }
+      
+
+      /* Try and listen onto socket */
+      status = listen (sock->socketId, SOMAXCONN);
+      if (status == -1)
+	{
+	  STRACE_ERROR(("pb listening to socket"));
+
+	  close(sock->socketId);
+	  return 0;
+	}
+
+      /* If we want a bufferized connection, create a fifo, and launch the sender
+	 thread that will read the fifo */
+      if(sock->fifo_size > 0 )	
+	{
+	  if(!TSP_stream_sender_init_bufferized(sock))
+	    {
+	      STRACE_ERROR(("Function TSP_stream_sender_init_bufferized failed"));
+	      close(sock->socketId);	  
+	      return 0;
+	    }
+	  
+	}
+      else
+	{
+	  /* Only create a buffer, with no ringbuffer */
+	  sock->out_item = (TSP_stream_sender_item_t*)calloc(1, sizeof(TSP_stream_sender_item_t) + sock->buffer_size);
+	  TSP_CHECK_ALLOC(sock->out_item, 0);
+	}
+      
+      /* When the client is be connected, the thread function
+	 TSP_streamer_sender_connector will set the client_is_connected  var to TRUE */            
+      
+      status = pthread_create(&thread_connect_id, NULL, TSP_streamer_sender_connector,  sock);
+      TSP_CHECK_THREAD(status, FALSE);      
+
+    }
+  return sock;
+}
+
+void TSP_stream_sender_destroy(TSP_stream_sender_t sender)
+{
+
+   TSP_socket_t* sock = (TSP_socket_t*)sender;
+
+   if( sock->fifo_size > 0)
+     {
+       RINGBUF_PTR_DESTROY(sock->out_ringbuf);
+     }
+   else
+     {
+         free(sock->out_item);sock->out_item = 0;
+     }
+   sock->out_ringbuf = 0;
+   free(sock);     
+
+}
+
+void 
+TSP_stream_sender_stop(TSP_stream_sender_t sender) {
+
+   TSP_socket_t* sock = (TSP_socket_t*)sender;
+   
+   sock->is_stopped = TRUE;
+
+   shutdown(sock->socketId, SHUT_RDWR);
+   shutdown(sock->hClient, SHUT_RDWR);
+   close(sock->socketId);
+   close(sock->hClient);
+
+   /* Is there was a thread for the fifo, we must wait for it to end */
+   if(sock->fifo_size > 0) {
+     pthread_join(sock->thread_id, NULL);
+   }
+}
+
+int 
+TSP_stream_sender_send(TSP_stream_sender_t sender, const char *buffer, int bufferLen) {
+  
+  int Total;
+  int nwrite;
+  TSP_socket_t* sock = (TSP_socket_t*)sender;
+  int identSocket = sock->hClient;
+
+  Total = 0;
+  if (identSocket > 0) {      
+    while (bufferLen > 0) {
+/* sous windows _errno est la variable globale en lecture seule */
+#ifndef WIN32
+      errno = 0;
+#endif
+      /* FIXME is it really an error to get 0 as nwrite? */
+#ifdef WIN32
+	if( (nwrite = send(identSocket, &buffer[Total], bufferLen,0)) <= 0 ) {
+    if( _errno == EINTR ) {
+#else
+	  if( (nwrite = write(identSocket,  &buffer[Total], bufferLen)) <= 0 ) {
+	if( errno == EINTR ) {
+#endif
+	  /* The write might have been interrupted by a signal */
+	  nwrite = 0;
+	}
+	else {		  
+#ifdef WIN32
+     STRACE_DEBUG(("send failed with errno = %d : <%s>",WSAGetLastError(),strerror(errno)));   
+#else
+	  STRACE_ERROR(("send failed with errno = %d : <%s>",errno,strerror(errno)));
+#endif
+	  sock->connection_ok = FALSE;
+	  return FALSE;
+	}
+      }      
+      Total += nwrite;
+      bufferLen -= nwrite;
+    } /* end while buffer not written fully */ 
+  } else {
+    STRACE_ERROR(("identSocket = %d",identSocket));
+    return (FALSE);
+  }
+
+  return(TRUE);
+} /* end of TSP_stream_sender_send */
+
+
+/**
+ * Tells is a client is connected to the socket.
+ * If a client crashes this still returns TRUE
+ * @return TRUE if the client was connected
+ */
+int 
+TSP_stream_sender_is_client_connected(TSP_stream_sender_t sender) {
+  TSP_socket_t* sock = (TSP_socket_t*)sender;
+
+  return sock->client_is_connected;
+}
+
+int 
+TSP_stream_sender_is_connection_ok(TSP_stream_sender_t sender) {
+  TSP_socket_t* sock = (TSP_socket_t*)sender;
+  
+  return sock->connection_ok;
+}
+
+
+TSP_stream_sender_ringbuf_t* 
+TSP_stream_sender_get_ringbuf(TSP_stream_sender_t sender) {
+  TSP_socket_t* sock = (TSP_socket_t*)sender;
+  
+  return sock->out_ringbuf;
+}
+
+TSP_stream_sender_item_t* 
+TSP_stream_sender_get_buffer(TSP_stream_sender_t sender) {
+  TSP_socket_t* sock = (TSP_socket_t*)sender;
+
+  return sock->out_item;
+}
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl_init/tsp_provider_init.c tsp-0.8.3-Source-Rtems/src/core/ctrl_init/tsp_provider_init.c
--- tsp-0.8.3-Source-Reference/src/core/ctrl_init/tsp_provider_init.c	2007-04-26 19:51:30.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl_init/tsp_provider_init.c	2007-10-29 10:50:12.000000000 +0100
@@ -37,6 +37,10 @@
  */
 #include <string.h>
 
+#ifdef TSP_RTEMS
+# include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* TSP_RTEMS */
+
 #include <tsp_sys_headers.h>
 
 #include <tsp_provider.h>
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl_init/tsp_provider_init.c~ tsp-0.8.3-Source-Rtems/src/core/ctrl_init/tsp_provider_init.c~
--- tsp-0.8.3-Source-Reference/src/core/ctrl_init/tsp_provider_init.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl_init/tsp_provider_init.c~	2007-10-16 14:04:57.000000000 +0200
@@ -0,0 +1,206 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl_init/tsp_provider_init.c,v 1.21 2007/04/26 17:51:30 deweerdt Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Function calls to launch a TSP Provider program
+            in the 'main'
+
+-----------------------------------------------------------------------
+ */
+#include <string.h>
+#include <sys/types.h>		 /* for types compatibility */
+
+#include <tsp_sys_headers.h>
+
+#include <tsp_provider.h>
+#include <tsp_request_handler.h>
+#include <tsp_provider_init.h>
+
+#ifdef BUILD_XMLRPC
+#include <tsp_xmlrpc_server.h>
+#endif
+#include <tsp_server.h>
+
+
+int32_t 
+TSP_provider_init(GLU_handle_t* theGLU, int* argc, char** argv[]) {
+
+#if defined (WIN32)
+  WSADATA WSAData;
+#endif
+
+  int32_t retcode = TSP_STATUS_OK;
+
+#if defined (WIN32)
+  if (WSAStartup(MAKEWORD(2,2), &WSAData)) {
+	WSACleanup();
+	retcode = TSP_STATUS_NOK;
+    return retcode;
+   }
+#endif
+
+  retcode = TSP_provider_private_init(theGLU,argc, argv);
+  
+  /* Initialize tsp request handlers structures */
+  if (TSP_STATUS_OK==retcode) {
+    if (TRUE != TSP_provider_rqh_manager_init()) {
+      retcode = TSP_STATUS_ERROR_UNKNOWN;
+    } else {
+      /* install atexit handler to close properly */
+      atexit(TSP_provider_end);
+    }  
+  }
+
+  return retcode;
+} /* End of TSP_provider_init */
+
+int32_t 
+TSP_provider_run(int spawn_mode) {
+  int32_t retcode = TSP_STATUS_OK;
+
+  if (TSP_provider_is_initialized()) {            
+      /* build and install default request handler (RPC) */
+      TSP_provider_rqh_manager_install(0,TSP_rpc_request);
+#ifdef BUILD_XMLRPC
+      TSP_provider_rqh_manager_install(1,TSP_xmlrpc_request);
+#endif
+
+
+
+      if (spawn_mode & TSP_ASYNC_REQUEST_DYNAMIC) {
+	/*
+	 * un-comment this if you want to test
+	 * more then one RPC request handler
+	 * TSP_provider_rqh_manager_install(1,TSP_rpc_request);
+	 */
+
+	/* TODO : call TSP_provider_rqh_manager_install with new ranks
+	   & other protocols (XML, CORBA, ...) */
+      }
+
+      if (TRUE != TSP_provider_rqh_manager_refresh()) {
+	retcode = TSP_STATUS_ERROR_UNKNOWN;
+      }
+      
+      if (TSP_STATUS_OK==retcode) {
+	retcode = TSP_provider_private_run();
+      }
+
+      /* 
+       * If we are launched in a blocking mode 
+       * Wait for every request handler thread to terminate
+       * !!! Thread MUST NOT DETACHED themselves though !!!
+       */
+      if ((TSP_STATUS_OK==retcode) && 
+	  (spawn_mode & TSP_ASYNC_REQUEST_BLOCKING)
+	  ) {
+	TSP_provider_rqh_manager_waitend();
+      }
+    }
+  else {
+    STRACE_ERROR(("Call TSP_provider_init first, and then call TSP_provider_run ! "));
+    retcode = TSP_STATUS_ERROR_UNKNOWN;
+  }
+  
+  return retcode;  
+  
+} /* TSP_provider_run */
+
+
+void 
+TSP_provider_end() {
+  /* TODO : call flush on streams */
+
+  /* remove any published URL */
+  {
+#if !defined (WIN32)
+    char systemCmd[512];
+    sprintf(systemCmd, "rm -f /tmp/TSP.%d", getpid());
+    system(systemCmd);
+#endif
+  }
+
+  /* Call handlers end function */
+  TSP_provider_rqh_manager_end();
+
+#if defined (WIN32)
+    WSACleanup();
+#endif
+} /* end of TSP_provider_end */
+
+void 
+TSP_provider_print_usage() {
+   printf(TSP_ARG_PROVIDER_USAGE"\n");
+} /* TSP_provider_print_usage */
+
+char**
+TSP_provider_urls(int pub_mode) {
+  int rank, nb;
+  char **urls = NULL, *url;
+
+  /* Check running handlers and copy their URLs */
+  nb = TSP_provider_rqh_manager_get_nb_running();
+  if(nb > 0)
+    {     
+      urls = (char**)calloc(nb,sizeof(char*));
+      for(rank = 0; rank < nb; rank ++)
+	{
+	  url = TSP_provider_rqh_manager_get_url(rank);
+	  if(url)
+	    {
+	      urls[rank] = strdup(url);
+
+	      if(pub_mode & TSP_PUBLISH_URLS_PRINT)
+		printf("TSP Provider on PID %d - URL #%d : <%s>\n", getpid(), rank, url);
+
+	      if(pub_mode & TSP_PUBLISH_URLS_FILE)
+		{
+#if !defined (WIN32)
+		  char systemCmd[512];
+		  sprintf(systemCmd, "echo \"%s\" > /tmp/TSP.%d", url, getpid());
+		  system(systemCmd);
+#endif
+		}
+
+	      if(pub_mode & TSP_PUBLISH_URLS_SNMP)
+		/* TODO */
+		STRACE_ERROR(("SNMP publication of TSP URLs not yet implemented\n"));
+	    }
+	  else
+	    {
+	      STRACE_ERROR(("Request Handler #%d did not provided an URL", rank));
+	      urls[rank] = strdup("");
+	    }
+	}
+    }
+  return urls;
+} /* TSP_provider_urls */
+
diff -urN tsp-0.8.3-Source-Reference/src/core/ctrl_init/tsp_provider_init.h~ tsp-0.8.3-Source-Rtems/src/core/ctrl_init/tsp_provider_init.h~
--- tsp-0.8.3-Source-Reference/src/core/ctrl_init/tsp_provider_init.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/ctrl_init/tsp_provider_init.h~	2007-10-16 14:03:10.000000000 +0200
@@ -0,0 +1,148 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/ctrl_init/tsp_provider_init.h,v 1.16 2006/10/18 21:23:51 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Function calls to launch a TSP Provider program
+            in the 'main'
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef _TSP_PROVIDER_INIT_H
+#define _TSP_PROVIDER_INIT_H
+
+#include <tsp_prjcfg.h>
+#include <tsp_glu.h>
+
+#include <sys/types.h>		 /* for types compatibility */
+
+BEGIN_C_DECLS
+
+/** 
+ * @addtogroup TSP_ProviderLib 
+ * @{
+ */
+
+/**
+ * Initialize the TSP provider library.
+ * Main initialisation function for a TSP provider
+ * one should call this function before any other
+ * call to the TSP provider library.
+ * Call this function at the start of your main function
+ * with the received argc/argv. Then use the modified argc/argv.
+ * If you do not have argc/argv when calling TSP_provider_init then
+ * fake it like this:
+ * 
+ * int argc = 1;
+ * char** argv = 0;
+ *
+ * argv = (char**)calloc(argc+1, sizeof(char*));
+ *
+ * argv[0] = strdup("MyOwnProvider");
+ * argv[1] = NULL;
+ *
+ * @param[in,out] theGLU the GLU object to be used by this provider.
+ * @param[in,out] argc You must provide the real argc before using it
+ * @param[in,out] argv You must provide the real argv before using it
+ * @return TSP_STATUS_OK on success other code on failure.
+ */
+_EXPORT_TSP_PROVIDER int32_t
+TSP_provider_init(GLU_handle_t* theGLU, int* argc, char** argv[]);
+
+/**
+ * Finalize the TSP provider library.
+ * After this call the TSP provider library should
+ * not be called anymore (even a second call to TSP_provider_init is forbidden).
+ */
+_EXPORT_TSP_PROVIDER void 
+TSP_provider_end(void);
+
+/**
+ * The different value of the TSP
+ * asynchronous request handling mode
+ */
+#define TSP_ASYNC_REQUEST_NON_BLOCKING   0x00000
+#define TSP_ASYNC_REQUEST_BLOCKING       0x00001
+
+#define TSP_ASYNC_REQUEST_SIMPLE         0x00000
+#define TSP_ASYNC_REQUEST_DYNAMIC        0x00010
+
+
+/**
+ * Main run function for a TSP provider.
+ * Call this function to launch the provider after the initialisation
+ * @param spawn_mode 
+ *       - 0x00 simple non blocking mode, a separate thread will be
+ *              spawned in order to handle TSP request.
+ *              The default TSP asynchronous request channel is used.
+ *       - 0x01 simple blocking mode, this function will block forever.
+ *       - 0x10 dynamic non blocking mode, several separate thread will
+ *              be spawned in order to handle TSP request on several
+ *              TSP asynchronous request channel (ONC RPC, XML RPC, SOAP, CORBA,...).
+ *              The number of thread launched may vary dynamically.
+ *       - 0x11 dynamic blocking mode, this function will block forever.
+ * @return TSP_STATUS_OK on success other code on failure.
+ */
+_EXPORT_TSP_PROVIDER int32_t
+TSP_provider_run(int spawn_mode);
+
+
+/**
+ * The different value of the TSP
+ * asynchronous request URLs publishing mode
+ */
+#define TSP_PUBLISH_URLS_NONE    0x0000
+#define TSP_PUBLISH_URLS_PRINT   0x0010
+#define TSP_PUBLISH_URLS_FILE    0x0100
+#define TSP_PUBLISH_URLS_SNMP    0x1000
+
+/**
+ * Universal Resource Locators of a TSP provider.
+ * Call this function to select a mode of URLs publication after the
+ * initialisation. Function always returns a string table of URLs
+ * @param pub_mode 
+ *       - 0x0000 do nothing else.
+ *       - 0x0010 print to stdout.
+ *       - 0x0100 publish to local SNMP agent (TODO).
+ * @return String table or NULL.
+ */
+_EXPORT_TSP_PROVIDER char**
+TSP_provider_urls(int pub_mode);
+
+
+void 
+TSP_provider_print_usage(void);
+
+/**  @} */
+
+END_C_DECLS
+
+#endif /* _TSP_PROVIDER_INIT_H */
diff -urN tsp-0.8.3-Source-Reference/src/core/include/README tsp-0.8.3-Source-Rtems/src/core/include/README
--- tsp-0.8.3-Source-Reference/src/core/include/README	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/README	2007-10-16 15:42:44.000000000 +0200
@@ -0,0 +1,2 @@
+SA le 16-10-2007 - Portage TSP sur RTEMS
+fichier tsp_prjcfg.h récupéré de /opt/tsp-0.8.3/include
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_abs_types.h tsp-0.8.3-Source-Rtems/src/core/include/tsp_abs_types.h
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_abs_types.h	2007-01-26 18:09:52.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_abs_types.h	2007-10-29 10:50:38.000000000 +0100
@@ -235,6 +235,18 @@
 
 #endif /* OpenBSD / i386 */
 
+/* RTEMS */
+#if defined (TSP_RTEMS)
+# define TSP_BYTE_ORDER TSP_LITTLE_ENDIAN
+# define TSP_SYSTEM_HAVE_NANOSLEEP
+# define TSP_HAVE_INT64 1
+# define TSP_INT64_CONSTANT(val)  (val##LL)
+# define TSP_GUINT64_FORMAT "llu"
+
+#endif /* _TSP_RTEMS_ */
+
+
+
 /*-----------------------------------------------------*/
 
 #ifndef	NULL
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_abs_types.h~ tsp-0.8.3-Source-Rtems/src/core/include/tsp_abs_types.h~
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_abs_types.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_abs_types.h~	2007-10-22 10:43:07.000000000 +0200
@@ -0,0 +1,396 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/include/tsp_abs_types.h,v 1.26 2007/01/26 17:09:52 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Consumer / Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Type abstraction : Stolen from GLIB public headers
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef  __TSP_ABS_TYPES_H
+#define  __TSP_ABS_TYPES_H 1
+
+/* excerpt from libtool manual */
+/* BEGIN_C_DECLS should be used at the beginning of your declarations,
+   so that C++ compilers don't mangle their names.  Use END_C_DECLS at
+   the end of C declarations. */
+#undef BEGIN_C_DECLS
+#undef END_C_DECLS
+#ifdef __cplusplus
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS }
+#else
+# define BEGIN_C_DECLS /* empty */
+# define END_C_DECLS /* empty */
+#endif
+
+#define TSP_LITTLE_ENDIAN 1234
+#define TSP_BIG_ENDIAN    4321
+#define TSP_PDP_ENDIAN    3412		/* unused, need specific PDP check */	
+
+/* This include should offers all the types like uint16_t and others */
+/* Choose to base TSP on the STANDARD POSIX types */
+#include <sys/types.h>
+
+/*** Platform specific ***/
+
+/* SUN / sparc|i386 (32/64 bits) */
+#if  defined(__sun)
+# define TSP_BYTE_ORDER TSP_BIG_ENDIAN
+# define TSP_SYSTEM_HAVE_NANOSLEEP
+# define TSP_HAVE_INT64 1
+# if  defined(__sparcv9)
+#   define TSP_INT64_CONSTANT(val)  (val##L)
+#   define TSP_GUINT64_FORMAT "lu"
+# else /* not sparcv9, an old one */
+#   define TSP_INT64_CONSTANT(val)  (val##LL)
+#   define TSP_GUINT64_FORMAT "llu"
+    /* Old sparc lacks from simple types, need to do it by our own */
+#   ifndef _SYS_INT_TYPES_H 
+#	ifndef _UINT16_T
+		typedef unsigned short   uint16_t;
+#		define _UINT16_T
+#	endif
+#	ifndef _INT16_T
+		typedef short   int16_t;
+#		define _INT16_T
+#	endif
+#	ifndef _UINT32_T
+		typedef unsigned long   uint32_t;
+#		define _UINT32_T
+#	endif
+#	ifndef _INT32_T
+		typedef long   int32_t;
+#		define _INT32_T
+#	endif
+#	ifndef _UINT64_T
+	    typedef u_longlong_t        uint64_t;
+#		define _UINT64_T
+#	endif
+#	ifndef _INT64_T
+	    typedef longlong_t    int64_t;
+#		define _INT64_T
+#	endif
+#   endif /* Exists SYS_TYPES_H */ 
+# endif /* ! sparcv9 */
+#endif /* SUN */
+
+/* Windows */
+#if defined (WIN32)
+#include <stddef.h>
+/* with UWin */
+#if defined (_UWIN)
+
+#include <stdint.h>
+
+#else /* FIXME */
+
+/* types for compat. with various BSD and other library sources */
+typedef signed char      int8_t;
+typedef unsigned char  u_int8_t;
+typedef short            int16_t;
+typedef unsigned short u_int16_t;
+typedef int              int32_t;
+typedef unsigned int   u_int32_t;
+/* types for compat. with Solaris 7 */
+typedef unsigned char  uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int   uint32_t;
+/*
+ * 64bit type for BSD compatability
+ */
+#ifdef __GNUC__
+typedef long long int 		  quad_t;
+typedef unsigned long long int	u_quad_t;
+typedef long long int             int64_t;
+typedef unsigned long long int  u_int64_t;
+#elif _MSC_VER
+typedef __int64 		  quad_t;
+typedef unsigned __int64 	u_quad_t;
+typedef __int64 		  int64_t;
+typedef unsigned __int64 	u_int64_t;
+#endif /*__GNUC__*/
+
+#ifndef _UINT64_T
+    typedef unsigned long long  uint64_t;
+#   define _UINT64_T
+#endif
+#ifndef _INT64_T
+    typedef long long  int64_t;
+#	define _INT64_T
+#endif
+
+#endif /* with UWin */
+# define TSP_BYTE_ORDER TSP_LITTLE_ENDIAN
+# define TSP_INT64_CONSTANT(val)  (val##LL)
+# define TSP_HAVE_INT64 1
+#endif /* Windows with UWin */
+
+
+/* Linux / Intel */
+#if defined (__linux__) &&  ( defined (__i386__)  || defined (__x86_64__) )
+# include <stdint.h>
+# define TSP_BYTE_ORDER TSP_LITTLE_ENDIAN
+# define TSP_INT64_CONSTANT(val)  (val##LL)
+# define TSP_GUINT64_FORMAT "llu"
+# define TSP_SYSTEM_HAVE_NANOSLEEP 1
+# define TSP_HAVE_INT64 1
+#endif /* Linux / Intel */
+
+
+/* Linux / Powerpc */ 							
+#if defined (__linux__) &&  defined (__powerpc__)  
+# include <stdint.h>							
+# define TSP_BYTE_ORDER TSP_BIG_ENDIAN			
+# define TSP_INT64_CONSTANT(val)  (val##LL) 	
+# define TSP_GUINT64_FORMAT "llu"				
+# define TSP_SYSTEM_HAVE_NANOSLEEP 1			
+# define TSP_HAVE_INT64 1						
+#endif /* Linux / Powerpc */						
+												
+												
+
+												
+
+
+
+/* OSF1 / Alpha */
+#if defined (__osf__) && defined (__alpha)
+# include <inttypes.h>
+typedef int_least16_t int16_t;
+# define TSP_INT64_CONSTANT(val)  (val##L)
+# define TSP_BYTE_ORDER TSP_LITTLE_ENDIAN
+# define TSP_GUINT64_FORMAT "lu"
+# define TSP_SYSTEM_HAVE_NANOSLEEP 1
+# define TSP_HAVE_INT64 1
+#endif /* OSF1 / Alpha */
+
+/* VXWORKS */
+#if  defined (VXWORKS)
+/* this works for VxWorks version 5.5.1 and WIND version 2.6 */
+# include <inttypes.h>
+# define TSP_BYTE_ORDER TSP_BIG_ENDIAN
+# define TSP_GUINT64_FORMAT "llu"
+# undef TSP_SYSTEM_HAVE_GETHRTIME 
+# define TSP_SYSTEM_HAVE_NANOSLEEP
+# define TSP_HAVE_INT64 1
+# define TSP_INT64_CONSTANT(val)  (val##LL)
+#endif /* VXWORKS */
+
+/* FreeBSD : may need testing on non i386 */
+#if defined (__FreeBSD__)
+# define TSP_INT64_CONSTANT(val)  (val##LL)
+#if defined (__sparcv9)
+# define TSP_BYTE_ORDER TSP_BIG_ENDIAN
+#else
+# define TSP_BYTE_ORDER TSP_LITTLE_ENDIAN
+#endif /* Endianness */
+# define TSP_GUINT64_FORMAT "llu"
+# define TSP_SYSTEM_HAVE_NANOSLEEP
+# define TSP_HAVE_INT64 1
+
+#endif /* FreeBSD */
+
+/* OpenBSD / i386 (32 bits) (From Fred&Co) */
+#if defined (__OpenBSD__) &&  defined (__i386__)
+# define TSP_INT64_CONSTANT(val)  (val##LL)
+# define TSP_BYTE_ORDER TSP_LITTLE_ENDIAN
+# define TSP_GUINT64_FORMAT "llu"
+# define TSP_SYSTEM_HAVE_NANOSLEEP
+# define TSP_HAVE_INT64 1
+
+/* Standard C types not defined in OBSD at the moment */
+typedef	int8_t	int_least8_t;
+typedef	int16_t	int_least16_t;
+typedef	int32_t	int_least32_t;
+typedef	int64_t	int_least64_t; 
+
+#endif /* OpenBSD / i386 */
+
+/* RTEMS */
+#if defined (RTEMS)
+#error "Arretestoila"
+# define TSP_BYTE_ORDER TSP_LITTLE_ENDIAN
+# define TSP_SYSTEM_HAVE_NANOSLEEP
+# define TSP_HAVE_INT64 1
+# define TSP_INT64_CONSTANT(val)  (val##LL)
+# define TSP_GUINT64_FORMAT "llu"
+
+#endif /* RTEMS*/
+
+
+
+/*-----------------------------------------------------*/
+
+#ifndef	NULL
+#define	NULL	((void*) 0)
+#endif
+
+#ifndef	FALSE
+#define	FALSE	(0)
+#endif
+
+#ifndef	TRUE
+#define	TRUE	(!FALSE)
+#endif
+
+#undef	ABS
+#define ABS(a)	   (((a) < 0) ? -(a) : (a))
+
+
+/* =================================================
+ * Warning : All this macro were stolen from GLIB
+ * Thanks to those people who makes so beautiful things
+ * But we didn't want to oblige people to link TSP with glib
+ * So our choice is POSIX types + renammed macro
+ * this header defines TSP_BYTE_ORDER which expands to one of
+ * the below macros.
+ */
+
+#if TSP_BYTE_ORDER == TSP_BIG_ENDIAN
+
+#define TSP_INT16_TO_BE(val)	((int16_t) (val))
+#define TSP_UINT16_TO_BE(val)	((uint16_t) (val))
+#define TSP_INT16_TO_LE(val)	((int16_t) TSP_UINT16_SWAP_LE_BE (val))
+#define TSP_UINT16_TO_LE(val)	(TSP_UINT16_SWAP_LE_BE (val))
+#define TSP_INT32_TO_BE(val)	((int32_t) (val))
+#define TSP_UINT32_TO_BE(val)	((uint32_t) (val))
+#define TSP_INT32_TO_LE(val)	((int32_t) TSP_UINT32_SWAP_LE_BE (val))
+#define TSP_UINT32_TO_LE(val)	(TSP_UINT32_SWAP_LE_BE (val))
+#define TSP_INT64_TO_BE(val)	((int64_t) (val))
+#define TSP_UINT64_TO_BE(val)	((uint64_t) (val))
+#define TSP_INT64_TO_LE(val)	((int64_t) TSP_UINT64_SWAP_LE_BE (val))
+#define TSP_UINT64_TO_LE(val)	(TSP_UINT64_SWAP_LE_BE (val))
+
+#define TSP_LONG_TO_LE(val)	((long_t) TSP_INT32_TO_LE (val))
+#define TSP_ULONG_T_TO_LE(val)	((ulong_t) TSP_UINT32_TO_LE (val))
+#define TSP_LONG_TO_BE(val)	((long_t) TSP_INT32_TO_BE (val))
+#define TSP_ULONG_T_TO_BE(val)	((ulong_t) TSP_UINT32_TO_BE (val))
+
+#define TSP_INT_TO_LE(val)	((int) TSP_INT32_TO_LE (val))
+#define TSP_UINT_TO_LE(val)	((uint_t) TSP_UINT32_TO_LE (val))
+#define TSP_INT_TO_BE(val)	((int) TSP_INT32_TO_BE (val))
+#define TSP_UINT_TO_BE(val)	((uint_t) TSP_UINT32_TO_BE (val))
+
+#endif
+
+#if TSP_BYTE_ORDER == TSP_LITTLE_ENDIAN
+
+#define TSP_INT16_TO_LE(val)	((int16_t) (val))
+#define TSP_UINT16_TO_LE(val)	((uint16_t) (val))
+#define TSP_INT16_TO_BE(val)	((int16_t) TSP_UINT16_SWAP_LE_BE (val))
+#define TSP_UINT16_TO_BE(val)	(TSP_UINT16_SWAP_LE_BE (val))
+#define TSP_INT32_TO_LE(val)	((int32_t) (val))
+#define TSP_UINT32_TO_LE(val)	((uint32_t) (val))
+#define TSP_INT32_TO_BE(val)	((int32_t) TSP_UINT32_SWAP_LE_BE (val))
+#define TSP_UINT32_TO_BE(val)	(TSP_UINT32_SWAP_LE_BE (val))
+#define TSP_INT64_TO_LE(val)	((int64_t) (val))
+#define TSP_UINT64_TO_LE(val)	((uint64_t) (val))
+#define TSP_INT64_TO_BE(val)	((int64_t) TSP_UINT64_SWAP_LE_BE (val))
+#define TSP_UINT64_TO_BE(val)	(TSP_UINT64_SWAP_LE_BE (val))
+
+#define TSP_LONG_TO_LE(val)	((long_t) TSP_INT32_TO_LE (val))
+#define TSP_ULONG_TO_LE(val)	((ulong_t) TSP_INT32_TO_LE (val))
+#define TSP_LONG_TO_BE(val)	((long_t) TSP_INT32_TO_BE (val))
+#define TSP_ULONG_TO_BE(val)	((ulong_t) TSP_INT32_TO_BE (val))
+
+#define TSP_INT_TO_LE(val)	((int) TSP_INT32_TO_LE (val))
+#define TSP_UINT_TO_LE(val)	((uint_t) TSP_UINT32_TO_LE (val))
+#define TSP_INT_TO_BE(val)	((int) TSP_INT32_TO_BE (val))
+#define TSP_UINT_TO_BE(val)	((uint_t) TSP_UINT32_TO_BE (val))
+
+#endif
+
+/* Basic bit swapping functions
+ */
+#define TSP_UINT16_SWAP_LE_BE_CONSTANT(val)	((uint16_t) ( \
+    (((uint16_t) (val) & (uint16_t) 0x00ffU) << 8) | \
+    (((uint16_t) (val) & (uint16_t) 0xff00U) >> 8)))
+#define TSP_UINT32_SWAP_LE_BE_CONSTANT(val)	((uint32_t) ( \
+    (((uint32_t) (val) & (uint32_t) 0x000000ffU) << 24) | \
+    (((uint32_t) (val) & (uint32_t) 0x0000ff00U) <<  8) | \
+    (((uint32_t) (val) & (uint32_t) 0x00ff0000U) >>  8) | \
+    (((uint32_t) (val) & (uint32_t) 0xff000000U) >> 24)))
+
+#  define TSP_UINT16_SWAP_LE_BE(val) (TSP_UINT16_SWAP_LE_BE_CONSTANT (val))
+#  define TSP_UINT32_SWAP_LE_BE(val) (TSP_UINT32_SWAP_LE_BE_CONSTANT (val))
+
+#ifdef TSP_HAVE_INT64
+#  define TSP_UINT64_SWAP_LE_BE_CONSTANT(val)	((uint64_t) ( \
+      (((uint64_t) (val) &						\
+	(uint64_t) TSP_INT64_CONSTANT(0x00000000000000ffU)) << 56) |	\
+      (((uint64_t) (val) &						\
+	(uint64_t) TSP_INT64_CONSTANT(0x000000000000ff00U)) << 40) |	\
+      (((uint64_t) (val) &						\
+	(uint64_t) TSP_INT64_CONSTANT(0x0000000000ff0000U)) << 24) |	\
+      (((uint64_t) (val) &						\
+	(uint64_t) TSP_INT64_CONSTANT(0x00000000ff000000U)) <<  8) |	\
+      (((uint64_t) (val) &						\
+	(uint64_t) TSP_INT64_CONSTANT(0x000000ff00000000U)) >>  8) |	\
+      (((uint64_t) (val) &						\
+	(uint64_t) TSP_INT64_CONSTANT(0x0000ff0000000000U)) >> 24) |	\
+      (((uint64_t) (val) &						\
+	(uint64_t) TSP_INT64_CONSTANT(0x00ff000000000000U)) >> 40) |	\
+      (((uint64_t) (val) &						\
+	(uint64_t) TSP_INT64_CONSTANT(0xff00000000000000U)) >> 56)))
+#    define TSP_UINT64_SWAP_LE_BE(val) (TSP_UINT64_SWAP_LE_BE_CONSTANT(val))
+#endif
+
+/* The G*_TO_?E() macros are defined in glibconfig.h.
+ * The transformation is symmetric, so the FROM just maps to the TO.
+ */
+#define TSP_INT16_FROM_LE(val)	(TSP_INT16_TO_LE (val))
+#define TSP_UINT16_FROM_LE(val)	(TSP_UINT16_TO_LE (val))
+#define TSP_INT16_FROM_BE(val)	(TSP_INT16_TO_BE (val))
+#define TSP_UINT16_FROM_BE(val)	(TSP_UINT16_TO_BE (val))
+#define TSP_INT32_FROM_LE(val)	(TSP_INT32_TO_LE (val))
+#define TSP_UINT32_FROM_LE(val)	(TSP_UINT32_TO_LE (val))
+#define TSP_INT32_FROM_BE(val)	(TSP_INT32_TO_BE (val))
+#define TSP_UINT32_FROM_BE(val)	(TSP_UINT32_TO_BE (val))
+
+#ifdef TSP_HAVE_INT64
+#  define TSP_INT64_FROM_LE(val)	(TSP_INT64_TO_LE (val))
+#  define TSP_UINT64_FROM_LE(val)	(TSP_UINT64_TO_LE (val))
+#  define TSP_INT64_FROM_BE(val)	(TSP_INT64_TO_BE (val))
+#  define TSP_UINT64_FROM_BE(val)	(TSP_UINT64_TO_BE (val))
+#endif
+
+#define TSP_LONG_FROM_LE(val)	(TSP_LONG_TO_LE (val))
+#define TSP_ULONG_FROM_LE(val)	(TSP_ULONG_TO_LE (val))
+#define TSP_LONG_FROM_BE(val)	(TSP_LONG_TO_BE (val))
+#define TSP_ULONG_FROM_BE(val)	(TSP_ULONG_TO_BE (val))
+
+#define TSP_INT_FROM_LE(val)	(TSP_INT_TO_LE (val))
+#define TSP_UINT_FROM_LE(val)	(TSP_UINT_TO_LE (val))
+#define TSP_INT_FROM_BE(val)	(TSP_INT_TO_BE (val))
+#define TSP_UINT_FROM_BE(val)	(TSP_UINT_TO_BE (val))
+
+#endif /*ABS_TYPES_H*/
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_const_def.h tsp-0.8.3-Source-Rtems/src/core/include/tsp_const_def.h
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_const_def.h	2007-02-26 20:30:11.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_const_def.h	2007-10-22 11:36:59.000000000 +0200
@@ -152,9 +152,9 @@
 
 /*-------- MISC --------*/
 
-typedef uint32_t channel_id_t;
-typedef uint32_t version_id_t;
-typedef uint32_t xdr_and_sync_type_t;
+typedef u_int32_t channel_id_t;
+typedef u_int32_t version_id_t;
+typedef u_int32_t xdr_and_sync_type_t;
 
 typedef int time_stamp_t;
 
@@ -294,7 +294,7 @@
 	{ \
 		if ( 0 != status ) \
 		{ \
-			STRACE_ERROR(("TSP_CHECK_THREAD : ERROR : Thread API Error"))  \
+			STRACE_ERROR(("TSP_CHECK_THREAD : ERROR : Thread API Error status = %d",status))  \
 			return ret; \
 		} \
 	}	
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_const_def.h~ tsp-0.8.3-Source-Rtems/src/core/include/tsp_const_def.h~
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_const_def.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_const_def.h~	2007-10-22 11:35:31.000000000 +0200
@@ -0,0 +1,372 @@
+/*
+ 
+$Header: /sources/tsp/tsp/src/core/include/tsp_const_def.h,v 1.44 2007/02/26 19:30:11 sgalles Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Consumer / Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : definitions and const that must have a program wide scope
+-----------------------------------------------------------------------
+ */
+
+#ifndef _TSP_CONST_DEF_H
+#define _TSP_CONST_DEF_H
+
+
+#define TSP_PROJECT_URL "https://savannah.nongnu.org/projects/tsp"
+
+
+/** TSP Version */
+#define TSP_PROTOCOL_VERSION 0x00010001
+
+/* We need abstract types for multi-platform portability */
+#include "tsp_abs_types.h"
+
+#define TSP_MAX_SYSMSG_SIZE 256
+
+/**
+ * Size of ringbuf  receiver 
+ * ex : 1000*100*10 = 10 sec depth for 1000 symbols 100Hz 
+ * FIXME : calculate the ringbuf depth using the base frequency
+ */
+#define TSP_CONSUMER_RINGBUF_SIZE (1000 * 100) * 10
+
+
+/* Max client total number */
+#define TSP_MAX_CLIENT_NUMBER 100
+
+/* Max server total number */
+#define TSP_MAX_SERVER_NUMBER 20
+
+#define TSP_MAX_REQUEST_HANDLERS TSP_MAX_SERVER_NUMBER
+
+/** Max period that can be asked by a consumer, for a symbol */
+#define TSP_MAX_PERIOD 100000
+
+
+/*-------- SOCKET --------*/
+
+/**
+ * Socket in and out fifo depth for Write and Read
+ * operations.
+ */
+#define TSP_DATA_STREAM_SOCKET_FIFO_SIZE (1024*48)
+
+/** Duration of stream sender fifo in seconds */
+#ifdef VXWORKS
+#define TSP_STREAM_SENDER_RINGBUF_SIZE 2
+#else
+#define TSP_STREAM_SENDER_RINGBUF_SIZE 10
+#endif
+
+
+/** used to calculate the socket buffer size */
+#define TSP_DATA_STREAM_MAX_HEADER_SIZE 1024
+
+/** No more than 2MB buffer size which is already HUGE */
+#define TSP_DATA_STREAM_MAX_BUFFER_MAXSIZE (1024*1024*2)
+
+/** FIXME explain that computation */
+#define TSP_DATA_STREAM_MAX_BUFFER_SIZE(group_max_byte_size)		\
+  ( (group_max_byte_size) > TSP_DATA_STREAM_MAX_BUFFER_MAXSIZE ? TSP_DATA_STREAM_MAX_BUFFER_MAXSIZE :  (group_max_byte_size) + TSP_DATA_STREAM_MAX_HEADER_SIZE )
+
+
+/** 
+ * Size of buffer used to receive the data
+ * FIXME : autocalculate this with max group size and TSP_DATA_STREAM_MAX_BUFFER_SIZE,
+ * for now, we use a huge value :(
+ */
+#define TSP_DATA_RECEIVER_BUFFER_SIZE (1024*512)
+
+
+/*-------- STREAM CONTROL -------*/
+
+/** 
+ * Control messages that can come from a provider, included in
+ * the data stream. Program level.
+ */
+enum TSP_msg_ctrl_t
+  {
+
+    /** Message control, end of stream */
+    TSP_MSG_CTRL_EOF,
+
+    /** Message control, end of stream and list of symbols changed */
+    TSP_MSG_CTRL_RECONF,
+
+    /** data were lost for all consumers by the GLU (ex : provider too slow) */
+    TSP_MSG_CTRL_GLU_DATA_LOST,
+
+    /** data were lost for a consumer (ex : consumer too slow) */
+    TSP_MSG_CTRL_CONSUMER_DATA_LOST
+
+  };
+
+typedef enum TSP_msg_ctrl_t TSP_msg_ctrl_t;
+
+/*-------- TSP PROTOCOL --------*/
+
+/** 
+ * Control messages that can come from a provider, included in
+ * the data stream. TSP protocol level. See TSP_msg_ctrl_t
+ */
+
+#define TSP_RESERVED_GROUP_EOF        0xFFFFFFFF
+
+/** FIXME : reserved for futur implementation of async symbols */
+#define TSP_RESERVED_GROUP_ASYNCHRONE 0xFFFFFFFE
+
+#define TSP_RESERVED_GROUP_RECONF     0xFFFFFFFD
+
+#define TSP_RESERVED_GROUP_GLU_DATA_LOST     0xFFFFFFFC
+
+#define TSP_RESERVED_GROUP_CONSUMER_DATA_LOST     0xFFFFFFFB
+
+/*  SPECIAL (NEGATIVE) VALUE for Provider Global Index */
+#define TSP_PGI_UNKNOWN_SYMBOL -1
+
+/*-------- MISC --------*/
+
+typedef u_int32_t channel_id_t;
+typedef u_int32_t version_id_t;
+typedef u_int32_t xdr_and_sync_type_t;
+
+typedef int time_stamp_t;
+
+/** Init values */
+#define TSP_UNDEFINED_CHANNEL_ID (-1)
+#define TSP_UNDEFINED_VERSION_ID (-1)
+
+/*-------- TSP COMMAND LINE ARGS --------*/
+
+
+/* Provider and consumer side */
+#define TSP_ARG_PREFIX            "--tsp-"
+#define TSP_ARG_STREAM_INIT_START TSP_ARG_PREFIX"stream-init-start"
+#define TSP_ARG_STREAM_INIT_STOP  TSP_ARG_PREFIX"stream-init-stop"
+
+/* Provider side only */
+#define TSP_ARG_SERVER_NUMBER     TSP_ARG_PREFIX"server-number"
+
+
+/* Stuff...*/
+#define TSP_ARG_DUMMY_PROG_NAME   "GLU"
+
+#define TSP_ARG_CONSUMER_USAGE   "TSP consumer usage : " \
+                                 "[" TSP_ARG_STREAM_INIT_START \
+                                 " commands ... " TSP_ARG_STREAM_INIT_STOP "] "
+
+#define TSP_ARG_PROVIDER_USAGE   "TSP provider Usage : " \
+                                 "[" TSP_ARG_STREAM_INIT_START \
+                                 " commands ... " TSP_ARG_STREAM_INIT_STOP "] " \
+                                 " [" TSP_ARG_SERVER_NUMBER " number ]"
+
+
+/*-------- XDR --------*/
+
+/**
+ * FIXME : XDR types. Will be used when the consumer will be able to
+ * chose several symbol types : double, string, raw ...For now
+ * only doubles (USER) implemented
+ */
+#define XDR_DATA_TYPE_RAW  	(1 << (16 + 0))
+#define XDR_DATA_TYPE_USER 	(1 << (16 + 1))
+#define XDR_DATA_TYPE_STRING 	(1 << (16 + 2))
+#define XDR_DATA_TYPE_MASK 	(0xFFFF0000)
+
+/**
+ * FIXME : Symbol types. Will be used when the consumer will be able to
+ * chose sync symbols and async symbols (not implemented). For now
+ * only sync implemented
+ */
+#define TSP_DATA_TYPE_SYNC  	(1 << 0)
+#define TSP_DATA_TYPE_ASYNC 	(1 << 1)
+#define TSP_DATA_TYPE_MASK 	(0xFFFF)
+
+/*-------- SERVER INFORMATION --------*/
+
+/* URL format to connect to a provider :
+ <protocol://host/server_name:server_number> */
+#define TSP_URL_FORMAT "%s://%s/%s:%d"
+
+/* Size of the information string for the server */
+#define STRING_SIZE_SERVER_INFO 256
+typedef char TSP_server_info_string_t[STRING_SIZE_SERVER_INFO+1]; 
+
+/**
+ * Server information struct.
+ * The informations in this struct are used by a client
+ * to get server information
+ */
+struct TSP_otsp_server_info_t
+{
+  TSP_server_info_string_t info; 
+};
+
+typedef struct  TSP_otsp_server_info_t TSP_otsp_server_info_t;
+
+/*-------- RPC --------*/
+#define TSP_RPC_PROTOCOL "rpc"
+#define TSP_XMLRPC_PROTOCOL "xmlrpc"
+
+#define TSP_DEFAULT_PROTOCOL TSP_RPC_PROTOCOL
+
+/**
+ * base RPC PROG_ID that will be used 
+ * to calculate the PROG ID for each server
+ */
+#define TSP_RPC_PROGID_BASE_COUNT 0x31230010
+
+/** Time out for client connection to server (secondes) )
+ * FIXME : not used yet 
+ */ 
+#define TSP_RPC_CONNECT_TIMEOUT 60
+
+/*------- SYSTEM -------*/
+
+/** SUSv2 guarantees that `Host names are limited to 255 bytes,
+ * but linux define MAXHOSTNAMELEN to be 64.
+ */
+#define TSP_MAXHOSTNAMELEN 255
+
+/* ------- URL LENGTH ----*/
+
+/**
+ * Max url length, 4096 looks like a sane value
+ * see http://www.faqts.com/knowledge_base/view.phtml/aid/329
+ */
+#define TSP_MAX_URL_LENGTH 4096
+
+/* ------- URL LENGTH ----*/
+
+/**
+ * Max url length, 4096 looks like a sane value
+ * see http://www.faqts.com/knowledge_base/view.phtml/aid/329
+ */
+#define TSP_MAX_URL_LENGTH 4096
+
+/*-------- MACROS --------*/
+
+#define TSP_CHECK_ALLOC(p, ret) \
+	{ \
+		if ( 0 == p ) \
+		{ \
+			STRACE_ERROR(("TSP_CHECK_ALLOC : ERROR : Memory allocation failed"))  \
+			return ret; \
+		} \
+	}
+
+#define TSP_CHECK_POINTER(p, ret, msg)		\
+	{ \
+		if ( NULL == p ) \
+		{ \
+			STRACE_ERROR(("TSP_CHECK_POINTER : NULL POINTER : " # msg ))  \
+			return ret; \
+		} \
+	}
+
+#define TSP_CHECK_THREAD(status, ret) \
+	{ \
+		if ( 0 != status ) \
+		{ \
+			STRACE_ERROR(("TSP_CHECK_THREAD : ERROR : Thread API Error status = %d",status))  \
+			return ret; \
+		} \
+	}	
+	
+#define TSP_LOCK_MUTEX(mutex, ret) \
+	{ \
+		if ( 0 != pthread_mutex_lock(mutex) )\
+		{ \
+			STRACE_ERROR(("TSP_LOCK_MUTEX : ERROR : Mutex Lock Error"))  \
+			return ret; \
+		} \
+	}	
+
+#define TSP_UNLOCK_MUTEX(mutex, ret) \
+	{ \
+		if ( 0 != pthread_mutex_unlock(mutex) ) \
+		{ \
+			STRACE_ERROR(("TSP_UNLOCK_MUTEX : ERROR : Mutex Unlock Error"))  \
+			return ret; \
+		} \
+	}	
+
+#define TSP_CHECK_STATUS_OK(status, ret) \
+  {					 \
+    if (TSP_STATUS_OK != status)         \
+      {		                         \
+	return ret;			 \
+      }					 \
+  }
+
+/*-------- DATA STREAM ENDIAN CONVERSION --------*/
+
+/**
+ * some macro used to respect indianity between consumer and producer.
+ * FIXME : the default endianity used by the producer should be its
+ * endianity so as to be CPU friendly for the producer. At least this
+ * should be the default behaviour. Then, a lazy consumer should be able
+ * to tell a producer that he wants to receive the data in its native
+ * endianity.
+ * FIXME: Erk: look at Corba CDR-encoding fashion to handle endianity.
+ * FIXME:      which may be instructive.
+ */
+#define TSP_ENCODE_DOUBLE_TO_UINT64(val) (TSP_UINT64_TO_BE (*(uint64_t*)(val) ))
+#define TSP_DECODE_DOUBLE_TO_UINT64(val) (TSP_UINT64_FROM_BE (*(uint64_t*) (val) ))
+
+#define TSP_ENCODE_FLOAT_TO_UINT32(val) (TSP_UINT32_TO_BE (*(uint32_t*)(val) ))
+#define TSP_DECODE_FLOAT_TO_UINT32(val) (TSP_UINT32_FROM_BE (*(uint32_t*) (val) ))
+
+#define TSP_ENCODE_INT(val) (TSP_INT_TO_BE (val))
+#define TSP_DECODE_INT(val) (TSP_INT_FROM_BE (val))
+
+
+#define TSP_ENCODE_INT64(val) (TSP_INT64_TO_BE (*(int64_t*) (val) ))
+#define TSP_DECODE_INT64(val) (TSP_INT64_FROM_BE (*(int64_t*) (val) ))
+
+#define TSP_ENCODE_UINT64(val) (TSP_UINT64_TO_BE (*(uint64_t*) (val) ))
+#define TSP_DECODE_UINT64(val) (TSP_UINT64_FROM_BE (*(uint64_t*) (val) ))
+
+#define TSP_ENCODE_UINT32(val) (TSP_UINT32_TO_BE (*(uint32_t*) (val) ))
+#define TSP_DECODE_UINT32(val) (TSP_UINT32_FROM_BE (*(uint32_t*) (val) ))
+
+#define TSP_ENCODE_INT32(val) (TSP_INT32_TO_BE (*(int32_t*) (val) ))
+#define TSP_DECODE_INT32(val) (TSP_INT32_FROM_BE (*(int32_t*) (val) ))
+
+#define TSP_ENCODE_UINT16(val) (TSP_UINT16_TO_BE (*(uint16_t*) (val) ))
+#define TSP_DECODE_UINT16(val) (TSP_UINT16_FROM_BE (*(uint16_t*) (val) ))
+
+#define TSP_ENCODE_INT16(val) (TSP_INT16_TO_BE (*(int16_t*) (val) ))
+#define TSP_DECODE_INT16(val) (TSP_INT16_FROM_BE (*(int16_t*) (val) ))
+
+#define TSP_ENCODE_UINT(val) (TSP_UINT_TO_BE (*(uint8_t*) (val) ))
+#define TSP_DECODE_UINT(val) (TSP_UINT_FROM_BE (*(uint8_t*) (val) ))
+ 
+
+#endif /*_TSP_CONST_DEF_H*/
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_glu.h tsp-0.8.3-Source-Rtems/src/core/include/tsp_glu.h
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_glu.h	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_glu.h	2007-10-29 10:51:30.000000000 +0100
@@ -38,6 +38,10 @@
 #ifndef _TSP_GLU_H
 #define _TSP_GLU_H
 
+#ifdef TSP_RTEMS
+# include <sys/types.h>		 /* for types compatibility with RTEMS*/
+#endif /* _TSP_RTEMS_ */
+
 #include <tsp_prjcfg.h>
 #include <tsp_datastruct.h>  /* FIXME : just for TSP_sample_symbol_info_list_t, and shouldn't use generated rpc struct */
 #if defined (WIN32)
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_glu.h~ tsp-0.8.3-Source-Rtems/src/core/include/tsp_glu.h~
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_glu.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_glu.h~	2007-10-16 17:31:30.000000000 +0200
@@ -0,0 +1,482 @@
+/*
+
+$Id: tsp_glu.h,v 1.16 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer: tsp@astrium.eads.net
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Interface for the glue server : the data producer
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef _TSP_GLU_H
+#define _TSP_GLU_H
+
+#ifdef RTEMS
+#include <sys/types.h>
+#endif
+
+#include <tsp_prjcfg.h>
+#include <tsp_datastruct.h>  /* FIXME : just for TSP_sample_symbol_info_list_t, and shouldn't use generated rpc struct */
+#if defined (WIN32)
+#include <pthread.h>
+#endif
+/* forward declare datapool type */
+struct TSP_datapool;
+
+
+/**
+ * @defgroup TSP_GLULib GLU Library
+ * @ingroup TSP_ProviderLib
+ * The GLU is the part of the TSP provider that should be
+ * coded each time the underlying 'real' sampled system 
+ * (hardware card, simulator, ...) change.
+ * The GLU object interface @ref GLU_handle_t should be implemented in order to combine
+ * the TSP provider lib in a real TSP provider.
+ * @{
+ */
+
+/**
+ * Asynchronous write "allowed" value.
+ */
+#define TSP_ASYNC_WRITE_ALLOWED   1
+/**
+ * Asynchronous write "forbidden" value.
+ */
+#define TSP_ASYNC_WRITE_FORBIDDEN 0
+
+
+/** GLU server type */
+typedef enum GLU_server_type_t
+{
+  /** 
+   * GLU is active. Means that the data are continuously produced
+   * and must be read at the same pace (or faster) by the provider.
+   * When GLU is active their shouldn'tr be more that one 
+   * GLU instance running by provider.
+   * @see GLU_get_instance.
+   */
+  GLU_SERVER_TYPE_ACTIVE,
+
+  /** 
+   * GLU is passive. Means that the data are produced only when the
+   * provider ask for them (typically File Based Glu/Provider)
+   */
+  GLU_SERVER_TYPE_PASSIVE
+} GLU_server_type_t;
+
+
+/**
+ * The state of the GLU.
+ */
+typedef enum GLU_get_state_t
+{
+  /** new item available */
+  GLU_GET_NEW_ITEM,
+
+  /** no item available */
+  GLU_GET_NO_ITEM,
+
+  /** end of data stream */
+  GLU_GET_EOF,
+
+  /** end of data stream, and GLU list of symbols changed, all
+      client will have to ask fo the new symbol list */
+  GLU_GET_RECONF,
+
+  /** Data were lost in GLU internals ; 
+      The provider might be too slow and/or the GLU too fast, 
+      and/or the CPU overloaded : all clients will be notified
+      by the provider */
+  GLU_GET_DATA_LOST
+
+} GLU_get_state_t;
+
+/** 
+ * Item used to transmit a sample data
+ * from the GLU to the datapool of the TSP provider lib.
+ */
+typedef struct glu_item_t
+{
+  /**
+   * The GLU timestamp
+   */
+  time_stamp_t time;
+  /**
+   * The PGI of the concerned sample
+   */
+  int32_t      provider_global_index;
+  /**
+   * Pointer to the raw sample value.
+   */
+  void*        raw_value;
+  /**
+   * The size of the pointer to be copied.
+   * The size may vary for different type
+   * including array version.
+   */
+  uint32_t     size;
+
+} glu_item_t;
+
+/*
+ * Define the GLU handle data type
+ */
+struct GLU_handle_t; /* necessary forward declaration */
+/** 
+ * GLU server name getter.
+ * This string will be used by the consumers to get informations
+ * about a provider. It must be meaningfull (ex : "Temperatures Sampler" ) 
+ */
+typedef char*              (* GLU_get_server_name_ft   )(struct GLU_handle_t* cthis);
+/**
+ * GLU server type getter.
+ * Will get the GLU type i.e. ACTIVE or PASSIVE.
+ * @return GLU server type.
+ */
+typedef GLU_server_type_t  (* GLU_get_server_type_ft   )(struct GLU_handle_t* cthis);
+/**
+ * Default GLU base frequency.
+ * @return GLU base frequency (Hz)
+ */
+typedef double             (* GLU_get_base_frequency_ft)(struct GLU_handle_t* cthis);
+/**
+ * The maximum number of consumer connection
+ * @return maximum number of consumer connection
+ */
+typedef int32_t             (* GLU_get_nb_max_consumer_ft)(struct GLU_handle_t* cthis);
+/**
+ * GLU instance creation.
+ * This function will be called by the provider for each consumer
+ * connection.
+ * This function is the place where the GLU must be instanciated.
+ * 
+ * - When the GLU is type ACTIVE, it must be a singleton and must
+ * be instanciated once ( i.e. the first time this function is called).
+ * When the instanciation of an ACTIVE GLU succed this function always
+ * returns the value GLU_GLOBAL_HANDLE (and for all the subsequent calls
+ * that should not create a new GLU, and always should always succed).
+ * 
+ * - When the GLU is type PASSIVE, for each consumer connection a new
+ * GLU must be instanciated ; use the GLU_handle_t type to reference your
+ * GLU object and return this handle when the instanciation succed
+ * 
+ * @param custom_argc Number of consumer initialisation elements
+ * (when the consumer do not provide any parameters
+ * this parameter is equal to fallback_argc of GLU_init)
+ * @param custom_argv Initialisation elements
+ * The first usefull parameter is always
+ * fallback_argv[1], so as the getopt* functions may be used to
+ * parse those parameters (when the consumer do not provide any parameters
+ * this parameter is equal to fallback_argv of GLU_init)
+ * @param error_info When the function fail the GLU may use this parameter
+ * to return an error string that will be transmited to the consumer
+ * to get detailed information about the error. 
+ * @return The created GLU handle. Returns 0 when the function fail
+ */
+typedef struct GLU_handle_t*      (* GLU_get_instance_ft      )(struct GLU_handle_t* cthis, int32_t custom_argc, char* custom_argv[], char** error_info);
+/**
+ * GLU initialization function.
+ *
+ * The code in this function will be called once,
+ * and may do any usefull global check and initialization. 
+ * Usually the data stream should not be started in this function
+ * as there is no connected consumer when this function is
+ * called. To start your data stream, wait for the first GLU_get_instance
+ * function that will be called for each consumer connection
+ *
+ * The parameters for this function come from the parameters
+ * that may have been provided thrue the command line that was used
+ * to launch the provider. In this function the GLU should not use these
+ * parameters, but it should check their value, as these value
+ * will be used as fallback parameters for the GLU_get_instance function
+ * each time a consumer connect to the provider and does not provide
+ * its own parameters
+ *
+ * the GLU may then for this function return :
+ * - FALSE if it does not want to be started ( ex : when the
+ * parameters are incorrect, or when there is no parameters
+ * at all and this GLU exepects parameters). The provider
+ * will stop.
+ * - TRUE if everything is OK
+ *
+ * NOTE1 : Sometimes, the the only way to check the provided
+ * parameters is to start the data stream. If so,
+ * the data stream must not be started a second time 
+ * in the get_instance function.
+ * 
+ * NOTE2 : This string is provided in this function for fallback
+ * test only and should not be memorized by the GLU server
+ *
+ * NOTE3 : When there is not fallback stream at all, the value
+ * of fallback_argv  is 0. It is up to the GLU server
+ * to decide if it is acceptable for the provider to be 
+ * started with no fallback stream at all (it usually is
+ * acceptable)
+ *
+ * @param this, the GLU handle
+ * @param fallback_argc Number of fallback initialisation elements as used in main(argc, argv)
+ * @param fallback_argv Fallback initialisation elements as used in main(argc, argv)
+ * The first usefull parameter is always
+ * fallback_argv[1], so as the getopt* functions may be used to
+ * parse those parameters
+ * @return Return FALSE if a fatal error occur during initialisation
+ * or if there is a probleme with the provided parameters
+ */
+typedef int32_t                (* GLU_init_ft              )(struct GLU_handle_t* cthis,int32_t fallback_argc, char* fallback_argv[]);
+/**
+ * Start the loop that will push data to datapool with push_next_item
+ * 
+ * @return status 
+ */
+typedef void*              (* GLU_run_ft               )(void* cthis);
+/**
+ * Start push datapool GLU activity AS A SEPARATE thread.
+ * The start function should NOT block, the defaut implementation
+ * is to start a new thread running the 'GLU_run_ft' of the GLU. 
+ * @return 0 on success and other value on error.
+ */
+typedef int32_t                (* GLU_start_ft             )(struct GLU_handle_t* cthis);
+/** 
+ * GLU_get_provider_global_indexes provider global indexes corresponding
+ * to given symbol list. Used to validate client provided symbol list
+ * @param[in] symbol_list the symbol list to validate
+ * @param[out] pg_indexes array containing corresponding provider global indexes or -1 if not found 
+ * @return TRUE if all symbol found, else return FALSE 
+ */
+typedef int32_t                (* GLU_get_pgi_ft           )(struct GLU_handle_t* cthis, TSP_sample_symbol_info_list_t* symbol_list, int* pg_indexes);
+/**
+ * List of symbols managed by the GLU.
+ * @param this Handle for the GLU (when the GLU is ACTIVE, it is always equal to GLU_GLOBAL_HANDLE)
+ * @param symbol_list List of symbols
+ * @return TRUE of FALSE. TRUE = OK;
+ */
+typedef int32_t                (* GLU_get_ssi_list_ft  )(struct GLU_handle_t* cthis, TSP_sample_symbol_info_list_t* symbol_list);
+
+/**
+ * Filtered list of symbols managed by the GLU.
+ * @param[in] cthis Handle for the GLU (when the GLU is ACTIVE, it is always equal to GLU_GLOBAL_HANDLE)
+ * @param[in] filter_kind the filter kind
+ * @param[in] filter_string the filter string
+ * @param[out] ans_sample the answer_sample to be filled-in by the GLU.
+ * @return TRUE of FALSE. TRUE = OK;
+ */
+typedef int32_t                (* GLU_get_filtered_ssi_list_ft)(struct GLU_handle_t* cthis, int32_t filter_kind, char* filter_string, TSP_answer_sample_t* symbol_list);
+
+/**
+ * Get Sample Symbols Info list from PGI lists.
+ * @param[in] cthis Handle for the GLU (when the GLU is ACTIVE, it is always equal to GLU_GLOBAL_HANDLE)
+ * @param[in] pgis the array of requested PGI
+ * @param[in] pgis_len the length of the pgis array
+ * @param[in,out] the preallocated SSI list. 
+ * @return TRUE of FALSE. TRUE = OK;
+ */
+typedef int32_t                (* GLU_get_ssi_list_fromPGI_ft)(struct GLU_handle_t* cthis, int* pgis, int32_t pgis_len, TSP_sample_symbol_info_list_t* SSI_list);
+
+/**
+ * Get Sample Symbols Extended Info list from PGI lists.
+ * @param[in] cthis Handle for the GLU (when the GLU is ACTIVE, it is always equal to GLU_GLOBAL_HANDLE)
+ * @param[in] pgis the array of requested PGI
+ * @param[in] pgis_len the length of the pgis array
+ * @param[in,out] on entry the preallocated SSEI list, on return the updated SSEI list
+ * @return TRUE of FALSE. TRUE = OK;
+ */
+typedef int32_t                (* GLU_get_ssei_list_fromPGI_ft)(struct GLU_handle_t* cthis, int* pgis, int32_t pgis_len, TSP_sample_symbol_extended_info_list_t* SSEI_list);
+
+/**
+ * Get the number of symbols managed by the GLU.
+ * @param this Handle for the GLU (when the GLU is ACTIVE, it is always equal to GLU_GLOBAL_HANDLE)
+ * @return the number of symbols;
+ */
+typedef int32_t                (* GLU_get_nb_symbols_ft  )(struct GLU_handle_t* cthis);
+
+/**
+ * GLU asynchronous sample write.
+ * This function will be called by the provider for TSP_async_sample_write.
+ * The convention fixed is : if we can write with this function the sample
+ * represented by its provider_global_index (correct pgi and authorization by
+ * the GLU), the number returned is >0; else the number returned is <= 0
+ *
+ * @param[in] pgi        the index of the symbol concerned by the writing
+ * @param[in] value_ptr  the new value of the symbol
+ * @param[in] value_size the size of the value.
+ * @return >0 on success <=0 on failure
+ */
+typedef int32_t                (* GLU_async_sample_write_ft)(struct GLU_handle_t* cthis, int32_t pgi, void* value_ptr, uint32_t value_size);
+
+/**
+ * GLU asynchronous sample read.
+ * This function will be called by the provider for each TSP_async_sample_read.
+ * The convention fixed is : if we can write with this function the sample
+ * represented by its provider_global_index (correct pgi and authorization by
+ * the GLU), the number returned is >0; else the number returned is <= 0
+ *
+ * @param[in] pgi        the index of the symbol concerned by the writing
+ * @param[in] value_ptr  the new value of the symbol
+ * @param[in,out] value_size the size of the value.
+ * @return >0 on success <=0 on failure
+ */
+typedef int32_t                (* GLU_async_sample_read_ft)(struct GLU_handle_t* cthis, int32_t pgi, void* value_ptr, uint32_t* value_size);
+
+                
+/** 
+ * GLU handle object.
+ * This object represents a GLU instance.
+ * It contains some minimal data and 
+ * function pointer which are 'methods' 
+ * for this object.
+ * GLU creation function provides a pre-initialize GLU_handle_t 
+ * structure with default implementation for some methods.
+ * Specific GLU implementation may overrides thoses methods
+ * with more efficient ones.
+ */
+typedef struct GLU_handle_t {
+
+  pthread_t                 tid;             /**< The GLU thread Id */
+  char*                     name;            /**< The GLU name */
+  GLU_server_type_t         type;            /**< The GLU type */  
+  double                    base_frequency;  /**< The provider base frequency */
+  int32_t                   nb_max_consumer; /**< The provider base frequency */
+  int32_t                   nb_connected_consumer; /**< The number of currently connected consumers using this GLU instance */
+  void*                     private_data;    /**< The opaque pointer extensibility point */
+  struct TSP_datapool*      datapool;
+
+  /**
+   * Name getter
+   */
+  GLU_get_server_name_ft     get_name; 
+  /**
+   * Type getter.
+   */
+  GLU_get_server_type_ft     get_type; 
+  /**
+   * Base frequency getter
+   */ 
+  GLU_get_base_frequency_ft  get_base_frequency;
+  /**
+   * max consumer getter
+   */ 
+  GLU_get_nb_max_consumer_ft get_nb_max_consumer;
+  /**
+   * instance getter 
+   */
+  GLU_get_instance_ft        get_instance;
+  /**
+   * Initializer member function.
+   */
+  GLU_init_ft                initialize;
+  /**
+   * Run member function.
+   */
+  GLU_run_ft                 run;
+  /**
+   * Start member function.
+   */
+  GLU_start_ft               start;
+  /**
+   * Get valid PGI list from sample symbol list
+   * member function.
+   */
+  GLU_get_pgi_ft                 get_pgi;
+  /**
+   * Get complete sample symbol info list
+   * member function.
+   */
+  GLU_get_ssi_list_ft            get_ssi_list;
+  /**
+   * Get filetered sample symbol info list
+   * member function.
+   */  
+  GLU_get_filtered_ssi_list_ft   get_filtered_ssi_list;
+  /** 
+   * Get sample symbol info list from PGI list.
+   */
+  GLU_get_ssi_list_fromPGI_ft    get_ssi_list_fromPGI;
+  /** 
+   * Get sample symbol extended info list from PGI list.
+   */
+  GLU_get_ssei_list_fromPGI_ft   get_ssei_list_fromPGI;
+  /**
+   * Get total number of available symbols
+   * member function.
+   */ 
+  GLU_get_nb_symbols_ft          get_nb_symbols; 
+  /**
+   * Asynchronous read
+   * member function.
+   */
+  GLU_async_sample_read_ft       async_read;
+  /**
+   * Asynchronous write
+   * member function.
+   */
+  GLU_async_sample_write_ft      async_write;
+  
+} GLU_handle_t;
+
+BEGIN_C_DECLS
+
+/**
+ * Create a GLU_handle. 
+ * This will provide some default implementation for member function.
+ * @param[out] glu pointer to a GLU_handle pointer that will be allocated
+ * @param[in] name the name of the GLU that will be advertised by the TSP provider.
+ * @param[in] type the type of the GLU @see GLU_server_type_t
+ * @param[in] base_frequency the base frequency that will be advertised by the TSP provider
+ * @return TRUE if ok FALSE otherwise
+ */
+_EXPORT_TSP_PROVIDER int32_t GLU_handle_create(GLU_handle_t** glu, const char* name, const GLU_server_type_t type, const double base_frequency);
+
+/**
+ * Destroy a GLU_handle.
+ * @param[out] glu pointer to a GLU_handle pointer that will be allocated
+ * @return TRUE if ok FALSE otherwise
+ */
+int32_t GLU_handle_destroy(GLU_handle_t** glu);
+
+/**
+ * Check a GLU_handle for consistency.
+ * This function may be called after specific GLU initialisation 
+ * in order to verify member function pointer consistency and values:
+ * <ul>
+ *     <li> mandatory member functions must not be NULL </li>
+ *     <li> try to detect unwanted circular reference between 
+ *          provided and default member function(s) </li> 
+ * </ul>
+ * @param[in] glu the GLU_handle object to be checked.
+ * @return TRUE if ok FALSE otherwise
+ */
+int32_t GLU_handle_check(GLU_handle_t* glu);
+
+
+/** @} */
+
+END_C_DECLS
+
+#endif /* _TSP_GLU_H */
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_prjcfg.h tsp-0.8.3-Source-Rtems/src/core/include/tsp_prjcfg.h
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_prjcfg.h	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_prjcfg.h	2007-10-16 15:43:04.000000000 +0200
@@ -0,0 +1,92 @@
+/* -*- c -*-
+
+/home/def/package/tsp_083_clean/src/core/include/tsp_prjcfg.h generated from include/tsp_prjcfg.h.in by CMake.
+
+$Id: tsp_prjcfg.h.in,v 1.9 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer: tsp@astrium-space.com
+Component : Consumer / Provider
+
+-----------------------------------------------------------------------
+Purpose   : some includes
+-----------------------------------------------------------------------
+/home/def/package/tsp_083_clean/src/core/include/tsp_prjcfg.h generated from include/tsp_prjcfg.h.in by CMake.
+ */
+
+#ifndef __TSP_PRJCFG_H
+#define __TSP_PRJCFG_H
+
+#include <tsp_abs_types.h>
+#include <tsp_const_def.h>
+
+/* 
+ * The following macro should be used to print-out TSP 
+ * version in binary executable. We should find a way to 
+ * automatically change this when tagging...
+ */
+#define TSP_SOURCE_VERSION "0.8.3"
+
+#include <tsp_simple_trace.h>
+
+/*
+ * The following macro is used under windows system to declare 
+ * the DLLs tsp_provider, tsp_common entries points
+ */
+#undef _EXPORT_TSP_PROVIDER
+#undef _EXPORT_TSP_COMMON
+#if defined (WIN32) && defined (TSP_SHARED_LIBS)
+#  ifdef tsp_provider_EXPORTS
+#    define _EXPORT_TSP_PROVIDER __declspec(dllexport)
+#  else
+#    define _EXPORT_TSP_PROVIDER __declspec(dllimport)
+#  endif
+#  ifdef tsp_common_EXPORTS
+#    define _EXPORT_TSP_COMMON __declspec(dllexport) 
+#  else
+#    define _EXPORT_TSP_COMMON __declspec(dllimport) 
+#  endif
+#else
+#  define _EXPORT_TSP_PROVIDER
+#  define _EXPORT_TSP_COMMON
+#endif
+
+/*
+ * The following macro is used under windows system to declare 
+ * the DLLs tsp_provider, tsp_common constant variables
+ */
+#if defined (_EXPORT_TSP_COMMON) && defined(WIN32)
+#  define _EXTERN_TSP_COMMON extern _EXPORT_TSP_COMMON
+#else
+#  define _EXTERN_TSP_COMMON extern
+#endif
+
+/* 
+ * The TSP doxygen modules are now defined
+ * in tsp/src/doxy/tsp_doc_tree.dox
+ */
+
+
+#endif /* _PRJCFG_H */
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_sys_headers.h tsp-0.8.3-Source-Rtems/src/core/include/tsp_sys_headers.h
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_sys_headers.h	2007-01-29 17:52:39.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_sys_headers.h	2007-10-29 10:54:26.000000000 +0100
@@ -67,7 +67,7 @@
 
 #include <string.h>
 
-#ifndef WIN32
+#if  !defined(WIN32) && !defined(TSP_RTEMS)
 #include <strings.h>
 #endif
 
diff -urN tsp-0.8.3-Source-Reference/src/core/include/tsp_sys_headers.h~ tsp-0.8.3-Source-Rtems/src/core/include/tsp_sys_headers.h~
--- tsp-0.8.3-Source-Reference/src/core/include/tsp_sys_headers.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/include/tsp_sys_headers.h~	2007-01-29 17:52:39.000000000 +0100
@@ -0,0 +1,114 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/include/tsp_sys_headers.h,v 1.23 2007/01/29 16:52:39 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium.eads.net
+Component : Consumer / Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : 
+-----------------------------------------------------------------------
+ */
+
+#ifndef __TSP_SYS_HEADERS_H
+#define __TSP_SYS_HEADERS_H
+
+#ifdef __FreeBSD__
+#include <rpc/rpc.h>
+#endif /* __FreeBSD__ */
+
+#ifdef __OpenBSD__
+#include <rpc/rpc.h>
+/* OpenBSD's rpcgen has timeout support and declares _rpcsvcdirty as extern */
+int _rpcsvcdirty;
+#endif /* __OpenBSD__ */
+
+/* FIXME using POSIX_SOURCE on SOLARIS gives me very strange compilation trouble (Erk) */
+#if !defined(_POSIX_SOURCE) && !(defined(sun) || defined(__sun))
+#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 199506L
+#endif
+
+#ifndef WIN32
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#if defined(sun) || defined(__sun)
+#include <alloca.h>
+#include <rpc/rpc.h>
+#endif
+
+#include <string.h>
+
+#ifndef WIN32
+#include <strings.h>
+#endif
+
+#include <errno.h>
+
+#ifndef WIN32 /* conflict error C2011 under VC++, already include by <rpc/rpc.h> */
+#include <netdb.h>
+#endif
+
+
+/* 
+ * Used for gprof to work for linux multi-thread programs.
+ * Do not use this with others targets 
+ */
+#ifdef MT_GPROF
+#include "tsp_mtgprof.h"
+#define pthread_create gprof_pthread_create
+#endif
+
+/* OSF1 / Alpha */
+#if defined (__osf__) && defined (__alpha)
+# define strtoll strtol
+# define strtoull strtoul
+#endif /* OSF1 / Alpha */
+
+#include <pthread.h>
+#ifndef WIN32
+#include <sys/time.h>
+#include <sys/param.h>
+#endif
+
+#ifdef VXWORKS
+/* VXWORKS part */
+# include <hostLib.h>
+# include <sockLib.h>
+# include <logLib.h>
+# include <tickLib.h>
+# include <taskLib.h>
+/* posix part */
+# include <libgen.h>
+# include <strings.h>
+#endif /* VXWORKS */
+
+#endif
diff -urN tsp-0.8.3-Source-Reference/src/core/misc_utils/tsp_time.c tsp-0.8.3-Source-Rtems/src/core/misc_utils/tsp_time.c
--- tsp-0.8.3-Source-Reference/src/core/misc_utils/tsp_time.c	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/misc_utils/tsp_time.c	2007-10-22 11:00:01.000000000 +0200
@@ -70,7 +70,7 @@
 #ifdef TSP_SYSTEM_HAVE_THREADSAFE_USLEEP
   return usleep(useconds);
 #else
-  
+ 
 #ifdef TSP_SYSTEM_USE_WIN32_SLEEP
   Sleep(useconds / 1000);
   return 0;
diff -urN tsp-0.8.3-Source-Reference/src/core/misc_utils/tsp_time.c~ tsp-0.8.3-Source-Rtems/src/core/misc_utils/tsp_time.c~
--- tsp-0.8.3-Source-Reference/src/core/misc_utils/tsp_time.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/misc_utils/tsp_time.c~	2007-10-16 17:19:50.000000000 +0200
@@ -0,0 +1,86 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/misc_utils/tsp_time.c,v 1.11 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Interface for tsp time functions
+
+-----------------------------------------------------------------------
+ */
+
+#include <time.h>
+
+#include "tsp_sys_headers.h"
+
+#include "tsp_time.h"
+
+#if defined (WIN32)
+#include <rpc/rpc.h>
+#endif
+tsp_hrtime_t tsp_gethrtime()
+{
+#ifdef TSP_SYSTEM_HAVE_GETHRTIME
+  return gethrtime();
+#else
+  struct timeval tp;
+  gettimeofday(&tp, (void*)NULL);
+   return ((tsp_hrtime_t)tp.tv_sec *  TSP_INT64_CONSTANT(1000000000)
+	   + (tsp_hrtime_t)tp.tv_usec*TSP_INT64_CONSTANT(1000));
+#endif
+}
+
+
+int tsp_usleep(int useconds)
+{
+
+#ifdef TSP_SYSTEM_HAVE_NANOSLEEP
+  struct timespec ts;
+  ts.tv_sec = useconds / 1000000;
+  ts.tv_nsec = (useconds % 1000000) * 1000;
+  return nanosleep(&ts, NULL);
+#else
+
+#ifdef TSP_SYSTEM_HAVE_THREADSAFE_USLEEP
+  return usleep(useconds);
+#else
+/*  
+#ifdef TSP_SYSTEM_USE_WIN32_SLEEP
+  Sleep(useconds / 1000);
+  return 0;
+#else
+  ERROR__you_should_try_to_find_some_kind_of_wait_function
+#endif /*TSP_SYSTEM_HAVE_SLEEP*/
+
+#endif /*TSP_SYSTEM_HAVE_THREADSAFE_USLEEP*/
+
+#endif /*TSP_SYSTEM_HAVE_NANOSLEEP*/
+
+}
+
Les fichiers binaires tsp-0.8.3-Source-Reference/src/core/misc_utils/tsp_time.o et tsp-0.8.3-Source-Rtems/src/core/misc_utils/tsp_time.o sont différents.
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_client.c tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_client.c
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_client.c	2007-03-01 23:26:39.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_client.c	2007-10-29 09:50:08.000000000 +0100
@@ -67,16 +67,33 @@
 
 CLIENT* tsp_remote_open_progid(const char *target_name, int progid)
 {
-
+  int sock = -1;      // modif pour RTEMS
+  struct hostent *hp;
+	struct sockaddr_in farAddr;
   CLIENT* cl = (CLIENT *)0;
   /* struct timeval timeout = { 1, 0 }; */
 
-  /*cl = clnt_create_timed(target_name, progid, TSP_RPC_VERSION_INITIAL, "tcp",&timeout );*/
+  /* modifie */
+	hp = gethostbyname (target_name);
+	if (hp == NULL) {
+		fprintf (stderr, "No server %s\n", target_name);
+		return 2;
+	}
+	/*
+	 * Set up server address
+	 * TCP_PORT = 15376 fixe pour RTEMS
+	 */
+	farAddr.sin_family = hp->h_addrtype;
+	farAddr.sin_port = htons (TCP_PORT);
+	memcpy((char*)&farAddr.sin_addr, hp->h_addr, hp->h_length);
 
-  cl = clnt_create(target_name, progid, TSP_RPC_VERSION_INITIAL, "tcp");
+  /*cl = clnt_create_timed(target_name, progid, TSP_RPC_VERSION_INITIAL, "tcp",&timeout );*/
 
+  //cl = clnt_create(target_name, progid, TSP_RPC_VERSION_INITIAL, "tcp");  	
+	cl = clnttcp_create (&farAddr, TSP_RPC, TSP_RPC_VERSION_INITIAL, &sock, 0, 0);
+	
   if (cl == (CLIENT *)0) {
-    STRACE_ERROR(("ERROR : GLOBAL clnt_create failed for host <%s> / progid <%d/0x%08X>", target_name, progid,progid));
+    STRACE_ERROR(("ERROR : GLOBAL clnt_create failed for host <%s> / progid <%d/0x%08X>", target_name, progid, progid));
   }
   else {
     STRACE_INFO(("CONNECTED to server %s", target_name));
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_client.c~ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_client.c~
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_client.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_client.c~	2007-10-26 17:05:10.000000000 +0200
@@ -0,0 +1,368 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/rpc/tsp_client.c,v 1.20 2007/03/01 22:26:39 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Consumer
+
+-----------------------------------------------------------------------
+
+Purpose   : 
+
+-----------------------------------------------------------------------
+ */
+
+#include "tsp_sys_headers.h"
+#include "tsp_client.h"
+
+#include "tsp_rpc.h"
+#include "tsp_rpc_confprogid.h"
+
+int tsp_wrap_rpc_clnt_set_timeout(CLIENT *client, int timeout);
+
+#define LOCAL_RPCCHECK_NORETURN  	if( server == (TSP_server_t)0)  \
+                                        { STRACE_ERROR(("RPCCHECK failed")) ;} 
+
+#define LOCAL_RPCCHECK_FALSE  	if( server == (TSP_server_t)0)  \
+				{ STRACE_ERROR(("RPCCHECK failed")) ; return FALSE ;} 
+				
+#define LOCAL_RPCCHECK_0  	if( server == (TSP_server_t)0) \
+				{ STRACE_ERROR(("RPCCHECK failed")) ; return 0 ;} 
+
+TSP_provider_info_t * tsp_provider_information(TSP_server_t server)
+{
+
+  TSP_provider_info_t* result;
+	
+  LOCAL_RPCCHECK_0;
+	
+  result = tsp_provider_information_1(server);
+  TSP_STRACE_RPC_ERROR(server, result);
+	
+  return result;
+}	
+
+CLIENT* tsp_remote_open_progid(const char *target_name, int progid)
+{
+  int sock = -1;      // modif
+  struct hostent *hp;
+	struct sockaddr_in farAddr;
+  CLIENT* cl = (CLIENT *)0;
+  /* struct timeval timeout = { 1, 0 }; */
+
+  /* modifie */
+	hp = gethostbyname (target_name);
+	if (hp == NULL) {
+		fprintf (stderr, "No server %s\n", target_name);
+		return 2;
+	}
+	/*
+	 * Set up server address
+	 */
+	farAddr.sin_family = hp->h_addrtype;
+	farAddr.sin_port = htons (TCP_PORT);
+	memcpy((char*)&farAddr.sin_addr, hp->h_addr, hp->h_length);
+
+  /*cl = clnt_create_timed(target_name, progid, TSP_RPC_VERSION_INITIAL, "tcp",&timeout );*/
+
+  //cl = clnt_create(target_name, progid, TSP_RPC_VERSION_INITIAL, "tcp");  	
+	cl = clnttcp_create (&farAddr, TSP_RPC, TSP_RPC_VERSION_INITIAL, &sock, 0, 0);
+	
+  if (cl == (CLIENT *)0) {
+    STRACE_ERROR(("ERROR : GLOBAL clnt_create failed for host <%s> / progid <%d/0x%08X>", target_name, progid, progid));
+  }
+  else {
+    STRACE_INFO(("CONNECTED to server %s", target_name));
+    /* Set time out */
+    tsp_wrap_rpc_clnt_set_timeout(cl, TSP_RPC_CONNECT_TIMEOUT);    
+  }
+ 
+  return cl;
+	
+}
+
+int TSP_remote_open_server( const char *protocol,
+			    const char *target_name,
+			    const char *server_name,
+			    const int server_id, 
+			    TSP_server_t* server,
+			    TSP_server_info_string_t server_info)
+{
+
+  int prodid_max_number, progid;
+  int ret = FALSE;
+  TSP_provider_info_t* server_info_t;
+	
+  *server = (TSP_server_t)0;
+  server_info[0] = '\0';
+	
+  prodid_max_number = TSP_get_progid_total_number();
+
+  if(strcmp(protocol, TSP_RPC_PROTOCOL) != 0)
+    {
+      STRACE_ERROR(("Protocol %s not handled, use %s", protocol, TSP_RPC_PROTOCOL));
+    }
+  else if((server_id < prodid_max_number) && (server_id >=0) )
+    {
+      progid = TSP_get_progid(server_id);
+      if(progid > 0) 
+	{
+	  *server = tsp_remote_open_progid(target_name, progid);
+	  if( (*server) != (TSP_server_t)0)
+	    {
+	      /*  On recupere la chaine d'info du serveur) */
+	      server_info_t = tsp_provider_information(*server);
+	      if( server_info_t != NULL)
+		{	
+		  if( STRING_SIZE_SERVER_INFO >= strlen(server_info_t->info) )
+		    {
+		      /* check whether server name is the one requested */
+		      if(strncmp(server_name,
+				 server_info_t->info,
+				 strlen(server_name)) == 0)
+			{
+			  strcpy(server_info, server_info_t->info);
+			  STRACE_INFO(("Server opened : '%s'", server_info));
+			  ret = TRUE;
+			}
+		      else
+			{
+			  STRACE_INFO(("Not the requested server : '%s'", server_info_t->info));
+			  TSP_remote_close_server(*server);
+			  ret = FALSE;
+			}
+		    }
+		  else
+		    {
+		      STRACE_ERROR(("Returned info string too long"));
+		    }
+		}
+	      else
+		{
+		  STRACE_ERROR(("%s", clnt_sperror(*server, "sp_server_info_1\n") ));
+		}
+	      
+	    }
+	  else
+	    {
+	      STRACE_DEBUG(("tsp_remote_open_progid failed"));
+	    }
+			
+	}
+      else
+	{
+	  STRACE_ERROR(("No ProgId for Server Id=%d", server_id));
+	}
+		
+    }
+  else
+    {
+      STRACE_ERROR(("server_id %d too high", server_id));
+    }
+	
+  return ret;
+	
+}
+
+void TSP_remote_close_server(TSP_server_t server)
+{
+  if(server)
+    {
+      clnt_destroy((CLIENT*)server);
+    }
+}
+
+
+int TSP_get_server_max_number()
+{
+  return TSP_get_progid_total_number();
+}
+
+TSP_answer_open_t * TSP_request_open(const TSP_request_open_t* req_open, TSP_server_t server)
+{
+
+  TSP_answer_open_t* result;
+	
+  LOCAL_RPCCHECK_0;
+	
+  result = tsp_request_open_1(*req_open, server);
+  TSP_STRACE_RPC_ERROR(server, result);
+	
+  return result;
+}	
+
+int* TSP_request_close(const TSP_request_close_t* req_close, TSP_server_t server)
+{
+  int* retcode;
+
+  LOCAL_RPCCHECK_0;
+    
+  retcode = tsp_request_close_1(*req_close, server);
+  TSP_STRACE_RPC_ERROR(server, retcode);
+  
+  return retcode;
+}	
+
+TSP_answer_sample_t * TSP_request_information(const TSP_request_information_t* req_info, TSP_server_t server)
+{
+
+  TSP_answer_sample_t* result;
+	
+  LOCAL_RPCCHECK_0;
+	
+  result = tsp_request_information_1(*req_info, server);
+  TSP_STRACE_RPC_ERROR(server, result);
+  
+  return result;
+}	
+
+TSP_answer_sample_t * TSP_request_filtered_information(const TSP_request_information_t* req_info, int filter_kind, char* filter_string, TSP_server_t server)
+{
+
+  TSP_answer_sample_t* result;
+	
+  LOCAL_RPCCHECK_0;
+	
+  result = tsp_request_filtered_information_1(*req_info, filter_kind, filter_string, server);
+  TSP_STRACE_RPC_ERROR(server, result);
+  
+  return result;
+}	
+
+TSP_answer_sample_t * TSP_request_sample(
+					 const TSP_request_sample_t* req_sample,
+					 TSP_server_t server)
+{
+
+  TSP_answer_sample_t* result;
+	
+  LOCAL_RPCCHECK_0;
+	
+  result = tsp_request_sample_1(*req_sample, server);
+  TSP_STRACE_RPC_ERROR(server, result);
+	
+  return result;
+}
+
+TSP_answer_sample_init_t * TSP_request_sample_init(
+					      const TSP_request_sample_init_t* req_sample,
+					      TSP_server_t server)
+{
+
+  TSP_answer_sample_init_t* result;
+	
+  LOCAL_RPCCHECK_0;
+	
+  result = tsp_request_sample_init_1(*req_sample, server);
+  TSP_STRACE_RPC_ERROR(server, result);
+	
+  return result;
+}
+
+TSP_answer_sample_destroy_t*
+TSP_request_sample_destroy(const TSP_request_sample_destroy_t* req_sample,
+			   TSP_server_t server)
+{
+  
+  TSP_answer_sample_destroy_t* result;
+	
+  LOCAL_RPCCHECK_0;
+	
+  result = tsp_request_sample_destroy_1(*req_sample, server);
+  TSP_STRACE_RPC_ERROR(server, result);
+	
+  return result;
+}
+
+int* TSP_request_async_sample_write(const TSP_async_sample_t* async_sample_write, TSP_server_t server)
+{
+  int* result;
+  
+/*   switch (async_sample_write->data.data_len) { */
+/*   case 2:  */
+/*     TSP_UINT16_TO_BE(*(uint16_t*)async_sample_write->data.data_val);	 */
+/*     break; */
+/*   case 4:  */
+/*     TSP_UINT32_TO_BE(*(uint32_t*)async_sample_write->data.data_val);	 */
+/*     break; */
+/*   case 8:   */
+/*     TSP_UINT64_TO_BE(*(uint64_t*)async_sample_write->data.data_val); */
+/*     break; */
+/*   default: */
+/*     break; */
+/*   } */
+  
+  LOCAL_RPCCHECK_FALSE;  
+
+  result = tsp_request_async_sample_write_1(*async_sample_write, server);
+	  
+  TSP_STRACE_RPC_ERROR(server, result);
+  	
+ return result;
+} /* end of async_sample_write */	
+
+TSP_async_sample_t* TSP_request_async_sample_read(const TSP_async_sample_t* async_sample_read, 
+						  TSP_server_t server)
+{
+  TSP_async_sample_t* result;
+  
+
+/*   switch (async_sample_read->data.data_len) { */
+/*   case 2:  */
+/*     TSP_UINT16_TO_BE(*(uint16_t*)async_sample_read->data.data_val);	 */
+/*     break; */
+/*   case 4:  */
+/*     TSP_UINT32_TO_BE(*(uint32_t*)async_sample_read->data.data_val);	 */
+/*     break; */
+/*   case 8:   */
+/*     TSP_UINT64_TO_BE(*(uint64_t*)async_sample_read->data.data_val); */
+/*     break; */
+/*   default: */
+/*     break; */
+/*   } */
+  
+  LOCAL_RPCCHECK_FALSE;
+  
+  result = tsp_request_async_sample_read_1(*async_sample_read, server);
+	
+  TSP_STRACE_RPC_ERROR(server, result);
+	
+  return result;
+} /* end of async_sample_read */	
+
+TSP_answer_extended_information_t* 
+TSP_request_extended_information(const TSP_request_extended_information_t* req_extinfo, TSP_server_t server)
+{
+
+  TSP_answer_extended_information_t* result;
+	
+  LOCAL_RPCCHECK_0;
+	
+  result = tsp_request_extended_information_1(*req_extinfo, server);
+  TSP_STRACE_RPC_ERROR(server, result);
+  
+  return result;
+}	
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_clnt_rtems.c tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_clnt_rtems.c
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_clnt_rtems.c	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_clnt_rtems.c	2007-10-22 11:01:56.000000000 +0200
@@ -0,0 +1,219 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#include <memory.h> /* for memset */
+#include "tsp_rpc.h"
+
+int tsp_wrap_rpc_clnt_set_timeout(CLIENT *client, int timeout)
+{
+ static struct timeval tv;
+
+ /* RPC timeout definition */
+ /* ----------------------- */
+ tv.tv_sec = timeout;
+ tv.tv_usec = 0;
+ return clnt_control(client, CLSET_TIMEOUT, (char *)&tv);
+}
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
+
+/* Default timeout can be changed using clnt_control() */
+static struct timeval TIMEOUT = { 25, 0 };
+
+TSP_provider_info_t *
+tsp_provider_information_1(CLIENT *clnt)
+{
+	static TSP_provider_info_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	 if (clnt_call (clnt, TSP_PROVIDER_INFORMATION, (xdrproc_t) xdr_void, (caddr_t) NULL,
+		(xdrproc_t) xdr_TSP_provider_info_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_open_t *
+tsp_request_open_1(TSP_request_open_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_open_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_OPEN,
+		(xdrproc_t) xdr_TSP_request_open_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_open_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+int *
+tsp_request_close_1(TSP_request_close_t arg1,  CLIENT *clnt)
+{
+	static int clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_CLOSE,
+		(xdrproc_t) xdr_TSP_request_close_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_t *
+tsp_request_information_1(TSP_request_information_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_sample_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_INFORMATION,
+		(xdrproc_t) xdr_TSP_request_information_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_sample_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_feature_t *
+tsp_request_feature_1(TSP_request_feature_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_feature_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_FEATURE,
+		(xdrproc_t) xdr_TSP_request_feature_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_feature_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_t *
+tsp_request_sample_1(TSP_request_sample_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_sample_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_SAMPLE,
+		(xdrproc_t) xdr_TSP_request_sample_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_sample_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_init_t *
+tsp_request_sample_init_1(TSP_request_sample_init_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_sample_init_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_SAMPLE_INIT,
+		(xdrproc_t) xdr_TSP_request_sample_init_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_sample_init_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_destroy_t *
+tsp_request_sample_destroy_1(TSP_request_sample_destroy_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_sample_destroy_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_SAMPLE_DESTROY,
+		(xdrproc_t) xdr_TSP_request_sample_destroy_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_sample_destroy_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+int *
+tsp_exec_feature_1(TSP_exec_feature_t arg1,  CLIENT *clnt)
+{
+	static int clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_EXEC_FEATURE,
+		(xdrproc_t) xdr_TSP_exec_feature_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+int *
+tsp_request_async_sample_write_1(TSP_async_sample_t arg1,  CLIENT *clnt)
+{
+	static int clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_ASYNC_SAMPLE_WRITE,
+		(xdrproc_t) xdr_TSP_async_sample_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_async_sample_t *
+tsp_request_async_sample_read_1(TSP_async_sample_t arg1,  CLIENT *clnt)
+{
+	static TSP_async_sample_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_ASYNC_SAMPLE_READ,
+		(xdrproc_t) xdr_TSP_async_sample_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_async_sample_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_t *
+tsp_request_filtered_information_1(TSP_request_information_t arg1, int arg2, char *arg3,  CLIENT *clnt)
+{
+	tsp_request_filtered_information_1_argument arg;
+	static TSP_answer_sample_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	arg.arg1 = arg1;
+	arg.arg2 = arg2;
+	arg.arg3 = arg3;
+	if (clnt_call (clnt, TSP_REQUEST_FILTERED_INFORMATION, (xdrproc_t) xdr_tsp_request_filtered_information_1_argument, (caddr_t) &arg,
+		(xdrproc_t) xdr_TSP_answer_sample_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_extended_information_t *
+tsp_request_extended_information_1(TSP_request_extended_information_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_extended_information_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_EXTENDED_INFORMATION,
+		(xdrproc_t) xdr_TSP_request_extended_information_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_extended_information_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_clnt_rtems.c~ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_clnt_rtems.c~
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_clnt_rtems.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_clnt_rtems.c~	2007-10-22 11:01:55.000000000 +0200
@@ -0,0 +1,219 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#include <memory.h> /* for memset */
+#include "tsp_rpc.h"
+
+int tsp_wrap_rpc_clnt_set_timeout(CLIENT *client, int timeout)
+{
+ static struct timeval tv;
+
+ /* RPC timeout definition */
+ /* ----------------------- */
+ tv.tv_sec = timeout;
+ tv.tv_usec = 0;
+ return clnt_control(client, CLSET_TIMEOUT, (char *)&tv);
+}
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
+
+/* Default timeout can be changed using clnt_control() */
+static struct timeval TIMEOUT = { 25, 0 };
+
+TSP_provider_info_t *
+tsp_provider_information_1(CLIENT *clnt)
+{
+	static TSP_provider_info_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	 if (clnt_call (clnt, TSP_PROVIDER_INFORMATION, (xdrproc_t) xdr_void, (caddr_t) NULL,
+		(xdrproc_t) xdr_TSP_provider_info_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_open_t *
+tsp_request_open_1(TSP_request_open_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_open_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_OPEN,
+		(xdrproc_t) xdr_TSP_request_open_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_open_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+int *
+tsp_request_close_1(TSP_request_close_t arg1,  CLIENT *clnt)
+{
+	static int clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_CLOSE,
+		(xdrproc_t) xdr_TSP_request_close_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_t *
+tsp_request_information_1(TSP_request_information_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_sample_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_INFORMATION,
+		(xdrproc_t) xdr_TSP_request_information_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_sample_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_feature_t *
+tsp_request_feature_1(TSP_request_feature_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_feature_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_FEATURE,
+		(xdrproc_t) xdr_TSP_request_feature_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_feature_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_t *
+tsp_request_sample_1(TSP_request_sample_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_sample_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_SAMPLE,
+		(xdrproc_t) xdr_TSP_request_sample_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_sample_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_init_t *
+tsp_request_sample_init_1(TSP_request_sample_init_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_sample_init_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_SAMPLE_INIT,
+		(xdrproc_t) xdr_TSP_request_sample_init_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_sample_init_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_destroy_t *
+tsp_request_sample_destroy_1(TSP_request_sample_destroy_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_sample_destroy_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_SAMPLE_DESTROY,
+		(xdrproc_t) xdr_TSP_request_sample_destroy_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_sample_destroy_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+int *
+tsp_exec_feature_1(TSP_exec_feature_t arg1,  CLIENT *clnt)
+{
+	static int clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_EXEC_FEATURE,
+		(xdrproc_t) xdr_TSP_exec_feature_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+int *
+tsp_request_async_sample_write_1(TSP_async_sample_t arg1,  CLIENT *clnt)
+{
+	static int clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_ASYNC_SAMPLE_WRITE,
+		(xdrproc_t) xdr_TSP_async_sample_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_int, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_async_sample_t *
+tsp_request_async_sample_read_1(TSP_async_sample_t arg1,  CLIENT *clnt)
+{
+	static TSP_async_sample_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_ASYNC_SAMPLE_READ,
+		(xdrproc_t) xdr_TSP_async_sample_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_async_sample_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_sample_t *
+tsp_request_filtered_information_1(TSP_request_information_t arg1, int arg2, char *arg3,  CLIENT *clnt)
+{
+	tsp_request_filtered_information_1_argument arg;
+	static TSP_answer_sample_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	arg.arg1 = arg1;
+	arg.arg2 = arg2;
+	arg.arg3 = arg3;
+	if (clnt_call (clnt, TSP_REQUEST_FILTERED_INFORMATION, (xdrproc_t) xdr_tsp_request_filtered_information_1_argument, (caddr_t) &arg,
+		(xdrproc_t) xdr_TSP_answer_sample_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
+
+TSP_answer_extended_information_t *
+tsp_request_extended_information_1(TSP_request_extended_information_t arg1,  CLIENT *clnt)
+{
+	static TSP_answer_extended_information_t clnt_res;
+
+	memset((char *)&clnt_res, 0, sizeof(clnt_res));
+	if (clnt_call (clnt, TSP_REQUEST_EXTENDED_INFORMATION,
+		(xdrproc_t) xdr_TSP_request_extended_information_t, (caddr_t) &arg1,
+		(xdrproc_t) xdr_TSP_answer_extended_information_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc.h tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc.h
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc.h	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc.h	2007-10-26 18:00:31.000000000 +0200
@@ -0,0 +1,452 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#ifndef _TSP_RPC_H_RPCGEN
+#define _TSP_RPC_H_RPCGEN
+
+#include <rpc/rpc.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* rajoute pour RTEMS*/
+#define TCP_PORT 15376
+
+enum TSP_status_t {
+	TSP_STATUS_OK = 0,
+	TSP_STATUS_NOK = 1,
+	TSP_STATUS_ERROR_PROVIDER_UNREACHABLE = 2,
+	TSP_STATUS_ERROR_UNKNOWN = 3,
+	TSP_STATUS_ERROR_SEE_STRING = 4,
+	TSP_STATUS_ERROR_VERSION = 5,
+	TSP_STATUS_ERROR_SYMBOLS = 6,
+	TSP_STATUS_ERROR_SYMBOL_FILTER = 7,
+	TSP_STATUS_ERROR_NOT_SUPPORTED = 8,
+	TSP_STATUS_ERROR_NOT_IMPLEMENTED = 9,
+	TSP_STATUS_ERROR_PGI_UNKNOWN = 10,
+	TSP_STATUS_ERROR_ASYNC_READ_NOT_ALLOWED = 11,
+	TSP_STATUS_ERROR_ASYNC_WRITE_NOT_ALLOWED = 12,
+	TSP_STATUS_ERROR_ASYNC_READ_NOT_SUPPORTED = 13,
+	TSP_STATUS_ERROR_ASYNC_WRITE_NOT_SUPPORTED = 14,
+	TSP_STATUS_ERROR_MEMORY_ALLOCATION = 15,
+	TSP_STATUS_ERROR_INVALID_CHANNEL_ID = 16,
+	TSP_STATUS_ERROR_NO_MORE_GLU = 17,
+	TSP_STATUS_ERROR_NO_MORE_SESSION = 18,
+	TSP_STATUS_ERROR_GLU_START = 19,
+	TSP_STATUS_ERROR_GLU_INITIALIZE = 20,
+	TSP_STATUS_ERROR_BAD_REQUEST_ORDER = 21,
+	TSP_STATUS_ERROR_DATAPOOL_INSTANTIATE = 22,
+	TSP_STATUS_ERROR_THREAD_CREATE = 23,
+	TSP_STATUS_ERROR_NOT_INITIALIZED = 24,
+	TSP_STATUS_ERROR_INVALID_REQUEST = 25,
+	TSP_STATUS_ERROR_EMPTY_REQUEST_SAMPLE = 26,
+	TSP_STATUS_ERROR_CUSTOM_BEGIN = 16384,
+};
+typedef enum TSP_status_t TSP_status_t;
+
+enum TSP_session_state_t {
+	TSP_SESSION_STATE_UNKNOWN = 0,
+	TSP_SESSION_STATE_OPENED = 1,
+	TSP_SESSION_STATE_CLOSED = 2,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_OK = 3,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK = 4,
+	TSP_SESSION_STATE_SAMPLING = 5,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_DESTROY_OK = 6,
+	TSP_SESSION_STATE_BROKEN_LINK = 7,
+	TSP_SESSION_STATE_CLOSE_ON_EOF = 8,
+};
+typedef enum TSP_session_state_t TSP_session_state_t;
+
+enum TSP_datatype_t {
+	TSP_TYPE_UNKNOWN = 0,
+	TSP_TYPE_DOUBLE = 1,
+	TSP_TYPE_FLOAT = 2,
+	TSP_TYPE_INT8 = 3,
+	TSP_TYPE_INT16 = 4,
+	TSP_TYPE_INT32 = 5,
+	TSP_TYPE_INT64 = 6,
+	TSP_TYPE_UINT8 = 7,
+	TSP_TYPE_UINT16 = 8,
+	TSP_TYPE_UINT32 = 9,
+	TSP_TYPE_UINT64 = 10,
+	TSP_TYPE_CHAR = 11,
+	TSP_TYPE_UCHAR = 12,
+	TSP_TYPE_RAW = 13,
+	TSP_TYPE_LAST = 14,
+};
+typedef enum TSP_datatype_t TSP_datatype_t;
+
+struct TSP_answer_open_t {
+	int version_id;
+	u_int channel_id;
+	TSP_status_t status;
+	char *status_str;
+};
+typedef struct TSP_answer_open_t TSP_answer_open_t;
+
+typedef char *TSP_argv_item_t;
+
+typedef struct {
+	u_int TSP_argv_t_len;
+	TSP_argv_item_t *TSP_argv_t_val;
+} TSP_argv_t;
+
+struct TSP_request_open_t {
+	int version_id;
+	TSP_argv_t argv;
+};
+typedef struct TSP_request_open_t TSP_request_open_t;
+
+struct TSP_request_close_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_close_t TSP_request_close_t;
+
+struct TSP_request_information_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_information_t TSP_request_information_t;
+
+struct TSP_request_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+};
+typedef struct TSP_request_feature_t TSP_request_feature_t;
+
+struct TSP_answer_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int int_value;
+	double double_value;
+	char *string_value;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_feature_t TSP_answer_feature_t;
+
+struct TSP_exec_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int int_value;
+	double double_value;
+	char *string_value;
+};
+typedef struct TSP_exec_feature_t TSP_exec_feature_t;
+
+struct TSP_sample_symbol_info_t {
+	char *name;
+	int provider_global_index;
+	int provider_group_index;
+	int provider_group_rank;
+	TSP_datatype_t type;
+	u_int dimension;
+	u_int offset;
+	u_int nelem;
+	int period;
+	int phase;
+};
+typedef struct TSP_sample_symbol_info_t TSP_sample_symbol_info_t;
+
+typedef struct {
+	u_int TSP_sample_symbol_info_list_t_len;
+	TSP_sample_symbol_info_t *TSP_sample_symbol_info_list_t_val;
+} TSP_sample_symbol_info_list_t;
+
+struct TSP_extended_info_t {
+	char *key;
+	char *value;
+};
+typedef struct TSP_extended_info_t TSP_extended_info_t;
+
+typedef struct {
+	u_int TSP_extended_info_list_t_len;
+	TSP_extended_info_t *TSP_extended_info_list_t_val;
+} TSP_extended_info_list_t;
+
+struct TSP_sample_symbol_extended_info_t {
+	int provider_global_index;
+	TSP_extended_info_list_t info;
+};
+typedef struct TSP_sample_symbol_extended_info_t TSP_sample_symbol_extended_info_t;
+
+typedef struct {
+	u_int TSP_sample_symbol_extended_info_list_t_len;
+	TSP_sample_symbol_extended_info_t *TSP_sample_symbol_extended_info_list_t_val;
+} TSP_sample_symbol_extended_info_list_t;
+
+struct TSP_request_extended_information_t {
+	int version_id;
+	u_int channel_id;
+	struct {
+		u_int pgi_len;
+		int *pgi_val;
+	} pgi;
+};
+typedef struct TSP_request_extended_information_t TSP_request_extended_information_t;
+
+struct TSP_answer_extended_information_t {
+	int version_id;
+	u_int channel_id;
+	TSP_sample_symbol_extended_info_list_t extsymbols;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_extended_information_t TSP_answer_extended_information_t;
+
+struct TSP_request_sample_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int consumer_timeout;
+	TSP_sample_symbol_info_list_t symbols;
+};
+typedef struct TSP_request_sample_t TSP_request_sample_t;
+
+struct TSP_answer_sample_t {
+	int version_id;
+	u_int channel_id;
+	int provider_timeout;
+	int provider_group_number;
+	TSP_sample_symbol_info_list_t symbols;
+	double base_frequency;
+	int max_period;
+	int max_client_number;
+	int current_client_number;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_sample_t TSP_answer_sample_t;
+
+struct TSP_request_sample_init_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_sample_init_t TSP_request_sample_init_t;
+
+struct TSP_answer_sample_init_t {
+	int version_id;
+	u_int channel_id;
+	char *data_address;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_sample_init_t TSP_answer_sample_init_t;
+
+struct TSP_request_sample_destroy_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_sample_destroy_t TSP_request_sample_destroy_t;
+
+struct TSP_answer_sample_destroy_t {
+	int version_id;
+	u_int channel_id;
+	int status;
+};
+typedef struct TSP_answer_sample_destroy_t TSP_answer_sample_destroy_t;
+
+struct TSP_async_sample_t {
+	int provider_global_index;
+	struct {
+		u_int data_len;
+		char *data_val;
+	} data;
+};
+typedef struct TSP_async_sample_t TSP_async_sample_t;
+
+struct TSP_request_async_sample_t {
+	int version_id;
+	u_int channel_id;
+	TSP_async_sample_t async_sample;
+};
+typedef struct TSP_request_async_sample_t TSP_request_async_sample_t;
+
+struct TSP_answer_async_sample_t {
+	int version_id;
+	u_int channel_id;
+	TSP_async_sample_t async_sample;
+	int status;
+};
+typedef struct TSP_answer_async_sample_t TSP_answer_async_sample_t;
+
+struct TSP_provider_info_t {
+	char *info;
+};
+typedef struct TSP_provider_info_t TSP_provider_info_t;
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
+
+struct tsp_request_filtered_information_1_argument {
+	TSP_request_information_t arg1;
+	int arg2;
+	char *arg3;
+};
+typedef struct tsp_request_filtered_information_1_argument tsp_request_filtered_information_1_argument;
+
+#define TSP_RPC 0x31230010
+#define TSP_RPC_VERSION_INITIAL 1
+
+#if defined(__STDC__) || defined(__cplusplus)
+#define TSP_PROVIDER_INFORMATION 101
+extern  TSP_provider_info_t * tsp_provider_information_1(CLIENT *);
+extern  TSP_provider_info_t * tsp_provider_information_1_svc(struct svc_req *);
+#define TSP_REQUEST_OPEN 102
+extern  TSP_answer_open_t * tsp_request_open_1(TSP_request_open_t , CLIENT *);
+extern  TSP_answer_open_t * tsp_request_open_1_svc(TSP_request_open_t , struct svc_req *);
+#define TSP_REQUEST_CLOSE 103
+extern  int * tsp_request_close_1(TSP_request_close_t , CLIENT *);
+extern  int * tsp_request_close_1_svc(TSP_request_close_t , struct svc_req *);
+#define TSP_REQUEST_INFORMATION 104
+extern  TSP_answer_sample_t * tsp_request_information_1(TSP_request_information_t , CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_information_1_svc(TSP_request_information_t , struct svc_req *);
+#define TSP_REQUEST_FEATURE 105
+extern  TSP_answer_feature_t * tsp_request_feature_1(TSP_request_feature_t , CLIENT *);
+extern  TSP_answer_feature_t * tsp_request_feature_1_svc(TSP_request_feature_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE 106
+extern  TSP_answer_sample_t * tsp_request_sample_1(TSP_request_sample_t , CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_sample_1_svc(TSP_request_sample_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE_INIT 107
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1(TSP_request_sample_init_t , CLIENT *);
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1_svc(TSP_request_sample_init_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE_DESTROY 108
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1(TSP_request_sample_destroy_t , CLIENT *);
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1_svc(TSP_request_sample_destroy_t , struct svc_req *);
+#define TSP_EXEC_FEATURE 109
+extern  int * tsp_exec_feature_1(TSP_exec_feature_t , CLIENT *);
+extern  int * tsp_exec_feature_1_svc(TSP_exec_feature_t , struct svc_req *);
+#define TSP_REQUEST_ASYNC_SAMPLE_WRITE 110
+extern  int * tsp_request_async_sample_write_1(TSP_async_sample_t , CLIENT *);
+extern  int * tsp_request_async_sample_write_1_svc(TSP_async_sample_t , struct svc_req *);
+#define TSP_REQUEST_ASYNC_SAMPLE_READ 111
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1(TSP_async_sample_t , CLIENT *);
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1_svc(TSP_async_sample_t , struct svc_req *);
+#define TSP_REQUEST_FILTERED_INFORMATION 112
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1(TSP_request_information_t , int , char *, CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1_svc(TSP_request_information_t , int , char *, struct svc_req *);
+#define TSP_REQUEST_EXTENDED_INFORMATION 113
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1(TSP_request_extended_information_t , CLIENT *);
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1_svc(TSP_request_extended_information_t , struct svc_req *);
+extern int tsp_rpc_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
+
+#else /* K&R C */
+#define TSP_PROVIDER_INFORMATION 101
+extern  TSP_provider_info_t * tsp_provider_information_1();
+extern  TSP_provider_info_t * tsp_provider_information_1_svc();
+#define TSP_REQUEST_OPEN 102
+extern  TSP_answer_open_t * tsp_request_open_1();
+extern  TSP_answer_open_t * tsp_request_open_1_svc();
+#define TSP_REQUEST_CLOSE 103
+extern  int * tsp_request_close_1();
+extern  int * tsp_request_close_1_svc();
+#define TSP_REQUEST_INFORMATION 104
+extern  TSP_answer_sample_t * tsp_request_information_1();
+extern  TSP_answer_sample_t * tsp_request_information_1_svc();
+#define TSP_REQUEST_FEATURE 105
+extern  TSP_answer_feature_t * tsp_request_feature_1();
+extern  TSP_answer_feature_t * tsp_request_feature_1_svc();
+#define TSP_REQUEST_SAMPLE 106
+extern  TSP_answer_sample_t * tsp_request_sample_1();
+extern  TSP_answer_sample_t * tsp_request_sample_1_svc();
+#define TSP_REQUEST_SAMPLE_INIT 107
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1();
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1_svc();
+#define TSP_REQUEST_SAMPLE_DESTROY 108
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1();
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1_svc();
+#define TSP_EXEC_FEATURE 109
+extern  int * tsp_exec_feature_1();
+extern  int * tsp_exec_feature_1_svc();
+#define TSP_REQUEST_ASYNC_SAMPLE_WRITE 110
+extern  int * tsp_request_async_sample_write_1();
+extern  int * tsp_request_async_sample_write_1_svc();
+#define TSP_REQUEST_ASYNC_SAMPLE_READ 111
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1();
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1_svc();
+#define TSP_REQUEST_FILTERED_INFORMATION 112
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1();
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1_svc();
+#define TSP_REQUEST_EXTENDED_INFORMATION 113
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1();
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1_svc();
+extern int tsp_rpc_1_freeresult ();
+#endif /* K&R C */
+
+/* the xdr functions */
+
+#if defined(__STDC__) || defined(__cplusplus)
+extern  bool_t xdr_TSP_status_t (XDR *, TSP_status_t*);
+extern  bool_t xdr_TSP_session_state_t (XDR *, TSP_session_state_t*);
+extern  bool_t xdr_TSP_datatype_t (XDR *, TSP_datatype_t*);
+extern  bool_t xdr_TSP_answer_open_t (XDR *, TSP_answer_open_t*);
+extern  bool_t xdr_TSP_argv_item_t (XDR *, TSP_argv_item_t*);
+extern  bool_t xdr_TSP_argv_t (XDR *, TSP_argv_t*);
+extern  bool_t xdr_TSP_request_open_t (XDR *, TSP_request_open_t*);
+extern  bool_t xdr_TSP_request_close_t (XDR *, TSP_request_close_t*);
+extern  bool_t xdr_TSP_request_information_t (XDR *, TSP_request_information_t*);
+extern  bool_t xdr_TSP_request_feature_t (XDR *, TSP_request_feature_t*);
+extern  bool_t xdr_TSP_answer_feature_t (XDR *, TSP_answer_feature_t*);
+extern  bool_t xdr_TSP_exec_feature_t (XDR *, TSP_exec_feature_t*);
+extern  bool_t xdr_TSP_sample_symbol_info_t (XDR *, TSP_sample_symbol_info_t*);
+extern  bool_t xdr_TSP_sample_symbol_info_list_t (XDR *, TSP_sample_symbol_info_list_t*);
+extern  bool_t xdr_TSP_extended_info_t (XDR *, TSP_extended_info_t*);
+extern  bool_t xdr_TSP_extended_info_list_t (XDR *, TSP_extended_info_list_t*);
+extern  bool_t xdr_TSP_sample_symbol_extended_info_t (XDR *, TSP_sample_symbol_extended_info_t*);
+extern  bool_t xdr_TSP_sample_symbol_extended_info_list_t (XDR *, TSP_sample_symbol_extended_info_list_t*);
+extern  bool_t xdr_TSP_request_extended_information_t (XDR *, TSP_request_extended_information_t*);
+extern  bool_t xdr_TSP_answer_extended_information_t (XDR *, TSP_answer_extended_information_t*);
+extern  bool_t xdr_TSP_request_sample_t (XDR *, TSP_request_sample_t*);
+extern  bool_t xdr_TSP_answer_sample_t (XDR *, TSP_answer_sample_t*);
+extern  bool_t xdr_TSP_request_sample_init_t (XDR *, TSP_request_sample_init_t*);
+extern  bool_t xdr_TSP_answer_sample_init_t (XDR *, TSP_answer_sample_init_t*);
+extern  bool_t xdr_TSP_request_sample_destroy_t (XDR *, TSP_request_sample_destroy_t*);
+extern  bool_t xdr_TSP_answer_sample_destroy_t (XDR *, TSP_answer_sample_destroy_t*);
+extern  bool_t xdr_TSP_async_sample_t (XDR *, TSP_async_sample_t*);
+extern  bool_t xdr_TSP_request_async_sample_t (XDR *, TSP_request_async_sample_t*);
+extern  bool_t xdr_TSP_answer_async_sample_t (XDR *, TSP_answer_async_sample_t*);
+extern  bool_t xdr_TSP_provider_info_t (XDR *, TSP_provider_info_t*);
+extern  bool_t xdr_tsp_request_filtered_information_1_argument (XDR *, tsp_request_filtered_information_1_argument*);
+
+#else /* K&R C */
+extern bool_t xdr_TSP_status_t ();
+extern bool_t xdr_TSP_session_state_t ();
+extern bool_t xdr_TSP_datatype_t ();
+extern bool_t xdr_TSP_answer_open_t ();
+extern bool_t xdr_TSP_argv_item_t ();
+extern bool_t xdr_TSP_argv_t ();
+extern bool_t xdr_TSP_request_open_t ();
+extern bool_t xdr_TSP_request_close_t ();
+extern bool_t xdr_TSP_request_information_t ();
+extern bool_t xdr_TSP_request_feature_t ();
+extern bool_t xdr_TSP_answer_feature_t ();
+extern bool_t xdr_TSP_exec_feature_t ();
+extern bool_t xdr_TSP_sample_symbol_info_t ();
+extern bool_t xdr_TSP_sample_symbol_info_list_t ();
+extern bool_t xdr_TSP_extended_info_t ();
+extern bool_t xdr_TSP_extended_info_list_t ();
+extern bool_t xdr_TSP_sample_symbol_extended_info_t ();
+extern bool_t xdr_TSP_sample_symbol_extended_info_list_t ();
+extern bool_t xdr_TSP_request_extended_information_t ();
+extern bool_t xdr_TSP_answer_extended_information_t ();
+extern bool_t xdr_TSP_request_sample_t ();
+extern bool_t xdr_TSP_answer_sample_t ();
+extern bool_t xdr_TSP_request_sample_init_t ();
+extern bool_t xdr_TSP_answer_sample_init_t ();
+extern bool_t xdr_TSP_request_sample_destroy_t ();
+extern bool_t xdr_TSP_answer_sample_destroy_t ();
+extern bool_t xdr_TSP_async_sample_t ();
+extern bool_t xdr_TSP_request_async_sample_t ();
+extern bool_t xdr_TSP_answer_async_sample_t ();
+extern bool_t xdr_TSP_provider_info_t ();
+extern bool_t xdr_tsp_request_filtered_information_1_argument ();
+
+#endif /* K&R C */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_TSP_RPC_H_RPCGEN */
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc.h~ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc.h~
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc.h~	2007-10-26 17:03:46.000000000 +0200
@@ -0,0 +1,454 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#ifndef _TSP_RPC_H_RPCGEN
+#define _TSP_RPC_H_RPCGEN
+
+#include <rpc/rpc.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* rajoute pour RTEMS*/
+//#if (defined RTEMS)
+#define TCP_PORT 15376
+//#endif /* _RTEMS_ */
+
+enum TSP_status_t {
+	TSP_STATUS_OK = 0,
+	TSP_STATUS_NOK = 1,
+	TSP_STATUS_ERROR_PROVIDER_UNREACHABLE = 2,
+	TSP_STATUS_ERROR_UNKNOWN = 3,
+	TSP_STATUS_ERROR_SEE_STRING = 4,
+	TSP_STATUS_ERROR_VERSION = 5,
+	TSP_STATUS_ERROR_SYMBOLS = 6,
+	TSP_STATUS_ERROR_SYMBOL_FILTER = 7,
+	TSP_STATUS_ERROR_NOT_SUPPORTED = 8,
+	TSP_STATUS_ERROR_NOT_IMPLEMENTED = 9,
+	TSP_STATUS_ERROR_PGI_UNKNOWN = 10,
+	TSP_STATUS_ERROR_ASYNC_READ_NOT_ALLOWED = 11,
+	TSP_STATUS_ERROR_ASYNC_WRITE_NOT_ALLOWED = 12,
+	TSP_STATUS_ERROR_ASYNC_READ_NOT_SUPPORTED = 13,
+	TSP_STATUS_ERROR_ASYNC_WRITE_NOT_SUPPORTED = 14,
+	TSP_STATUS_ERROR_MEMORY_ALLOCATION = 15,
+	TSP_STATUS_ERROR_INVALID_CHANNEL_ID = 16,
+	TSP_STATUS_ERROR_NO_MORE_GLU = 17,
+	TSP_STATUS_ERROR_NO_MORE_SESSION = 18,
+	TSP_STATUS_ERROR_GLU_START = 19,
+	TSP_STATUS_ERROR_GLU_INITIALIZE = 20,
+	TSP_STATUS_ERROR_BAD_REQUEST_ORDER = 21,
+	TSP_STATUS_ERROR_DATAPOOL_INSTANTIATE = 22,
+	TSP_STATUS_ERROR_THREAD_CREATE = 23,
+	TSP_STATUS_ERROR_NOT_INITIALIZED = 24,
+	TSP_STATUS_ERROR_INVALID_REQUEST = 25,
+	TSP_STATUS_ERROR_EMPTY_REQUEST_SAMPLE = 26,
+	TSP_STATUS_ERROR_CUSTOM_BEGIN = 16384,
+};
+typedef enum TSP_status_t TSP_status_t;
+
+enum TSP_session_state_t {
+	TSP_SESSION_STATE_UNKNOWN = 0,
+	TSP_SESSION_STATE_OPENED = 1,
+	TSP_SESSION_STATE_CLOSED = 2,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_OK = 3,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK = 4,
+	TSP_SESSION_STATE_SAMPLING = 5,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_DESTROY_OK = 6,
+	TSP_SESSION_STATE_BROKEN_LINK = 7,
+	TSP_SESSION_STATE_CLOSE_ON_EOF = 8,
+};
+typedef enum TSP_session_state_t TSP_session_state_t;
+
+enum TSP_datatype_t {
+	TSP_TYPE_UNKNOWN = 0,
+	TSP_TYPE_DOUBLE = 1,
+	TSP_TYPE_FLOAT = 2,
+	TSP_TYPE_INT8 = 3,
+	TSP_TYPE_INT16 = 4,
+	TSP_TYPE_INT32 = 5,
+	TSP_TYPE_INT64 = 6,
+	TSP_TYPE_UINT8 = 7,
+	TSP_TYPE_UINT16 = 8,
+	TSP_TYPE_UINT32 = 9,
+	TSP_TYPE_UINT64 = 10,
+	TSP_TYPE_CHAR = 11,
+	TSP_TYPE_UCHAR = 12,
+	TSP_TYPE_RAW = 13,
+	TSP_TYPE_LAST = 14,
+};
+typedef enum TSP_datatype_t TSP_datatype_t;
+
+struct TSP_answer_open_t {
+	int version_id;
+	u_int channel_id;
+	TSP_status_t status;
+	char *status_str;
+};
+typedef struct TSP_answer_open_t TSP_answer_open_t;
+
+typedef char *TSP_argv_item_t;
+
+typedef struct {
+	u_int TSP_argv_t_len;
+	TSP_argv_item_t *TSP_argv_t_val;
+} TSP_argv_t;
+
+struct TSP_request_open_t {
+	int version_id;
+	TSP_argv_t argv;
+};
+typedef struct TSP_request_open_t TSP_request_open_t;
+
+struct TSP_request_close_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_close_t TSP_request_close_t;
+
+struct TSP_request_information_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_information_t TSP_request_information_t;
+
+struct TSP_request_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+};
+typedef struct TSP_request_feature_t TSP_request_feature_t;
+
+struct TSP_answer_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int int_value;
+	double double_value;
+	char *string_value;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_feature_t TSP_answer_feature_t;
+
+struct TSP_exec_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int int_value;
+	double double_value;
+	char *string_value;
+};
+typedef struct TSP_exec_feature_t TSP_exec_feature_t;
+
+struct TSP_sample_symbol_info_t {
+	char *name;
+	int provider_global_index;
+	int provider_group_index;
+	int provider_group_rank;
+	TSP_datatype_t type;
+	u_int dimension;
+	u_int offset;
+	u_int nelem;
+	int period;
+	int phase;
+};
+typedef struct TSP_sample_symbol_info_t TSP_sample_symbol_info_t;
+
+typedef struct {
+	u_int TSP_sample_symbol_info_list_t_len;
+	TSP_sample_symbol_info_t *TSP_sample_symbol_info_list_t_val;
+} TSP_sample_symbol_info_list_t;
+
+struct TSP_extended_info_t {
+	char *key;
+	char *value;
+};
+typedef struct TSP_extended_info_t TSP_extended_info_t;
+
+typedef struct {
+	u_int TSP_extended_info_list_t_len;
+	TSP_extended_info_t *TSP_extended_info_list_t_val;
+} TSP_extended_info_list_t;
+
+struct TSP_sample_symbol_extended_info_t {
+	int provider_global_index;
+	TSP_extended_info_list_t info;
+};
+typedef struct TSP_sample_symbol_extended_info_t TSP_sample_symbol_extended_info_t;
+
+typedef struct {
+	u_int TSP_sample_symbol_extended_info_list_t_len;
+	TSP_sample_symbol_extended_info_t *TSP_sample_symbol_extended_info_list_t_val;
+} TSP_sample_symbol_extended_info_list_t;
+
+struct TSP_request_extended_information_t {
+	int version_id;
+	u_int channel_id;
+	struct {
+		u_int pgi_len;
+		int *pgi_val;
+	} pgi;
+};
+typedef struct TSP_request_extended_information_t TSP_request_extended_information_t;
+
+struct TSP_answer_extended_information_t {
+	int version_id;
+	u_int channel_id;
+	TSP_sample_symbol_extended_info_list_t extsymbols;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_extended_information_t TSP_answer_extended_information_t;
+
+struct TSP_request_sample_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int consumer_timeout;
+	TSP_sample_symbol_info_list_t symbols;
+};
+typedef struct TSP_request_sample_t TSP_request_sample_t;
+
+struct TSP_answer_sample_t {
+	int version_id;
+	u_int channel_id;
+	int provider_timeout;
+	int provider_group_number;
+	TSP_sample_symbol_info_list_t symbols;
+	double base_frequency;
+	int max_period;
+	int max_client_number;
+	int current_client_number;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_sample_t TSP_answer_sample_t;
+
+struct TSP_request_sample_init_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_sample_init_t TSP_request_sample_init_t;
+
+struct TSP_answer_sample_init_t {
+	int version_id;
+	u_int channel_id;
+	char *data_address;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_sample_init_t TSP_answer_sample_init_t;
+
+struct TSP_request_sample_destroy_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_sample_destroy_t TSP_request_sample_destroy_t;
+
+struct TSP_answer_sample_destroy_t {
+	int version_id;
+	u_int channel_id;
+	int status;
+};
+typedef struct TSP_answer_sample_destroy_t TSP_answer_sample_destroy_t;
+
+struct TSP_async_sample_t {
+	int provider_global_index;
+	struct {
+		u_int data_len;
+		char *data_val;
+	} data;
+};
+typedef struct TSP_async_sample_t TSP_async_sample_t;
+
+struct TSP_request_async_sample_t {
+	int version_id;
+	u_int channel_id;
+	TSP_async_sample_t async_sample;
+};
+typedef struct TSP_request_async_sample_t TSP_request_async_sample_t;
+
+struct TSP_answer_async_sample_t {
+	int version_id;
+	u_int channel_id;
+	TSP_async_sample_t async_sample;
+	int status;
+};
+typedef struct TSP_answer_async_sample_t TSP_answer_async_sample_t;
+
+struct TSP_provider_info_t {
+	char *info;
+};
+typedef struct TSP_provider_info_t TSP_provider_info_t;
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
+
+struct tsp_request_filtered_information_1_argument {
+	TSP_request_information_t arg1;
+	int arg2;
+	char *arg3;
+};
+typedef struct tsp_request_filtered_information_1_argument tsp_request_filtered_information_1_argument;
+
+#define TSP_RPC 0x31230010
+#define TSP_RPC_VERSION_INITIAL 1
+
+#if defined(__STDC__) || defined(__cplusplus)
+#define TSP_PROVIDER_INFORMATION 101
+extern  TSP_provider_info_t * tsp_provider_information_1(CLIENT *);
+extern  TSP_provider_info_t * tsp_provider_information_1_svc(struct svc_req *);
+#define TSP_REQUEST_OPEN 102
+extern  TSP_answer_open_t * tsp_request_open_1(TSP_request_open_t , CLIENT *);
+extern  TSP_answer_open_t * tsp_request_open_1_svc(TSP_request_open_t , struct svc_req *);
+#define TSP_REQUEST_CLOSE 103
+extern  int * tsp_request_close_1(TSP_request_close_t , CLIENT *);
+extern  int * tsp_request_close_1_svc(TSP_request_close_t , struct svc_req *);
+#define TSP_REQUEST_INFORMATION 104
+extern  TSP_answer_sample_t * tsp_request_information_1(TSP_request_information_t , CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_information_1_svc(TSP_request_information_t , struct svc_req *);
+#define TSP_REQUEST_FEATURE 105
+extern  TSP_answer_feature_t * tsp_request_feature_1(TSP_request_feature_t , CLIENT *);
+extern  TSP_answer_feature_t * tsp_request_feature_1_svc(TSP_request_feature_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE 106
+extern  TSP_answer_sample_t * tsp_request_sample_1(TSP_request_sample_t , CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_sample_1_svc(TSP_request_sample_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE_INIT 107
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1(TSP_request_sample_init_t , CLIENT *);
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1_svc(TSP_request_sample_init_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE_DESTROY 108
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1(TSP_request_sample_destroy_t , CLIENT *);
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1_svc(TSP_request_sample_destroy_t , struct svc_req *);
+#define TSP_EXEC_FEATURE 109
+extern  int * tsp_exec_feature_1(TSP_exec_feature_t , CLIENT *);
+extern  int * tsp_exec_feature_1_svc(TSP_exec_feature_t , struct svc_req *);
+#define TSP_REQUEST_ASYNC_SAMPLE_WRITE 110
+extern  int * tsp_request_async_sample_write_1(TSP_async_sample_t , CLIENT *);
+extern  int * tsp_request_async_sample_write_1_svc(TSP_async_sample_t , struct svc_req *);
+#define TSP_REQUEST_ASYNC_SAMPLE_READ 111
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1(TSP_async_sample_t , CLIENT *);
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1_svc(TSP_async_sample_t , struct svc_req *);
+#define TSP_REQUEST_FILTERED_INFORMATION 112
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1(TSP_request_information_t , int , char *, CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1_svc(TSP_request_information_t , int , char *, struct svc_req *);
+#define TSP_REQUEST_EXTENDED_INFORMATION 113
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1(TSP_request_extended_information_t , CLIENT *);
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1_svc(TSP_request_extended_information_t , struct svc_req *);
+extern int tsp_rpc_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
+
+#else /* K&R C */
+#define TSP_PROVIDER_INFORMATION 101
+extern  TSP_provider_info_t * tsp_provider_information_1();
+extern  TSP_provider_info_t * tsp_provider_information_1_svc();
+#define TSP_REQUEST_OPEN 102
+extern  TSP_answer_open_t * tsp_request_open_1();
+extern  TSP_answer_open_t * tsp_request_open_1_svc();
+#define TSP_REQUEST_CLOSE 103
+extern  int * tsp_request_close_1();
+extern  int * tsp_request_close_1_svc();
+#define TSP_REQUEST_INFORMATION 104
+extern  TSP_answer_sample_t * tsp_request_information_1();
+extern  TSP_answer_sample_t * tsp_request_information_1_svc();
+#define TSP_REQUEST_FEATURE 105
+extern  TSP_answer_feature_t * tsp_request_feature_1();
+extern  TSP_answer_feature_t * tsp_request_feature_1_svc();
+#define TSP_REQUEST_SAMPLE 106
+extern  TSP_answer_sample_t * tsp_request_sample_1();
+extern  TSP_answer_sample_t * tsp_request_sample_1_svc();
+#define TSP_REQUEST_SAMPLE_INIT 107
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1();
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1_svc();
+#define TSP_REQUEST_SAMPLE_DESTROY 108
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1();
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1_svc();
+#define TSP_EXEC_FEATURE 109
+extern  int * tsp_exec_feature_1();
+extern  int * tsp_exec_feature_1_svc();
+#define TSP_REQUEST_ASYNC_SAMPLE_WRITE 110
+extern  int * tsp_request_async_sample_write_1();
+extern  int * tsp_request_async_sample_write_1_svc();
+#define TSP_REQUEST_ASYNC_SAMPLE_READ 111
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1();
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1_svc();
+#define TSP_REQUEST_FILTERED_INFORMATION 112
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1();
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1_svc();
+#define TSP_REQUEST_EXTENDED_INFORMATION 113
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1();
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1_svc();
+extern int tsp_rpc_1_freeresult ();
+#endif /* K&R C */
+
+/* the xdr functions */
+
+#if defined(__STDC__) || defined(__cplusplus)
+extern  bool_t xdr_TSP_status_t (XDR *, TSP_status_t*);
+extern  bool_t xdr_TSP_session_state_t (XDR *, TSP_session_state_t*);
+extern  bool_t xdr_TSP_datatype_t (XDR *, TSP_datatype_t*);
+extern  bool_t xdr_TSP_answer_open_t (XDR *, TSP_answer_open_t*);
+extern  bool_t xdr_TSP_argv_item_t (XDR *, TSP_argv_item_t*);
+extern  bool_t xdr_TSP_argv_t (XDR *, TSP_argv_t*);
+extern  bool_t xdr_TSP_request_open_t (XDR *, TSP_request_open_t*);
+extern  bool_t xdr_TSP_request_close_t (XDR *, TSP_request_close_t*);
+extern  bool_t xdr_TSP_request_information_t (XDR *, TSP_request_information_t*);
+extern  bool_t xdr_TSP_request_feature_t (XDR *, TSP_request_feature_t*);
+extern  bool_t xdr_TSP_answer_feature_t (XDR *, TSP_answer_feature_t*);
+extern  bool_t xdr_TSP_exec_feature_t (XDR *, TSP_exec_feature_t*);
+extern  bool_t xdr_TSP_sample_symbol_info_t (XDR *, TSP_sample_symbol_info_t*);
+extern  bool_t xdr_TSP_sample_symbol_info_list_t (XDR *, TSP_sample_symbol_info_list_t*);
+extern  bool_t xdr_TSP_extended_info_t (XDR *, TSP_extended_info_t*);
+extern  bool_t xdr_TSP_extended_info_list_t (XDR *, TSP_extended_info_list_t*);
+extern  bool_t xdr_TSP_sample_symbol_extended_info_t (XDR *, TSP_sample_symbol_extended_info_t*);
+extern  bool_t xdr_TSP_sample_symbol_extended_info_list_t (XDR *, TSP_sample_symbol_extended_info_list_t*);
+extern  bool_t xdr_TSP_request_extended_information_t (XDR *, TSP_request_extended_information_t*);
+extern  bool_t xdr_TSP_answer_extended_information_t (XDR *, TSP_answer_extended_information_t*);
+extern  bool_t xdr_TSP_request_sample_t (XDR *, TSP_request_sample_t*);
+extern  bool_t xdr_TSP_answer_sample_t (XDR *, TSP_answer_sample_t*);
+extern  bool_t xdr_TSP_request_sample_init_t (XDR *, TSP_request_sample_init_t*);
+extern  bool_t xdr_TSP_answer_sample_init_t (XDR *, TSP_answer_sample_init_t*);
+extern  bool_t xdr_TSP_request_sample_destroy_t (XDR *, TSP_request_sample_destroy_t*);
+extern  bool_t xdr_TSP_answer_sample_destroy_t (XDR *, TSP_answer_sample_destroy_t*);
+extern  bool_t xdr_TSP_async_sample_t (XDR *, TSP_async_sample_t*);
+extern  bool_t xdr_TSP_request_async_sample_t (XDR *, TSP_request_async_sample_t*);
+extern  bool_t xdr_TSP_answer_async_sample_t (XDR *, TSP_answer_async_sample_t*);
+extern  bool_t xdr_TSP_provider_info_t (XDR *, TSP_provider_info_t*);
+extern  bool_t xdr_tsp_request_filtered_information_1_argument (XDR *, tsp_request_filtered_information_1_argument*);
+
+#else /* K&R C */
+extern bool_t xdr_TSP_status_t ();
+extern bool_t xdr_TSP_session_state_t ();
+extern bool_t xdr_TSP_datatype_t ();
+extern bool_t xdr_TSP_answer_open_t ();
+extern bool_t xdr_TSP_argv_item_t ();
+extern bool_t xdr_TSP_argv_t ();
+extern bool_t xdr_TSP_request_open_t ();
+extern bool_t xdr_TSP_request_close_t ();
+extern bool_t xdr_TSP_request_information_t ();
+extern bool_t xdr_TSP_request_feature_t ();
+extern bool_t xdr_TSP_answer_feature_t ();
+extern bool_t xdr_TSP_exec_feature_t ();
+extern bool_t xdr_TSP_sample_symbol_info_t ();
+extern bool_t xdr_TSP_sample_symbol_info_list_t ();
+extern bool_t xdr_TSP_extended_info_t ();
+extern bool_t xdr_TSP_extended_info_list_t ();
+extern bool_t xdr_TSP_sample_symbol_extended_info_t ();
+extern bool_t xdr_TSP_sample_symbol_extended_info_list_t ();
+extern bool_t xdr_TSP_request_extended_information_t ();
+extern bool_t xdr_TSP_answer_extended_information_t ();
+extern bool_t xdr_TSP_request_sample_t ();
+extern bool_t xdr_TSP_answer_sample_t ();
+extern bool_t xdr_TSP_request_sample_init_t ();
+extern bool_t xdr_TSP_answer_sample_init_t ();
+extern bool_t xdr_TSP_request_sample_destroy_t ();
+extern bool_t xdr_TSP_answer_sample_destroy_t ();
+extern bool_t xdr_TSP_async_sample_t ();
+extern bool_t xdr_TSP_request_async_sample_t ();
+extern bool_t xdr_TSP_answer_async_sample_t ();
+extern bool_t xdr_TSP_provider_info_t ();
+extern bool_t xdr_tsp_request_filtered_information_1_argument ();
+
+#endif /* K&R C */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_TSP_RPC_H_RPCGEN */
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc.h.rtems tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc.h.rtems
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc.h.rtems	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc.h.rtems	2007-10-22 10:46:10.000000000 +0200
@@ -0,0 +1,450 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#ifndef _TSP_RPC_H_RPCGEN
+#define _TSP_RPC_H_RPCGEN
+
+#include <rpc/rpc.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+enum TSP_status_t {
+	TSP_STATUS_OK = 0,
+	TSP_STATUS_NOK = 1,
+	TSP_STATUS_ERROR_PROVIDER_UNREACHABLE = 2,
+	TSP_STATUS_ERROR_UNKNOWN = 3,
+	TSP_STATUS_ERROR_SEE_STRING = 4,
+	TSP_STATUS_ERROR_VERSION = 5,
+	TSP_STATUS_ERROR_SYMBOLS = 6,
+	TSP_STATUS_ERROR_SYMBOL_FILTER = 7,
+	TSP_STATUS_ERROR_NOT_SUPPORTED = 8,
+	TSP_STATUS_ERROR_NOT_IMPLEMENTED = 9,
+	TSP_STATUS_ERROR_PGI_UNKNOWN = 10,
+	TSP_STATUS_ERROR_ASYNC_READ_NOT_ALLOWED = 11,
+	TSP_STATUS_ERROR_ASYNC_WRITE_NOT_ALLOWED = 12,
+	TSP_STATUS_ERROR_ASYNC_READ_NOT_SUPPORTED = 13,
+	TSP_STATUS_ERROR_ASYNC_WRITE_NOT_SUPPORTED = 14,
+	TSP_STATUS_ERROR_MEMORY_ALLOCATION = 15,
+	TSP_STATUS_ERROR_INVALID_CHANNEL_ID = 16,
+	TSP_STATUS_ERROR_NO_MORE_GLU = 17,
+	TSP_STATUS_ERROR_NO_MORE_SESSION = 18,
+	TSP_STATUS_ERROR_GLU_START = 19,
+	TSP_STATUS_ERROR_GLU_INITIALIZE = 20,
+	TSP_STATUS_ERROR_BAD_REQUEST_ORDER = 21,
+	TSP_STATUS_ERROR_DATAPOOL_INSTANTIATE = 22,
+	TSP_STATUS_ERROR_THREAD_CREATE = 23,
+	TSP_STATUS_ERROR_NOT_INITIALIZED = 24,
+	TSP_STATUS_ERROR_INVALID_REQUEST = 25,
+	TSP_STATUS_ERROR_EMPTY_REQUEST_SAMPLE = 26,
+	TSP_STATUS_ERROR_CUSTOM_BEGIN = 16384,
+};
+typedef enum TSP_status_t TSP_status_t;
+
+enum TSP_session_state_t {
+	TSP_SESSION_STATE_UNKNOWN = 0,
+	TSP_SESSION_STATE_OPENED = 1,
+	TSP_SESSION_STATE_CLOSED = 2,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_OK = 3,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK = 4,
+	TSP_SESSION_STATE_SAMPLING = 5,
+	TSP_SESSION_STATE_REQUEST_SAMPLE_DESTROY_OK = 6,
+	TSP_SESSION_STATE_BROKEN_LINK = 7,
+	TSP_SESSION_STATE_CLOSE_ON_EOF = 8,
+};
+typedef enum TSP_session_state_t TSP_session_state_t;
+
+enum TSP_datatype_t {
+	TSP_TYPE_UNKNOWN = 0,
+	TSP_TYPE_DOUBLE = 1,
+	TSP_TYPE_FLOAT = 2,
+	TSP_TYPE_INT8 = 3,
+	TSP_TYPE_INT16 = 4,
+	TSP_TYPE_INT32 = 5,
+	TSP_TYPE_INT64 = 6,
+	TSP_TYPE_UINT8 = 7,
+	TSP_TYPE_UINT16 = 8,
+	TSP_TYPE_UINT32 = 9,
+	TSP_TYPE_UINT64 = 10,
+	TSP_TYPE_CHAR = 11,
+	TSP_TYPE_UCHAR = 12,
+	TSP_TYPE_RAW = 13,
+	TSP_TYPE_LAST = 14,
+};
+typedef enum TSP_datatype_t TSP_datatype_t;
+
+struct TSP_answer_open_t {
+	int version_id;
+	u_int channel_id;
+	TSP_status_t status;
+	char *status_str;
+};
+typedef struct TSP_answer_open_t TSP_answer_open_t;
+
+typedef char *TSP_argv_item_t;
+
+typedef struct {
+	u_int TSP_argv_t_len;
+	TSP_argv_item_t *TSP_argv_t_val;
+} TSP_argv_t;
+
+struct TSP_request_open_t {
+	int version_id;
+	TSP_argv_t argv;
+};
+typedef struct TSP_request_open_t TSP_request_open_t;
+
+struct TSP_request_close_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_close_t TSP_request_close_t;
+
+struct TSP_request_information_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_information_t TSP_request_information_t;
+
+struct TSP_request_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+};
+typedef struct TSP_request_feature_t TSP_request_feature_t;
+
+struct TSP_answer_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int int_value;
+	double double_value;
+	char *string_value;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_feature_t TSP_answer_feature_t;
+
+struct TSP_exec_feature_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int int_value;
+	double double_value;
+	char *string_value;
+};
+typedef struct TSP_exec_feature_t TSP_exec_feature_t;
+
+struct TSP_sample_symbol_info_t {
+	char *name;
+	int provider_global_index;
+	int provider_group_index;
+	int provider_group_rank;
+	TSP_datatype_t type;
+	u_int dimension;
+	u_int offset;
+	u_int nelem;
+	int period;
+	int phase;
+};
+typedef struct TSP_sample_symbol_info_t TSP_sample_symbol_info_t;
+
+typedef struct {
+	u_int TSP_sample_symbol_info_list_t_len;
+	TSP_sample_symbol_info_t *TSP_sample_symbol_info_list_t_val;
+} TSP_sample_symbol_info_list_t;
+
+struct TSP_extended_info_t {
+	char *key;
+	char *value;
+};
+typedef struct TSP_extended_info_t TSP_extended_info_t;
+
+typedef struct {
+	u_int TSP_extended_info_list_t_len;
+	TSP_extended_info_t *TSP_extended_info_list_t_val;
+} TSP_extended_info_list_t;
+
+struct TSP_sample_symbol_extended_info_t {
+	int provider_global_index;
+	TSP_extended_info_list_t info;
+};
+typedef struct TSP_sample_symbol_extended_info_t TSP_sample_symbol_extended_info_t;
+
+typedef struct {
+	u_int TSP_sample_symbol_extended_info_list_t_len;
+	TSP_sample_symbol_extended_info_t *TSP_sample_symbol_extended_info_list_t_val;
+} TSP_sample_symbol_extended_info_list_t;
+
+struct TSP_request_extended_information_t {
+	int version_id;
+	u_int channel_id;
+	struct {
+		u_int pgi_len;
+		int *pgi_val;
+	} pgi;
+};
+typedef struct TSP_request_extended_information_t TSP_request_extended_information_t;
+
+struct TSP_answer_extended_information_t {
+	int version_id;
+	u_int channel_id;
+	TSP_sample_symbol_extended_info_list_t extsymbols;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_extended_information_t TSP_answer_extended_information_t;
+
+struct TSP_request_sample_t {
+	int version_id;
+	u_int channel_id;
+	u_int feature_words[4];
+	int consumer_timeout;
+	TSP_sample_symbol_info_list_t symbols;
+};
+typedef struct TSP_request_sample_t TSP_request_sample_t;
+
+struct TSP_answer_sample_t {
+	int version_id;
+	u_int channel_id;
+	int provider_timeout;
+	int provider_group_number;
+	TSP_sample_symbol_info_list_t symbols;
+	double base_frequency;
+	int max_period;
+	int max_client_number;
+	int current_client_number;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_sample_t TSP_answer_sample_t;
+
+struct TSP_request_sample_init_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_sample_init_t TSP_request_sample_init_t;
+
+struct TSP_answer_sample_init_t {
+	int version_id;
+	u_int channel_id;
+	char *data_address;
+	TSP_status_t status;
+};
+typedef struct TSP_answer_sample_init_t TSP_answer_sample_init_t;
+
+struct TSP_request_sample_destroy_t {
+	int version_id;
+	u_int channel_id;
+};
+typedef struct TSP_request_sample_destroy_t TSP_request_sample_destroy_t;
+
+struct TSP_answer_sample_destroy_t {
+	int version_id;
+	u_int channel_id;
+	int status;
+};
+typedef struct TSP_answer_sample_destroy_t TSP_answer_sample_destroy_t;
+
+struct TSP_async_sample_t {
+	int provider_global_index;
+	struct {
+		u_int data_len;
+		char *data_val;
+	} data;
+};
+typedef struct TSP_async_sample_t TSP_async_sample_t;
+
+struct TSP_request_async_sample_t {
+	int version_id;
+	u_int channel_id;
+	TSP_async_sample_t async_sample;
+};
+typedef struct TSP_request_async_sample_t TSP_request_async_sample_t;
+
+struct TSP_answer_async_sample_t {
+	int version_id;
+	u_int channel_id;
+	TSP_async_sample_t async_sample;
+	int status;
+};
+typedef struct TSP_answer_async_sample_t TSP_answer_async_sample_t;
+
+struct TSP_provider_info_t {
+	char *info;
+};
+typedef struct TSP_provider_info_t TSP_provider_info_t;
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
+
+struct tsp_request_filtered_information_1_argument {
+	TSP_request_information_t arg1;
+	int arg2;
+	char *arg3;
+};
+typedef struct tsp_request_filtered_information_1_argument tsp_request_filtered_information_1_argument;
+
+#define TSP_RPC 0x31230010
+#define TSP_RPC_VERSION_INITIAL 1
+
+#if defined(__STDC__) || defined(__cplusplus)
+#define TSP_PROVIDER_INFORMATION 101
+extern  TSP_provider_info_t * tsp_provider_information_1(CLIENT *);
+extern  TSP_provider_info_t * tsp_provider_information_1_svc(struct svc_req *);
+#define TSP_REQUEST_OPEN 102
+extern  TSP_answer_open_t * tsp_request_open_1(TSP_request_open_t , CLIENT *);
+extern  TSP_answer_open_t * tsp_request_open_1_svc(TSP_request_open_t , struct svc_req *);
+#define TSP_REQUEST_CLOSE 103
+extern  int * tsp_request_close_1(TSP_request_close_t , CLIENT *);
+extern  int * tsp_request_close_1_svc(TSP_request_close_t , struct svc_req *);
+#define TSP_REQUEST_INFORMATION 104
+extern  TSP_answer_sample_t * tsp_request_information_1(TSP_request_information_t , CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_information_1_svc(TSP_request_information_t , struct svc_req *);
+#define TSP_REQUEST_FEATURE 105
+extern  TSP_answer_feature_t * tsp_request_feature_1(TSP_request_feature_t , CLIENT *);
+extern  TSP_answer_feature_t * tsp_request_feature_1_svc(TSP_request_feature_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE 106
+extern  TSP_answer_sample_t * tsp_request_sample_1(TSP_request_sample_t , CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_sample_1_svc(TSP_request_sample_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE_INIT 107
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1(TSP_request_sample_init_t , CLIENT *);
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1_svc(TSP_request_sample_init_t , struct svc_req *);
+#define TSP_REQUEST_SAMPLE_DESTROY 108
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1(TSP_request_sample_destroy_t , CLIENT *);
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1_svc(TSP_request_sample_destroy_t , struct svc_req *);
+#define TSP_EXEC_FEATURE 109
+extern  int * tsp_exec_feature_1(TSP_exec_feature_t , CLIENT *);
+extern  int * tsp_exec_feature_1_svc(TSP_exec_feature_t , struct svc_req *);
+#define TSP_REQUEST_ASYNC_SAMPLE_WRITE 110
+extern  int * tsp_request_async_sample_write_1(TSP_async_sample_t , CLIENT *);
+extern  int * tsp_request_async_sample_write_1_svc(TSP_async_sample_t , struct svc_req *);
+#define TSP_REQUEST_ASYNC_SAMPLE_READ 111
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1(TSP_async_sample_t , CLIENT *);
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1_svc(TSP_async_sample_t , struct svc_req *);
+#define TSP_REQUEST_FILTERED_INFORMATION 112
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1(TSP_request_information_t , int , char *, CLIENT *);
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1_svc(TSP_request_information_t , int , char *, struct svc_req *);
+#define TSP_REQUEST_EXTENDED_INFORMATION 113
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1(TSP_request_extended_information_t , CLIENT *);
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1_svc(TSP_request_extended_information_t , struct svc_req *);
+extern int tsp_rpc_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
+
+#else /* K&R C */
+#define TSP_PROVIDER_INFORMATION 101
+extern  TSP_provider_info_t * tsp_provider_information_1();
+extern  TSP_provider_info_t * tsp_provider_information_1_svc();
+#define TSP_REQUEST_OPEN 102
+extern  TSP_answer_open_t * tsp_request_open_1();
+extern  TSP_answer_open_t * tsp_request_open_1_svc();
+#define TSP_REQUEST_CLOSE 103
+extern  int * tsp_request_close_1();
+extern  int * tsp_request_close_1_svc();
+#define TSP_REQUEST_INFORMATION 104
+extern  TSP_answer_sample_t * tsp_request_information_1();
+extern  TSP_answer_sample_t * tsp_request_information_1_svc();
+#define TSP_REQUEST_FEATURE 105
+extern  TSP_answer_feature_t * tsp_request_feature_1();
+extern  TSP_answer_feature_t * tsp_request_feature_1_svc();
+#define TSP_REQUEST_SAMPLE 106
+extern  TSP_answer_sample_t * tsp_request_sample_1();
+extern  TSP_answer_sample_t * tsp_request_sample_1_svc();
+#define TSP_REQUEST_SAMPLE_INIT 107
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1();
+extern  TSP_answer_sample_init_t * tsp_request_sample_init_1_svc();
+#define TSP_REQUEST_SAMPLE_DESTROY 108
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1();
+extern  TSP_answer_sample_destroy_t * tsp_request_sample_destroy_1_svc();
+#define TSP_EXEC_FEATURE 109
+extern  int * tsp_exec_feature_1();
+extern  int * tsp_exec_feature_1_svc();
+#define TSP_REQUEST_ASYNC_SAMPLE_WRITE 110
+extern  int * tsp_request_async_sample_write_1();
+extern  int * tsp_request_async_sample_write_1_svc();
+#define TSP_REQUEST_ASYNC_SAMPLE_READ 111
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1();
+extern  TSP_async_sample_t * tsp_request_async_sample_read_1_svc();
+#define TSP_REQUEST_FILTERED_INFORMATION 112
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1();
+extern  TSP_answer_sample_t * tsp_request_filtered_information_1_svc();
+#define TSP_REQUEST_EXTENDED_INFORMATION 113
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1();
+extern  TSP_answer_extended_information_t * tsp_request_extended_information_1_svc();
+extern int tsp_rpc_1_freeresult ();
+#endif /* K&R C */
+
+/* the xdr functions */
+
+#if defined(__STDC__) || defined(__cplusplus)
+extern  bool_t xdr_TSP_status_t (XDR *, TSP_status_t*);
+extern  bool_t xdr_TSP_session_state_t (XDR *, TSP_session_state_t*);
+extern  bool_t xdr_TSP_datatype_t (XDR *, TSP_datatype_t*);
+extern  bool_t xdr_TSP_answer_open_t (XDR *, TSP_answer_open_t*);
+extern  bool_t xdr_TSP_argv_item_t (XDR *, TSP_argv_item_t*);
+extern  bool_t xdr_TSP_argv_t (XDR *, TSP_argv_t*);
+extern  bool_t xdr_TSP_request_open_t (XDR *, TSP_request_open_t*);
+extern  bool_t xdr_TSP_request_close_t (XDR *, TSP_request_close_t*);
+extern  bool_t xdr_TSP_request_information_t (XDR *, TSP_request_information_t*);
+extern  bool_t xdr_TSP_request_feature_t (XDR *, TSP_request_feature_t*);
+extern  bool_t xdr_TSP_answer_feature_t (XDR *, TSP_answer_feature_t*);
+extern  bool_t xdr_TSP_exec_feature_t (XDR *, TSP_exec_feature_t*);
+extern  bool_t xdr_TSP_sample_symbol_info_t (XDR *, TSP_sample_symbol_info_t*);
+extern  bool_t xdr_TSP_sample_symbol_info_list_t (XDR *, TSP_sample_symbol_info_list_t*);
+extern  bool_t xdr_TSP_extended_info_t (XDR *, TSP_extended_info_t*);
+extern  bool_t xdr_TSP_extended_info_list_t (XDR *, TSP_extended_info_list_t*);
+extern  bool_t xdr_TSP_sample_symbol_extended_info_t (XDR *, TSP_sample_symbol_extended_info_t*);
+extern  bool_t xdr_TSP_sample_symbol_extended_info_list_t (XDR *, TSP_sample_symbol_extended_info_list_t*);
+extern  bool_t xdr_TSP_request_extended_information_t (XDR *, TSP_request_extended_information_t*);
+extern  bool_t xdr_TSP_answer_extended_information_t (XDR *, TSP_answer_extended_information_t*);
+extern  bool_t xdr_TSP_request_sample_t (XDR *, TSP_request_sample_t*);
+extern  bool_t xdr_TSP_answer_sample_t (XDR *, TSP_answer_sample_t*);
+extern  bool_t xdr_TSP_request_sample_init_t (XDR *, TSP_request_sample_init_t*);
+extern  bool_t xdr_TSP_answer_sample_init_t (XDR *, TSP_answer_sample_init_t*);
+extern  bool_t xdr_TSP_request_sample_destroy_t (XDR *, TSP_request_sample_destroy_t*);
+extern  bool_t xdr_TSP_answer_sample_destroy_t (XDR *, TSP_answer_sample_destroy_t*);
+extern  bool_t xdr_TSP_async_sample_t (XDR *, TSP_async_sample_t*);
+extern  bool_t xdr_TSP_request_async_sample_t (XDR *, TSP_request_async_sample_t*);
+extern  bool_t xdr_TSP_answer_async_sample_t (XDR *, TSP_answer_async_sample_t*);
+extern  bool_t xdr_TSP_provider_info_t (XDR *, TSP_provider_info_t*);
+extern  bool_t xdr_tsp_request_filtered_information_1_argument (XDR *, tsp_request_filtered_information_1_argument*);
+
+#else /* K&R C */
+extern bool_t xdr_TSP_status_t ();
+extern bool_t xdr_TSP_session_state_t ();
+extern bool_t xdr_TSP_datatype_t ();
+extern bool_t xdr_TSP_answer_open_t ();
+extern bool_t xdr_TSP_argv_item_t ();
+extern bool_t xdr_TSP_argv_t ();
+extern bool_t xdr_TSP_request_open_t ();
+extern bool_t xdr_TSP_request_close_t ();
+extern bool_t xdr_TSP_request_information_t ();
+extern bool_t xdr_TSP_request_feature_t ();
+extern bool_t xdr_TSP_answer_feature_t ();
+extern bool_t xdr_TSP_exec_feature_t ();
+extern bool_t xdr_TSP_sample_symbol_info_t ();
+extern bool_t xdr_TSP_sample_symbol_info_list_t ();
+extern bool_t xdr_TSP_extended_info_t ();
+extern bool_t xdr_TSP_extended_info_list_t ();
+extern bool_t xdr_TSP_sample_symbol_extended_info_t ();
+extern bool_t xdr_TSP_sample_symbol_extended_info_list_t ();
+extern bool_t xdr_TSP_request_extended_information_t ();
+extern bool_t xdr_TSP_answer_extended_information_t ();
+extern bool_t xdr_TSP_request_sample_t ();
+extern bool_t xdr_TSP_answer_sample_t ();
+extern bool_t xdr_TSP_request_sample_init_t ();
+extern bool_t xdr_TSP_answer_sample_init_t ();
+extern bool_t xdr_TSP_request_sample_destroy_t ();
+extern bool_t xdr_TSP_answer_sample_destroy_t ();
+extern bool_t xdr_TSP_async_sample_t ();
+extern bool_t xdr_TSP_request_async_sample_t ();
+extern bool_t xdr_TSP_answer_async_sample_t ();
+extern bool_t xdr_TSP_provider_info_t ();
+extern bool_t xdr_tsp_request_filtered_information_1_argument ();
+
+#endif /* K&R C */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_TSP_RPC_H_RPCGEN */
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_svc_rtems.c tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_svc_rtems.c
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_svc_rtems.c	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_svc_rtems.c	2007-10-22 11:02:08.000000000 +0200
@@ -0,0 +1,223 @@
+#ifdef VXWORKS
+#define static extern
+#endif /* !VXWORKS */
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#include "tsp_rpc.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <rpc/pmap_clnt.h>
+#include <string.h>
+#include <memory.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#ifndef SIG_PF
+#define SIG_PF void(*)(int)
+#endif
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
+
+static TSP_provider_info_t *
+_tsp_provider_information_1 (void  *argp, struct svc_req *rqstp)
+{
+	return (tsp_provider_information_1_svc(rqstp));
+}
+
+static TSP_answer_open_t *
+_tsp_request_open_1 (TSP_request_open_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_open_1_svc(*argp, rqstp));
+}
+
+static int *
+_tsp_request_close_1 (TSP_request_close_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_close_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_t *
+_tsp_request_information_1 (TSP_request_information_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_information_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_feature_t *
+_tsp_request_feature_1 (TSP_request_feature_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_feature_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_t *
+_tsp_request_sample_1 (TSP_request_sample_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_sample_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_init_t *
+_tsp_request_sample_init_1 (TSP_request_sample_init_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_sample_init_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_destroy_t *
+_tsp_request_sample_destroy_1 (TSP_request_sample_destroy_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_sample_destroy_1_svc(*argp, rqstp));
+}
+
+static int *
+_tsp_exec_feature_1 (TSP_exec_feature_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_exec_feature_1_svc(*argp, rqstp));
+}
+
+static int *
+_tsp_request_async_sample_write_1 (TSP_async_sample_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_async_sample_write_1_svc(*argp, rqstp));
+}
+
+static TSP_async_sample_t *
+_tsp_request_async_sample_read_1 (TSP_async_sample_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_async_sample_read_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_t *
+_tsp_request_filtered_information_1 (tsp_request_filtered_information_1_argument *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_filtered_information_1_svc(argp->arg1, argp->arg2, argp->arg3, rqstp));
+}
+
+static TSP_answer_extended_information_t *
+_tsp_request_extended_information_1 (TSP_request_extended_information_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_extended_information_1_svc(*argp, rqstp));
+}
+
+void
+tsp_rpc_1(struct svc_req *rqstp, register SVCXPRT *transp)
+{
+	union {
+		TSP_request_open_t tsp_request_open_1_arg;
+		TSP_request_close_t tsp_request_close_1_arg;
+		TSP_request_information_t tsp_request_information_1_arg;
+		TSP_request_feature_t tsp_request_feature_1_arg;
+		TSP_request_sample_t tsp_request_sample_1_arg;
+		TSP_request_sample_init_t tsp_request_sample_init_1_arg;
+		TSP_request_sample_destroy_t tsp_request_sample_destroy_1_arg;
+		TSP_exec_feature_t tsp_exec_feature_1_arg;
+		TSP_async_sample_t tsp_request_async_sample_write_1_arg;
+		TSP_async_sample_t tsp_request_async_sample_read_1_arg;
+		tsp_request_filtered_information_1_argument tsp_request_filtered_information_1_arg;
+		TSP_request_extended_information_t tsp_request_extended_information_1_arg;
+	} argument;
+	char *result;
+	xdrproc_t _xdr_argument, _xdr_result;
+	char *(*local)(char *, struct svc_req *);
+
+	switch (rqstp->rq_proc) {
+	case NULLPROC:
+		(void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
+		return;
+
+	case TSP_PROVIDER_INFORMATION:
+		_xdr_argument = (xdrproc_t) xdr_void;
+		_xdr_result = (xdrproc_t) xdr_TSP_provider_info_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_provider_information_1;
+		break;
+
+	case TSP_REQUEST_OPEN:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_open_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_open_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_open_1;
+		break;
+
+	case TSP_REQUEST_CLOSE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_close_t;
+		_xdr_result = (xdrproc_t) xdr_int;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_close_1;
+		break;
+
+	case TSP_REQUEST_INFORMATION:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_information_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_information_1;
+		break;
+
+	case TSP_REQUEST_FEATURE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_feature_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_feature_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_feature_1;
+		break;
+
+	case TSP_REQUEST_SAMPLE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_sample_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_sample_1;
+		break;
+
+	case TSP_REQUEST_SAMPLE_INIT:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_sample_init_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_init_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_sample_init_1;
+		break;
+
+	case TSP_REQUEST_SAMPLE_DESTROY:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_sample_destroy_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_destroy_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_sample_destroy_1;
+		break;
+
+	case TSP_EXEC_FEATURE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_exec_feature_t;
+		_xdr_result = (xdrproc_t) xdr_int;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_exec_feature_1;
+		break;
+
+	case TSP_REQUEST_ASYNC_SAMPLE_WRITE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_async_sample_t;
+		_xdr_result = (xdrproc_t) xdr_int;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_async_sample_write_1;
+		break;
+
+	case TSP_REQUEST_ASYNC_SAMPLE_READ:
+		_xdr_argument = (xdrproc_t) xdr_TSP_async_sample_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_async_sample_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_async_sample_read_1;
+		break;
+
+	case TSP_REQUEST_FILTERED_INFORMATION:
+		_xdr_argument = (xdrproc_t) xdr_tsp_request_filtered_information_1_argument;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_filtered_information_1;
+		break;
+
+	case TSP_REQUEST_EXTENDED_INFORMATION:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_extended_information_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_extended_information_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_extended_information_1;
+		break;
+
+	default:
+		svcerr_noproc (transp);
+		return;
+	}
+	memset ((char *)&argument, 0, sizeof (argument));
+	if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
+		svcerr_decode (transp);
+		return;
+	}
+	result = (*local)((char *)&argument, rqstp);
+	if (result != NULL && !svc_sendreply(transp, (xdrproc_t) _xdr_result, result)) {
+		svcerr_systemerr (transp);
+	}
+	if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
+		fprintf (stderr, "%s", "unable to free arguments");
+		exit (1);
+	}
+	return;
+}
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_svc_rtems.c~ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_svc_rtems.c~
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_svc_rtems.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_svc_rtems.c~	2007-10-18 16:46:29.000000000 +0200
@@ -0,0 +1,223 @@
+#ifdef VXWORKS
+#define static extern
+#endif /* !VXWORKS */
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#include "tsp_rpc_rtems.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <rpc/pmap_clnt.h>
+#include <string.h>
+#include <memory.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#ifndef SIG_PF
+#define SIG_PF void(*)(int)
+#endif
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
+
+static TSP_provider_info_t *
+_tsp_provider_information_1 (void  *argp, struct svc_req *rqstp)
+{
+	return (tsp_provider_information_1_svc(rqstp));
+}
+
+static TSP_answer_open_t *
+_tsp_request_open_1 (TSP_request_open_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_open_1_svc(*argp, rqstp));
+}
+
+static int *
+_tsp_request_close_1 (TSP_request_close_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_close_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_t *
+_tsp_request_information_1 (TSP_request_information_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_information_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_feature_t *
+_tsp_request_feature_1 (TSP_request_feature_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_feature_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_t *
+_tsp_request_sample_1 (TSP_request_sample_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_sample_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_init_t *
+_tsp_request_sample_init_1 (TSP_request_sample_init_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_sample_init_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_destroy_t *
+_tsp_request_sample_destroy_1 (TSP_request_sample_destroy_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_sample_destroy_1_svc(*argp, rqstp));
+}
+
+static int *
+_tsp_exec_feature_1 (TSP_exec_feature_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_exec_feature_1_svc(*argp, rqstp));
+}
+
+static int *
+_tsp_request_async_sample_write_1 (TSP_async_sample_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_async_sample_write_1_svc(*argp, rqstp));
+}
+
+static TSP_async_sample_t *
+_tsp_request_async_sample_read_1 (TSP_async_sample_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_async_sample_read_1_svc(*argp, rqstp));
+}
+
+static TSP_answer_sample_t *
+_tsp_request_filtered_information_1 (tsp_request_filtered_information_1_argument *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_filtered_information_1_svc(argp->arg1, argp->arg2, argp->arg3, rqstp));
+}
+
+static TSP_answer_extended_information_t *
+_tsp_request_extended_information_1 (TSP_request_extended_information_t  *argp, struct svc_req *rqstp)
+{
+	return (tsp_request_extended_information_1_svc(*argp, rqstp));
+}
+
+void
+tsp_rpc_1(struct svc_req *rqstp, register SVCXPRT *transp)
+{
+	union {
+		TSP_request_open_t tsp_request_open_1_arg;
+		TSP_request_close_t tsp_request_close_1_arg;
+		TSP_request_information_t tsp_request_information_1_arg;
+		TSP_request_feature_t tsp_request_feature_1_arg;
+		TSP_request_sample_t tsp_request_sample_1_arg;
+		TSP_request_sample_init_t tsp_request_sample_init_1_arg;
+		TSP_request_sample_destroy_t tsp_request_sample_destroy_1_arg;
+		TSP_exec_feature_t tsp_exec_feature_1_arg;
+		TSP_async_sample_t tsp_request_async_sample_write_1_arg;
+		TSP_async_sample_t tsp_request_async_sample_read_1_arg;
+		tsp_request_filtered_information_1_argument tsp_request_filtered_information_1_arg;
+		TSP_request_extended_information_t tsp_request_extended_information_1_arg;
+	} argument;
+	char *result;
+	xdrproc_t _xdr_argument, _xdr_result;
+	char *(*local)(char *, struct svc_req *);
+
+	switch (rqstp->rq_proc) {
+	case NULLPROC:
+		(void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
+		return;
+
+	case TSP_PROVIDER_INFORMATION:
+		_xdr_argument = (xdrproc_t) xdr_void;
+		_xdr_result = (xdrproc_t) xdr_TSP_provider_info_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_provider_information_1;
+		break;
+
+	case TSP_REQUEST_OPEN:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_open_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_open_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_open_1;
+		break;
+
+	case TSP_REQUEST_CLOSE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_close_t;
+		_xdr_result = (xdrproc_t) xdr_int;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_close_1;
+		break;
+
+	case TSP_REQUEST_INFORMATION:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_information_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_information_1;
+		break;
+
+	case TSP_REQUEST_FEATURE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_feature_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_feature_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_feature_1;
+		break;
+
+	case TSP_REQUEST_SAMPLE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_sample_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_sample_1;
+		break;
+
+	case TSP_REQUEST_SAMPLE_INIT:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_sample_init_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_init_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_sample_init_1;
+		break;
+
+	case TSP_REQUEST_SAMPLE_DESTROY:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_sample_destroy_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_destroy_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_sample_destroy_1;
+		break;
+
+	case TSP_EXEC_FEATURE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_exec_feature_t;
+		_xdr_result = (xdrproc_t) xdr_int;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_exec_feature_1;
+		break;
+
+	case TSP_REQUEST_ASYNC_SAMPLE_WRITE:
+		_xdr_argument = (xdrproc_t) xdr_TSP_async_sample_t;
+		_xdr_result = (xdrproc_t) xdr_int;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_async_sample_write_1;
+		break;
+
+	case TSP_REQUEST_ASYNC_SAMPLE_READ:
+		_xdr_argument = (xdrproc_t) xdr_TSP_async_sample_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_async_sample_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_async_sample_read_1;
+		break;
+
+	case TSP_REQUEST_FILTERED_INFORMATION:
+		_xdr_argument = (xdrproc_t) xdr_tsp_request_filtered_information_1_argument;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_sample_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_filtered_information_1;
+		break;
+
+	case TSP_REQUEST_EXTENDED_INFORMATION:
+		_xdr_argument = (xdrproc_t) xdr_TSP_request_extended_information_t;
+		_xdr_result = (xdrproc_t) xdr_TSP_answer_extended_information_t;
+		local = (char *(*)(char *, struct svc_req *)) _tsp_request_extended_information_1;
+		break;
+
+	default:
+		svcerr_noproc (transp);
+		return;
+	}
+	memset ((char *)&argument, 0, sizeof (argument));
+	if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
+		svcerr_decode (transp);
+		return;
+	}
+	result = (*local)((char *)&argument, rqstp);
+	if (result != NULL && !svc_sendreply(transp, (xdrproc_t) _xdr_result, result)) {
+		svcerr_systemerr (transp);
+	}
+	if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
+		fprintf (stderr, "%s", "unable to free arguments");
+		exit (1);
+	}
+	return;
+}
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_xdr_rtems.c tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_xdr_rtems.c
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_xdr_rtems.c	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_xdr_rtems.c	2007-10-22 11:02:18.000000000 +0200
@@ -0,0 +1,860 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#include "tsp_rpc.h"
+
+bool_t
+xdr_TSP_status_t (XDR *xdrs, TSP_status_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_enum (xdrs, (enum_t *) objp))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_session_state_t (XDR *xdrs, TSP_session_state_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_enum (xdrs, (enum_t *) objp))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_datatype_t (XDR *xdrs, TSP_datatype_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_enum (xdrs, (enum_t *) objp))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_open_t (XDR *xdrs, TSP_answer_open_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->status_str, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_argv_item_t (XDR *xdrs, TSP_argv_item_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_string (xdrs, objp, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_argv_t (XDR *xdrs, TSP_argv_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_array (xdrs, (char **)&objp->TSP_argv_t_val, (u_int *) &objp->TSP_argv_t_len, ~0,
+		sizeof (TSP_argv_item_t), (xdrproc_t) xdr_TSP_argv_item_t))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_open_t (XDR *xdrs, TSP_request_open_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_TSP_argv_t (xdrs, &objp->argv))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_close_t (XDR *xdrs, TSP_request_close_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_information_t (XDR *xdrs, TSP_request_information_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_feature_t (XDR *xdrs, TSP_request_feature_t *objp)
+{
+	register int32_t *buf;
+
+	int i;
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, (2 +  4 )* BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+		} else {
+			IXDR_PUT_LONG(buf, objp->version_id);
+			IXDR_PUT_U_LONG(buf, objp->channel_id);
+			{
+				register u_int *genp;
+
+				for (i = 0, genp = objp->feature_words;
+					i < 4; ++i) {
+					IXDR_PUT_U_LONG(buf, *genp++);
+				}
+			}
+		}
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, (2 +  4 )* BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+		} else {
+			objp->version_id = IXDR_GET_LONG(buf);
+			objp->channel_id = IXDR_GET_U_LONG(buf);
+			{
+				register u_int *genp;
+
+				for (i = 0, genp = objp->feature_words;
+					i < 4; ++i) {
+					*genp++ = IXDR_GET_U_LONG(buf);
+				}
+			}
+		}
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+		sizeof (u_int), (xdrproc_t) xdr_u_int))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_feature_t (XDR *xdrs, TSP_answer_feature_t *objp)
+{
+	register int32_t *buf;
+
+	int i;
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->int_value))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->version_id);
+		IXDR_PUT_U_LONG(buf, objp->channel_id);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				IXDR_PUT_U_LONG(buf, *genp++);
+			}
+		}
+		IXDR_PUT_LONG(buf, objp->int_value);
+		}
+		 if (!xdr_double (xdrs, &objp->double_value))
+			 return FALSE;
+		 if (!xdr_string (xdrs, &objp->string_value, ~0))
+			 return FALSE;
+		 if (!xdr_TSP_status_t (xdrs, &objp->status))
+			 return FALSE;
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->int_value))
+				 return FALSE;
+
+		} else {
+		objp->version_id = IXDR_GET_LONG(buf);
+		objp->channel_id = IXDR_GET_U_LONG(buf);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				*genp++ = IXDR_GET_U_LONG(buf);
+			}
+		}
+		objp->int_value = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_double (xdrs, &objp->double_value))
+			 return FALSE;
+		 if (!xdr_string (xdrs, &objp->string_value, ~0))
+			 return FALSE;
+		 if (!xdr_TSP_status_t (xdrs, &objp->status))
+			 return FALSE;
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+		sizeof (u_int), (xdrproc_t) xdr_u_int))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->int_value))
+		 return FALSE;
+	 if (!xdr_double (xdrs, &objp->double_value))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->string_value, ~0))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_exec_feature_t (XDR *xdrs, TSP_exec_feature_t *objp)
+{
+	register int32_t *buf;
+
+	int i;
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->int_value))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->version_id);
+		IXDR_PUT_U_LONG(buf, objp->channel_id);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				IXDR_PUT_U_LONG(buf, *genp++);
+			}
+		}
+		IXDR_PUT_LONG(buf, objp->int_value);
+		}
+		 if (!xdr_double (xdrs, &objp->double_value))
+			 return FALSE;
+		 if (!xdr_string (xdrs, &objp->string_value, ~0))
+			 return FALSE;
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->int_value))
+				 return FALSE;
+
+		} else {
+		objp->version_id = IXDR_GET_LONG(buf);
+		objp->channel_id = IXDR_GET_U_LONG(buf);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				*genp++ = IXDR_GET_U_LONG(buf);
+			}
+		}
+		objp->int_value = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_double (xdrs, &objp->double_value))
+			 return FALSE;
+		 if (!xdr_string (xdrs, &objp->string_value, ~0))
+			 return FALSE;
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+		sizeof (u_int), (xdrproc_t) xdr_u_int))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->int_value))
+		 return FALSE;
+	 if (!xdr_double (xdrs, &objp->double_value))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->string_value, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_sample_symbol_info_t (XDR *xdrs, TSP_sample_symbol_info_t *objp)
+{
+	register int32_t *buf;
+
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		 if (!xdr_string (xdrs, &objp->name, ~0))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->provider_global_index))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_index))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_rank))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->provider_global_index);
+		IXDR_PUT_LONG(buf, objp->provider_group_index);
+		IXDR_PUT_LONG(buf, objp->provider_group_rank);
+		}
+		 if (!xdr_TSP_datatype_t (xdrs, &objp->type))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_u_int (xdrs, &objp->dimension))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->offset))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->nelem))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->period))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->phase))
+				 return FALSE;
+		} else {
+			IXDR_PUT_U_LONG(buf, objp->dimension);
+			IXDR_PUT_U_LONG(buf, objp->offset);
+			IXDR_PUT_U_LONG(buf, objp->nelem);
+			IXDR_PUT_LONG(buf, objp->period);
+			IXDR_PUT_LONG(buf, objp->phase);
+		}
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		 if (!xdr_string (xdrs, &objp->name, ~0))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->provider_global_index))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_index))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_rank))
+				 return FALSE;
+
+		} else {
+		objp->provider_global_index = IXDR_GET_LONG(buf);
+		objp->provider_group_index = IXDR_GET_LONG(buf);
+		objp->provider_group_rank = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_TSP_datatype_t (xdrs, &objp->type))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_u_int (xdrs, &objp->dimension))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->offset))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->nelem))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->period))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->phase))
+				 return FALSE;
+		} else {
+			objp->dimension = IXDR_GET_U_LONG(buf);
+			objp->offset = IXDR_GET_U_LONG(buf);
+			objp->nelem = IXDR_GET_U_LONG(buf);
+			objp->period = IXDR_GET_LONG(buf);
+			objp->phase = IXDR_GET_LONG(buf);
+		}
+	 return TRUE;
+	}
+
+	 if (!xdr_string (xdrs, &objp->name, ~0))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_global_index))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_group_index))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_group_rank))
+		 return FALSE;
+	 if (!xdr_TSP_datatype_t (xdrs, &objp->type))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->dimension))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->offset))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->nelem))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->period))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->phase))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_sample_symbol_info_list_t (XDR *xdrs, TSP_sample_symbol_info_list_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_array (xdrs, (char **)&objp->TSP_sample_symbol_info_list_t_val, (u_int *) &objp->TSP_sample_symbol_info_list_t_len, ~0,
+		sizeof (TSP_sample_symbol_info_t), (xdrproc_t) xdr_TSP_sample_symbol_info_t))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_extended_info_t (XDR *xdrs, TSP_extended_info_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_string (xdrs, &objp->key, ~0))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->value, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_extended_info_list_t (XDR *xdrs, TSP_extended_info_list_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_array (xdrs, (char **)&objp->TSP_extended_info_list_t_val, (u_int *) &objp->TSP_extended_info_list_t_len, ~0,
+		sizeof (TSP_extended_info_t), (xdrproc_t) xdr_TSP_extended_info_t))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_sample_symbol_extended_info_t (XDR *xdrs, TSP_sample_symbol_extended_info_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->provider_global_index))
+		 return FALSE;
+	 if (!xdr_TSP_extended_info_list_t (xdrs, &objp->info))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_sample_symbol_extended_info_list_t (XDR *xdrs, TSP_sample_symbol_extended_info_list_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_array (xdrs, (char **)&objp->TSP_sample_symbol_extended_info_list_t_val, (u_int *) &objp->TSP_sample_symbol_extended_info_list_t_len, ~0,
+		sizeof (TSP_sample_symbol_extended_info_t), (xdrproc_t) xdr_TSP_sample_symbol_extended_info_t))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_extended_information_t (XDR *xdrs, TSP_request_extended_information_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_array (xdrs, (char **)&objp->pgi.pgi_val, (u_int *) &objp->pgi.pgi_len, ~0,
+		sizeof (int), (xdrproc_t) xdr_int))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_extended_information_t (XDR *xdrs, TSP_answer_extended_information_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_TSP_sample_symbol_extended_info_list_t (xdrs, &objp->extsymbols))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_sample_t (XDR *xdrs, TSP_request_sample_t *objp)
+{
+	register int32_t *buf;
+
+	int i;
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->consumer_timeout))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->version_id);
+		IXDR_PUT_U_LONG(buf, objp->channel_id);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				IXDR_PUT_U_LONG(buf, *genp++);
+			}
+		}
+		IXDR_PUT_LONG(buf, objp->consumer_timeout);
+		}
+		 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+			 return FALSE;
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->consumer_timeout))
+				 return FALSE;
+
+		} else {
+		objp->version_id = IXDR_GET_LONG(buf);
+		objp->channel_id = IXDR_GET_U_LONG(buf);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				*genp++ = IXDR_GET_U_LONG(buf);
+			}
+		}
+		objp->consumer_timeout = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+			 return FALSE;
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+		sizeof (u_int), (xdrproc_t) xdr_u_int))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->consumer_timeout))
+		 return FALSE;
+	 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_sample_t (XDR *xdrs, TSP_answer_sample_t *objp)
+{
+	register int32_t *buf;
+
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_timeout))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_number))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->version_id);
+		IXDR_PUT_U_LONG(buf, objp->channel_id);
+		IXDR_PUT_LONG(buf, objp->provider_timeout);
+		IXDR_PUT_LONG(buf, objp->provider_group_number);
+		}
+		 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+			 return FALSE;
+		 if (!xdr_double (xdrs, &objp->base_frequency))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->max_period))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->max_client_number))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->current_client_number))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->max_period);
+		IXDR_PUT_LONG(buf, objp->max_client_number);
+		IXDR_PUT_LONG(buf, objp->current_client_number);
+		}
+		 if (!xdr_TSP_status_t (xdrs, &objp->status))
+			 return FALSE;
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_timeout))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_number))
+				 return FALSE;
+
+		} else {
+		objp->version_id = IXDR_GET_LONG(buf);
+		objp->channel_id = IXDR_GET_U_LONG(buf);
+		objp->provider_timeout = IXDR_GET_LONG(buf);
+		objp->provider_group_number = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+			 return FALSE;
+		 if (!xdr_double (xdrs, &objp->base_frequency))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->max_period))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->max_client_number))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->current_client_number))
+				 return FALSE;
+
+		} else {
+		objp->max_period = IXDR_GET_LONG(buf);
+		objp->max_client_number = IXDR_GET_LONG(buf);
+		objp->current_client_number = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_TSP_status_t (xdrs, &objp->status))
+			 return FALSE;
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_timeout))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_group_number))
+		 return FALSE;
+	 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+		 return FALSE;
+	 if (!xdr_double (xdrs, &objp->base_frequency))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->max_period))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->max_client_number))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->current_client_number))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_sample_init_t (XDR *xdrs, TSP_request_sample_init_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_sample_init_t (XDR *xdrs, TSP_answer_sample_init_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->data_address, ~0))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_sample_destroy_t (XDR *xdrs, TSP_request_sample_destroy_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_sample_destroy_t (XDR *xdrs, TSP_answer_sample_destroy_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_async_sample_t (XDR *xdrs, TSP_async_sample_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->provider_global_index))
+		 return FALSE;
+	 if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_async_sample_t (XDR *xdrs, TSP_request_async_sample_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_TSP_async_sample_t (xdrs, &objp->async_sample))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_async_sample_t (XDR *xdrs, TSP_answer_async_sample_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_TSP_async_sample_t (xdrs, &objp->async_sample))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_provider_info_t (XDR *xdrs, TSP_provider_info_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_string (xdrs, &objp->info, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_tsp_request_filtered_information_1_argument (XDR *xdrs, tsp_request_filtered_information_1_argument *objp)
+{
+	 if (!xdr_TSP_request_information_t (xdrs, &objp->arg1))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->arg2))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->arg3, ~0))
+		 return FALSE;
+	return TRUE;
+}
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_xdr_rtems.c~ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_xdr_rtems.c~
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_rpc_xdr_rtems.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_rpc_xdr_rtems.c~	2007-10-18 16:46:37.000000000 +0200
@@ -0,0 +1,860 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#include "tsp_rpc_rtems.h"
+
+bool_t
+xdr_TSP_status_t (XDR *xdrs, TSP_status_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_enum (xdrs, (enum_t *) objp))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_session_state_t (XDR *xdrs, TSP_session_state_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_enum (xdrs, (enum_t *) objp))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_datatype_t (XDR *xdrs, TSP_datatype_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_enum (xdrs, (enum_t *) objp))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_open_t (XDR *xdrs, TSP_answer_open_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->status_str, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_argv_item_t (XDR *xdrs, TSP_argv_item_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_string (xdrs, objp, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_argv_t (XDR *xdrs, TSP_argv_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_array (xdrs, (char **)&objp->TSP_argv_t_val, (u_int *) &objp->TSP_argv_t_len, ~0,
+		sizeof (TSP_argv_item_t), (xdrproc_t) xdr_TSP_argv_item_t))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_open_t (XDR *xdrs, TSP_request_open_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_TSP_argv_t (xdrs, &objp->argv))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_close_t (XDR *xdrs, TSP_request_close_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_information_t (XDR *xdrs, TSP_request_information_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_feature_t (XDR *xdrs, TSP_request_feature_t *objp)
+{
+	register int32_t *buf;
+
+	int i;
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, (2 +  4 )* BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+		} else {
+			IXDR_PUT_LONG(buf, objp->version_id);
+			IXDR_PUT_U_LONG(buf, objp->channel_id);
+			{
+				register u_int *genp;
+
+				for (i = 0, genp = objp->feature_words;
+					i < 4; ++i) {
+					IXDR_PUT_U_LONG(buf, *genp++);
+				}
+			}
+		}
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, (2 +  4 )* BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+		} else {
+			objp->version_id = IXDR_GET_LONG(buf);
+			objp->channel_id = IXDR_GET_U_LONG(buf);
+			{
+				register u_int *genp;
+
+				for (i = 0, genp = objp->feature_words;
+					i < 4; ++i) {
+					*genp++ = IXDR_GET_U_LONG(buf);
+				}
+			}
+		}
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+		sizeof (u_int), (xdrproc_t) xdr_u_int))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_feature_t (XDR *xdrs, TSP_answer_feature_t *objp)
+{
+	register int32_t *buf;
+
+	int i;
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->int_value))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->version_id);
+		IXDR_PUT_U_LONG(buf, objp->channel_id);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				IXDR_PUT_U_LONG(buf, *genp++);
+			}
+		}
+		IXDR_PUT_LONG(buf, objp->int_value);
+		}
+		 if (!xdr_double (xdrs, &objp->double_value))
+			 return FALSE;
+		 if (!xdr_string (xdrs, &objp->string_value, ~0))
+			 return FALSE;
+		 if (!xdr_TSP_status_t (xdrs, &objp->status))
+			 return FALSE;
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->int_value))
+				 return FALSE;
+
+		} else {
+		objp->version_id = IXDR_GET_LONG(buf);
+		objp->channel_id = IXDR_GET_U_LONG(buf);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				*genp++ = IXDR_GET_U_LONG(buf);
+			}
+		}
+		objp->int_value = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_double (xdrs, &objp->double_value))
+			 return FALSE;
+		 if (!xdr_string (xdrs, &objp->string_value, ~0))
+			 return FALSE;
+		 if (!xdr_TSP_status_t (xdrs, &objp->status))
+			 return FALSE;
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+		sizeof (u_int), (xdrproc_t) xdr_u_int))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->int_value))
+		 return FALSE;
+	 if (!xdr_double (xdrs, &objp->double_value))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->string_value, ~0))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_exec_feature_t (XDR *xdrs, TSP_exec_feature_t *objp)
+{
+	register int32_t *buf;
+
+	int i;
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->int_value))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->version_id);
+		IXDR_PUT_U_LONG(buf, objp->channel_id);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				IXDR_PUT_U_LONG(buf, *genp++);
+			}
+		}
+		IXDR_PUT_LONG(buf, objp->int_value);
+		}
+		 if (!xdr_double (xdrs, &objp->double_value))
+			 return FALSE;
+		 if (!xdr_string (xdrs, &objp->string_value, ~0))
+			 return FALSE;
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->int_value))
+				 return FALSE;
+
+		} else {
+		objp->version_id = IXDR_GET_LONG(buf);
+		objp->channel_id = IXDR_GET_U_LONG(buf);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				*genp++ = IXDR_GET_U_LONG(buf);
+			}
+		}
+		objp->int_value = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_double (xdrs, &objp->double_value))
+			 return FALSE;
+		 if (!xdr_string (xdrs, &objp->string_value, ~0))
+			 return FALSE;
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+		sizeof (u_int), (xdrproc_t) xdr_u_int))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->int_value))
+		 return FALSE;
+	 if (!xdr_double (xdrs, &objp->double_value))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->string_value, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_sample_symbol_info_t (XDR *xdrs, TSP_sample_symbol_info_t *objp)
+{
+	register int32_t *buf;
+
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		 if (!xdr_string (xdrs, &objp->name, ~0))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->provider_global_index))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_index))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_rank))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->provider_global_index);
+		IXDR_PUT_LONG(buf, objp->provider_group_index);
+		IXDR_PUT_LONG(buf, objp->provider_group_rank);
+		}
+		 if (!xdr_TSP_datatype_t (xdrs, &objp->type))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_u_int (xdrs, &objp->dimension))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->offset))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->nelem))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->period))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->phase))
+				 return FALSE;
+		} else {
+			IXDR_PUT_U_LONG(buf, objp->dimension);
+			IXDR_PUT_U_LONG(buf, objp->offset);
+			IXDR_PUT_U_LONG(buf, objp->nelem);
+			IXDR_PUT_LONG(buf, objp->period);
+			IXDR_PUT_LONG(buf, objp->phase);
+		}
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		 if (!xdr_string (xdrs, &objp->name, ~0))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->provider_global_index))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_index))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_rank))
+				 return FALSE;
+
+		} else {
+		objp->provider_global_index = IXDR_GET_LONG(buf);
+		objp->provider_group_index = IXDR_GET_LONG(buf);
+		objp->provider_group_rank = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_TSP_datatype_t (xdrs, &objp->type))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_u_int (xdrs, &objp->dimension))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->offset))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->nelem))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->period))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->phase))
+				 return FALSE;
+		} else {
+			objp->dimension = IXDR_GET_U_LONG(buf);
+			objp->offset = IXDR_GET_U_LONG(buf);
+			objp->nelem = IXDR_GET_U_LONG(buf);
+			objp->period = IXDR_GET_LONG(buf);
+			objp->phase = IXDR_GET_LONG(buf);
+		}
+	 return TRUE;
+	}
+
+	 if (!xdr_string (xdrs, &objp->name, ~0))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_global_index))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_group_index))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_group_rank))
+		 return FALSE;
+	 if (!xdr_TSP_datatype_t (xdrs, &objp->type))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->dimension))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->offset))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->nelem))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->period))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->phase))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_sample_symbol_info_list_t (XDR *xdrs, TSP_sample_symbol_info_list_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_array (xdrs, (char **)&objp->TSP_sample_symbol_info_list_t_val, (u_int *) &objp->TSP_sample_symbol_info_list_t_len, ~0,
+		sizeof (TSP_sample_symbol_info_t), (xdrproc_t) xdr_TSP_sample_symbol_info_t))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_extended_info_t (XDR *xdrs, TSP_extended_info_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_string (xdrs, &objp->key, ~0))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->value, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_extended_info_list_t (XDR *xdrs, TSP_extended_info_list_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_array (xdrs, (char **)&objp->TSP_extended_info_list_t_val, (u_int *) &objp->TSP_extended_info_list_t_len, ~0,
+		sizeof (TSP_extended_info_t), (xdrproc_t) xdr_TSP_extended_info_t))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_sample_symbol_extended_info_t (XDR *xdrs, TSP_sample_symbol_extended_info_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->provider_global_index))
+		 return FALSE;
+	 if (!xdr_TSP_extended_info_list_t (xdrs, &objp->info))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_sample_symbol_extended_info_list_t (XDR *xdrs, TSP_sample_symbol_extended_info_list_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_array (xdrs, (char **)&objp->TSP_sample_symbol_extended_info_list_t_val, (u_int *) &objp->TSP_sample_symbol_extended_info_list_t_len, ~0,
+		sizeof (TSP_sample_symbol_extended_info_t), (xdrproc_t) xdr_TSP_sample_symbol_extended_info_t))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_extended_information_t (XDR *xdrs, TSP_request_extended_information_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_array (xdrs, (char **)&objp->pgi.pgi_val, (u_int *) &objp->pgi.pgi_len, ~0,
+		sizeof (int), (xdrproc_t) xdr_int))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_extended_information_t (XDR *xdrs, TSP_answer_extended_information_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_TSP_sample_symbol_extended_info_list_t (xdrs, &objp->extsymbols))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_sample_t (XDR *xdrs, TSP_request_sample_t *objp)
+{
+	register int32_t *buf;
+
+	int i;
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->consumer_timeout))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->version_id);
+		IXDR_PUT_U_LONG(buf, objp->channel_id);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				IXDR_PUT_U_LONG(buf, *genp++);
+			}
+		}
+		IXDR_PUT_LONG(buf, objp->consumer_timeout);
+		}
+		 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+			 return FALSE;
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, (3 + ( 4 )) * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+				sizeof (u_int), (xdrproc_t) xdr_u_int))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->consumer_timeout))
+				 return FALSE;
+
+		} else {
+		objp->version_id = IXDR_GET_LONG(buf);
+		objp->channel_id = IXDR_GET_U_LONG(buf);
+		{
+			register u_int *genp;
+
+			for (i = 0, genp = objp->feature_words;
+				i < 4; ++i) {
+				*genp++ = IXDR_GET_U_LONG(buf);
+			}
+		}
+		objp->consumer_timeout = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+			 return FALSE;
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_vector (xdrs, (char *)objp->feature_words, 4,
+		sizeof (u_int), (xdrproc_t) xdr_u_int))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->consumer_timeout))
+		 return FALSE;
+	 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_sample_t (XDR *xdrs, TSP_answer_sample_t *objp)
+{
+	register int32_t *buf;
+
+
+	if (xdrs->x_op == XDR_ENCODE) {
+		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_timeout))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_number))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->version_id);
+		IXDR_PUT_U_LONG(buf, objp->channel_id);
+		IXDR_PUT_LONG(buf, objp->provider_timeout);
+		IXDR_PUT_LONG(buf, objp->provider_group_number);
+		}
+		 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+			 return FALSE;
+		 if (!xdr_double (xdrs, &objp->base_frequency))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->max_period))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->max_client_number))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->current_client_number))
+				 return FALSE;
+
+		} else {
+		IXDR_PUT_LONG(buf, objp->max_period);
+		IXDR_PUT_LONG(buf, objp->max_client_number);
+		IXDR_PUT_LONG(buf, objp->current_client_number);
+		}
+		 if (!xdr_TSP_status_t (xdrs, &objp->status))
+			 return FALSE;
+		return TRUE;
+	} else if (xdrs->x_op == XDR_DECODE) {
+		buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->version_id))
+				 return FALSE;
+			 if (!xdr_u_int (xdrs, &objp->channel_id))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_timeout))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->provider_group_number))
+				 return FALSE;
+
+		} else {
+		objp->version_id = IXDR_GET_LONG(buf);
+		objp->channel_id = IXDR_GET_U_LONG(buf);
+		objp->provider_timeout = IXDR_GET_LONG(buf);
+		objp->provider_group_number = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+			 return FALSE;
+		 if (!xdr_double (xdrs, &objp->base_frequency))
+			 return FALSE;
+		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+		if (buf == NULL) {
+			 if (!xdr_int (xdrs, &objp->max_period))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->max_client_number))
+				 return FALSE;
+			 if (!xdr_int (xdrs, &objp->current_client_number))
+				 return FALSE;
+
+		} else {
+		objp->max_period = IXDR_GET_LONG(buf);
+		objp->max_client_number = IXDR_GET_LONG(buf);
+		objp->current_client_number = IXDR_GET_LONG(buf);
+		}
+		 if (!xdr_TSP_status_t (xdrs, &objp->status))
+			 return FALSE;
+	 return TRUE;
+	}
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_timeout))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->provider_group_number))
+		 return FALSE;
+	 if (!xdr_TSP_sample_symbol_info_list_t (xdrs, &objp->symbols))
+		 return FALSE;
+	 if (!xdr_double (xdrs, &objp->base_frequency))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->max_period))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->max_client_number))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->current_client_number))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_sample_init_t (XDR *xdrs, TSP_request_sample_init_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_sample_init_t (XDR *xdrs, TSP_answer_sample_init_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->data_address, ~0))
+		 return FALSE;
+	 if (!xdr_TSP_status_t (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_sample_destroy_t (XDR *xdrs, TSP_request_sample_destroy_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_sample_destroy_t (XDR *xdrs, TSP_answer_sample_destroy_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_async_sample_t (XDR *xdrs, TSP_async_sample_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->provider_global_index))
+		 return FALSE;
+	 if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_request_async_sample_t (XDR *xdrs, TSP_request_async_sample_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_TSP_async_sample_t (xdrs, &objp->async_sample))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_answer_async_sample_t (XDR *xdrs, TSP_answer_async_sample_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_int (xdrs, &objp->version_id))
+		 return FALSE;
+	 if (!xdr_u_int (xdrs, &objp->channel_id))
+		 return FALSE;
+	 if (!xdr_TSP_async_sample_t (xdrs, &objp->async_sample))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->status))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_provider_info_t (XDR *xdrs, TSP_provider_info_t *objp)
+{
+	register int32_t *buf;
+
+	 if (!xdr_string (xdrs, &objp->info, ~0))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_tsp_request_filtered_information_1_argument (XDR *xdrs, tsp_request_filtered_information_1_argument *objp)
+{
+	 if (!xdr_TSP_request_information_t (xdrs, &objp->arg1))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->arg2))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->arg3, ~0))
+		 return FALSE;
+	return TRUE;
+}
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_server.c tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_server.c
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_server.c	2006-10-21 10:48:00.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_server.c	2007-10-29 10:54:47.000000000 +0100
@@ -46,6 +46,10 @@
     #include <rpc/pmap_cln.h>
 #endif
 
+#ifdef TSP_RTEMS
+# include <stdio.h>
+#endif /* _TSP_RTEMS_*/
+
 #include <tsp_sys_headers.h>
 #include <tsp_glu.h>
 /* 
@@ -260,24 +264,52 @@
 
 static void TSP_rpc_run(TSP_rpc_request_config_t *config)
 {
-  int32_t rpc_progid = TSP_get_progid(config->server_number);
-
-  /* svc_create does not exist for linux, we must use the deprecated function */
-  /* pmap_unset (rpc_progid, TSP_RPC_VERSION_INITIAL); */
-
-  config->xprt = svctcp_create(RPC_ANYSOCK, 0, 0);
-  if (config->xprt == NULL) 
-    {
-      STRACE_ERROR(("Cannot create TCP service"));
-      return;
-    }
-
-  if (!svc_register(config->xprt, rpc_progid, TSP_RPC_VERSION_INITIAL, tsp_rpc_1, IPPROTO_TCP))
-    {
-      STRACE_ERROR(("RPC server unable to register ProgId=%X",  rpc_progid));
-      return;
-    }
-
+	int32_t rpc_progid = TSP_get_progid(config->server_number);
+	int sock;
+	struct sockaddr_in myAddr;
+	SVCXPRT *transp;
+	bool_t status;
+	
+	/* svc_create does not exist for linux, we must use the deprecated function */
+	/* pmap_unset (rpc_progid, TSP_RPC_VERSION_INITIAL); */
+	
+	/*             MODIFIE SELON RPC DEMO                */
+	/*
+	 * Create socket
+	 */
+	sock = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
+	if (sock < 0) {
+		perror ("socket creation problem");
+		return 1;
+	}
+
+	/*
+	 * Bind to local address
+	 */
+	myAddr.sin_family = htons (AF_INET);
+	myAddr.sin_port = htons (TCP_PORT);
+	myAddr.sin_addr.s_addr = htonl (INADDR_ANY);
+	if (bind (sock, (struct sockaddr *)&myAddr, sizeof myAddr) < 0) {
+		perror ("bind problem");
+		return 2;
+	}
+	
+	/*
+	 * Create TCP server
+	 */
+	//config->xprt = svctcp_create(RPC_ANYSOCK, 0, 0); 
+	config->xprt = svctcp_create(sock, 0, 0); 	 	
+	if (config->xprt == NULL) 
+	{
+    STRACE_ERROR(("Cannot create TCP service"));
+    return;
+	}
+//  if (!svc_register(config->xprt, rpc_progid, TSP_RPC_VERSION_INITIAL, tsp_rpc_1, IPPROTO_TCP))
+	if (!svc_register(config->xprt, rpc_progid, TSP_RPC_VERSION_INITIAL, tsp_rpc_1, 0))
+	{
+    STRACE_ERROR(("RPC server unable to register ProgId=%X",  rpc_progid));
+    return;
+	}
   STRACE_DEBUG(("RPC server is being be started with ProgId=%X", rpc_progid));
   
   STRACE_DEBUG(("launching svc_run..."));
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_server.c~ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_server.c~
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_server.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_server.c~	2007-10-29 10:01:17.000000000 +0100
@@ -0,0 +1,456 @@
+/*
+
+$Header: /sources/tsp/tsp/src/core/rpc/tsp_server.c,v 1.33 2006/10/21 08:48:00 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+Copyright (c) 2005 Cesare BERTONA
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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 GNULesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project    : TSP
+Maintainer : tsp@astrium.eads.net
+Component  : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : 
+
+-----------------------------------------------------------------------
+*/
+
+
+#include <rpc/rpc.h>
+#include <stdio.h>
+#ifndef WIN32
+    #include <netdb.h>
+    #include <unistd.h> 
+    #include <rpc/pmap_clnt.h>
+#else
+    #include <rpc/pmap_cln.h>
+#endif
+
+#ifdef RTEMS
+# include <stdio.h>
+#endif /* _RTEMS_*/
+
+#include <tsp_sys_headers.h>
+#include <tsp_glu.h>
+/* 
+ * FIXME RP : beurk, RPC is compiled before CTRL 
+ * could export this include, how should I call 
+ * Request Manager and GLU then ? 
+ * All our troubles comes from using tsp_rpc.h
+ * in tsp_datastruct.h
+ * As soon as we have clean IDL generator
+ * we will get rid of those circular include problem
+ * We need 2 passes compile here, 
+ * the first for IDL and the second for C compilation.
+ */
+#include "../ctrl/tsp_provider.h"
+#include "../ctrl/tsp_request_handler.h"
+/* same FIXME IDL <--> C dependency */
+#include "../common/tsp_common_macros.h"
+
+#include <tsp_server.h>
+#include <tsp_rpc.h>
+#include <tsp_rpc_confprogid.h>
+
+void
+tsp_rpc_1(struct svc_req *rqstp, register SVCXPRT *transp) ;
+
+#define TSP_URL_MAXLENGTH 256
+
+typedef struct {
+  int  server_number;
+  char url[TSP_URL_MAXLENGTH];
+  SVCXPRT *xprt;
+} TSP_rpc_request_config_t;
+
+TSP_provider_info_t* tsp_provider_information_1_svc(struct svc_req *rqstp)
+{
+  static TSP_provider_info_t server_info;	
+  server_info.info = (char*) TSP_provider_get_name();    
+  return &server_info;
+}
+
+TSP_answer_open_t* tsp_request_open_1_svc(TSP_request_open_t req_open, struct svc_req* rqstp)
+{
+
+  static TSP_answer_open_t ans_open;
+	
+  TSP_provider_request_open(&req_open, &ans_open);	
+  return &ans_open;
+
+}
+
+int *tsp_request_close_1_svc(TSP_request_close_t req_close, struct svc_req * rqstp)
+{
+
+  static int retcode = 0;
+	
+  TSP_provider_request_close(&req_close);
+	
+  return &retcode;
+}
+
+TSP_answer_sample_t* tsp_request_information_1_svc(TSP_request_information_t req_info, struct svc_req * rqstp)
+{
+
+  static TSP_answer_sample_t ans_sample;
+	
+  TSP_provider_request_information(&req_info, &ans_sample);
+  return &ans_sample;
+
+}
+
+TSP_answer_sample_t* tsp_request_filtered_information_1_svc(TSP_request_information_t req_info, int filter_kind, char* filter_string, struct svc_req * rqstp)
+{
+
+  static TSP_answer_sample_t ans_sample;
+	
+  TSP_provider_request_filtered_information(&req_info, filter_kind, filter_string, &ans_sample);
+  return &ans_sample;
+
+}
+
+TSP_answer_feature_t* tsp_request_feature_1_svc(TSP_request_feature_t req_feature, struct svc_req * rqstp)
+{
+
+  static TSP_answer_feature_t ans_feature;
+	
+  return &ans_feature;
+
+}
+
+TSP_answer_sample_t* 
+tsp_request_sample_1_svc(TSP_request_sample_t req_sample, struct svc_req * rqstp) {
+
+  static TSP_answer_sample_t as = TSP_AS_STATIC_INITIALIZER ;
+
+  TSP_provider_request_sample(&req_sample, &as);
+  return &as;
+}
+ 
+TSP_answer_sample_init_t* 
+tsp_request_sample_init_1_svc(TSP_request_sample_init_t req_sample, struct svc_req * rqstp) {
+  
+  static TSP_answer_sample_init_t asi = TSP_ASI_STATIC_INITIALIZER;
+
+  TSP_provider_request_sample_init(&req_sample, &asi);
+
+  return &asi;
+}
+
+TSP_answer_sample_destroy_t* tsp_request_sample_destroy_1_svc(TSP_request_sample_destroy_t req_sample, struct svc_req * rqstp)
+{
+
+  static TSP_answer_sample_destroy_t ans_sample = TSP_ASD_STATIC_INITIALIZER;
+	
+  TSP_provider_request_sample_destroy(&req_sample, &ans_sample);
+	
+  return &ans_sample;
+
+}
+
+int* tsp_exec_feature_1_svc(TSP_exec_feature_t exec_feature, struct svc_req * rqstp)
+{
+
+  static int retcode = 0;	
+
+  return &retcode;
+}
+
+int * tsp_request_async_sample_write_1_svc(TSP_async_sample_t async_sample_write, struct svc_req * rqstp)
+{
+  static int ret = TRUE;
+  
+
+  /* endianity managment*/
+/*   STRACE_DEBUG(("Len=%d,  pgi = %d value = %f et ret = %d", async_sample_write.data.data_len, async_sample_write.provider_global_index,(double*)(async_sample_write.data.data_val),ret)); */
+
+/*   switch (async_sample_write.data.data_len) { */
+/*   case 2:  */
+/*       TSP_UINT16_FROM_BE(*(uint16_t*)async_sample_write.data.data_val); */
+/*       break; */
+/*   case 4:  */
+/*       TSP_UINT32_FROM_BE(*(uint32_t*)async_sample_write.data.data_val); */
+/*       break; */
+/*   case 8:   */
+/*       TSP_UINT64_FROM_BE(*(uint64_t*)async_sample_write.data.data_val); */
+/*       break; */
+/*   default: */
+/*       break; */
+/*   } */
+	
+
+  STRACE_DEBUG(("TSP_SERVER Before async_write : pgi %d value %s return %d ",async_sample_write.provider_global_index,async_sample_write.data.data_val,ret ));
+  
+  ret = TSP_provider_request_async_sample_write(&async_sample_write);	
+  
+  STRACE_DEBUG(("TSP_SERVER After async_write : pgi %d value %s return %d ",async_sample_write.provider_global_index,async_sample_write.data.data_val,ret ));
+
+  return &ret;
+  
+}
+
+TSP_async_sample_t * tsp_request_async_sample_read_1_svc(TSP_async_sample_t async_sample_read, struct svc_req * rqstp)
+{
+  static TSP_async_sample_t ret;
+  
+  /* endianity managment*/
+/*   STRACE_DEBUG(("Len=%d,  pgi = %d value = %f et ret = %d", async_sample_read.data.data_len, async_sample_read.provider_global_index,(double*)(async_sample_read.data.data_val),ret)); */
+
+/*   switch (async_sample_read.data.data_len) { */
+/*   case 2:  */
+/*       TSP_UINT16_FROM_BE(*(uint16_t*)async_sample_read.data.data_val); */
+/*       break; */
+/*   case 4:  */
+/*       TSP_UINT32_FROM_BE(*(uint32_t*)async_sample_read.data.data_val); */
+/*       break; */
+/*   case 8:   */
+/*       TSP_UINT64_FROM_BE(*(uint64_t*)async_sample_read.data.data_val); */
+/*       break; */
+/*   default: */
+/*       break; */
+/*   } */
+	
+
+  
+  ret = async_sample_read;
+
+  if (TSP_STATUS_OK!=TSP_provider_request_async_sample_read(&ret)) {
+    ret.provider_global_index = -1;
+  }	
+
+  return &ret;
+  
+}
+
+
+static int TSP_rpc_init(TSP_rpc_request_config_t *config)
+{
+  int rpcport = -1;
+
+  /* look for a free port */
+  while(rpcport && (config->server_number<TSP_MAX_SERVER_NUMBER))
+    {
+      rpcport = (int)getrpcport("localhost", TSP_get_progid(config->server_number), TSP_RPC_VERSION_INITIAL, IPPROTO_TCP);
+      if(rpcport)
+	    config->server_number++;
+    }
+
+  if(rpcport && (config->server_number >= TSP_MAX_SERVER_NUMBER))
+      config->server_number = -1;
+
+  return config->server_number;
+}
+
+static void TSP_rpc_run(TSP_rpc_request_config_t *config)
+{
+	int32_t rpc_progid = TSP_get_progid(config->server_number);
+  printk(" -> TSP_get_progid: ProgId=%X \n", rpc_progid);
+	int sock;
+	struct sockaddr_in myAddr;
+	SVCXPRT *transp;
+	bool_t status;
+	
+	/* svc_create does not exist for linux, we must use the deprecated function */
+	/* pmap_unset (rpc_progid, TSP_RPC_VERSION_INITIAL); */
+	
+	/*             MODIFIE SELON RPC DEMO                */
+	/*
+	 * Create socket
+	 */
+	sock = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
+	if (sock < 0) {
+		perror ("socket creation problem");
+		return 1;
+	}
+
+	/*
+	 * Bind to local address
+	 */
+	myAddr.sin_family = htons (AF_INET);
+	myAddr.sin_port = htons (TCP_PORT);
+	myAddr.sin_addr.s_addr = htonl (INADDR_ANY);
+	if (bind (sock, (struct sockaddr *)&myAddr, sizeof myAddr) < 0) {
+		perror ("bind problem");
+		return 2;
+	}
+	
+	/*
+	 * Create TCP server
+	 */
+	//config->xprt = svctcp_create(RPC_ANYSOCK, 0, 0); 
+	config->xprt = svctcp_create(sock, 0, 0); 	 	
+	if (config->xprt == NULL) 
+	{
+    STRACE_ERROR(("Cannot create TCP service"));
+    return;
+	}
+//  if (!svc_register(config->xprt, rpc_progid, TSP_RPC_VERSION_INITIAL, tsp_rpc_1, IPPROTO_TCP))
+	if (!svc_register(config->xprt, rpc_progid, TSP_RPC_VERSION_INITIAL, tsp_rpc_1, 0))
+	{
+    STRACE_ERROR(("RPC server unable to register ProgId=%X",  rpc_progid));
+    return;
+	}
+  STRACE_DEBUG(("RPC server is being be started with ProgId=%X", rpc_progid));
+  
+  STRACE_DEBUG(("launching svc_run..."));
+  svc_run();
+  STRACE_INFO(("svc_run returned"));
+
+}
+
+static void TSP_rpc_stop(TSP_rpc_request_config_t *config)
+{
+  /* STRACE_DEBUG(("calling svc_exit...")); */
+  /* svc_destroy(config->xprt); */
+
+  /* Clean-up Port map so that next provider could use this ProgId */
+  if(config->server_number >= 0)
+    {
+      svc_unregister(TSP_get_progid(config->server_number),TSP_RPC_VERSION_INITIAL);
+      pmap_unset (TSP_get_progid(config->server_number), TSP_RPC_VERSION_INITIAL);
+    }
+}
+
+int TSP_rpc_request(TSP_provider_request_handler_t* this)
+{
+  this->config             = TSP_rpc_request_config;
+  this->run                = TSP_rpc_request_run;
+  this->stop               = TSP_rpc_request_stop;
+  this->url                = TSP_rpc_request_url;
+#if defined (WIN32)
+  /* structure pthread_t different under Windows */
+  this->tid.p              = -1;
+#else
+  this->tid                = (pthread_t)-1;
+#endif
+  this->config_param       = calloc(1, sizeof(TSP_rpc_request_config_t));
+
+  this->status             = TSP_RQH_STATUS_IDLE;
+  return TRUE;
+}
+
+int TSP_rpc_request_config(TSP_provider_request_handler_t* this)
+{
+  TSP_rpc_request_config_t *config = (TSP_rpc_request_config_t *)(this->config_param);
+  char  hostname[MAXHOSTNAMELEN+1];
+  char* servername;
+  int  hostnameOk;
+#undef NUMERIC_HOST
+#if NUMERIC_HOST
+  struct hostent*  myhost;
+  union {
+    uint32_t    addr;
+    uint8_t     parts[4];
+  } myu;
+#endif
+
+  config->server_number = TSP_provider_get_server_base_number();
+  /* do not buffer overflow */
+  memset(&config->url[0],'\0',TSP_URL_MAXLENGTH);
+  
+  config->server_number = TSP_rpc_init(config);
+  if(config->server_number < 0) {
+      STRACE_ERROR(("unable to register any RPC progid :\n\tcheck RPC daemons, or use tsp_rpc_cleanup to clean-up all TSP RPC port mapping"));
+      this->status = TSP_RQH_STATUS_IDLE;
+      
+      return FALSE;
+  }
+  else {
+    hostnameOk = gethostname(hostname, MAXHOSTNAMELEN);
+#if NUMERIC_HOST
+    myhost = gethostbyname(hostname);
+    if (myhost == NULL) {
+      STRACE_ERROR(("Cannot gethostbyname '(hostname --> @IP)' for host <%s> check your /etc/hosts file.\n",hostname));
+      /* be tolerant we keep going with hostname but... consumer may not handle this properly */    
+    } else {
+     /* 
+      * Now translate hostname to @IP in order
+      * to avoid name -> IP resolution on consumer side 
+      */
+      memset(hostname,0,sizeof(hostname));
+      myu.addr = (uint32_t)ntohl(*((uint32_t*)myhost->h_addr_list[0]));
+      sprintf(hostname,"%d.%d.%d.%d",myu.parts[3], myu.parts[2], myu.parts[1], myu.parts[0]);
+    }
+#endif
+    servername = (char*)TSP_provider_get_name();
+    
+    sprintf(config->url, /* TSP_URL_MAXLENGTH, pour snprintf quand Solaris 2.5 sera mort */
+	    TSP_URL_FORMAT, TSP_RPC_PROTOCOL, hostname, servername, config->server_number);
+    
+    this->status = TSP_RQH_STATUS_CONFIGURED;
+    
+    return TRUE;
+  }
+
+} /* end of TSP_rpc_request_config */
+
+
+
+void* TSP_rpc_request_run(TSP_provider_request_handler_t* this)
+{
+
+  TSP_rpc_request_config_t *config = (TSP_rpc_request_config_t *)(this->config_param);
+
+  /* pthread_detach(pthread_self()); */ /* FIXME shoudl we do this */ 
+
+  if(config->server_number >= 0)
+    {
+      this->status = TSP_RQH_STATUS_RUNNING;
+      TSP_rpc_run(config);
+      this->status = TSP_RQH_STATUS_IDLE;
+   }
+
+  return (void*)NULL;
+} /* end of TSP_rpc_request_run */
+
+char *TSP_rpc_request_url(TSP_provider_request_handler_t* this)
+{
+  TSP_rpc_request_config_t *config = (TSP_rpc_request_config_t*)(this->config_param);
+  if(this->status == TSP_RQH_STATUS_RUNNING)
+    return config->url;
+  else
+    return NULL;
+}
+
+int TSP_rpc_request_stop(TSP_provider_request_handler_t* this)
+{
+  TSP_rpc_request_config_t *config = (TSP_rpc_request_config_t*)(this->config_param);
+  
+  TSP_rpc_stop(config);
+  this->status = TSP_RQH_STATUS_STOPPED;
+
+  return TRUE;
+} /* end of TSP_rpc_request_stop */
+
+                                   
+TSP_answer_extended_information_t* tsp_request_extended_information_1_svc(TSP_request_extended_information_t req_extinfo, struct svc_req * rqstp)
+{
+
+  static TSP_answer_extended_information_t ans_extinfo;
+	
+  TSP_provider_request_extended_information(&req_extinfo, &ans_extinfo);
+  return &ans_extinfo;
+
+}
+
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_server.h tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_server.h
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_server.h	2006-10-18 11:58:48.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_server.h	2007-10-29 10:55:23.000000000 +0100
@@ -40,6 +40,10 @@
 
 #include "tsp_prjcfg.h"
 
+#ifdef TSP_RTEMS
+# define TCP_PORT 15376
+#endif /* _TSP_RTEMS_ */
+
 /**
  * @defgroup TSP_RPCRequestHandlerLib RPC Request Handler
  * The module is the set of functions which encapsulate
diff -urN tsp-0.8.3-Source-Reference/src/core/rpc/tsp_server.h~ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_server.h~
--- tsp-0.8.3-Source-Reference/src/core/rpc/tsp_server.h~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/core/rpc/tsp_server.h~	2007-10-24 15:55:18.000000000 +0200
@@ -0,0 +1,64 @@
+/*
+
+$Id: tsp_server.h,v 1.11 2006/10/18 09:58:48 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : 
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef _TSP_SERVER_H
+#define _TSP_SERVER_H
+
+#include "tsp_prjcfg.h"
+
+#ifdef RTEMS
+# define TCP_PORT 15376
+#endif
+
+/**
+ * @defgroup TSP_RPCRequestHandlerLib RPC Request Handler
+ * The module is the set of functions which encapsulate
+ * the RPC machinery on server side.
+ * @ingroup TSP_RequestHandlerLib
+ * @{
+ */
+
+
+int TSP_rpc_request(TSP_provider_request_handler_t* cthis);
+int TSP_rpc_request_config(TSP_provider_request_handler_t* cthis);
+void* TSP_rpc_request_run(TSP_provider_request_handler_t* cthis);
+int TSP_rpc_request_stop(TSP_provider_request_handler_t* cthis);
+char* TSP_rpc_request_url(TSP_provider_request_handler_t* cthis);
+
+/** @} end group TSP_RPCRequestHandlerLib */ 
+
+#endif /* _TSP_SERVER_H */
diff -urN tsp-0.8.3-Source-Reference/src/providers/stub/glue_stub.c tsp-0.8.3-Source-Rtems/src/providers/stub/glue_stub.c
--- tsp-0.8.3-Source-Reference/src/providers/stub/glue_stub.c	2006-10-25 17:00:31.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/providers/stub/glue_stub.c	2007-10-29 10:39:39.000000000 +0100
@@ -38,13 +38,17 @@
 */
 #include <string.h>
 
+#if (defined TSP_RTEMS)
+# include <sys/types.h>		   /* for types compatibility with Rtems*/
+#endif /* _TSP_RTEMS_*/
+
 #include <tsp_sys_headers.h> /* platform independant data types definition */
 #include <tsp_glu.h>         /* TSP GLU object definition and API */
 #include <tsp_ringbuf.h>
 #include <tsp_time.h>
-#include <tsp_datapool.h>   /* TSP provider datapool API */
+#include <tsp_datapool.h>    /* TSP provider datapool API */
 #include <calc_func.h>
-#include <tsp_common.h>     /* TSP common structure manipulation API */
+#include <tsp_common.h>      /* TSP common structure manipulation API */
 
 /* TSP glue server defines */
 #define GLU_MAX_SYMBOLS_DOUBLE 1000
diff -urN tsp-0.8.3-Source-Reference/src/providers/stub/glue_stub.c~ tsp-0.8.3-Source-Rtems/src/providers/stub/glue_stub.c~
--- tsp-0.8.3-Source-Reference/src/providers/stub/glue_stub.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/providers/stub/glue_stub.c~	2007-10-29 10:39:32.000000000 +0100
@@ -0,0 +1,592 @@
+/*
+
+$Id: glue_stub.c,v 1.29 2006/10/25 15:00:31 erk Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer: tsp@astrium-space.com
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Implementation for the glue_server, for stub test
+	    Allow the output of a datapool of 1000 symbols, 
+	    cyclically generated at 100Hz
+
+-----------------------------------------------------------------------
+*/
+#include <string.h>
+
+#if (defined TSP_RTEMS)
+# include <sys/types.h>		   /* for types compatibility with Rtems*/
+#endif /* _TSP_RTEMS_*/
+
+#include <tsp_sys_headers.h> /* platform independant data types definition */
+#include <tsp_glu.h>         /* TSP GLU object definition and API */
+#include <tsp_ringbuf.h>
+#include <tsp_time.h>
+#include <tsp_datapool.h>    /* TSP provider datapool API */
+#include <calc_func.h>
+#include <tsp_common.h>      /* TSP common structure manipulation API */
+
+/* TSP glue server defines */
+#define GLU_MAX_SYMBOLS_DOUBLE 1000
+#define GLU_MAX_SYMBOLS_NOT_DOUBLE 12
+
+/* Nasty static variables */
+static TSP_sample_symbol_info_list_t X_SSI_list;
+static TSP_sample_symbol_info_t *X_sample_symbol_info_list_val;
+static tsp_hrtime_t X_nexttime;
+static time_stamp_t my_time = 0;
+static GLU_handle_t* stub_GLU = NULL;
+static int32_t taille_max_symbol=0;
+
+/*
+ * The GLU->run member function.
+ */
+void* STUB_GLU_thread(void* athis)
+{
+  int i,j, symbols_nb, *ptr_index;
+  tsp_hrtime_t current_time;
+  glu_item_t item;
+  double memo_val[GLU_MAX_SYMBOLS_DOUBLE]; /*for debug informatin */
+  GLU_handle_t* cthis  = (GLU_handle_t*) athis;
+  int tsp_usleep_period_us = (int)(1000000/(cthis->get_base_frequency(cthis)));
+
+  current_time = X_nexttime = tsp_gethrtime();  
+
+  item.raw_value=calloc(1,taille_max_symbol);
+  assert(item.raw_value);
+
+  /* Infinite loop for 
+   * our pseudo simulator 
+   * symbols generation 
+   */
+  while(1) {
+
+      /* Must be call at each step in case of new samples wanted */
+      TSP_datapool_get_reverse_list(cthis->datapool,&symbols_nb, &ptr_index); 
+
+      for (i = 0 ; i <  symbols_nb ; i++) {
+	 
+	  int index=ptr_index[i];
+	  if (my_time%X_sample_symbol_info_list_val[index].period == 0) {
+	      item.size = X_sample_symbol_info_list_val[index].dimension * tsp_type_size[X_sample_symbol_info_list_val[index].type];
+ 
+	      item.time = my_time;
+	      item.provider_global_index = index;
+
+	      /* PGI 0 is a pseudo time */
+	      if (0==index) {
+		*((double*)item.raw_value) = (double)(my_time) / (double)(cthis->get_base_frequency(cthis));
+		/* PUSH next sample item into the TSP provider lib DataPool 
+		 * and go to next for (over requested symbols) iteration */
+		TSP_datapool_push_next_item(cthis->datapool, &item);
+		memo_val[index]=*((double*)item.raw_value);
+		continue;
+	      }
+	      
+	      /* cthis loop generate pseudo evolving values for each 
+	       * Stubbed Server symbol 
+	       */
+	      for(j=0;j<X_sample_symbol_info_list_val[index].dimension;++j)
+	      {
+	       
+	      switch(X_sample_symbol_info_list_val[index].type)
+	      {
+	      case TSP_TYPE_DOUBLE:
+		*((double*)item.raw_value) = calc_func(index, my_time);
+		memo_val[index]=*((double*)item.raw_value);
+		break;
+
+	      case TSP_TYPE_FLOAT:
+		*((float*)item.raw_value) = 1.102;  /* (float)calc_func(index, my_time);*/
+		break;
+	
+	      case TSP_TYPE_INT8:
+		((int8_t*)item.raw_value)[j] = 2+j; /*  (int8_t)calc_func(index, my_time);*/
+		break;
+	
+	      case TSP_TYPE_INT16:
+		*((int16_t*)item.raw_value) = 3; /*(int16_t) calc_func(index, my_time);*/
+		break;
+	
+	      case TSP_TYPE_INT32:
+		*((int32_t*)item.raw_value) =  4; /*(int32_t)calc_func(index, my_time);*/
+		break;
+	
+
+	      case TSP_TYPE_INT64:
+		*((int64_t*)item.raw_value) = 5; /* (int64_t)calc_func(index, my_time);*/
+		break;
+	
+	      case TSP_TYPE_UINT8:
+		*((uint8_t*)item.raw_value) = 6; /* (uint8_t)calc_func(index, my_time);*/
+		break;
+	
+	      case TSP_TYPE_UINT16:	       
+		*((uint16_t*)item.raw_value) = 7; /* (uint16_t)calc_func(index, my_time);*/
+		break;
+	
+	      case TSP_TYPE_UINT32:
+		*((uint32_t*)item.raw_value) = 8; /* (uint32_t)calc_func(index, my_time);*/
+		break;
+	
+	      case TSP_TYPE_UINT64:
+		*((uint64_t*)item.raw_value) = 9; /* (uint64_t)calc_func(index, my_time);*/
+		break;
+	
+	      case TSP_TYPE_CHAR:	
+		*((char*)item.raw_value) = 'C'; /* calc_func_char(index, my_time);*/
+		break;
+			
+	      case TSP_TYPE_UCHAR:		
+		*((unsigned char*)item.raw_value) = 'U'; /* (unsigned char)calc_func_char(index, my_time);*/
+		break;
+		  
+	      case TSP_TYPE_RAW:
+		*((uint8_t*)item.raw_value) = 10; /* (uint8_t)calc_func(index, my_time);*/
+		break;
+	      default:
+		STRACE_ERROR(("Unhandled TSP datatype =%d",X_sample_symbol_info_list_val[index].type));
+	 
+	      }
+	      }
+
+	      TSP_datapool_push_next_item(cthis->datapool, &item);
+	    }
+	}
+
+      /* 
+       * Finalize the datapool state with new time : Ready to send 
+       * This call signals the TSP Provider library that the coherent
+       * set of samples have reached the Datapool and are ready
+       * to be distributed with TSP
+       */
+      TSP_datapool_push_commit(cthis->datapool,my_time, GLU_GET_NEW_ITEM);
+
+      /* Update nexttime to be next time to generated symbols */
+      X_nexttime += tsp_usleep_period_us*1000;
+      /* get current time */
+      current_time = tsp_gethrtime();
+      /* wait for "missing" cycle time */
+      if( current_time < X_nexttime ) { 	
+	/* time are in nano-second and we Usleep in micro-second */
+	tsp_usleep((X_nexttime-current_time)/1000);
+      }
+
+      my_time++;    
+      
+      /* print out some pseudo time for debug purpose */
+      if (!(my_time%1000))  STRACE_INFO(("TOP %d : %s=%g \t%s=%g \t%s=%g \t%s=%g", my_time,
+					 X_sample_symbol_info_list_val[0].name, memo_val[0],
+					 X_sample_symbol_info_list_val[1].name, memo_val[1],
+					 X_sample_symbol_info_list_val[2].name, memo_val[2],
+					 X_sample_symbol_info_list_val[3].name, memo_val[3]
+					));
+    }
+    
+  return cthis;
+
+}
+
+
+int STUB_GLU_init(GLU_handle_t* cthis, int fallback_argc, char* fallback_argv[])
+{
+  int i;
+  int32_t size;
+  char symbol_buf[50];
+
+  /* Initialize provided sample info list */
+  if (TSP_STATUS_OK!=TSP_SSIList_initialize(&X_SSI_list,GLU_MAX_SYMBOLS_DOUBLE+GLU_MAX_SYMBOLS_NOT_DOUBLE+1)) {
+    return FALSE;
+  }
+  
+  X_sample_symbol_info_list_val = X_SSI_list.TSP_sample_symbol_info_list_t_val;
+  
+  for (i=0; i<GLU_MAX_SYMBOLS_DOUBLE; i++)
+    {      
+      sprintf(symbol_buf, "Symbol%d",i);
+      TSP_SSI_initialize(TSP_SSIList_getSSI(X_SSI_list,i),
+			 symbol_buf,        /* name                  */ 
+			 i,                 /* provider global index */
+			 0,0,               /* pgridx,pgrank         */
+			 TSP_TYPE_DOUBLE,   /* type                  */
+			 1,                 /* dimension             */
+			 0,0,               /* offset, nelem         */
+			 1,                 /* period                */
+			 0);                /* phase                 */
+      /* compute symbol memory size */
+      size = X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      /* update symbol max size */
+      if (taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+    }
+
+  if(0!=GLU_MAX_SYMBOLS_NOT_DOUBLE)
+  {
+
+      /*Float*/
+      sprintf(symbol_buf, "FLOAT_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_FLOAT;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+    
+      /*ENTIER*/
+      sprintf(symbol_buf, "INT8_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_INT8;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+      /*Int16*/
+      sprintf(symbol_buf, "INT16_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_INT16;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+      /*Int32*/
+      sprintf(symbol_buf, "INT32_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_INT32;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+      /*Int64*/
+      sprintf(symbol_buf, "INT64_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_INT64;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+      /*uint8*/
+      sprintf(symbol_buf, "UINT8_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_UINT8;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+      /*uint16*/
+      sprintf(symbol_buf, "UINT16_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_UINT16;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+
+      /*uint32*/
+      sprintf(symbol_buf, "UINT32_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_UINT32;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+      /*uint64*/
+      sprintf(symbol_buf, "UINT64_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_UINT64;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+
+
+      /*CHAR*/
+      sprintf(symbol_buf, "CHAR_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_CHAR;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+
+      /*UCHAR*/
+      sprintf(symbol_buf, "UCHAR_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_UCHAR;
+      X_sample_symbol_info_list_val[i].dimension = 1;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+
+      /*TAB INT8*/
+      sprintf(symbol_buf, "TAB_INT8_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_INT8;
+      X_sample_symbol_info_list_val[i].dimension = 10;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+      /*TAB CHAR*/
+      sprintf(symbol_buf, "TAB_CHAR_Symbol%d",i);
+      X_sample_symbol_info_list_val[i].name = strdup(symbol_buf);
+      X_sample_symbol_info_list_val[i].provider_global_index = i;
+      X_sample_symbol_info_list_val[i].period = 1;
+      X_sample_symbol_info_list_val[i].type =  TSP_TYPE_CHAR;
+      X_sample_symbol_info_list_val[i].dimension = 2*10;
+
+      size=X_sample_symbol_info_list_val[i].dimension * tsp_type_size[X_sample_symbol_info_list_val[i].type];
+      if(taille_max_symbol< size)
+      {
+	taille_max_symbol= size;
+      }
+
+      ++i;
+  }
+
+  /*overide first name*/
+  X_sample_symbol_info_list_val[0].name = strdup("t");
+
+  return TRUE;
+}
+
+int  
+STUB_GLU_get_ssi_list(GLU_handle_t* h_glu,TSP_sample_symbol_info_list_t* symbol_list)
+{
+  symbol_list->TSP_sample_symbol_info_list_t_len = X_SSI_list.TSP_sample_symbol_info_list_t_len;
+  symbol_list->TSP_sample_symbol_info_list_t_val = X_SSI_list.TSP_sample_symbol_info_list_t_val;
+	    
+  return TRUE;
+} /* STUB_GLU_get_ssi_list */
+
+int32_t
+STUB_GLU_get_ssei_list_fromPGI(struct GLU_handle_t* cthis, 
+			       int32_t* pgis, int32_t pgis_len, 
+			       TSP_sample_symbol_extended_info_list_t* SSEI_list) {
+
+  int32_t i,ret;
+  ret=TSP_STATUS_OK;
+
+  /* Store all global indexes into list including NOT FOUND ones */
+  for ( i=0 ; i < pgis_len;++i) {    
+    STRACE_DEBUG(("Getting extended info for PGI <%d>",pgis[i]));
+    if(-1!=pgis[i]) {
+
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].provider_global_index=pgis[i]; 
+
+      if(1000>pgis[i])
+      {     
+	SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_len=0;
+	SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val=NULL;
+      }
+      else
+      {
+	switch(pgis[i])
+	  {
+	  case 1000:
+   	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "a");
+	    break; 
+	  case 1001:
+   	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "b");
+	    break;
+	  case 1002:
+	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "c");
+	    break;
+	  case 1003:
+	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "d");
+	    break;
+          case 1004:
+	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "e");
+	    break;
+          case 1005:
+	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "f");
+	    break;
+          case 1006:
+	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "g");
+	    break;
+	  case 1007:
+	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "h");
+	    break;
+	  case 1008:
+	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "i");
+	    break;
+         case 1009:
+	   TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	   TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "j");
+	   break;
+	  case 1010:
+	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),1);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "unit", "m");
+	    break;
+	  case 1011:
+   	    TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),2);
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "profile", "10");
+ 	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[1]), "unit", "SI");
+	    TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[1]), "order", "1");
+	    break;
+	   case 1012:
+	     TSP_EIList_initialize(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info),2);
+	     TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[0]), "profile", "2*10");
+	     TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[1]), "unit", "None");
+	     TSP_EI_update(&(SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val[1]), "order", "2");
+	     break; 
+	  default:
+	    /* do not forget invalid > 1012 PGIs */
+	    SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].provider_global_index=-1;      
+	    SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_len=0;
+	    SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val=NULL;
+	    ret=TSP_STATUS_ERROR_PGI_UNKNOWN;     
+	  }
+      }
+    }
+    else {
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].provider_global_index=-1;      
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_len=0;
+      SSEI_list->TSP_sample_symbol_extended_info_list_t_val[i].info.TSP_extended_info_list_t_val=NULL;
+      ret=TSP_STATUS_ERROR_PGI_UNKNOWN;      
+    }
+  } /*end for*/
+  return  ret;
+
+} /* end of STUB_GLU_get_ssei_list_fromPGI */
+
+
+/* create the GLU handle instance for STUB */
+GLU_handle_t* GLU_stub_create(double baseFrequency) {
+  
+  /* create a default GLU */
+  GLU_handle_create(&stub_GLU,"StubbedServer",GLU_SERVER_TYPE_ACTIVE,baseFrequency);
+  
+  stub_GLU->initialize             = &STUB_GLU_init;
+  stub_GLU->run                    = &STUB_GLU_thread;
+  stub_GLU->get_ssi_list           = &STUB_GLU_get_ssi_list;
+  stub_GLU->get_ssei_list_fromPGI  = &STUB_GLU_get_ssei_list_fromPGI;
+
+  return stub_GLU;
+} /* GLU_stub_create */
diff -urN tsp-0.8.3-Source-Reference/src/providers/stub/stub_server_rtems.c tsp-0.8.3-Source-Rtems/src/providers/stub/stub_server_rtems.c
--- tsp-0.8.3-Source-Reference/src/providers/stub/stub_server_rtems.c	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/providers/stub/stub_server_rtems.c	2007-10-15 14:00:52.000000000 +0200
@@ -0,0 +1,204 @@
+/*
+
+$Id: server_main.c,v 1.15 2007/03/29 20:42:53 deweerdt Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer: tsp@astrium.eads.net
+Component : Provider
+
+-----------------------------------------------------------------------
+
+Purpose   : Implementation for the glue_server, for stub test
+	    Allow the output of a datapool of 1000 symbols, 
+	    cyclically generated at 100Hz
+
+-----------------------------------------------------------------------
+*/
+
+#include <signal.h>
+
+#include "tsp_provider_init.h"
+
+#include "stub_server_rtems.h"
+
+
+#if defined (WIN32)
+#include "tsp_time.h"
+typedef unsigned long sigset_t;
+#endif
+
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+    #include  "getopt.h"
+#else
+    #include <unistd.h>
+    #include <assert.h>
+#endif
+
+GLU_handle_t* GLU_stub_create(double baseFrequency);
+
+#if defined (WIN32)
+static int sigint_reveived = 0;
+/* intercept signal function : call once */
+void intrpt(int signum)
+{
+    /* managed the SIGINT signal */
+    (void) signal(SIGINT, SIG_DFL);
+    /* End of the waiting */
+    sigint_reveived = 1;
+    /* could be modified to use CreateEvent, SetEvent and WaitForSingleObject functions */
+}
+#endif
+
+/**
+ * @defgroup TSP_StubbedServer Stubbed Provider
+ * A Simple TSP provider producing 100 symbols at specified base frequency.
+ *
+ * \par tsp_stub_server [-h] [-f frequency (in HZ)]
+ * \par 
+ * <ul>
+ *   <li> \b -h  (optional) print command line help.</li>
+ *   <li> \b -f  (optional) produce symbols at specified frequency in Hz. Default is 100 Hz.</li>
+ * </ul>
+ * @ingroup TSP_Providers
+ */
+
+void 
+stub_usage(const char* me) {
+  printf("%s is a (very) simple TSP provider which produce 1000 Symbols at specified frequency.\n",me);
+  printf("With no args %s will produce 1000 Symvols at 100 Hz\n",me); 
+ 
+  printf("Usage: %s [-h] [-f frequency]\n",me);
+  printf("   -h           (optional) print command line help.\n");
+  printf("   -f frequency (optional) produce symbols at specified frequency in Hz. Default is 100 Hz.\n");
+}
+
+int main_stub_server(int argc, char *argv[])
+{
+  GLU_handle_t* GLU_stub;
+  int           opt_ok=1;
+  int           c_opt;
+  double        baseFrequency = 100.0; /* default frequency is 100Hz */
+
+/* Managing the SIGINT signal */
+#if defined (WIN32)
+  /* intercept SIGINT signal */
+  if ( SIG_ERR == signal(SIGINT, intrpt))
+  {
+    STRACE_ERROR(("Error initialisation signal intercept function"));
+    exit(1);
+  }
+#else
+  sigset_t allsigs;
+  int whatsig;
+
+  /* Allows the SIGINT signal */
+  /* so the sigwait function may stop on a SIGINT signal */
+  sigemptyset(&allsigs);
+  sigaddset(&allsigs, SIGINT);
+  sigprocmask(SIG_BLOCK, &allsigs, NULL);
+#endif
+
+    /* Analyse command line parameters */
+  c_opt = getopt(argc,argv,"f:h");
+
+  if(opt_ok && EOF != c_opt) {
+      opt_ok  = 1;
+    do { 
+      switch (c_opt) {
+      case 'f':
+	baseFrequency = atof(optarg);
+	break;
+      case 'h':
+	opt_ok = 0;
+	break;
+      case '?':
+	fprintf(stderr,"Invalid command line option(s), correct it and rerun\n");
+	opt_ok = 0;
+	break;
+      default:
+	opt_ok = 0;
+	break;
+      } /* end of switch */  
+      c_opt = getopt(argc,argv,"u:p:n:s:ht");  
+    }
+    while (opt_ok && (EOF != c_opt));
+  }
+
+  if (!opt_ok) {
+    stub_usage(argv[0]);
+    exit(-1);
+  } else {
+    printf ("#=====================================================================#\n");
+    printf ("# Launching <StubbedServer> for generation of 1000 Symbols at %f Hz    \n",baseFrequency);
+    printf ("#=====================================================================#\n");
+  }
+
+  /* Create our structured GLU callbacks */
+  GLU_stub = GLU_stub_create(baseFrequency);
+
+  /* Initialize TSP Provider library and register OUR GLU object
+   * so that the TSP core knows it and is able
+   * to call appropriate callback GLU member functions.
+   */
+  if(TSP_STATUS_OK==TSP_provider_init(GLU_stub,&argc, &argv)) {
+    /* configure TSP request handling SIMPLE and NON BLOCKING mode and
+     * 
+     * Start TSP request handling loop
+     * In this case the function will not return
+     * until the program is interrupted (Ctrl-C).
+     *
+     * Provider run will:
+     *    1- Call GLU-->initialize()
+     *    2- Start a thread running GLU-->run()
+     *    3- Start TSP request handler   
+     */
+    if (TSP_STATUS_OK!=TSP_provider_run(TSP_ASYNC_REQUEST_SIMPLE | TSP_ASYNC_REQUEST_NON_BLOCKING)) {
+        return -1;
+    }
+    /* print out TSP URL */
+    TSP_provider_urls(TSP_PUBLISH_URLS_PRINT | TSP_PUBLISH_URLS_FILE);
+#if defined (WIN32)
+    /* Wait until the intercept signal function is call */
+    while (!sigint_reveived)
+    {
+        tsp_usleep(1000);
+    }
+#else
+    /* wait until a SIGINT signal */
+    sigwait(&allsigs, &whatsig);
+#endif
+    /* Terminate TSP Provider library */
+    TSP_provider_end();
+    
+    /* * * NO TSP_xxx functions may be called after this call * * */
+  }
+
+  printf("#=== End ===#\n");
+  return 0;
+}
+  
+
+   
diff -urN tsp-0.8.3-Source-Reference/src/providers/stub/stub_server_rtems.h tsp-0.8.3-Source-Rtems/src/providers/stub/stub_server_rtems.h
--- tsp-0.8.3-Source-Reference/src/providers/stub/stub_server_rtems.h	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/providers/stub/stub_server_rtems.h	2007-10-15 09:25:36.000000000 +0200
@@ -0,0 +1,7 @@
+
+#ifndef _TSP_STUB_SERVER_H_
+#define _TSP_STUB_SERVER_H_
+
+int main_stub_server(int argc, char *argv[]);
+
+#endif /*_TSP_STUB_SERVER_H_*/
diff -urN tsp-0.8.3-Source-Reference/src/util/libbb/bb_core.c tsp-0.8.3-Source-Rtems/src/util/libbb/bb_core.c
--- tsp-0.8.3-Source-Reference/src/util/libbb/bb_core.c	2007-04-01 15:17:21.000000000 +0200
+++ tsp-0.8.3-Source-Rtems/src/util/libbb/bb_core.c	2007-10-12 09:20:27.000000000 +0200
@@ -913,36 +913,35 @@
 } /* end of bb_data_print */
 #endif /* !__KERNEL__ */
 
-int32_t 
-bb_create(S_BB_T** bb, 
+int32_t bb_create(S_BB_T** bb, 
 	       const char* pc_bb_name,
 	       int32_t n_data,
 	       int32_t data_size) {
 
-  enum bb_type type;
-  int32_t retcode;
-  assert(bb);
+	enum bb_type type;
+	int32_t retcode;
+	assert(bb);
+
+	type = bb_type(pc_bb_name);
+	retcode = ops[type]->bb_shmem_get(bb, pc_bb_name, n_data, data_size, 1);
+	if (retcode != BB_OK)
+		goto err;
+
+	retcode = ops[(*bb)->type]->bb_sem_get(*bb, 1);
+	if (retcode != BB_OK)
+		goto err;
 
-  type = bb_type(pc_bb_name);
-  retcode = ops[type]->bb_shmem_get(bb, pc_bb_name, n_data, data_size, 1);
-  if (retcode != BB_OK)
-  	goto err;
+	retcode = ops[(*bb)->type]->bb_msgq_get(*bb, 1);
 
-  retcode = ops[(*bb)->type]->bb_sem_get(*bb, 1);
-  if (retcode != BB_OK)
-  	goto err;
-
-  retcode = ops[(*bb)->type]->bb_msgq_get(*bb, 1);
-  
-err:
-  return retcode;
+	err:
+	return retcode;
 } /* end of bb_create */
+	
 #ifdef __KERNEL__
 EXPORT_SYMBOL_GPL(bb_create);
 #endif
 
-int32_t 
-bb_destroy(S_BB_T** bb) {
+int32_t bb_destroy(S_BB_T** bb) {
   
   int32_t retcode;
   
diff -urN tsp-0.8.3-Source-Reference/src/util/libbb/bb_core.c~ tsp-0.8.3-Source-Rtems/src/util/libbb/bb_core.c~
--- tsp-0.8.3-Source-Reference/src/util/libbb/bb_core.c~	1970-01-01 01:00:00.000000000 +0100
+++ tsp-0.8.3-Source-Rtems/src/util/libbb/bb_core.c~	2007-10-12 09:15:58.000000000 +0200
@@ -0,0 +1,1472 @@
+/*
+
+$Header: /sources/tsp/tsp/src/util/libbb/bb_core.c,v 1.40 2007/04/01 13:17:21 deweerdt Exp $
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT 
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+-----------------------------------------------------------------------
+
+Project   : TSP
+Maintainer : tsp@astrium-space.com
+Component : Consumer
+
+-----------------------------------------------------------------------
+
+Purpose   : Blackboard Idiom implementation
+
+-----------------------------------------------------------------------
+ */
+
+#ifndef __KERNEL__
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <unistd.h>
+#include <assert.h>
+#include <ctype.h>
+#include <dlfcn.h>
+#ifndef RTLD_DEFAULT
+#define RTLD_DEFAULT (void *)0
+#endif
+
+#include <tsp_abs_types.h>
+#include <tsp_abs_types.h>
+#include <tsp_sys_headers.h>
+#include <tsp_simple_trace.h>
+
+#endif /* __KERNEL__ */
+
+#include "bb_alias.h"
+#include "bb_utils.h"
+#include "bb_core.h"
+
+/**
+ * Convert type to string for display use.
+ */
+#ifndef __KERNEL__
+static const char* E_BB_2STRING[] = {"DiscoverType",
+				     "double",
+				     "float",
+				     "int8_t",
+				     "int16_t",
+				     "int32_t",
+				     "int64_t",
+				     "uint8_t",
+				     "uint16_t",
+				     "uint32_t",
+				     "uint64_t",
+				     "char",
+				     "uchar",
+				     "UserType",
+				     "NotAType end"};
+#endif
+
+static const size_t E_BB_TYPE_SIZE[] = {0,
+			#ifndef __KERNEL__
+					sizeof(double),
+					sizeof(float),
+      #else
+          0,
+          0,
+			#endif
+					sizeof(int8_t),
+					sizeof(int16_t),
+					sizeof(int32_t),
+					sizeof(int64_t),
+					sizeof(uint8_t),
+					sizeof(uint16_t),
+					sizeof(uint32_t),
+					sizeof(uint64_t),
+					sizeof(char),
+					sizeof(unsigned char),
+					0,
+					0};
+
+#ifdef __KERNEL__
+/* In case we're compiling kernel code, there's really no need
+   for the sysv code */
+static struct bb_operations sysv_bb_ops;
+extern struct bb_operations k_bb_ops;
+#else
+extern struct bb_operations sysv_bb_ops;
+#if defined(linux) || defined(__linux)
+extern struct bb_operations k_bb_ops;
+#endif
+#endif
+
+/* Note: This is thigtly related to enum bb_type in bb_core.h,
+   if you ever modify this, you'll probably need to modify
+   enum bb_type */
+static struct bb_operations *ops[] = {
+	&sysv_bb_ops
+#if defined(linux) || defined(__linux)
+	,&k_bb_ops
+#endif
+};
+
+static enum bb_type bb_type(const char *name)
+{
+#ifdef __KERNEL__
+	return BB_KERNEL;
+#else
+	if (!strncmp(name, "/dev/", 5))
+		return BB_KERNEL;
+
+	return BB_SYSV;
+#endif /* __KERNEL__ */
+}
+
+size_t 
+sizeof_bb_type(E_BB_TYPE_T bb_type) {
+  size_t retval = 0;
+  if ((bb_type>=1) && (bb_type<E_BB_USER)) {
+    retval = E_BB_TYPE_SIZE[bb_type];
+  }
+  return retval;
+}
+
+E_BB_TYPE_T 
+bb_type_string2bb_type(const char* bb_type_string) {
+  E_BB_TYPE_T retval = 0;
+#ifndef __KERNEL__
+  if (!strncasecmp("double",bb_type_string,strlen("double"))) {
+    retval = E_BB_DOUBLE;
+  } else
+  if (!strncasecmp("float",bb_type_string,strlen("float"))) {
+    retval = E_BB_FLOAT;
+  } else
+#endif
+  if (!strncasecmp("int8",bb_type_string,strlen("int8"))) {
+    retval = E_BB_INT8;
+  } else
+  if (!strncasecmp("int16",bb_type_string,strlen("int16"))) {
+    retval = E_BB_INT16;
+  } else
+  if (!strncasecmp("int32",bb_type_string,strlen("int32"))) {
+    retval = E_BB_INT32;
+  } else
+  if (!strncasecmp("int64",bb_type_string,strlen("int64"))) {
+    retval = E_BB_INT64;
+  } else
+  if (!strncasecmp("uint8",bb_type_string,strlen("uint8"))) {
+    retval = E_BB_UINT8;
+  } else
+  if (!strncasecmp("uint16",bb_type_string,strlen("uint16"))) {
+    retval = E_BB_UINT16;
+  } else
+  if (!strncasecmp("uint32",bb_type_string,strlen("uint32"))) {
+    retval = E_BB_UINT32;
+  } else
+  if (!strncasecmp("uint64",bb_type_string,strlen("uint64"))) {
+    retval = E_BB_UINT64;
+  } else
+  if (!strncasecmp("char",bb_type_string,strlen("char"))) {
+    retval = E_BB_CHAR;
+  } else
+  if (!strncasecmp("uchar",bb_type_string,strlen("uchar"))) {
+    retval = E_BB_UCHAR;
+  }
+  return retval;
+}
+
+#ifdef __KERNEL__
+static inline char *__strdup (const char *s1)
+{
+	char *p;
+	p = (char *)kmalloc((strlen(s1)+1)*sizeof(char), GFP_KERNEL);
+	if (p != NULL)
+		strcpy (p,s1);
+	return p;
+}
+#endif
+static char *bb_get_varname_default(const S_BB_DATADESC_T *dd)
+{
+#ifdef __KERNEL__
+  return __strdup(dd->__name);
+#else
+  return strdup(dd->__name);
+#endif
+}
+
+static int32_t bb_varname_max_len_default(void)
+{
+  return VARNAME_MAX_SIZE;
+}
+
+static int32_t bb_set_varname_default(S_BB_DATADESC_T *dd, const char *key)
+{
+  strncpy(dd->__name, key, VARNAME_MAX_SIZE);
+  return BB_OK;
+}
+
+bb_get_varname_fn bb_get_varname = bb_get_varname_default;
+bb_set_varname_fn bb_set_varname = bb_set_varname_default;
+bb_varname_max_len_fn bb_varname_max_len = bb_varname_max_len_default;
+
+#ifndef __KERNEL__
+static int32_t
+bb_varname_init(S_BB_T *bb)
+{
+  bb_varname_init_fn init;
+  bb_get_varname_fn getter;
+  bb_set_varname_fn setter;
+  bb_varname_max_len_fn max_len;
+  char getter_name[256];
+  char setter_name[256];
+  char init_name[256];
+  char max_len_name[256];
+  S_BB_PRIV_T *priv;
+  void *handle = RTLD_DEFAULT;
+
+  priv = bb_get_priv(bb);
+  if (priv->varname_lib[0] == '\0') {
+    return BB_OK;
+  }
+
+  sprintf(getter_name, "bb_get_varname_%s", priv->varname_lib);
+  sprintf(setter_name, "bb_set_varname_%s", priv->varname_lib);
+  sprintf(init_name, "bb_varname_init_%s", priv->varname_lib);
+  sprintf(max_len_name, "bb_varname_max_len_%s", priv->varname_lib);
+
+  getter = dlsym(handle, getter_name);
+  if (!getter) {
+    char libname[FILENAME_MAX];
+
+    sprintf(libname, "lib%s.so", priv->varname_lib);
+    /* try to open a library */
+    handle = dlopen(libname, RTLD_NOW);
+    if (!handle) {
+      bb_logMsg(BB_LOG_WARNING, "cound not find lib %s\n", libname);
+      return BB_NOK;
+    }
+    getter = dlsym(handle, getter_name);
+    if (!getter) {
+      bb_logMsg(BB_LOG_WARNING, "cound not find symbol %s\n", getter_name);
+      return BB_NOK;
+    }
+  }
+  setter = dlsym(handle, setter_name);
+  if (!setter) {
+    bb_logMsg(BB_LOG_WARNING, "cound not find symbol %s\n", setter_name);
+    return BB_NOK;
+  }
+
+  init = dlsym(handle, init_name);
+
+  if (init) {
+    if (init(bb) != BB_OK)
+      return BB_NOK;
+  }
+
+  max_len = dlsym(handle, max_len_name);
+  if (max_len)
+    bb_varname_max_len = max_len;
+
+  bb_set_varname = setter;
+  bb_get_varname = getter;
+
+  return BB_OK;
+}
+#else
+static int32_t
+bb_varname_init(S_BB_T *bb)
+{
+	return BB_OK;
+}
+#endif
+
+
+int32_t
+bb_ctl(S_BB_T *bb, unsigned int request, ...)
+{
+  va_list ap;
+  int ret=BB_OK;
+  char *name;
+  S_BB_PRIV_T *priv;
+
+  va_start(ap, request);
+  switch (request) {
+    /* We've been passed a function pointer */
+    case BB_CTL_SET_NAME_SETTER_PTR:
+      bb_set_varname = va_arg(ap, typeof(bb_set_varname));
+      break;
+      /* We've been passed a function pointer */
+    case BB_CTL_SET_NAME_GETTER_PTR:
+      bb_get_varname = va_arg(ap, typeof(bb_get_varname));
+      break;
+    case BB_CTL_GET_NAMING_FROM_BB:
+      ret=bb_varname_init(bb);
+      break;
+    case BB_CTL_SET_NAMING_IN_BB:
+      name = va_arg(ap, typeof(name));
+      priv = bb_get_priv(bb);
+      strncpy(priv->varname_lib, name, VARNAME_LIB_LENGTH);
+      ret=bb_varname_init(bb);
+      break;
+    default:
+      ret=BB_NOK;
+      break;
+  }
+  va_end(ap);
+
+  return ret;
+}
+
+int32_t
+bb_check_version(volatile S_BB_T* bb) {
+  int32_t retval = 0;
+/*   union { */
+/*     uint16_t lower; */
+/*     uint16_t upper; */
+/*   } version_using, version_access; */
+
+  assert(bb);
+  retval = BB_VERSION_ID - bb->bb_version_id;
+  /* From now on we're nice and backwards compatible */
+  if (BB_VERSION_ID >= 0x2000 && bb->bb_version_id >= 0x2000) {
+    return 0; 
+  }
+/*   if (retval != 0) { */
+/*       bb_logMsg(BB_LOG_WARNING, "BlackBoard::bb_check_version", */
+/* 		"BB version mismatch using <0x%08X> for accessing <0x%08X>\n", */
+/* 		BB_VERSION_ID,bb->bb_version_id); */
+/*   } */
+  return retval;
+} /* end of bb_check_version */
+
+int32_t 
+bb_size(const int32_t n_data, const int32_t data_size) {
+  /* The SHM segment is sized to:
+   *  BB structure size +
+   *  data descriptor array size +
+   *  data zone size
+   */
+  int32_t size;
+
+  size = (sizeof(S_BB_T) + 
+    sizeof(S_BB_DATADESC_T)*n_data +
+    sizeof(char)*data_size);
+
+  size += sizeof(S_BB_PRIV_T);
+  return size;
+} /* end of bb_size */
+
+S_BB_PRIV_T *
+bb_get_priv(volatile S_BB_T* bb)
+{
+  return (S_BB_PRIV_T *)((unsigned long)bb + (unsigned long)(bb_size(bb->max_data_desc_size, bb->max_data_size) - sizeof(S_BB_PRIV_T)));
+}
+
+int32_t
+bb_find(volatile S_BB_T* bb, const char* var_name) {
+  int32_t retval;
+  int32_t i;
+
+  retval = -1;
+  assert(bb);
+
+  for (i=0; i< bb->n_data;++i) {
+    char * n = bb_get_varname(&bb_data_desc(bb)[i]);
+    if (!strcmp(var_name,n)) {
+      retval = i;
+      free(n);
+      break;
+    }
+    free(n);
+  } /* end for */
+
+  return retval;
+} /* end of  bb_find */
+
+S_BB_DATADESC_T*
+bb_data_desc(volatile S_BB_T* bb) {
+  S_BB_DATADESC_T* retval;
+
+  retval = NULL;
+  assert(bb);
+  retval = (S_BB_DATADESC_T*) ((char*)(bb) + bb->data_desc_offset);
+
+  return retval;
+} /* end of bb_data_desc */
+
+void*
+bb_data(volatile S_BB_T* bb) {
+  void* retval;
+
+  retval = NULL;
+  assert(bb);
+  retval = (char*)(bb) + bb->data_offset;
+
+  return retval;
+} /* end of bb_data */
+
+#ifndef __KERNEL__
+double
+bb_double_of(void* value, E_BB_TYPE_T bbtype) {
+
+  double retval;
+
+  retval = 0.0;
+
+  switch (bbtype) {
+  case E_BB_DOUBLE: 
+    retval = *((double*)value);
+    break;
+  case E_BB_FLOAT:
+    retval = *((float*)value);
+    break;
+  case E_BB_INT8:
+    retval = *((int8_t*)value);
+    break; 
+  case E_BB_INT16:
+    retval = *((int16_t*)value);
+    break; 
+  case E_BB_INT32:
+    retval = *((int32_t*)value);
+    break; 
+  case E_BB_INT64:
+    retval = *((int64_t*)value);
+    break; 
+  case E_BB_UINT8:
+    retval = *((uint8_t*)value);
+    break;  
+  case E_BB_UINT16:
+    retval = *((uint16_t*)value);
+    break;
+  case E_BB_UINT32:
+    retval = *((uint32_t*)value);
+    break;	
+  case E_BB_UINT64:
+    retval = *((uint64_t*)value);
+    break;	
+  case E_BB_CHAR:
+  case E_BB_UCHAR:
+  case E_BB_USER:
+    /* FIXME could not convert set 0.0 */
+    retval = 0.0;
+    break; 
+  default:
+    retval = 0.0;
+    break;
+  }
+
+  return retval;
+} /* end of bb_double_of */
+#endif
+
+int32_t 
+bb_data_initialise(volatile S_BB_T* bb, S_BB_DATADESC_T* data_desc,void* default_value) {
+  
+  int32_t retval;  
+  char* data;
+  int32_t i;
+  int32_t idxstack[1];
+  int32_t idxstack_len = 1;
+  
+  idxstack[0] = 0;
+  
+  assert(data_desc);
+  /* on recupere l'adresse de la donnee dans le BB */
+  /* FIXME a modifier peut etre */
+  //data = (char*)bb_data(bb) + data_desc.data_offset;
+  data = bb_item_offset(bb,data_desc,idxstack, idxstack_len);
+  
+  
+  retval = BB_OK;
+  for (i=0; i< data_desc->dimension; ++i) {
+    switch (data_desc->type) {
+#ifndef __KERNEL__
+    case E_BB_DOUBLE: 
+      ((double*) data)[i] = default_value ? *((double *) default_value) : 0.0;
+      break;
+    case E_BB_FLOAT:
+      ((float*) data)[i] = default_value ? *((float *) default_value) : 0.0;
+      break;
+#endif
+    case E_BB_INT8:
+      ((int8_t*) data)[i] = default_value ? *((int8_t *) default_value) : 0;
+      break;
+    case E_BB_INT16:
+      ((int16_t*) data)[i] = default_value ? *((short *) default_value) : 0;
+      break; 
+    case E_BB_INT32:
+      ((int32_t*) data)[i] = default_value ? *((int *) default_value) : 0;
+      break; 
+    case E_BB_INT64:
+      ((int64_t*) data)[i] = default_value ? *((long *) default_value) : 0;
+      break;       
+    case E_BB_UINT8:
+      ((uint8_t*) data)[i] = default_value ? *((uint8_t *) default_value) : 0;
+      break;
+    case E_BB_UINT16:
+      ((uint16_t*) data)[i] = default_value ? *((unsigned short *) default_value) : 0;
+      break;
+    case E_BB_UINT32:
+      ((uint32_t*) data)[i] = default_value ? *((unsigned int *) default_value) : 0;
+      break;	
+    case E_BB_UINT64:
+      ((uint64_t*) data)[i] = default_value ? *((unsigned long *) default_value) : 0;
+      break;	
+    case E_BB_CHAR:
+      ((char *) data)[i] = default_value ? *((char *) default_value) : '\0';
+      break;
+    case E_BB_USER:
+      if (NULL == default_value) {
+				memset(data + (data_desc->type)*i,0,data_desc->type_size);
+      } else {
+				memcpy(data + (data_desc->type)*i,default_value,data_desc->type_size);
+      }
+      break; 
+    default:
+      retval = BB_NOK;
+      break;
+    }
+  } 
+  
+  return retval;
+} /* end of bb_data_initialise */
+
+int32_t
+bb_value_direct_rawwrite(void* data, S_BB_DATADESC_T data_desc, void* value) {  
+  memcpy(data,value,data_desc.type_size);
+  return BB_OK;
+}
+
+#ifndef __KERNEL__
+int32_t
+bb_value_direct_write(void* data, S_BB_DATADESC_T data_desc, const char* value, int hexval) {
+
+  int retval;
+
+  retval = BB_OK;
+
+  switch (data_desc.type) {
+#ifndef __KERNEL__
+  case E_BB_DOUBLE: 
+    ((double *)data)[0] = atof(value);
+    break;
+  case E_BB_FLOAT:
+    ((float *)data)[0] = atof(value);
+    break;
+#endif
+  case E_BB_INT8:
+    ((int8_t*)data)[0] = strtol(value,(char **)NULL,hexval ? 16 : 10);
+    break; 
+  case E_BB_INT16:
+    ((int16_t*)data)[0] = strtol(value,(char **)NULL,hexval ? 16 : 10);
+    break; 
+  case E_BB_INT32:
+    ((int32_t*)data)[0] = strtol(value,(char **)NULL,hexval ? 16 : 10);
+    break; 
+  case E_BB_INT64:
+    ((int64_t*)data)[0] = strtoll(value,(char **)NULL,hexval ? 16 : 10);
+    break; 
+  case E_BB_UINT8:
+    ((uint8_t*)data)[0] = strtol(value,(char **)NULL,hexval ? 16 : 10);
+    break; 
+  case E_BB_UINT16:
+    ((uint16_t*)data)[0] = strtoul(value,(char **)NULL,hexval ? 16 : 10);
+    break;
+  case E_BB_UINT32:
+    ((uint32_t*)data)[0] = strtoul(value,(char **)NULL,hexval ? 16 : 10);
+    break;	
+  case E_BB_UINT64:
+    ((uint64_t*)data)[0] = strtoull(value,(char **)NULL,hexval ? 16 : 10);
+    break;	
+  case E_BB_CHAR:
+    memcpy(&((char*)data)[0],value,sizeof(char));
+    break;
+  case E_BB_UCHAR:
+    memcpy(&((unsigned char*)data)[0],value,sizeof(unsigned char));
+    break; 
+  case E_BB_USER:
+    
+    retval = bb_utils_convert_string2hexbuf(hexval ? value+2 : value,
+					    &((unsigned char*)data)[0*data_desc.type_size],
+					    data_desc.type_size, 
+					    hexval);
+    retval = BB_NOK;
+    break; 
+  default:
+    retval = BB_NOK;
+    break;
+  }
+  return retval;
+} /* bb_value_direct_write */
+#endif /* !__KERNEL__ */
+
+int32_t
+bb_value_write(volatile S_BB_T* bb, 
+	       S_BB_DATADESC_T data_desc, 
+	       const char* value, 
+	       int32_t* idxstack, int32_t idxstack_len) {
+
+  char* data;
+  int retval;
+  int hexval;
+  int lenval;
+  assert(bb);
+  
+  retval = BB_OK;
+
+  lenval = strlen(value);
+
+  if ((NULL != strstr(value,"0x")) | 
+      (NULL != strstr(value,"0X"))
+      ) {
+    hexval  = 1;
+    lenval -= 2;
+  } else {
+    hexval = 0;
+  }
+
+  /* Get address of the data in BB */
+  data = bb_item_offset(bb, &data_desc,idxstack,idxstack_len);
+  /* Now write the value at obtained offset */
+#ifndef __KERNEL__
+  retval = bb_value_direct_write(data,data_desc,value,hexval);
+#endif
+  return retval;
+} /* bb_value_write */
+
+#ifndef __KERNEL__
+
+int32_t
+bb_data_header_print(S_BB_DATADESC_T data_desc, FILE* pf, int32_t idx, int32_t aliastack) {
+  const char oneTab[] = "    "; 
+  char tabs[MAX_ALIAS_LEVEL*5]="";
+  char *n;
+  int i;
+
+  for (i=0; i<(aliastack-1); i++)
+    {
+      strncat(tabs, oneTab, sizeof(tabs)-strlen(tabs));
+    }
+
+  n = bb_get_varname(&data_desc);
+  fprintf(pf,"%s---------- < %s > ----------\n", tabs, n);
+  free(n);
+  fprintf(pf,"%s  alias-target = %d\n", tabs, data_desc.alias_target);
+  fprintf(pf,"%s  type         = %d  (%s)\n",tabs,data_desc.type,E_BB_2STRING[data_desc.type]);
+  fprintf(pf,"%s  dimension    = %d  \n",tabs,data_desc.dimension);
+  fprintf(pf,"%s  type_size    = %d  \n",tabs,data_desc.type_size);
+  fprintf(pf,"%s  data_offset  = %ld \n",tabs,data_desc.data_offset);
+  if ((idx>=0) && 
+      ((E_BB_UCHAR != data_desc.type) &&
+       (E_BB_CHAR  != data_desc.type)
+       )
+      ) {
+    fprintf(pf,"%s  value[%d]     = ",tabs,idx);
+  } else {
+    fprintf(pf,"%s  value        = ",tabs);
+  }
+  if ((data_desc.dimension > 1) &&
+      ((E_BB_UCHAR != data_desc.type) &&
+       (E_BB_CHAR  != data_desc.type)
+       )
+      ){
+    fprintf(pf," [ ");
+  } 
+
+  if ((idx>=0) && 
+      ((E_BB_UCHAR != data_desc.type) &&
+       (E_BB_CHAR  != data_desc.type)
+       )
+      ) {
+    fprintf(pf,"... ");
+  }
+  return 0;
+} /* end of bb_data_header_print */
+
+int32_t
+bb_data_footer_print(S_BB_DATADESC_T data_desc, FILE* pf, int32_t idx, int32_t aliastack) {
+  const char oneTab[] = "    ";
+  char tabs[MAX_ALIAS_LEVEL*5]="";
+  
+  int i;
+  
+  for (i=0; i<(aliastack-1); i++) {
+    strncat(tabs, oneTab, strlen(oneTab)+sizeof(tabs));
+  }
+    
+  if ((idx>=0) &&
+      ((E_BB_UCHAR != data_desc.type) &&
+       (E_BB_CHAR  != data_desc.type)
+       )
+      ) {
+    fprintf(pf,"... ");
+  }  
+
+  if ((data_desc.dimension > 1) &&
+      ((E_BB_UCHAR != data_desc.type) &&
+       (E_BB_CHAR  != data_desc.type)
+       )
+      ){
+    fprintf(pf,"]");
+  }  
+  fprintf(pf,"\n");    
+  fprintf(pf,"%s---------- ---------- ----------\n", tabs);
+  
+  return 0;
+} /* end of bb_data_footer_print */
+
+int32_t 
+bb_string_value_print(volatile S_BB_T* bb, S_BB_DATADESC_T data_desc, FILE* pf, 
+		      int32_t* idxstack, int32_t idxstack_len) {
+  int32_t i,ibeg,iend;
+  char* data;
+  int32_t idx;
+  assert(bb);
+  /* We get BB data address  */
+  data = bb_item_offset(bb, &data_desc,idxstack,idxstack_len);
+  
+  /* check index stack to handle index */
+  if ((idxstack_len>0) && (data_desc.dimension > 1)){
+    idx = idxstack[idxstack_len-1];
+    if (idx>=0) {
+      ibeg=0;
+      iend=1;
+    } else {
+      ibeg=0;
+      iend=data_desc.dimension;
+    }
+  } else {
+    idx = 0;
+    ibeg=0;
+    iend=data_desc.dimension;
+  }
+
+  /* 
+   * If we have character this means we want
+   * a character-like or string-like display 
+   * HEX dump should be for UINT8/16/32/64
+   */
+  if ((E_BB_CHAR ==data_desc.type) ||
+      (E_BB_UCHAR==data_desc.type)) {
+    for (i=ibeg; i< iend; ++i) {
+      if ('\0'==((char*) data)[i]) {
+	break;
+      } else {
+	fprintf(pf,"%c",isprint((int)data[i]) ? ((char*) data)[i] : '?');
+      }
+    }
+  } else {
+    /* This is not a char type ? */
+    fprintf(pf,"bb_string_value_print: Not a char type");
+    return 1;
+  }
+  return 0;
+} /* end of bb_string_value_print */
+
+int32_t 
+bb_value_print(volatile S_BB_T* bb, S_BB_DATADESC_T data_desc, FILE* pf, 
+               int32_t* idxstack, int32_t idxstack_len) {
+  
+  int32_t i,j,ibeg,iend;
+  char* data;
+  int32_t idx;
+  int32_t charNullCount;
+  assert(bb);
+  /* We get BB data address  */
+  data = bb_item_offset(bb, &data_desc,idxstack,idxstack_len);
+  
+  /* check index stack to handle index */
+  if ((idxstack_len>0) && (data_desc.dimension > 1)){
+    idx = idxstack[idxstack_len-1];
+    if (idx>=0) {
+      ibeg=0;
+      iend=1;
+    } else {
+      ibeg=0;
+      iend=data_desc.dimension;
+    }
+  } else {
+    idx = 0;
+    ibeg=0;
+    iend=data_desc.dimension;
+  }
+
+  /* 
+   * If we have character this means we want
+   * a character-like or string-like display 
+   * HEX dump should be for UINT8/16/32/64
+   */
+  if ((E_BB_CHAR ==data_desc.type) ||
+      (E_BB_UCHAR==data_desc.type)) {
+    charNullCount = 0;
+    for (i=ibeg; i< iend; ++i) {
+      if ('\0'==((char*) data)[i]) {
+	charNullCount++;
+      } else {
+	if (charNullCount>0) {
+	  fprintf(pf,"(%d*'\\0')",charNullCount);
+	  charNullCount = 0;
+	}
+	if (isprint((int)data[i])) {
+	  fprintf(pf,"%c",((char*) data)[i]);
+	} else {
+	  fprintf(pf," 0x%02X ",((char*) data)[i]);
+	}
+      }
+    }
+    if (charNullCount>0) {
+      fprintf(pf," (%d*'\\0')",charNullCount);
+      charNullCount = 0;
+    }
+
+/*     fprintf(pf," (0x"); */
+/*     for (i=ibeg; i< iend; ++i) { */
+/*       fprintf(pf,"%02x",((char*) data)[i]); */
+/*     } */
+/*     fprintf(pf,")"); */
+  } else {
+
+    for (i=ibeg; i< iend; ++i) {    
+      switch (data_desc.type) {
+      case E_BB_DOUBLE: 
+	fprintf(pf,"%1.16f ",((double*) data)[i]);
+	break;
+      case E_BB_FLOAT:
+	fprintf(pf,"%f ",((float*) data)[i]);
+	break;
+      case E_BB_INT8:
+	fprintf(pf,"%d ",((int8_t*) data)[i]);
+	break;
+      case E_BB_INT16:
+	fprintf(pf,"%d ",((int16_t*) data)[i]);
+	break; 
+      case E_BB_INT32:
+	fprintf(pf,"%d ",((int32_t*) data)[i]);
+	break; 
+      case E_BB_INT64:
+	fprintf(pf,"%lld ",((int64_t*) data)[i]);
+	break;
+      case E_BB_UINT8:
+	fprintf(pf,"0x%x ",((uint8_t*) data)[i]);
+	break; 
+      case E_BB_UINT16:
+	fprintf(pf,"0x%x ",((uint16_t*) data)[i]);
+	break;
+      case E_BB_UINT32:
+	fprintf(pf,"0x%x ",((uint32_t*) data)[i]);
+	break;	
+      case E_BB_UINT64:
+	fprintf(pf,"0x%llx ",((uint64_t*) data)[i]);
+	break;	
+	/*     case E_BB_CHAR: */
+	/*       fprintf(pf,"0x%02x<%c> ",((char*) data)[i], */
+	/* 	      isprint((int)data[i]) ? ((char*) data)[i] : '?'); */
+	/*       break; */
+	/*     case E_BB_UCHAR: */
+	/*       fprintf(pf,"0x%02x<%c> ",((char*) data)[i], */
+	/* 	      isprint((int)data[i]) ? ((char*) data)[i] : '?'); */
+	/*       break;*/
+      case E_BB_USER:
+	for (j=0; j<data_desc.type_size; ++j) {
+	  fprintf(pf,"0x%02x ",((uint8_t*) data)[i*data_desc.type_size+j]);
+	  //bb_data_print(bb, *(&data_desc+1), pf);  
+	}
+	break; 
+      default:
+	fprintf(pf,"0x%x ",((char*) data)[i]);
+	break;
+      }
+    }
+  } 
+  return 0;
+} /* end of bb_value_print */
+
+int32_t 
+bb_data_print(volatile S_BB_T* bb, S_BB_DATADESC_T data_desc, FILE* pf,
+              int32_t* idxstack, int32_t idxstack_len) {
+   int32_t          aliasstack_size = MAX_ALIAS_LEVEL;
+   S_BB_DATADESC_T  aliasstack[MAX_ALIAS_LEVEL];
+   
+   aliasstack[0]=data_desc;		
+   bb_find_aliastack(bb, aliasstack, &aliasstack_size);
+   bb_data_header_print(data_desc,pf,-1,aliasstack_size);
+   bb_value_print(bb,data_desc,pf,idxstack,idxstack_len);
+   bb_data_footer_print(data_desc,pf,-1,aliasstack_size);
+   return BB_OK;
+} /* end of bb_data_print */
+#endif /* !__KERNEL__ */
+
+int32_t bb_create(S_BB_T** bb, 
+	       const char* pc_bb_name,
+	       int32_t n_data,
+	       int32_t data_size) {
+
+	enum bb_type type;
+	int32_t retcode;
+	assert(bb);
+
+	type = bb_type(pc_bb_name);
+	retcode = ops[type]->bb_shmem_get(bb, pc_bb_name, n_data, data_size, 1);
+	if (retcode != BB_OK)
+		goto err;
+
+	retcode = ops[(*bb)->type]->bb_sem_get(*bb, 1);
+	if (retcode != BB_OK)
+		goto err;
+
+	retcode = ops[(*bb)->type]->bb_msgq_get(*bb, 1);
+
+	err:
+	return retcode;
+	} /* end of bb_create */
+	
+#ifdef __KERNEL__
+EXPORT_SYMBOL_GPL(bb_create);
+#endif
+
+int32_t 
+bb_destroy(S_BB_T** bb) {
+  
+  int32_t retcode;
+  
+  assert(bb);
+  assert(*bb);  
+  /* 
+   * On signale la destruction en cours pour les processes qui
+   * resteraient attach�s
+   */
+  (*bb)->status = BB_STATUS_DESTROYED;
+  retcode = ops[(*bb)->type]->bb_sem_destroy(*bb);
+  if (retcode != BB_OK)
+  	goto out;
+  retcode = ops[(*bb)->type]->bb_msgq_destroy(*bb);
+  if (retcode != BB_OK)
+  	goto out;
+  retcode = ops[(*bb)->type]->bb_shmem_destroy(bb);
+  if (retcode != BB_OK)
+  	goto out;
+    
+out:
+  return retcode;
+} /* end of bb_destroy */
+
+int32_t
+bb_data_memset(S_BB_T* bb, const char c) { 
+  int32_t retcode;  
+  assert(bb);
+  retcode = 0;
+  memset(bb_data(bb),c,bb->max_data_size);
+  return retcode;
+} /* end of bb_data_memset */
+
+int32_t 
+bb_lock(volatile S_BB_T* bb) {
+  return ops[bb->type]->bb_unlock(bb);
+} /* end of bb_lock */
+
+int32_t 
+bb_unlock(volatile S_BB_T* bb) {
+  
+  return ops[bb->type]->bb_unlock(bb);
+} /* end of bb_unlock */
+
+int32_t 
+bb_attach(S_BB_T** bb, const char* pc_bb_name) 
+{
+  enum bb_type type;
+  int ret;
+
+  type = bb_type(pc_bb_name);
+  ret = ops[type]->bb_shmem_attach(bb, pc_bb_name);
+  if (ret != BB_OK)
+    return ret;
+
+  /* older versions don't support name encoding */
+  if ((*bb)->bb_version_id < 0x0004000)
+    return ret;
+
+#ifndef __KERNEL__
+  if (bb_varname_init(*bb) != BB_OK) {
+    bb_logMsg(BB_LOG_WARNING, "%s", "Could not setup a proper varname encoding scheme\n");
+  }
+#endif
+  return ret;
+} /* end of bb_attach */
+
+int32_t
+bb_detach(S_BB_T** bb) {
+  assert(bb);
+  assert(*bb);
+
+  return ops[(*bb)->type]->bb_shmem_detach(bb);
+} /* end of bb_detach */
+
+void*
+bb_publish(volatile S_BB_T *bb, S_BB_DATADESC_T* data_desc) {
+  void* retval;
+  int32_t needed_size;
+  char *n;
+
+  retval = NULL;
+  assert(bb);
+  assert(data_desc);
+
+  /* Verify that the published data is not already published
+   * (key unicity) and trigger automatic subscribe
+   * if key already exists.
+   */
+  bb_lock(bb);
+  n = bb_get_varname(data_desc);
+  if (bb_find(bb, n) != -1) {
+    char *name = bb_get_varname(data_desc);
+    bb_logMsg(BB_LOG_FINER,"BlackBoard::bb_publish",
+        "Key <%s> already exists in blackboard (automatic subscribe)!!", name);
+    free(name);
+    bb_unlock(bb);
+    retval = bb_subscribe(bb,data_desc);
+    bb_lock(bb);
+  } else {
+    /* compute required data size  */
+    needed_size = data_desc->type_size*data_desc->dimension;
+    /* verify available space in BB data descriptor zone */
+    if (bb->n_data >= bb->max_data_desc_size) {
+      bb_logMsg(BB_LOG_SEVERE,"BlackBoard::bb_publish",
+		"No more room in BB data descriptor!! [current n_data=%d]",
+		bb->n_data);
+      /* verify available space in BB data zone */
+    } else if ((bb->max_data_size-bb->data_free_offset) < needed_size) {
+      bb_logMsg(BB_LOG_SEVERE,"BlackBoard::bb_publish",
+		"No more room in BB data zone!! [left <%d> byte(s) out of <%d> required]",
+		bb->max_data_size-bb->data_free_offset,needed_size);
+    } else {
+      /* Compute the free address */
+      retval = (char*) bb_data(bb) + bb->data_free_offset;
+      /* Update returned data descriptor */
+      data_desc->data_offset = bb->data_free_offset;
+      /* this is not an alias */
+      data_desc->alias_target = -1;
+      /* Update next free address */
+      bb->data_free_offset  = bb->data_free_offset + needed_size;
+      /* Update data descriptor zone */
+      bb_data_desc(bb)[bb->n_data] = *data_desc;
+      /* Increment number of published data */
+      bb->n_data++;
+    }
+    /* initialize publish data zone with default value */
+    bb_data_initialise(bb,data_desc,NULL);
+  }
+  free(n);
+  /* no init in case of automatic subscribe */
+  bb_unlock(bb);
+  return retval;
+} /* end of bb_publish */
+
+void*
+bb_subscribe(volatile S_BB_T *bb, S_BB_DATADESC_T* data_desc) {
+	int32_t indexstack[MAX_ALIAS_LEVEL];
+  	/* zero out indexstack */
+	memset(indexstack,0,MAX_ALIAS_LEVEL*sizeof(int32_t));
+
+	return bb_alias_subscribe(bb,data_desc, indexstack,MAX_ALIAS_LEVEL);
+} /* end of bb_subscribe */
+
+void*
+bb_item_offset(volatile S_BB_T *bb, 
+	       S_BB_DATADESC_T* data_desc,
+	       const int32_t* indexstack,
+	       const int32_t indexstack_len) {
+  
+  void* retval;
+  S_BB_DATADESC_T  aliasstack[MAX_ALIAS_LEVEL];
+  int32_t          aliasstack_size = MAX_ALIAS_LEVEL;
+  int32_t          myIndexstack[MAX_ALIAS_LEVEL];
+  int32_t          i,j;
+  
+  retval = NULL;
+  assert(bb);
+  assert(data_desc);
+
+  /* zero out indexstack */
+  memset(myIndexstack,0,MAX_ALIAS_LEVEL*sizeof(int32_t));
+  /* We seek the data using its key (name) */
+
+  /* ********** ALIAS publish case **************** */
+  if (bb_isalias(data_desc)) {
+
+    /* rebuild alias stack beginning with current symbol */
+    aliasstack[0] = *data_desc;
+    if (!bb_find_aliastack(bb,aliasstack,&aliasstack_size)) {
+      /* fill index stack with missing 0 (scalar case) */
+      /* provided stack index is inverted */
+      for (i=0,j=indexstack_len-1;i<aliasstack_size;++i) {
+	if (1==aliasstack[i].dimension) {
+	  myIndexstack[i] = 0;
+	} else {
+	  /* *** FIXME check provided indexstack length 
+	     *** in order to avoid buffer overflow 
+	     *** */
+	  if (j>=0) {
+	    myIndexstack[i] = indexstack[j];
+	    --j;
+	  } else {
+	    myIndexstack[i] = 0;
+	  }
+	}		
+      }
+      /* force last index (first on stack) to zero */
+      if (data_desc->type == E_BB_USER){
+	myIndexstack[0] = 0;
+      }
+      retval = (char*) bb_data(bb) + 
+	bb_aliasstack_offset(aliasstack,myIndexstack,aliasstack_size);	    
+    } else {
+      bb_logMsg(BB_LOG_SEVERE,
+		"Blackboard::bb_item_offset",
+		"Cannot resolve alias stack!!");
+      retval = NULL;
+    }
+  }
+  /* ********** GENUINE publish case **************** */ 
+  else {
+    retval = (char*) bb_data(bb) + 
+      data_desc->data_offset + 
+      /* if indexstack_len is not greater than 0 then indexstack[0] have no sense */ 
+      (indexstack_len>0 ? (indexstack[0])*(data_desc->type_size) :  0 ) ;
+  }
+  return retval;
+} /* end of bb_item_offset */
+
+
+#ifndef __KERNEL__
+
+int32_t 
+bb_dump(volatile S_BB_T *bb, FILE* p_filedesc) {  
+  
+  int32_t retcode;
+  /* char syserr[MAX_SYSMSG_SIZE]; */
+  int32_t i;
+  int32_t j;
+  int32_t indexstack[MAX_ALIAS_LEVEL];
+  int32_t indexstack_len;
+  int32_t          aliasstack_size = MAX_ALIAS_LEVEL;
+  S_BB_DATADESC_T  aliasstack[MAX_ALIAS_LEVEL];
+  int32_t array_in_aliasstack;
+
+  
+  retcode = BB_OK;
+  assert(bb);
+  fprintf(p_filedesc,"============= <[begin] BlackBoard [%s] [begin] > ===============\n",
+	  bb->name);
+  fprintf(p_filedesc,"  @start blackboard    = 0x%x\n",(unsigned int) (bb));
+  fprintf(p_filedesc,"  stored data          = %d / %d [max desc]\n",
+	  bb->n_data,
+	  bb->max_data_desc_size);
+  fprintf(p_filedesc,"  free data size       = %ld / %ld\n",
+	  bb->max_data_size - bb->data_free_offset,
+	  bb->max_data_size);  
+  fprintf(p_filedesc,"  @data_desc           = 0x%x\n",
+	  (unsigned int) (bb_data_desc(bb)));
+  fprintf(p_filedesc,"  @data                = 0x%x\n",
+	  (unsigned int) (bb_data(bb)));
+  fprintf(p_filedesc,"================ < [begin] Data [begin] > ==================\n");
+  for (i=0;i<bb->n_data;++i) {
+    /* NON ALIAS CASE */
+    if ((bb_data_desc(bb)[i]).alias_target == -1) {
+      indexstack[0]  = 0;
+      indexstack_len = 0;
+      bb_data_print(bb,bb_data_desc(bb)[i],p_filedesc,indexstack, indexstack_len);
+    }
+    /* ALIAS CASE */
+    else {
+      array_in_aliasstack = 0;
+      aliasstack[0]=bb_data_desc(bb)[i];
+      aliasstack_size = MAX_ALIAS_LEVEL;
+      bb_find_aliastack(bb, aliasstack, &aliasstack_size);
+      /*		for (j=0; j<aliasstack_size; j++){
+	if (aliasstack[j].dimension>1){
+	array_in_aliasstack = 1;
+	}
+	}
+	if (!array_in_aliasstack)*/
+      if ((aliasstack[aliasstack_size-1].dimension) <= 1) {
+	for (j=0; j<bb_data_desc(bb)[i].dimension; j++){
+	  indexstack[0] = j;
+	  indexstack_len = 1;
+	  bb_data_print(bb, bb_data_desc(bb)[i], p_filedesc,indexstack, indexstack_len);
+	  
+	}
+      }
+      
+      else {
+	for (j=0; j<aliasstack[aliasstack_size-1].dimension; j++){
+	  indexstack[0] = j;
+	  indexstack_len = 1;
+	  bb_data_print(bb, bb_data_desc(bb)[i], p_filedesc,indexstack, indexstack_len);
+	  
+	}			
+      }             
+    }
+  }
+  fprintf(p_filedesc,"================== < [end] Data [end] > ====================\n");
+  fprintf(p_filedesc,"============== < [end] BlackBoard [%s] [end] > ================\n",
+	  bb->name);
+  
+  return retcode;
+} /* end of bb_dump */
+
+#endif /* ! __KERNEL__ */
+
+int32_t
+bb_get_nb_max_item(volatile S_BB_T *bb) {
+  
+  int32_t retval;  
+  
+  
+  retval = -1;
+  assert(bb);
+  
+  retval = bb->max_data_desc_size;
+  
+  return retval;
+}
+
+int32_t
+bb_get_nb_item(volatile S_BB_T *bb) {
+
+  
+  int32_t retval;  
+  
+  
+  retval = -1;
+  assert(bb);
+  
+  retval = bb->n_data;
+  
+  return retval;
+}
+
+int32_t
+bb_get_mem_size(volatile S_BB_T *bb) {
+
+  
+  int32_t retval;  
+  
+  
+  retval = -1;
+  assert(bb);
+  
+  retval = bb_size(bb->max_data_desc_size,
+			bb->max_data_size);
+  
+  return retval;
+}
+
+int32_t 
+bb_shadow_get(S_BB_T *bb_shadow,
+	      volatile S_BB_T *bb_src) {
+  
+  int32_t retcode;
+
+  bb_lock(bb_src);  
+  assert(bb_src);
+  assert(bb_shadow);
+  retcode = BB_OK;
+  /* raw copy of BB */
+  memcpy(bb_shadow,
+	 (void*)bb_src,
+	 bb_get_mem_size(bb_src));
+  bb_shadow->status = BB_STATUS_SHADOW;
+  bb_unlock(bb_src);
+  
+  return retcode;
+}
+
+int32_t 
+bb_shadow_update_data(S_BB_T *bb_shadow,
+		      volatile S_BB_T *bb_src) {  
+  int32_t retcode;
+  
+  assert(bb_src);
+  assert(bb_shadow);
+  retcode = BB_OK;
+  bb_lock(bb_src);
+  /* raw copy of BlackBoard data zone content
+   * (in fact only used part of the data zone, 
+   *  we do not copy unused part) */
+  memcpy(bb_data(bb_shadow),
+	 bb_data(bb_src),
+	 bb_shadow->data_free_offset);
+  bb_unlock(bb_src);
+  
+  return retcode;
+} /* end of bb_shadow_update_data */
+
+
+int32_t 
+bb_snd_msg(volatile S_BB_T *bb,
+		S_BB_MSG_T* msg) {
+  
+  int32_t retcode;
+  
+  retcode = BB_OK;
+  assert(bb);
+  return ops[bb->type]->bb_msgq_send(bb, msg);
+} /* end of bb_snd_msg */
+
+
+int32_t 
+bb_rcv_msg(volatile S_BB_T *bb,
+		S_BB_MSG_T* msg) {
+    
+  assert(bb);
+
+  return ops[bb->type]->bb_msgq_recv(bb, msg);
+} /* end of bb_rcv_msg */
+
+
+int32_t
+bb_get_array_name(char * array_name,
+		  int array_name_size_max,
+		  S_BB_DATADESC_T * aliasstack, int32_t aliasstack_size,
+		  int32_t * indexstack, int32_t indexstack_len) {
+
+  char * part_of_name;
+  int32_t indexstack_curr;
+  int j;
+    
+#ifdef __KERNEL__
+  part_of_name = kmalloc(array_name_size_max, GFP_KERNEL);
+#else
+  part_of_name = malloc(array_name_size_max);
+#endif /* __KERNEL__ */
+
+  indexstack_curr = 0;
+  for (j=aliasstack_size-1; j>=0; j--) {
+    /* If this alias is an array */
+    if (aliasstack[j].dimension > 1) {
+      if (j==aliasstack_size-1) {
+        char *n = bb_get_varname(&aliasstack[j]);
+        snprintf(part_of_name, array_name_size_max, "%s[%0d]", n,
+            indexstack[indexstack_curr]);
+        free(n);
+      } else {
+        char *n1, *n2;
+        n1 = bb_get_varname(&aliasstack[j]);
+        n2 = bb_get_varname(&aliasstack[j+1]);
+        snprintf(part_of_name, array_name_size_max, "%s[%0d]",
+            strstr(n1, n2 + strlen(n2)),
+            indexstack[indexstack_curr]);
+        free(n1);
+        free(n2);
+      }      
+      strncat(array_name, part_of_name, array_name_size_max-strlen(array_name));
+      /* go to next index in the index stack */
+      indexstack_curr++;
+    }
+    /* The current alias is a scalar */
+    else {
+      char *n1, *n2;
+      if (j==aliasstack_size-1){
+        n1 = bb_get_varname(&aliasstack[j]);
+        snprintf(part_of_name, array_name_size_max, "%s", n1);
+        free(n1);
+      } else {
+        n1 = bb_get_varname(&aliasstack[j]);
+        n2 = bb_get_varname(&aliasstack[j+1]);
+        snprintf(part_of_name, array_name_size_max, "%s",
+            strstr(n1, n2 + strlen(n2)));
+        free(n1);
+        free(n2);
+      }
+      strncat(array_name, part_of_name, array_name_size_max-strlen(array_name));
+    }
+  }
+  free (part_of_name);
+  return BB_OK;
+
+} /* end of get_array_name */
+
+int32_t
+bb_msgq_isalive(S_BB_T *bb)
+{
+	return ops[bb->type]->bb_msgq_isalive(bb);
+}
+
+#ifdef __KERNEL__
+int32_t 
+bb_logMsg(const BB_LOG_LEVEL_T level, const char* who, char* fmt, ...) 
+{
+	va_list args;	
+	char message[2048];
+
+	memset(message,0,2048);
+	va_start(args, fmt);
+	vsnprintf(message, 2048, fmt, args);
+	va_end(args);
+	printk("bb: %s : %s", who, message);
+	return 0;
+}
+#else
+int32_t 
+bb_logMsg(const BB_LOG_LEVEL_T level, const char* who, char* fmt, ...) {
+  va_list args;
+  char message[2048];
+  char *tmp_str;
+
+  memset(message,0,2048);
+  va_start(args, fmt);
+  vsnprintf(message, 2048, fmt, args);
+  va_end(args);
+  /* add strerror, if needed */
+  if (errno != 0) {
+    tmp_str = strdup(message);
+    if (!tmp_str) {
+      	printf("Cannot allocate memory for message %s\n", message);
+	return BB_NOK;
+    }
+    snprintf(message, 2048, "%s: %s", tmp_str, strerror(errno));
+
+    free(tmp_str);
+  }
+  
+  switch (level) {
+    
+  case BB_LOG_ABORT:
+  case BB_LOG_SEVERE:
+    STRACE_ERROR(("%s : %s",who,message));
+    break;
+  case BB_LOG_WARNING:
+    STRACE_WARNING(("%s : %s",who,message));
+    break;
+  case BB_LOG_INFO:
+  case BB_LOG_CONFIG:
+    STRACE_INFO(("%s : %s",who,message));
+    break;
+  case BB_LOG_FINE:
+  case BB_LOG_FINER:
+    STRACE_DEBUG(("%s : %s",who,message));
+
+  }
+  return 0;
+} /* end of bb_logMsg */
+
+#endif /* __KERNEL__ */
+
+
Les fichiers binaires tsp-0.8.3-Source-Reference/src/util/libcalc/calc_func.o et tsp-0.8.3-Source-Rtems/src/util/libcalc/calc_func.o sont différents.
