Index: src/core/Makefile
===================================================================
--- src/core/Makefile	(révision 4)
+++ src/core/Makefile	(révision 205)
@@ -1,238 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.2
-
-#=============================================================================
-# Set environment variables for the build.
-
-# The shell in which to execute make rules.
-SHELL = /bin/sh
-
-# The CMake executable.
-CMAKE_COMMAND = /usr/bin/cmake
-
-# The command to remove a file.
-RM = /usr/bin/cmake -E remove -f
-
-# The program to use to edit the cache.
-CMAKE_EDIT_COMMAND = /usr/bin/ccmake
-
-# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /home/noularde/TSP/tsp_all/tsp
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/noularde/TSP/tsp_all/tsp
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-# Special rule to run installation script.
-install: all
-	$(CMAKE_COMMAND) -P cmake_install.cmake
-
-# Special rule to re-run CMake using make.
-rebuild_cache:
-	@echo "Running CMake to regenerate build system..."
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule to re-run CMake cache editor using make.
-edit_cache:
-	@echo "Running CMake cache editor..."
-	$(CMAKE_EDIT_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# The main all target
-all:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/core/directorystart
-
-# The main clean target
-clean:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/core/clean
-
-# clear depends
-depend:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-
-# Convenience name for target.
-src/core/CMakeFiles/tsp_common.dir/rule:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/core/CMakeFiles/tsp_common.dir/rule
-
-# Convenience name for target.
-tsp_common: src/core/CMakeFiles/tsp_common.dir/rule
-
-# Convenience name for target.
-src/core/CMakeFiles/tsp_consumer.dir/rule:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/core/CMakeFiles/tsp_consumer.dir/rule
-
-# Convenience name for target.
-tsp_consumer: src/core/CMakeFiles/tsp_consumer.dir/rule
-
-# Convenience name for target.
-src/core/CMakeFiles/tsp_provider.dir/rule:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/core/CMakeFiles/tsp_provider.dir/rule
-
-# Convenience name for target.
-tsp_provider: src/core/CMakeFiles/tsp_provider.dir/rule
-
-# Convenience name for target.
-src/core/CMakeFiles/tsp_services.dir/rule:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f CMakeFiles/Makefile2 src/core/CMakeFiles/tsp_services.dir/rule
-
-# Convenience name for target.
-tsp_services: src/core/CMakeFiles/tsp_services.dir/rule
-
-# target for object file
-tsp_client.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_consumer.dir/build.make src/core/CMakeFiles/tsp_consumer.dir/tsp_client.o
-
-# target for object file
-tsp_common.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_common.dir/build.make src/core/CMakeFiles/tsp_common.dir/tsp_common.o
-
-# target for object file
-tsp_common_as.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_common.dir/build.make src/core/CMakeFiles/tsp_common.dir/tsp_common_as.o
-
-# target for object file
-tsp_common_request.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_common.dir/build.make src/core/CMakeFiles/tsp_common.dir/tsp_common_request.o
-
-# target for object file
-tsp_common_ssei.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_common.dir/build.make src/core/CMakeFiles/tsp_common.dir/tsp_common_ssei.o
-
-# target for object file
-tsp_common_ssi.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_common.dir/build.make src/core/CMakeFiles/tsp_common.dir/tsp_common_ssi.o
-
-# target for object file
-tsp_common_status.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_common.dir/build.make src/core/CMakeFiles/tsp_common.dir/tsp_common_status.o
-
-# target for object file
-tsp_consumer.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_consumer.dir/build.make src/core/CMakeFiles/tsp_consumer.dir/tsp_consumer.o
-
-# target for object file
-tsp_data_receiver.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_consumer.dir/build.make src/core/CMakeFiles/tsp_consumer.dir/tsp_data_receiver.o
-
-# target for object file
-tsp_data_sender.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_data_sender.o
-
-# target for object file
-tsp_datapool.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_datapool.o
-
-# target for object file
-tsp_decoder.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_common.dir/build.make src/core/CMakeFiles/tsp_common.dir/tsp_decoder.o
-
-# target for object file
-tsp_default_glu.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_default_glu.o
-
-# target for object file
-tsp_encoder.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_common.dir/build.make src/core/CMakeFiles/tsp_common.dir/tsp_encoder.o
-
-# target for object file
-tsp_filter_symbol.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_filter_symbol.o
-
-# target for object file
-tsp_group.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_consumer.dir/build.make src/core/CMakeFiles/tsp_consumer.dir/tsp_group.o
-
-# target for object file
-tsp_group_algo.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_group_algo.o
-
-# target for object file
-tsp_mtgprof.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_services.dir/build.make src/core/CMakeFiles/tsp_services.dir/tsp_mtgprof.o
-
-# target for object file
-tsp_provider.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_provider.o
-
-# target for object file
-tsp_provider_init.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_provider_init.o
-
-# target for object file
-tsp_request_handler.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_request_handler.o
-
-# target for object file
-tsp_rpc_clnt.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_consumer.dir/build.make src/core/CMakeFiles/tsp_consumer.dir/tsp_rpc_clnt.o
-
-# target for object file
-tsp_rpc_confprogid.o:
-	cd /home/noularde/TSP/tsp_all/tsp && cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_consumer.dir/build.make src/core/CMakeFiles/tsp_consumer.dir/tsp_rpc_confprogid.o
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_rpc_confprogid.o
-
-# target for object file
-tsp_rpc_svc.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_rpc_svc.o
-
-# target for object file
-tsp_rpc_xdr.o:
-	cd /home/noularde/TSP/tsp_all/tsp && cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_consumer.dir/build.make src/core/CMakeFiles/tsp_consumer.dir/tsp_rpc_xdr.o
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_rpc_xdr.o
-
-# target for object file
-tsp_server.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_server.o
-
-# target for object file
-tsp_session.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_session.o
-
-# target for object file
-tsp_stream_receiver.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_consumer.dir/build.make src/core/CMakeFiles/tsp_consumer.dir/tsp_stream_receiver.o
-
-# target for object file
-tsp_stream_sender.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_provider.dir/build.make src/core/CMakeFiles/tsp_provider.dir/tsp_stream_sender.o
-
-# target for object file
-tsp_time.o:
-	cd /home/noularde/TSP/tsp_all/tsp && $(MAKE) -f src/core/CMakeFiles/tsp_services.dir/build.make src/core/CMakeFiles/tsp_services.dir/tsp_time.o
-
-# Help Target
-help::
-	@echo "The following are some of the valid targets for this Makefile:"
-	@echo "... all (the default if no target is provided)"
-	@echo "... clean"
-	@echo "... depend"
-	@echo "... install"
-	@echo "... rebuild_cache"
-	@echo "... tsp_common"
-	@echo "... tsp_consumer"
-	@echo "... tsp_provider"
-	@echo "... tsp_services"
-
-
-
-#=============================================================================
-# Special targets to cleanup operation of make.
-
-# Special rule to run CMake to check the build system integrity.
-# No rule that depends on this can have commands that come from listfiles
-# because they might be regenerated.
-cmake_check_build_system:
-	$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Index: src/core/include/tsp_prjcfg.h
===================================================================
--- src/core/include/tsp_prjcfg.h	(révision 4)
+++ src/core/include/tsp_prjcfg.h	(révision 205)
@@ -1,60 +0,0 @@
-/* -*- c -*-
-
-/home/noularde/TSP/tsp_all/tsp/src/core/include/tsp_prjcfg.h generated from include/tsp_prjcfg.h.in by CMake.
-
-$Id: tsp_prjcfg.h.in,v 1.8 2006/02/26 13:36:05 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/noularde/TSP/tsp_all/tsp/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.cvs"
-
-#include <tsp_simple_trace.h>
-
-/* 
- * The TSP doxygen modules are now defined
- * in tsp/src/doxy/tsp_doc_tree.dox
- */
-
-
-#endif /* _PRJCFG_H */
Index: src/core/include/Makefile
===================================================================
--- src/core/include/Makefile	(révision 4)
+++ src/core/include/Makefile	(révision 205)
@@ -1,11 +0,0 @@
-include $(DEVBASE)/make/Makeparams
-
-XINC = tsp_prjcfg.h tsp_abs_types.h tsp_const_def.h tsp_simple_trace.h tsp_sys_headers.h \
-       tsp_glu.h
-
-build:: export_include
-
-destroy::
-	$(MAKE) remove_include
-
-include $(DEVBASE)/make/Makerules
Index: src/core/include/tsp_const_def.h
===================================================================
--- src/core/include/tsp_const_def.h	(révision 4)
+++ src/core/include/tsp_const_def.h	(révision 205)
@@ -45,7 +45,7 @@
 #define TSP_PROTOCOL_VERSION 0x00010001
 
 /* we need abstract types for multi-platform portability */
-#include <tsp_abs_types.h>
+#include "tsp_abs_types.h"
 
 #define TSP_MAX_SYSMSG_SIZE 256
 
@@ -88,10 +88,12 @@
 
 /** 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)
 /* till now, all elements are doubles, but there will be strings, raw, etc ... */
-#define TSP_DATA_STREAM_MAX_ITEM_SIZE sizeof(double)*8096
+#define TSP_DATA_STREAM_MAX_ITEM_SIZE sizeof(double)*10
 #define TSP_DATA_STREAM_MAX_BUFFER_SIZE(max_nb_items) \
-             ( (max_nb_items) * TSP_DATA_STREAM_MAX_ITEM_SIZE \
+  ( ((max_nb_items) * TSP_DATA_STREAM_MAX_ITEM_SIZE) > TSP_DATA_STREAM_MAX_BUFFER_MAXSIZE ? TSP_DATA_STREAM_MAX_BUFFER_MAXSIZE :  (max_nb_items) * TSP_DATA_STREAM_MAX_ITEM_SIZE \
                               + TSP_DATA_STREAM_MAX_HEADER_SIZE)
 
 
Index: src/core/include/tsp_glu.h
===================================================================
--- src/core/include/tsp_glu.h	(révision 4)
+++ src/core/include/tsp_glu.h	(révision 205)
@@ -40,7 +40,9 @@
 
 #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;
 
@@ -148,23 +150,23 @@
  * 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* this);
+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* this);
+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* this);
+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* this);
+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
@@ -194,7 +196,7 @@
  * 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* this, int32_t custom_argc, char* custom_argv[], char** error_info);
+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.
  *
@@ -243,20 +245,20 @@
  * @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* this,int32_t fallback_argc, char* fallback_argv[]);
+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* this);
+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* this);
+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
@@ -264,51 +266,51 @@
  * @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* this, TSP_sample_symbol_info_list_t* symbol_list, int* pg_indexes);
+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* this, TSP_sample_symbol_info_list_t* symbol_list);
+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] this Handle for the GLU (when the GLU is ACTIVE, it is always equal to GLU_GLOBAL_HANDLE)
+ * @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* this, int32_t filter_kind, char* filter_string, TSP_answer_sample_t* symbol_list);
+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] this Handle for the GLU (when the GLU is ACTIVE, it is always equal to GLU_GLOBAL_HANDLE)
+ * @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* this, int* pgis, int32_t pgis_len, TSP_sample_symbol_info_list_t* SSI_list);
+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] this Handle for the GLU (when the GLU is ACTIVE, it is always equal to GLU_GLOBAL_HANDLE)
+ * @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* this, int* pgis, int32_t pgis_len, TSP_sample_symbol_extended_info_list_t* SSEI_list);
+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* this);
+typedef int32_t                (* GLU_get_nb_symbols_ft  )(struct GLU_handle_t* cthis);
 
 /**
  * GLU asynchronous sample write.
@@ -322,7 +324,7 @@
  * @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* this, int32_t pgi, void* value_ptr, uint32_t value_size);
+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.
@@ -336,7 +338,7 @@
  * @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* this, int32_t pgi, void* value_ptr, uint32_t* value_size);
+typedef int32_t                (* GLU_async_sample_read_ft)(struct GLU_handle_t* cthis, int32_t pgi, void* value_ptr, uint32_t* value_size);
 
                 
 /** 
@@ -445,7 +447,7 @@
  * @param[in] base_frequency the base frequency that will be advertised by the TSP provider
  * @return TRUE if ok FALSE otherwise
  */
-int32_t GLU_handle_create(GLU_handle_t** glu, const char* name, const GLU_server_type_t type, const double base_frequency);
+_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.
Index: src/core/include/tsp_simple_trace.h
===================================================================
--- src/core/include/tsp_simple_trace.h	(révision 4)
+++ src/core/include/tsp_simple_trace.h	(révision 205)
@@ -55,7 +55,7 @@
            printf text; printf("\n"); fflush(stdout);\
     }\
 } 
-#ifdef __GNUC__       
+#if defined(__GNUC__) || defined(_MSC_VER)
 #  define SIMPLE_TRACE(level,src,text) SIMPLE_TRACE_FUNC(level,src,__FUNCTION__,text)
 #else 
 #  define SIMPLE_TRACE(level,src,text) SIMPLE_TRACE_FUNC(level,src,"where?",text)
Index: src/core/include/tsp_abs_types.h
===================================================================
--- src/core/include/tsp_abs_types.h	(révision 4)
+++ src/core/include/tsp_abs_types.h	(révision 205)
@@ -45,8 +45,8 @@
 #undef BEGIN_C_DECLS
 #undef END_C_DECLS
 #ifdef __cplusplus
-# define BEGIN_C_DECLS extern "C" {
-# define END_C_DECLS }
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS }
 #else
 # define BEGIN_C_DECLS /* empty */
 # define END_C_DECLS /* empty */
@@ -63,6 +63,7 @@
 /*** Platform specific ***/
 
 /* SUN / sparc|i386 (32/64 bits) */
+/* AP : Migration sous Windows */
 #if  defined(__sun)
 # define TSP_BYTE_ORDER TSP_BIG_ENDIAN
 # define TSP_SYSTEM_HAVE_GETHRTIME
@@ -93,17 +94,68 @@
 #		define _INT32_T
 #	endif
 #	ifndef _UINT64_T
-		typedef u_longlong_t    uint64_t;
+	    typedef u_longlong_t        uint64_t;
 #		define _UINT64_T
 #	endif
 #	ifndef _INT64_T
-		typedef longlong_t    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__) )
@@ -116,7 +168,6 @@
 #endif /* Linux / Intel */
 
 
-
 /* Linux / Powerpc */ 							
 #if defined (__linux__) &&  defined (__powerpc__)  
 # include <stdint.h>							
Index: src/core/include/tsp_sys_headers.h
===================================================================
--- src/core/include/tsp_sys_headers.h	(révision 4)
+++ src/core/include/tsp_sys_headers.h	(révision 205)
@@ -52,14 +52,19 @@
 #define _POSIX_C_SOURCE 199506L
 #endif
 
+#ifndef WIN32
 #include <unistd.h>
-#include <assert.h>
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #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
 /*#include "fortify.h"*/
 
 
@@ -77,8 +82,10 @@
 #endif /* OSF1 / Alpha */
 
 #include <pthread.h>
+#ifndef WIN32
 #include <sys/time.h>
 #include <sys/param.h>
+#endif
 
 #ifdef VXWORKS
 /* VXWORKS part */
Index: src/core/include/tsp_prjcfg.h.in
===================================================================
--- src/core/include/tsp_prjcfg.h.in	(révision 4)
+++ src/core/include/tsp_prjcfg.h.in	(révision 205)
@@ -51,6 +51,38 @@
 
 #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
Index: src/core/ctrl/Makefile
===================================================================
--- src/core/ctrl/Makefile	(révision 4)
+++ src/core/ctrl/Makefile	(révision 205)
@@ -1,39 +0,0 @@
-include $(DEVBASE)/make/Makeparams
-
-XINC    = tsp_provider.h tsp_datapool.h tsp_default_glu.h
-#XINC    = tsp_provider.h tsp_session.h   glue_sserver.h tsp_datapool.h \
-          tsp_group_algo.h tsp_data_sender.h tsp_group_algo_data.h \
-          tsp_stream_sender.h tsp_request.h
-
-SOURCES = \
-	tsp_default_glu.c \
-	tsp_provider.c \
-	tsp_session.c \
-	tsp_datapool.c \
-	tsp_group_algo.c \
-	tsp_data_sender.c \
-	tsp_stream_sender.c \
-	tsp_request_handler.c \
-	tsp_filter_symbol.c
-
-
-OBJECTS=$(SOURCES:%.c=$(DIROBJ)/%.o) 
-
-TARGET=$(DIRLIB)/libtsp_provider.a
-
-CPPFLAGS += -I../rpc -I ../misc_utils
-
-CFLAGS += -Werror
-
-# -----------------------------------------------------------
-# No label all:: because it's in Makeparams and calls build::	
-# same thing for clean:: that calls destroy::
-# -----------------------------------------------------------
-
-build:: export_include $(TARGET)($(OBJECTS))
-
-destroy::
-	$(RM) 	$(TARGET)
-	$(MAKE) remove_include
-
-include $(DEVBASE)/make/Makerules
Index: src/core/ctrl/tsp_datapool.h
===================================================================
--- src/core/ctrl/tsp_datapool.h	(révision 4)
+++ src/core/ctrl/tsp_datapool.h	(révision 205)
@@ -91,27 +91,27 @@
 
 /**
  * Get the reverse list of global_index wanted by some consumers
- * @param[in] this the datapool object
+ * @param[in] cthis the datapool object
  * @param[in]  nb   pointer on where to store the number of items
  * @param[out] list pointer on list of global_index
  */ 
-void TSP_datapool_get_reverse_list (TSP_datapool_t* this, int *nb, int **list);
+_EXPORT_TSP_PROVIDER void TSP_datapool_get_reverse_list (TSP_datapool_t* cthis, int *nb, int **list);
 
 /**
  * Push GLU data into datapool.
- * @param[in,out] this  the datapool object
+ * @param[in,out] cthis  the datapool object
  * @param[in]     item  the GLU item to push in the datapool. The item is copied
  *                      and may be re-used on return.
  */ 
-int TSP_datapool_push_next_item(TSP_datapool_t* this, glu_item_t* item);
+_EXPORT_TSP_PROVIDER int TSP_datapool_push_next_item(TSP_datapool_t* cthis, glu_item_t* item);
 
 /**
  * End of push, we commit the whole
- * @param[in,out] this the datapool object to commit in.
+ * @param[in,out] cthis the datapool object to commit in.
  * @param[in] time_stamp  date of datapool items
  * @param[in] state ok or error (reconf,eof, ...)
  */ 
-int TSP_datapool_push_commit(TSP_datapool_t* this, time_stamp_t time_stamp, GLU_get_state_t state);
+_EXPORT_TSP_PROVIDER int TSP_datapool_push_commit(TSP_datapool_t* cthis, time_stamp_t time_stamp, GLU_get_state_t state);
 
 
 /**
@@ -137,20 +137,20 @@
  * Initialize datapool with provided GLU.
  * This function will allocate internal datapool structure.
  * After this datapool is ready to be used by the refered GLU.
- * @param[in,out] this the datapool to be initialized
+ * @param[in,out] cthis the datapool to be initialized
  * @param[in,out] glu the GLU to be linked with the datapool
  * @return TSP_STATUS_OK on success.
  */
 int32_t 
-TSP_datapool_initialize(TSP_datapool_t* this, GLU_handle_t* glu);
+TSP_datapool_initialize(TSP_datapool_t* cthis, GLU_handle_t* glu);
 
 /**
  * Initialize datapool with provided GLU.
- * @param[in,out] this the datapool to be finalized
+ * @param[in,out] cthis the datapool to be finalized
  * @return TSP_STATUS_OK on success.
  */
 int32_t 
-TSP_datapool_finalize(TSP_datapool_t* this);
+TSP_datapool_finalize(TSP_datapool_t* cthis);
 
 /**
  * Get the datapool instance for this GLU.
@@ -170,12 +170,12 @@
 
 /**
  * Get the address of a value in the datapool
- * @param this The datapool handle
+ * @param cthis The datapool handle
  * @param provider_global_index The index of the symbol that is searched
  * @return The data address
  */ 
 void* 
-TSP_datapool_get_symbol_value(TSP_datapool_t* this, 
+TSP_datapool_get_symbol_value(TSP_datapool_t* cthis, 
 			      int provider_global_index);
 
  
Index: src/core/ctrl/tsp_data_sender.c
===================================================================
--- src/core/ctrl/tsp_data_sender.c	(révision 4)
+++ src/core/ctrl/tsp_data_sender.c	(révision 205)
@@ -36,6 +36,12 @@
 -----------------------------------------------------------------------
  */
 
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
 #include <tsp_sys_headers.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
Index: src/core/ctrl/tsp_session.c
===================================================================
--- src/core/ctrl/tsp_session.c	(révision 4)
+++ src/core/ctrl/tsp_session.c	(révision 205)
@@ -41,6 +41,12 @@
 #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>
@@ -187,7 +193,7 @@
 } /* end of TSP_session_destroy_symbols_table */
 
 void 
-TSP_session_init(void) {
+TSP_session_init() {
   if( FALSE == X_initialized )
     {
       /* Mise a 0 de la zone memoire */
@@ -197,8 +203,9 @@
 }
 
 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_session_t* session;
+  /* TSP_session_t* session; */
   TSP_GET_SESSION(session,channel_id,NULL);  
   TSP_UNLOCK_MUTEX(&X_session_list_mutex,NULL);
   return session->session_data->glu_h;
@@ -232,7 +239,7 @@
 
 
 int 
-TSP_session_get_nb_session(void) {
+TSP_session_get_nb_session() {
   int client_number;
 
   TSP_LOCK_MUTEX(&X_session_list_mutex,-1);
@@ -671,12 +678,11 @@
 						TSP_sample_symbol_info_list_t* symbol_list)
 {
     TSP_session_t* session;
-    int ret=TRUE;
-    TSP_LOCK_MUTEX(&X_session_list_mutex,FALSE);
-    TSP_GET_SESSION(session, channel_id, FALSE);
     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"));
Index: src/core/ctrl/tsp_request_handler.c
===================================================================
--- src/core/ctrl/tsp_request_handler.c	(révision 4)
+++ src/core/ctrl/tsp_request_handler.c	(révision 205)
@@ -41,12 +41,12 @@
 #include "tsp_time.h"
 
 int 
-TSP_provider_rqh_manager_get_max_nb(void) {
+TSP_provider_rqh_manager_get_max_nb() {
   return TSP_MAX_REQUEST_HANDLERS;
 }
 
 int
-TSP_provider_rqh_manager_get_nb(void) {
+TSP_provider_rqh_manager_get_nb() {
 
   int retval = 0;
   int i;
@@ -63,7 +63,7 @@
 
 
 int 
-TSP_provider_rqh_manager_get_nb_running(void) {
+TSP_provider_rqh_manager_get_nb_running() {
 
   int retval = 0;
   STRACE_IO(("-->IN"));
@@ -137,7 +137,7 @@
 } /* End of TSP_provider_rqh_manager_install */
 
 int 
-TSP_provider_rqh_manager_init(void) {
+TSP_provider_rqh_manager_init() {
 
   int retval = TRUE;
   int i;
@@ -155,7 +155,12 @@
   rqh_manager_if.nb_running_rhq = 0;
   /* RAZ handlers array */ 
   for (i=0;i<TSP_provider_rqh_manager_get_max_nb();++i) {
+#if defined (WIN32)
+    /* structure pthread_t different under Windows */
+    rqh_manager_if.request_handlers[i].tid.p              = 0;
+#else
     rqh_manager_if.request_handlers[i].tid                = 0;
+#endif
     rqh_manager_if.request_handlers[i].status             = TSP_RQH_STATUS_NOTINSTALLED;
     rqh_manager_if.request_handlers[i].config_param       = NULL;
     rqh_manager_if.request_handlers[i].config             = NULL;
@@ -170,7 +175,7 @@
 
 
 int 
-TSP_provider_rqh_manager_refresh(void) {
+TSP_provider_rqh_manager_refresh() {
 
   int retval = TRUE, timeout;
   TSP_provider_request_handler_t *rqh_p;
@@ -227,7 +232,7 @@
 
 
 
-int TSP_provider_rqh_manager_end(void)
+int TSP_provider_rqh_manager_end()
 {
   int timeout;
   TSP_provider_request_handler_t *rqh_p;
@@ -272,7 +277,7 @@
 } /* end of TSP_provider_rqh_manager_end */
 
 
-void TSP_provider_rqh_manager_waitend(void) {
+void TSP_provider_rqh_manager_waitend() {
 
   STRACE_IO(("-->INT"));
 
Index: src/core/ctrl/tsp_session.h
===================================================================
--- src/core/ctrl/tsp_session.h	(révision 4)
+++ src/core/ctrl/tsp_session.h	(révision 205)
@@ -55,7 +55,7 @@
 /**
  * Session initialisation.
  */
-void TSP_session_init(void);
+void TSP_session_init();
 
 /**
  * Close a session.
@@ -175,7 +175,7 @@
  * Get current total number of session.
  * @return Total number of session
  */
-int TSP_session_get_nb_session(void);
+int TSP_session_get_nb_session();
 
 /**
  * Change session state to target newState.
Index: src/core/ctrl/tsp_request_handler.h
===================================================================
--- src/core/ctrl/tsp_request_handler.h	(révision 4)
+++ src/core/ctrl/tsp_request_handler.h	(révision 205)
@@ -166,7 +166,7 @@
  * of TSP_provider_request_handler.
  * @return the maximum number of (registrable) request handler
  */
-int TSP_provider_rqh_manager_get_max_nb(void);
+int TSP_provider_rqh_manager_get_max_nb();
 
 /**
  * Get the current number
Index: src/core/ctrl/tsp_provider.c
===================================================================
--- src/core/ctrl/tsp_provider.c	(révision 4)
+++ src/core/ctrl/tsp_provider.c	(révision 205)
@@ -35,6 +35,13 @@
 -----------------------------------------------------------------------
  */
 
+/* FIXME car sinon pb avec pthread_self*/
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+#include <pthread.h>
 #include <tsp_sys_headers.h>
 #include <tsp_provider.h>
 #include <tsp_filter_symbol.h>
@@ -116,6 +123,10 @@
   char* p;
   int ret = TRUE;
 
+  if (NULL==argv) {
+      return ret;
+  }
+
   /* FIXME : FUITE */
   X_argv = (char**)calloc(*argc, sizeof(char*));
   X_glu_argv = (char**)calloc(*argc, sizeof(char*));
@@ -123,7 +134,9 @@
   TSP_CHECK_ALLOC(X_argv, FALSE);
   TSP_CHECK_ALLOC(X_glu_argv, FALSE);
   /* Get program name anyway */
+  
   X_argv[0] = (*argv)[0];
+  
   for( i = 1 ; i < *argc && ret ; i++)
     {
       /* Is the arg a TSP arg ? */
@@ -246,11 +259,11 @@
 }
 
 int 
-TSP_provider_is_initialized(void) {
+TSP_provider_is_initialized() {
   return  X_tsp_provider_init_ok;
 }
 
-int TSP_provider_get_server_base_number(void)
+int TSP_provider_get_server_base_number()
 {
   return  X_server_base_number;
 }
@@ -396,9 +409,10 @@
 					  int filter_kind, char* filter_string,
 					  TSP_answer_sample_t* ans_sample) {
 
-  STRACE_REQUEST(("FILTERED INFORMATIONS channel_id=<%d>",req_info->channel_id));
-  TSP_LOCK_MUTEX(&X_tsp_request_mutex,);  
   GLU_handle_t* myGLU = NULL;
+
+  STRACE_REQUEST(("FILTERED INFORMATIONS channel_id=<%d>",req_info->channel_id));
+  TSP_LOCK_MUTEX(&X_tsp_request_mutex,);
   
   /* fill-in minimal info in answer_sample */
   TSP_provider_update_answer_with_minimalinfo(req_info->version_id,req_info->channel_id,
@@ -437,9 +451,11 @@
 TSP_provider_request_sample(TSP_request_sample_t* req_sample, 
 			    TSP_answer_sample_t* ans_sample) {
 
+  GLU_handle_t* myGLU;
+  
   STRACE_REQUEST(("SAMPLE channel_id=<%d>",req_sample->channel_id));
   TSP_LOCK_MUTEX(&X_tsp_request_mutex,);	
-  GLU_handle_t* myGLU;
+  
   /* Always re-init answer_sample */
   TSP_AS_finalize(ans_sample);
   TSP_provider_update_answer_with_minimalinfo(req_sample->version_id,
Index: src/core/ctrl/tsp_default_glu.c
===================================================================
--- src/core/ctrl/tsp_default_glu.c	(révision 4)
+++ src/core/ctrl/tsp_default_glu.c	(révision 205)
@@ -37,7 +37,11 @@
 -----------------------------------------------------------------------
  */
 
-#include <assert.h>
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
 #include <stdlib.h>
 #include <pthread.h>
 
@@ -54,7 +58,12 @@
   *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;
@@ -152,7 +161,12 @@
 
 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;
Index: src/core/ctrl/tsp_stream_sender.c
===================================================================
--- src/core/ctrl/tsp_stream_sender.c	(révision 4)
+++ src/core/ctrl/tsp_stream_sender.c	(révision 205)
@@ -35,14 +35,23 @@
 -----------------------------------------------------------------------
  */
 
-#include <unistd.h>  
-#include <netdb.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <sys/socket.h>
 #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
 
-#ifndef VXWORKS
+#if !defined (VXWORKS) && !defined(WIN32)
 #include <strings.h> /* for bzero */
 #endif
 #include <string.h>  /* for bzero too :=} */
@@ -119,11 +128,13 @@
 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* signal(int signo, Sigfunc* func)
-{
+Sigfunc* MySignal(int signo, Sigfunc* func)
+{    
   struct sigaction act, oact;
   
   act.sa_handler = func;
@@ -145,7 +156,7 @@
     return(SIG_ERR);
   return (oact.sa_handler);
 } 
-
+#endif
 
 void* TSP_streamer_sender_thread_sender(void* arg)
 {
@@ -201,21 +212,21 @@
 
   int status;
 
-  STRACE_IO(("-->IN"));
-
   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);
  
-  STRACE_IO(("-->OUT"));
-
   return TRUE;
   
 }
@@ -246,7 +257,12 @@
     
   /* 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 */
@@ -286,12 +302,15 @@
     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 == signal(SIGPIPE, SIG_IGN)) {
+  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"));
@@ -506,15 +525,27 @@
   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? */
-      if( (nwrite = write(identSocket,  &buffer[Total], bufferLen)) <= 0 ) {
+#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 {		  
-	  STRACE_DEBUG(("send failed with errno = %d : <%s>",errno,strerror(errno)));
+#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;
 	}
Index: src/core/ctrl/tsp_group_algo.c
===================================================================
--- src/core/ctrl/tsp_group_algo.c	(révision 4)
+++ src/core/ctrl/tsp_group_algo.c	(révision 205)
@@ -38,7 +38,11 @@
  */
 
 #include <string.h>
-
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
 #include "tsp_sys_headers.h"
 
 #include "tsp_group_algo.h"
@@ -233,7 +237,7 @@
 
     }
       
-  STRACE_DEBUG(("Max group size = %d", table->max_group_len));
+  STRACE_INFO(("Max group size = %d", table->max_group_len));
   return table;
 }
                                                              
@@ -303,9 +307,10 @@
 		table->groups[group_id].items[rank].offset       = in_info->offset;
 		table->groups[group_id].items[rank].nelem        = in_info->nelem;
 		
-		/*complete les infos)*/		  
+		/*complete les infos)*/
+        /* cast en int32_t pour Windows : WIN32 */
 		table->groups[group_id].items[rank].data = 
-		  TSP_datapool_get_symbol_value(datapool, in_info->provider_global_index)
+		  (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 */
Index: src/core/ctrl/tsp_provider.h
===================================================================
--- src/core/ctrl/tsp_provider.h	(révision 4)
+++ src/core/ctrl/tsp_provider.h	(révision 205)
@@ -88,10 +88,10 @@
 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(void);
+int TSP_provider_is_initialized();
 
-int TSP_provider_get_server_number(void);
-int TSP_provider_get_server_base_number(void );
+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);
 
Index: src/core/ctrl/tsp_default_glu.h
===================================================================
--- src/core/ctrl/tsp_default_glu.h	(révision 4)
+++ src/core/ctrl/tsp_default_glu.h	(révision 205)
@@ -52,47 +52,47 @@
 
 /** 
  * Default GLU server name.
- * @param this the GLU object
+ * @param cthis the GLU object
  * @return GLU name.
  */
-char* GLU_get_server_name_default(GLU_handle_t* this);
+char* GLU_get_server_name_default(GLU_handle_t* cthis);
 
 /**
  * Default GLU server type.
- * @param[in] this the GLU object
+ * @param[in] cthis the GLU object
  * @return GLU server type.
  */
-GLU_server_type_t GLU_get_server_type_default(GLU_handle_t* this);
+GLU_server_type_t GLU_get_server_type_default(GLU_handle_t* cthis);
 
 /**
  * Default GLU base frequency.
- * @param[in] this the GLU object
+ * @param[in] cthis the GLU object
  * @return GLU base frequency (Hz)
  */
-double GLU_get_base_frequency_default(GLU_handle_t* this);
+double GLU_get_base_frequency_default(GLU_handle_t* cthis);
 
 int32_t 
-GLU_get_nb_max_consumer_default(struct GLU_handle_t* this);
+GLU_get_nb_max_consumer_default(struct GLU_handle_t* cthis);
 
 /**
  * Default GLU start.
- * @param[in] this the GLU object
+ * @param[in] cthis the GLU object
  * @return true or false
  */
 int32_t 
-GLU_start_default(GLU_handle_t* this);
+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] this the GLU object 
+ * @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* this, 
+GLU_get_pgi_default(GLU_handle_t* cthis, 
 		    TSP_sample_symbol_info_list_t* symbol_list, 
 		    int* pg_indexes);
 
@@ -101,29 +101,29 @@
  * 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] this  the GLU object
+ * @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* this,
+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] this the GLU object
+ * @param[in] cthis the GLU object
  * @return the number of (static) available symbols.
  */
 int32_t
-GLU_get_nb_symbols_default(GLU_handle_t* this);
+GLU_get_nb_symbols_default(GLU_handle_t* cthis);
 
 /**
  * Return the filtered list of sample symbols.
- * @param[in] this the GLU object
+ * @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
@@ -131,27 +131,27 @@
  * @return the number of (static) available symbols.
  */
 int32_t
-GLU_get_filtered_ssi_list_default(GLU_handle_t* this, 
+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* this, 
+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_ssei_list_fromPGI_default(struct GLU_handle_t* this, 
+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_async_sample_read_default(struct GLU_handle_t* this, 
+GLU_async_sample_read_default(struct GLU_handle_t* cthis, 
 			      int pgi, 
 			      void* value_ptr, uint32_t* value_size);
 
 int32_t
-GLU_async_sample_write_default(struct GLU_handle_t* this, 
+GLU_async_sample_write_default(struct GLU_handle_t* cthis, 
 			       int pgi, 
 			       void* value_ptr, uint32_t value_size);
 
Index: src/core/ctrl/tsp_datapool.c
===================================================================
--- src/core/ctrl/tsp_datapool.c	(révision 4)
+++ src/core/ctrl/tsp_datapool.c	(révision 205)
@@ -37,6 +37,12 @@
 -----------------------------------------------------------------------
  */
 
+#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>
@@ -72,16 +78,15 @@
 
 
 void 
-TSP_datapool_get_reverse_list (TSP_datapool_t* datapool, int *nb, int **list) {
+TSP_datapool_get_reverse_list (TSP_datapool_t* this, int *nb, int **list) {
   assert(nb!=NULL);
   assert(list!=NULL);
-  assert(datapool);
-  *nb = datapool->nb_wanted_items;
-  *list = datapool->reverse_index;
+  assert(this);
+  *nb = this->nb_wanted_items;
+  *list = this->reverse_index;
 }
 
-
-inline int 
+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,
Index: src/core/rpc/Makefile
===================================================================
--- src/core/rpc/Makefile	(révision 4)
+++ src/core/rpc/Makefile	(révision 205)
@@ -1,48 +0,0 @@
-include $(DEVBASE)/make/Makeparams
-
-XINC = tsp_rpc.h tsp_datastruct.h
-
-RPC = tsp_rpc
-
-
-RPCGENFLAGS=  -N -C
-
-RPC_CLIENT_SRC = tsp_client.c tsp_rpc_confprogid.c
-RPC_SERVER_SRC = tsp_server.c tsp_rpc_confprogid.c
-
-RPC_CLEANUP = $(DIRBIN)/tsp_rpc_cleanup
-ADD_LIB = $(DIRLIB)/libtsp_provider.a  $(DIRLIB)/libtsp_services.a $(DIRLIB)/libtsp_common.a 
-
-# -----------------------------------------------------------
-# No label all:: because it's in Makeparams and calls build::	
-# same thing for clean:: that calls destroy::
-# -----------------------------------------------------------
-
-build:: export_include
-	$(MAKE) rpcgen
-	@if [ "${BUILD_PROVIDER}" = "yes" ]; then \
-		$(MAKE) RPC_LIB_SUFFIX=tsp_provider rpc.server.lib ;  \
-		$(MAKE) "CFLAGS += -DTSP_RPC_CLEANUP" \
-		 main_cleanup ; \
-	fi ;\
-	if [ "${BUILD_CONSUMER}" = "yes" ]; then \
-		$(MAKE) RPC_LIB_SUFFIX=tsp_consumer rpc.client.lib;   \
-	fi
-
-destroy::
-	$(MAKE) RPC_LIB_SUFFIX=tsp_consumer rpc.clean
-	$(MAKE) RPC_LIB_SUFFIX=tsp_provider rpc.clean
-	$(MAKE) remove_include
-
-
-main_cleanup : $(RPC_CLEANUP)
-
-$(RPC_CLEANUP) : tsp_server
-	mv $< $@
-
-include $(DEVBASE)/make/Makerules
-
-
-
-
-
Index: src/core/rpc/tsp_rpc.h
===================================================================
--- src/core/rpc/tsp_rpc.h	(révision 0)
+++ src/core/rpc/tsp_rpc.h	(révision 205)
@@ -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 = 1 + 1,
+	TSP_TYPE_INT8 = 1 + 2,
+	TSP_TYPE_INT16 = 1 + 3,
+	TSP_TYPE_INT32 = 1 + 4,
+	TSP_TYPE_INT64 = 1 + 5,
+	TSP_TYPE_UINT8 = 1 + 6,
+	TSP_TYPE_UINT16 = 1 + 7,
+	TSP_TYPE_UINT32 = 1 + 8,
+	TSP_TYPE_UINT64 = 1 + 9,
+	TSP_TYPE_CHAR = 1 + 10,
+	TSP_TYPE_UCHAR = 1 + 11,
+	TSP_TYPE_RAW = 1 + 12,
+	TSP_TYPE_LAST = 1 + 13,
+};
+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 req_info;
+	int filter_kind;
+	char *filter_string;
+};
+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 */
Index: src/core/rpc/tsp_rpc_cleanup.c
===================================================================
--- src/core/rpc/tsp_rpc_cleanup.c	(révision 0)
+++ src/core/rpc/tsp_rpc_cleanup.c	(révision 205)
@@ -0,0 +1,95 @@
+/*
+
+$Header: /cvsroot/tsp/tsp/src/core/rpc/tsp_server.c,v 1.31 2006/05/03 21:16: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 
+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
+
+#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>
+
+int main(void)
+{
+#if defined (WIN32)
+  WSADATA WSAData;
+#endif
+
+  int servernumber;
+
+#if defined (WIN32)
+  if (WSAStartup(MAKEWORD(2,2), &WSAData)) {
+	WSACleanup();
+    return -1;
+   }
+#endif
+
+  for(servernumber=0; servernumber<TSP_MAX_SERVER_NUMBER; servernumber++)
+    {
+      svc_unregister (TSP_get_progid(servernumber), TSP_RPC_VERSION_INITIAL);
+      pmap_unset (TSP_get_progid(servernumber), TSP_RPC_VERSION_INITIAL);
+    }
+#if defined (WIN32)
+    WSACleanup();
+#endif
+  return 0;
+}
Index: src/core/rpc/tsp_server.h
===================================================================
--- src/core/rpc/tsp_server.h	(révision 4)
+++ src/core/rpc/tsp_server.h	(révision 205)
@@ -49,11 +49,11 @@
  */
 
 
-int TSP_rpc_request(TSP_provider_request_handler_t* this);
-int TSP_rpc_request_config(TSP_provider_request_handler_t* this);
-void* TSP_rpc_request_run(TSP_provider_request_handler_t* this);
-int TSP_rpc_request_stop(TSP_provider_request_handler_t* this);
-char* TSP_rpc_request_url(TSP_provider_request_handler_t* this);
+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 */ 
 
Index: src/core/rpc/tsp_client.c
===================================================================
--- src/core/rpc/tsp_client.c	(révision 4)
+++ src/core/rpc/tsp_client.c	(révision 205)
@@ -87,7 +87,7 @@
 
   if(cl == (CLIENT *)0)
     {
-      STRACE_DEBUG(("ERROR : GLOBAL clnt_create failed for host %s", target_name));
+      STRACE_ERROR(("ERROR : GLOBAL clnt_create failed for host %s", target_name));
     }
   else
     {
Index: src/core/rpc/tsp_rpc_svc.c
===================================================================
--- src/core/rpc/tsp_rpc_svc.c	(révision 0)
+++ src/core/rpc/tsp_rpc_svc.c	(révision 205)
@@ -0,0 +1,227 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+/* AP : Migration sous Windows */
+/* Suppression car ne fonctionne pas mais ne sert pas non plus ! */
+//#include <rpc/pmap_clnt.h>
+#include <string.h>
+#include <memory.h>
+#ifndef WIN32
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+/* AP : Migration sous Windows */
+/* ne trouve pas le fichier "rpc/tsp_rpc.h" */
+#include "tsp_rpc.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->req_info, argp->filter_kind, argp->filter_string, 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;
+}
Index: src/core/rpc/tsp_rpc_xdr.c
===================================================================
--- src/core/rpc/tsp_rpc_xdr.c	(révision 0)
+++ src/core/rpc/tsp_rpc_xdr.c	(révision 205)
@@ -0,0 +1,855 @@
+/*
+ * 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)
+{
+	 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)
+{
+	 if (!xdr_enum (xdrs, (enum_t *) objp))
+		 return FALSE;
+	return TRUE;
+}
+
+bool_t
+xdr_TSP_datatype_t (XDR *xdrs, TSP_datatype_t *objp)
+{
+	 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)
+{
+	 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)
+{
+	 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;*/
+    register int *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;*/
+    register int *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;*/
+    register int *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;*/
+    register int *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;*/
+    register int *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;*/
+    register int *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->req_info))
+		 return FALSE;
+	 if (!xdr_int (xdrs, &objp->filter_kind))
+		 return FALSE;
+	 if (!xdr_string (xdrs, &objp->filter_string, ~0))
+		 return FALSE;
+	return TRUE;
+}
+#define TSP_STRACE_RPC_ERROR(cl, pResult) if(!pResult) { STRACE_ERROR(("%s", clnt_sperror(cl, ""))); }
Index: src/core/rpc/tsp_rpc_clnt.c
===================================================================
--- src/core/rpc/tsp_rpc_clnt.c	(révision 0)
+++ src/core/rpc/tsp_rpc_clnt.c	(révision 205)
@@ -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 req_open,  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) &req_open,
+		(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 req_close,  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) &req_close,
+		(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 req_info,  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) &req_info,
+		(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 req_feature,  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) &req_feature,
+		(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 req_sample,  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) &req_sample,
+		(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 req_sample,  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) &req_sample,
+		(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 req_destroy,  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) &req_destroy,
+		(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 exec_feature,  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) &exec_feature,
+		(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 async_sample_write,  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) &async_sample_write,
+		(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 async_sample_read,  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) &async_sample_read,
+		(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 req_info, int filter_kind, char *filter_string,  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.req_info = req_info;
+	arg.filter_kind = filter_kind;
+	arg.filter_string = filter_string;
+	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 req_extinfo,  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) &req_extinfo,
+		(xdrproc_t) xdr_TSP_answer_extended_information_t, (caddr_t) &clnt_res,
+		TIMEOUT) != RPC_SUCCESS) {
+		return (NULL);
+	}
+	return (&clnt_res);
+}
Index: src/core/rpc/tsp_server.c
===================================================================
--- src/core/rpc/tsp_server.c	(révision 4)
+++ src/core/rpc/tsp_server.c	(révision 205)
@@ -37,10 +37,14 @@
 
 
 #include <rpc/rpc.h>
-#include <netdb.h>
-#include <rpc/pmap_clnt.h>
 #include <stdio.h>
-#include <unistd.h> 
+#ifndef WIN32
+    #include <netdb.h>
+    #include <unistd.h> 
+    #include <rpc/pmap_clnt.h>
+#else
+    #include <rpc/pmap_cln.h>
+#endif
 
 #include <tsp_sys_headers.h>
 #include <tsp_glu.h>
@@ -67,8 +71,6 @@
 void
 tsp_rpc_1(struct svc_req *rqstp, register SVCXPRT *transp) ;
 
-#ifndef TSP_RPC_CLEANUP
-
 #define TSP_URL_MAXLENGTH 256
 
 typedef struct {
@@ -254,14 +256,14 @@
   int rpcport = -1;
 
   /* look for a free port */
-  while(rpcport && config->server_number<TSP_MAX_SERVER_NUMBER)
+  while(rpcport && (config->server_number<TSP_MAX_SERVER_NUMBER))
     {
-      rpcport = getrpcport("localhost", TSP_get_progid(config->server_number), TSP_RPC_VERSION_INITIAL, IPPROTO_TCP);
+      rpcport = (int)getrpcport("localhost", TSP_get_progid(config->server_number), TSP_RPC_VERSION_INITIAL, IPPROTO_TCP);
       if(rpcport)
-	config->server_number++;
+	    config->server_number++;
     }
 
-  if(rpcport && config->server_number >= TSP_MAX_SERVER_NUMBER)
+  if(rpcport && (config->server_number >= TSP_MAX_SERVER_NUMBER))
       config->server_number = -1;
 
   return config->server_number;
@@ -314,8 +316,12 @@
   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;
@@ -432,16 +438,3 @@
 
 }
 
-#else
-int main(void)
-{
-  int servernumber;
-  for(servernumber=0; servernumber<TSP_MAX_SERVER_NUMBER; servernumber++)
-    {
-      svc_unregister (TSP_get_progid(servernumber), TSP_RPC_VERSION_INITIAL);
-      pmap_unset (TSP_get_progid(servernumber), TSP_RPC_VERSION_INITIAL);
-    }
-  return 0;
-}
-
-#endif
Index: src/core/xmlrpc/Makefile
===================================================================
--- src/core/xmlrpc/Makefile	(révision 4)
+++ src/core/xmlrpc/Makefile	(révision 205)
@@ -1,45 +0,0 @@
-include $(DEVBASE)/make/Makeparams
-
-XINC = tsp_datastruct.h  # FIXME : shoudl not need to export tsp_datastruct.h
-#XINC    = tsp_provider.h glue_sserver.h tsp_datapool.h
-#XINC    = tsp_provider.h tsp_session.h   glue_sserver.h tsp_datapool.h \
-          tsp_group_algo.h tsp_data_sender.h tsp_group_algo_data.h \
-          tsp_stream_sender.h tsp_request.h
-
-SOURCES = \
-	tsp_xmlrpc_client.c \
-	tsp_xmlrpc_server.c \
-	tsp_xmlrpc_util.c
-
-
-OBJECTS=$(SOURCES:%.c=$(DIROBJ)/%.o) 
-
-TARGET_C=$(DIRLIB)/libtsp_consumer.a
-TARGET_P=$(DIRLIB)/libtsp_provider.a
-
-CPPFLAGS += -I ../misc_utils
-
-# -----------------------------------------------------------
-# No label all:: because it's in Makeparams and calls build::	
-# same thing for clean:: that calls destroy::
-# -----------------------------------------------------------
-BUILD_TARGETS = build_p build_c
-ifeq (${BUILD_PROVIDER}, yes)
-	BUILD_TARGETS += build_p
-endif
-ifeq (${BUILD_CONSUMER}, yes)
-	BUILD_TARGETS += build_c
-endif
-		
-build:: $(BUILD_TARGETS)
-
-build_p:: export_include $(TARGET_P)($(OBJECTS)) 
-
-build_c:: export_include $(TARGET_C)($(OBJECTS)) 
-
-
-destroy::
-	$(RM) 	$(TARGET)
-	$(MAKE) remove_include
-
-include $(DEVBASE)/make/Makerules
Index: src/core/xmlrpc/tsp_xmlrpc_server.h
===================================================================
--- src/core/xmlrpc/tsp_xmlrpc_server.h	(révision 4)
+++ src/core/xmlrpc/tsp_xmlrpc_server.h	(révision 205)
@@ -49,11 +49,11 @@
  */
 
 
-int TSP_xmlrpc_request(TSP_provider_request_handler_t* this);
-int TSP_xmlrpc_request_config(TSP_provider_request_handler_t* this);
-void* TSP_xmlrpc_request_run(TSP_provider_request_handler_t* this);
-int TSP_xmlrpc_request_stop(TSP_provider_request_handler_t* this);
-char* TSP_xmlrpc_request_url(TSP_provider_request_handler_t* this);
+int TSP_xmlrpc_request(TSP_provider_request_handler_t* cthis);
+int TSP_xmlrpc_request_config(TSP_provider_request_handler_t* cthis);
+void* TSP_xmlrpc_request_run(TSP_provider_request_handler_t* cthis);
+int TSP_xmlrpc_request_stop(TSP_provider_request_handler_t* cthis);
+char* TSP_xmlrpc_request_url(TSP_provider_request_handler_t* cthis);
 
 /** @} end group TSP_XMLRPCRequestHandlerLib */ 
 
Index: src/core/ctrl_init/Makefile
===================================================================
--- src/core/ctrl_init/Makefile	(révision 4)
+++ src/core/ctrl_init/Makefile	(révision 205)
@@ -1,26 +0,0 @@
-include $(DEVBASE)/make/Makeparams
-
-XINC    = tsp_provider_init.h
-
-SOURCES = \
-	tsp_provider_init.c
-
-OBJECTS=$(SOURCES:%.c=$(DIROBJ)/%.o) 
-
-TARGET=$(DIRLIB)/libtsp_provider.a
-
-CPPFLAGS += -I../rpc -I../ctrl
-
-# -----------------------------------------------------------
-# No label all:: because it's in Makeparams and calls build::	
-# same thing for clean:: that calls destroy::
-# -----------------------------------------------------------
-
-build:: export_include $(TARGET)($(OBJECTS))
-
-destroy::
-	$(RM) 	$(TARGET)
-	$(MAKE) remove_include
-
-
-include $(DEVBASE)/make/Makerules
Index: src/core/ctrl_init/tsp_provider_init.c
===================================================================
--- src/core/ctrl_init/tsp_provider_init.c	(révision 4)
+++ src/core/ctrl_init/tsp_provider_init.c	(révision 205)
@@ -52,8 +52,20 @@
 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 */
@@ -122,22 +134,28 @@
 
 
 void 
-TSP_provider_end(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(void) {
+TSP_provider_print_usage() {
    printf(TSP_ARG_PROVIDER_USAGE"\n");
 } /* TSP_provider_print_usage */
 
@@ -163,9 +181,11 @@
 
 	      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)
Index: src/core/ctrl_init/tsp_provider_init.h
===================================================================
--- src/core/ctrl_init/tsp_provider_init.h	(révision 4)
+++ src/core/ctrl_init/tsp_provider_init.h	(révision 205)
@@ -61,7 +61,7 @@
  * @param[in,out] argv You must provide the real argv before using it
  * @return TSP_STATUS_OK on success other code on failure.
  */
-int32_t
+_EXPORT_TSP_PROVIDER int32_t
 TSP_provider_init(GLU_handle_t* theGLU, int* argc, char** argv[]);
 
 /**
@@ -69,7 +69,7 @@
  * After this call the TSP provider library should
  * not be called anymore.
  */
-void 
+_EXPORT_TSP_PROVIDER void 
 TSP_provider_end(void);
 
 /**
@@ -98,7 +98,7 @@
  *       - 0x11 dynamic blocking mode, this function will block forever.
  * @return TSP_STATUS_OK on success other code on failure.
  */
-int32_t
+_EXPORT_TSP_PROVIDER int32_t
 TSP_provider_run(int spawn_mode);
 
 
@@ -121,7 +121,7 @@
  *       - 0x0100 publish to local SNMP agent (TODO).
  * @return String table or NULL.
  */
-char**
+_EXPORT_TSP_PROVIDER char**
 TSP_provider_urls(int pub_mode);
 
 
Index: src/core/common/Makefile
===================================================================
--- src/core/common/Makefile	(révision 4)
+++ src/core/common/Makefile	(révision 205)
@@ -1,40 +0,0 @@
-include $(DEVBASE)/make/Makeparams
-
-XINC    = tsp_common.h \
-	tsp_common_request.h \
-	tsp_common_filter.h \
-	tsp_common_ssi.h \
-	tsp_common_ssei.h \
-	tsp_common_as.h \
-	tsp_common_status.h \
-	tsp_decoder.h \
-	tsp_encoder.h
-SOURCES = \
-	tsp_common.c \
-	tsp_common_request.c \
-	tsp_common_ssi.c \
-	tsp_common_ssei.c \
-	tsp_common_as.c \
-	tsp_common_status.c \
-	tsp_encoder.c \
-	tsp_decoder.c
-
-OBJECTS=$(SOURCES:%.c=$(DIROBJ)/%.o) 
-
-TARGET=$(DIRLIB)/libtsp_common.a
-
-CPPFLAGS += -I. #./rpc -I../misc_utils -I../driver -I../ctrl -I../include 
-CFLAGS += -Wall -Werror
-
-# -----------------------------------------------------------
-# No label all:: because it's in Makeparams and calls build::	
-# same thing for clean:: that calls destroy::
-# -----------------------------------------------------------
-
-build:: export_include $(TARGET)($(OBJECTS))
-
-destroy::
-	$(RM) 	$(TARGET)
-	$(MAKE) remove_include
-
-include $(DEVBASE)/make/Makerules
Index: src/core/common/tsp_decoder.h
===================================================================
--- src/core/common/tsp_decoder.h	(révision 4)
+++ src/core/common/tsp_decoder.h	(révision 205)
@@ -39,7 +39,7 @@
 #define _TSP_DECODER_H
 
 
-#include <tsp_abs_types.h>
+#include <tsp_prjcfg.h>
 #include <tsp_rpc.h>
 
 #define TSP_SIZEOF_ENCODED_DOUBLE RNDUP(sizeof(double))
@@ -200,14 +200,14 @@
  * @param[in] type data type to determine the decoder to use
  * @return The address of the decoder function for the data type
  */
-TSP_data_decoder_t TSP_data_channel_get_decoder(TSP_datatype_t type);
+_EXPORT_TSP_COMMON TSP_data_decoder_t TSP_data_channel_get_decoder(TSP_datatype_t type);
 
 /**
  * Get the size of an encoded data type coming from the data stream
  * @param[in] type data type to determine the data type size
  * @return The size of an encoded ddata for the data stream 
  */
-int32_t TSP_data_channel_get_encoded_size(TSP_datatype_t type);
+_EXPORT_TSP_COMMON int32_t TSP_data_channel_get_encoded_size(TSP_datatype_t type);
 
 /** @} */
 
Index: src/core/common/tsp_common_ssi.h
===================================================================
--- src/core/common/tsp_common_ssi.h	(révision 4)
+++ src/core/common/tsp_common_ssi.h	(révision 205)
@@ -40,6 +40,12 @@
 
 #include <tsp_prjcfg.h>
 #include <tsp_datastruct.h>
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
 
 /**
  * @defgroup TSP_CommonLib_SSI Sample Symbol Information Library Handling
@@ -70,7 +76,7 @@
  * @param[in] phase the symbol phase
  * return the new tsp_sample_symbol_info_t
  */
-TSP_sample_symbol_info_t*
+_EXPORT_TSP_COMMON TSP_sample_symbol_info_t*
 TSP_SSI_new(const char* name,
 	    int32_t pgi,
 	    int32_t pgridx,
@@ -87,7 +93,7 @@
  * @param[in] ssi the symbols list to destruct
  * return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSI_delete(TSP_sample_symbol_info_t** ssi);
 
 /**
@@ -105,7 +111,7 @@
  * @param[in] phase the symbol phase
  * return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSI_initialize(TSP_sample_symbol_info_t* ssi,
 		   const char* name,
 		   int32_t pgi,
@@ -123,7 +129,7 @@
  * @param[in] ssi the symbols list to destruct
  * return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSI_finalize(TSP_sample_symbol_info_t* ssi);
 
 /**
@@ -136,7 +142,7 @@
  *                On return the initialized structure.
  * @return TSP_STATUS_OK on success
  */
-int32_t 
+_EXPORT_TSP_COMMON int32_t 
 TSP_SSI_initialize_default(TSP_sample_symbol_info_t* ssi);
 
 /**
@@ -146,7 +152,7 @@
  * @param[in] period the symbol period
  * return  TSP_STATUS_OK if ok
  */
-int32_t 
+_EXPORT_TSP_COMMON int32_t 
 TSP_SSI_initialize_request_minimal(TSP_sample_symbol_info_t* ssi,
 				   const char* name,
 				   int32_t period);
@@ -162,7 +168,7 @@
  * @param[in] phase the symbol phase
  * return  TSP_STATUS_OK if ok
  */
-int32_t 
+_EXPORT_TSP_COMMON int32_t 
 TSP_SSI_initialize_request_full(TSP_sample_symbol_info_t* ssi,
 				const char* name,
 				int32_t type,
@@ -181,7 +187,7 @@
  * @param[in]     src_ssi
  * return  TSP_STATUS_OK if ok 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSI_copy(TSP_sample_symbol_info_t* dst_ssi, 
 	     const TSP_sample_symbol_info_t src_ssi);
 
@@ -191,7 +197,7 @@
  * @param[in]  nbSSI the number of SSI in the to be created in the list.
  * @return the allocated list on success NULL on failure.
  */
-TSP_sample_symbol_info_list_t*
+_EXPORT_TSP_COMMON TSP_sample_symbol_info_list_t*
 TSP_SSIList_new(int32_t nbSSI);
 
 /**
@@ -199,7 +205,7 @@
  * @param[in] ssi the symbols list to destruct
  * return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSIList_delete(TSP_sample_symbol_info_list_t** ssi);
 
 /**
@@ -212,7 +218,7 @@
  * @post ssil contains the description of a SSIList with 
  *       nbSSI symbols. Each item of the list has been default initialized. 
  */
-int32_t 
+_EXPORT_TSP_COMMON int32_t 
 TSP_SSIList_initialize(TSP_sample_symbol_info_list_t* ssil,
 		       int32_t nbSSI);
 
@@ -221,7 +227,7 @@
  * @param[in] ssil the symbols list to destruct
  * return  TSP_STATUS_OK if ok
  */
-int32_t 
+_EXPORT_TSP_COMMON int32_t 
 TSP_SSIList_finalize(TSP_sample_symbol_info_list_t* ssil);
 
 /**
@@ -230,15 +236,15 @@
  * @param[in] src_ssil the symbols list copy source
  * return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSIList_copy(TSP_sample_symbol_info_list_t* dst_ssil, 
 		 const TSP_sample_symbol_info_list_t  src_ssil);
 
 
-TSP_sample_symbol_info_t*
+_EXPORT_TSP_COMMON TSP_sample_symbol_info_t*
 TSP_SSIList_getSSI(TSP_sample_symbol_info_list_t ssil, uint32_t index);
 
-uint32_t
+_EXPORT_TSP_COMMON uint32_t
 TSP_SSIList_getSize(const TSP_sample_symbol_info_list_t ssil);
 
 /** @} */
Index: src/core/common/tsp_common_ssei.c
===================================================================
--- src/core/common/tsp_common_ssei.c	(révision 4)
+++ src/core/common/tsp_common_ssei.c	(révision 205)
@@ -43,6 +43,11 @@
 #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) {
Index: src/core/common/tsp_common_as.c
===================================================================
--- src/core/common/tsp_common_as.c	(révision 4)
+++ src/core/common/tsp_common_as.c	(révision 205)
@@ -45,6 +45,11 @@
 #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,
@@ -86,8 +91,9 @@
 		  int32_t max_consumer_number,
 		  int32_t current_consumer_number,
 		  TSP_status_t status) {
-  assert(as);
+  
   int32_t retcode = TSP_STATUS_OK;
+  assert(as);
 
   as->version_id             = version_id;
   as->channel_id             = channel_id;
@@ -105,8 +111,9 @@
 
 int32_t
 TSP_AS_finalize(TSP_answer_sample_t* as) {
-  assert(as);
+  
   int32_t retcode = TSP_STATUS_OK;
+  assert(as);
   
   TSP_AS_initialize(as,
 		    TSP_UNDEFINED_VERSION_ID,
Index: src/core/common/tsp_encoder.c
===================================================================
--- src/core/common/tsp_encoder.c	(révision 4)
+++ src/core/common/tsp_encoder.c	(révision 205)
@@ -36,8 +36,7 @@
 -----------------------------------------------------------------------
  */
 
-
-#include <rpc/types.h>
+#include <rpc/rpc.h>
 #include <rpc/xdr.h>
 
 #include <tsp_const_def.h>
@@ -46,12 +45,25 @@
 #include <tsp_encoder.h>
 #include <tsp_decoder.h>
 
+#if defined (WIN32)
+    #include <malloc.h>
+    #define assert(exp)     ((void)0)
+#else
+    #include <assert.h>
+#endif
+
 uint32_t TSP_data_channel_double_encoder(void* v_double, uint32_t dimension,  char* out_buf, uint32_t size)
 {
 
   double *pt_double;
   uint32_t i,taille;
 
+#ifndef TSP_NO_XDR_ENCODE
+
+  XDR xhandle;
+
+#endif /*TSP_NO_XDR_ENCODE*/
+
   taille= sizeof(double) * dimension;
   if(size  < taille )
   {
@@ -62,9 +74,6 @@
   pt_double=(double*)v_double;
 
 #ifndef TSP_NO_XDR_ENCODE
-
-  XDR xhandle;
-  
  
   xdrmem_create(&xhandle, out_buf,  size, XDR_ENCODE);
 
@@ -102,6 +111,12 @@
   float *pt_float;
   uint32_t i,taille;
 
+#ifndef TSP_NO_XDR_ENCODE
+
+  XDR xhandle;
+
+#endif /*TSP_NO_XDR_ENCODE*/
+
   taille= sizeof(float) * dimension;
   if(size  < taille )
   {
@@ -113,9 +128,6 @@
 
 #ifndef TSP_NO_XDR_ENCODE
 
-  XDR xhandle;
-  
- 
   xdrmem_create(&xhandle, out_buf,  size, XDR_ENCODE);
 
   for(i=0;i<dimension;++i)
@@ -149,7 +161,7 @@
 
   int8_t *pt_int8;
   uint32_t i;
-  int32_t  temp[dimension];
+  int32_t*  temp = alloca(sizeof(int32_t)*dimension);
 
   pt_int8=(int8_t*)v_int8;
 
@@ -167,7 +179,7 @@
 {
   int16_t *pt_int16;
   uint32_t i;
-  int32_t  temp[dimension];
+  int32_t*  temp = alloca(sizeof(int32_t)*dimension);
 
   pt_int16=(int16_t*)v_int16;
 
@@ -183,6 +195,12 @@
   int32_t *pt_int32;
   uint32_t i,taille;
 
+#ifndef TSP_NO_XDR_ENCODE
+
+  XDR xhandle;
+
+#endif /*TSP_NO_XDR_ENCODE*/
+
   taille= TSP_SIZEOF_ENCODED_INT32 * dimension;
   if(size  < taille )
   {
@@ -194,9 +212,6 @@
 
 #ifndef TSP_NO_XDR_ENCODE
 
-  XDR xhandle;
-  
- 
   xdrmem_create(&xhandle, out_buf,  size, XDR_ENCODE);
 
   for(i=0;i<dimension;++i)
@@ -229,6 +244,12 @@
   int64_t *pt_int64;
   uint32_t i,taille;
 
+#ifndef TSP_NO_XDR_ENCODE
+
+  XDR xhandle;
+
+#endif /*TSP_NO_XDR_ENCODE*/
+
   taille= TSP_SIZEOF_ENCODED_INT64 * dimension;
   if(size  < taille )
   {
@@ -240,9 +261,6 @@
 
 #ifndef TSP_NO_XDR_ENCODE
 
-  XDR xhandle;
-  
- 
   xdrmem_create(&xhandle, out_buf,  size, XDR_ENCODE);
 
   for(i=0;i<dimension;++i)
@@ -275,7 +293,7 @@
 
   uint8_t *pt_uint8;
   uint32_t i;
-  uint32_t  temp[dimension];
+  uint32_t*  temp = alloca(sizeof(int32_t)*dimension);
 
   pt_uint8=(uint8_t*)v_uint8;
 
@@ -290,7 +308,7 @@
 {
   uint16_t *pt_uint16;
   uint32_t i;
-  uint32_t  temp[dimension];
+  uint32_t*  temp = alloca(sizeof(int32_t)*dimension);
 
   pt_uint16=(uint16_t*)v_uint16;
 
@@ -306,6 +324,12 @@
   uint32_t *pt_uint32;
   uint32_t i,taille;
 
+#ifndef TSP_NO_XDR_ENCODE
+
+  XDR xhandle;
+
+#endif /*TSP_NO_XDR_ENCODE*/
+
   taille= TSP_SIZEOF_ENCODED_UINT32 * dimension;
   if(size  < taille )
   {
@@ -317,9 +341,6 @@
 
 #ifndef TSP_NO_XDR_ENCODE
 
-  XDR xhandle;
-  
- 
   xdrmem_create(&xhandle, out_buf,  size, XDR_ENCODE);
 
   for(i=0;i<dimension;++i)
@@ -353,6 +374,12 @@
   uint64_t *pt_uint64;
   uint32_t i,taille;
 
+#ifndef TSP_NO_XDR_ENCODE
+
+  XDR xhandle;
+
+#endif /*TSP_NO_XDR_ENCODE*/
+
   taille= TSP_SIZEOF_ENCODED_UINT64 * dimension;
   if(size  < taille )
   {
@@ -364,9 +391,6 @@
 
 #ifndef TSP_NO_XDR_ENCODE
 
-  XDR xhandle;
-  
- 
   xdrmem_create(&xhandle, out_buf,  size, XDR_ENCODE);
 
   for(i=0;i<dimension;++i)
@@ -399,7 +423,7 @@
 {
   uint8_t *pt_char;
   uint32_t i;
-  uint32_t  temp[dimension];
+  uint32_t*  temp = alloca(sizeof(int32_t)*dimension);
 
   pt_char=(uint8_t*)v_char;
 
@@ -415,7 +439,7 @@
 
   uint8_t  *pt_uchar;
   uint32_t  i;
-  uint32_t  temp[dimension];
+  uint32_t*  temp = alloca(sizeof(int32_t)*dimension);
 
   pt_uchar=(uint8_t*)v_uchar;
 
@@ -431,7 +455,7 @@
 
   uint8_t *pt_user;
   uint32_t  i;
-  uint32_t  temp[dimension];
+  uint32_t*  temp = alloca(sizeof(int32_t)*dimension);
 
   pt_user=(uint8_t*)v_user;
 
Index: src/core/common/tsp_common_ssei.h
===================================================================
--- src/core/common/tsp_common_ssei.h	(révision 4)
+++ src/core/common/tsp_common_ssei.h	(révision 205)
@@ -62,7 +62,7 @@
  * @param[in] value value of the extended info
  * @return the new ei
  */
-TSP_extended_info_t*
+_EXPORT_TSP_COMMON TSP_extended_info_t*
 TSP_EI_new(const char *key,const char *value);
 
 /**
@@ -70,7 +70,7 @@
  * @param[in] ei ei to destruct
  * @return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EI_delete(TSP_extended_info_t** ei);
 
 /**
@@ -81,7 +81,7 @@
  * @param[in] value the value of the extended information
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EI_initialize(TSP_extended_info_t* ei, const char* key, const char* value);
 
 /**
@@ -92,7 +92,7 @@
  * @param[in] value the value of the extended information
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EI_update(TSP_extended_info_t* ei, const char* key, const char* value);
 
 /**
@@ -101,7 +101,7 @@
  *                be allocated but the field may not
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EI_finalize(TSP_extended_info_t* ei);
 
 /**
@@ -110,7 +110,7 @@
  * @param[in]     src_EI  source
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EI_copy(TSP_extended_info_t* dest_EI, const TSP_extended_info_t src_EI);
 
 /**
@@ -118,7 +118,7 @@
  * @param[in] len length of the eil
  * @return the new eil
  */
-TSP_extended_info_list_t*
+_EXPORT_TSP_COMMON TSP_extended_info_list_t*
 TSP_EIList_new(int32_t len);
 
 /**
@@ -126,7 +126,7 @@
  * @param[in] eil eil to destruct
  * @return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EIList_delete(TSP_extended_info_list_t** eil);
 
 /**
@@ -139,7 +139,7 @@
  * @param[in] len the length of the extended info list
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EIList_initialize(TSP_extended_info_list_t* eil, const int32_t len);
 
 /**
@@ -147,7 +147,7 @@
  * @param[in,out] eil the extended info list structure
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EIList_finalize(TSP_extended_info_list_t* eil);
 
 /**
@@ -156,7 +156,7 @@
  * @param[in] key the key of the extended information to look for 
  * @return a TSP_extended_info_t if found else NULL 
  */
-const TSP_extended_info_t*
+_EXPORT_TSP_COMMON const TSP_extended_info_t*
 TSP_EIList_findEIByKey(const TSP_extended_info_list_t* eil, const char* key);
 
 /**
@@ -165,7 +165,7 @@
  * @param[in]     eil_src  source list
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_EIList_copy(TSP_extended_info_list_t* eil_dest,
 		const TSP_extended_info_list_t eil_src);
 
@@ -175,7 +175,7 @@
  * @param[in] nei number of extended info
  * @return the new ssei
  */
-TSP_sample_symbol_extended_info_t*
+_EXPORT_TSP_COMMON TSP_sample_symbol_extended_info_t*
 TSP_SSEI_new(const int32_t pgi, const int32_t nei);
 
 /**
@@ -183,7 +183,7 @@
  * @param[in] ssei ssei to destruct
  * @return TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSEI_delete(TSP_sample_symbol_extended_info_t** ssei);
 
 /**
@@ -193,7 +193,7 @@
  * @param[in] nei the number of extended informations to be attached to this PGI
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSEI_initialize(TSP_sample_symbol_extended_info_t* ssei, const int32_t pgi, const int32_t nei);
 
 /**
@@ -201,7 +201,7 @@
  * @param[in,out] ssei struct to destroy
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSEI_finalize(TSP_sample_symbol_extended_info_t* ssei);
 
 /**
@@ -210,7 +210,7 @@
  * @param[in]     ssei_src  source 
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSEI_copy(TSP_sample_symbol_extended_info_t* ssei_dest,
   	      const TSP_sample_symbol_extended_info_t ssei_src);
 
@@ -219,7 +219,7 @@
  * @param[in] len length of the sseil
  * @return the new sseil
  */
-TSP_sample_symbol_extended_info_list_t*
+_EXPORT_TSP_COMMON TSP_sample_symbol_extended_info_list_t*
 TSP_SSEIList_new(int32_t len);
 
 /**
@@ -227,7 +227,7 @@
  * @param[in] ssei_list  sseil to destruct
  * @return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSEIList_delete(TSP_sample_symbol_extended_info_list_t** ssei_list);
 
 /**
@@ -236,7 +236,7 @@
  * @param[in]     len length of the list
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSEIList_initialize(TSP_sample_symbol_extended_info_list_t* ssei_list,int32_t len);
 
 /**
@@ -244,7 +244,7 @@
  * @param[in,out] ssei_list list to destroy
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_SSEIList_finalize(TSP_sample_symbol_extended_info_list_t* ssei_list);
 
 /**
@@ -253,12 +253,12 @@
  * @param[in] src_ssei_list source list
  * @return TSP_STATUS_OK on success 
  */
-int32_t
+_EXPORT_TSP_COMMON 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);
 
 
-TSP_extended_info_list_t*
+_EXPORT_TSP_COMMON TSP_extended_info_list_t*
 TSP_SSEIList_getEIList(const TSP_sample_symbol_extended_info_list_t SSEIList, uint32_t index);
 
 END_C_DECLS
Index: src/core/common/tsp_common_as.h
===================================================================
--- src/core/common/tsp_common_as.h	(révision 4)
+++ src/core/common/tsp_common_as.h	(révision 205)
@@ -69,7 +69,7 @@
  * @param[in] status
  * @return the new TSP_answer_sample_t
  */
-TSP_answer_sample_t*
+_EXPORT_TSP_COMMON TSP_answer_sample_t*
 TSP_AS_new(int32_t version_id,
 	   uint32_t channel_id,
 	   int32_t p_timeout,
@@ -83,9 +83,9 @@
 /**
  * Delete an Answer Sample.
  * @param[in] as  pointer to pointer to the Answer Sample to be destroy
- * return  TSP_STATUS_OK if ok
+ * @return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_AS_delete(TSP_answer_sample_t** as);
 
 /**
@@ -100,9 +100,9 @@
  * @param[in] max_consumer_number the maximum number of consumer the provider is able to handle.
  * @param[in] current_consumer_number the current number of connected consumer.
  * @param[in] status the TSP STATUS of the answer.
- * return  TSP_STATUS_OK if ok
+ * @return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_AS_initialize(TSP_answer_sample_t* as,
 		  int32_t version_id,
 		  uint32_t channel_id,
@@ -117,9 +117,9 @@
 /**
  * Destroy the content of an Answer Sample.
  * @param[in,out] as the Answer Sample whose content should be destroyed.
- * return  TSP_STATUS_OK if ok
+ * @return  TSP_STATUS_OK if ok
  */
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_AS_finalize(TSP_answer_sample_t* as);
 
 /** @} */
Index: src/core/common/tsp_encoder.h
===================================================================
--- src/core/common/tsp_encoder.h	(révision 4)
+++ src/core/common/tsp_encoder.h	(révision 205)
@@ -38,7 +38,7 @@
 #ifndef _TSP_ENCODER_H
 #define _TSP_ENCODER_H
 
-#include <tsp_abs_types.h>
+#include <tsp_prjcfg.h>
 #include <tsp_rpc.h>
 
 /**
@@ -198,7 +198,7 @@
  * @param[in] type data type to encode.
  * @return The data type encoder function
  */
-TSP_data_encoder_t TSP_data_channel_get_encoder(TSP_datatype_t type);
+_EXPORT_TSP_COMMON TSP_data_encoder_t TSP_data_channel_get_encoder(TSP_datatype_t type);
 
 /** @} */
 
Index: src/core/common/tsp_common.c
===================================================================
--- src/core/common/tsp_common.c	(révision 4)
+++ src/core/common/tsp_common.c	(révision 205)
@@ -43,3 +43,9 @@
 #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
\ Pas de fin de ligne à la fin du fichier.
Index: src/core/common/tsp_common_status.c
===================================================================
--- src/core/common/tsp_common_status.c	(révision 4)
+++ src/core/common/tsp_common_status.c	(révision 205)
@@ -44,6 +44,13 @@
 #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
 
Index: src/core/common/tsp_common.h
===================================================================
--- src/core/common/tsp_common.h	(révision 4)
+++ src/core/common/tsp_common.h	(révision 205)
@@ -48,6 +48,8 @@
 #include <tsp_common_ssei.h>
 #include <tsp_common_as.h>
 
+BEGIN_C_DECLS
+
 /**
  * @defgroup TSP_CommonLib TSP Common Library
  * @ingroup TSP_CoreLib
@@ -58,7 +60,7 @@
  */
 
 #ifdef TSP_COMMON_C
-const int tsp_type_size[] = { 0,
+_EXPORT_TSP_COMMON const int tsp_type_size[] = { 0,
 			      sizeof(double),
 			      sizeof(float),
 			      sizeof(int8_t),
@@ -74,7 +76,7 @@
 			      sizeof(uint8_t),
 			      0				
 };
-const char* tsp_type_name[] = { "TSP_TYPE_UNKNOWN",
+_EXPORT_TSP_COMMON const char* tsp_type_name[] = { "TSP_TYPE_UNKNOWN",
 				"TSP_TYPE_DOUBLE",
 				"TSP_TYPE_FLOAT",
 				"TSP_TYPE_INT8",
@@ -90,7 +92,7 @@
 				"TSP_TYPE_RAW",
 				"TSP_TYPE_LAST"
 };
-const char* tsp_type_fmt[] = { "TSP_TYPE_UNKNOWN",
+_EXPORT_TSP_COMMON const char* tsp_type_fmt[] = { "TSP_TYPE_UNKNOWN",
 			       "%1.15G",
 			       "%1.15G",
 			       "%d",
@@ -107,16 +109,14 @@
 			       "TSP_TYPE_LAST"	
 };
 #else
-extern const int   tsp_type_size[];
-extern const char* tsp_type_name[];
-extern const char* tsp_type_fmt[];
+_EXTERN_TSP_COMMON const int   tsp_type_size[];
+_EXTERN_TSP_COMMON const char* tsp_type_name[];
+_EXTERN_TSP_COMMON const char* tsp_type_fmt[];
+#undef _EXTERN_TSP_COMMON
 #endif
 
-BEGIN_C_DECLS
-
+END_C_DECLS
 
 /** @} */
 
-END_C_DECLS
-
 #endif /* _TSP_COMMON_H */
Index: src/core/common/tsp_common_status.h
===================================================================
--- src/core/common/tsp_common_status.h	(révision 4)
+++ src/core/common/tsp_common_status.h	(révision 205)
@@ -55,10 +55,10 @@
 
 BEGIN_C_DECLS
 
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_STATUS_print(FILE* fs, int32_t TSPStatus);
 
-int32_t
+_EXPORT_TSP_COMMON int32_t
 TSP_STATUS_sprint(char* buffer, int32_t buffer_len, int32_t TSPStatus);
 
 /** @} */
Index: src/core/common/tsp_common_request.c
===================================================================
--- src/core/common/tsp_common_request.c	(révision 4)
+++ src/core/common/tsp_common_request.c	(révision 205)
@@ -44,6 +44,12 @@
 #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;
Index: src/core/common/tsp_decoder.c
===================================================================
--- src/core/common/tsp_decoder.c	(révision 4)
+++ src/core/common/tsp_decoder.c	(révision 205)
@@ -35,7 +35,7 @@
 -----------------------------------------------------------------------
  */
 
-
+#include <rpc/rpc.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
  
@@ -44,6 +44,12 @@
 #include <tsp_simple_trace.h>
 #include <tsp_decoder.h>
 
+#ifdef WIN32
+    #define assert(exp)     ((void)0)
+    #include <malloc.h>
+#else
+    #include <assert.h>
+#endif
 
 int32_t TSP_data_channel_double_decoder(void* out_double, uint32_t dimension,  char* in_buf)
 {
@@ -75,11 +81,10 @@
     ((uint64_t*)out_double)[i] = TSP_DECODE_DOUBLE_TO_UINT64(in_buf+(i*TSP_SIZEOF_ENCODED_DOUBLE));   
     STRACE_DEBUG(("decoded DOUBLE = %f, (received) encoded DOUBLE=0x%08llx",((double*)out_double)[i],((uint64_t*)in_buf)[i]));
   }
-  
-  return TRUE;
-
 #endif
 
+  return TRUE;
+
 }
 
 int32_t TSP_data_channel_float_decoder(void* out_float, uint32_t dimension,  char* in_buf)
@@ -112,16 +117,15 @@
 
     ((uint32_t*)out_float)[i] = TSP_DECODE_FLOAT_TO_UINT32(in_buf+(i* TSP_SIZEOF_ENCODED_FLOAT));   
   }
-  
+#endif
   return TRUE;
 
-#endif
 }
 
 int32_t TSP_data_channel_int8_decoder(void* out_int8, uint32_t dimension,  char* in_buf)
 {
   uint32_t i;
-  int32_t out_temp[dimension];
+  int32_t* out_temp = alloca(sizeof(int32_t)*dimension);
 
 
   if(TSP_data_channel_int32_decoder((void *)(&out_temp[0]), dimension, in_buf))
@@ -142,7 +146,7 @@
 {
 
   uint32_t i;
-  int32_t out_temp[dimension];
+  int32_t* out_temp = alloca(sizeof(int32_t)*dimension);
 
 
   if(TSP_data_channel_int32_decoder((void *)(&out_temp[0]), dimension, in_buf))
@@ -191,9 +195,8 @@
     ((int32_t*)out_int32)[i] = TSP_DECODE_INT32(in_buf+(i * TSP_SIZEOF_ENCODED_INT32));   
   }
   
-  return TRUE;
-
 #endif
+    return TRUE;
 }
 
 int32_t TSP_data_channel_int64_decoder(void* out_int64, uint32_t dimension,  char* in_buf)
@@ -226,16 +229,15 @@
 
     ((int64_t*)out_int64)[i] = TSP_DECODE_INT64(in_buf+(i * TSP_SIZEOF_ENCODED_INT64));   
   }
-  
-  return TRUE;
-
+ 
 #endif
+    return TRUE;
 }
 
 int32_t TSP_data_channel_uint8_decoder(void* out_uint8, uint32_t dimension,  char* in_buf)
 {
   uint32_t i;
-  int32_t out_temp[dimension];
+  int32_t* out_temp = alloca(sizeof(int32_t)*dimension);
 
 
   if(TSP_data_channel_int32_decoder((void *)(&out_temp[0]), dimension, in_buf))
@@ -255,7 +257,7 @@
 int32_t TSP_data_channel_uint16_decoder(void* out_uint16, uint32_t dimension,  char* in_buf)
 {
   uint32_t i;
-  int32_t out_temp[dimension];
+  int32_t* out_temp = alloca(sizeof(int32_t)*dimension);
 
 
   if(TSP_data_channel_int32_decoder((void *)(&out_temp[0]), dimension, in_buf))
@@ -303,9 +305,8 @@
     ((uint32_t*)out_uint32)[i] = TSP_DECODE_UINT32(in_buf+(i * TSP_SIZEOF_ENCODED_UINT32));   
   }
   
-  return TRUE;
-
 #endif
+  return TRUE;
 }
 
 int32_t TSP_data_channel_uint64_decoder(void* out_uint64, uint32_t dimension,  char* in_buf)
@@ -339,16 +340,15 @@
     ((uint64_t*)out_uint64)[i] = TSP_DECODE_UINT64(in_buf+(i * TSP_SIZEOF_ENCODED_UINT64));   
   }
   
-  return TRUE;
-
 #endif
+  return TRUE;
 }
 
 int32_t TSP_data_channel_char_decoder(void* out_char, uint32_t dimension,  char* in_buf)
 {
 
   uint32_t i;
-  int32_t out_temp[dimension];
+  int32_t* out_temp = alloca(sizeof(int32_t)*dimension);
 
 
   if(TSP_data_channel_int32_decoder((void *)(&out_temp[0]), dimension, in_buf))
@@ -369,7 +369,7 @@
 {
 
   uint32_t i;
-  int32_t out_temp[dimension];
+  int32_t* out_temp = alloca(sizeof(int32_t)*dimension);
 
 
   if(TSP_data_channel_int32_decoder((void *)(&out_temp[0]), dimension, in_buf))
@@ -390,7 +390,7 @@
 {
 
   uint32_t i;
-  int32_t out_temp[dimension];
+  int32_t* out_temp = alloca(sizeof(int32_t)*dimension);
 
 
   if(TSP_data_channel_int32_decoder((void *)(&out_temp[0]), dimension, in_buf))
Index: src/core/common/tsp_common_request.h
===================================================================
--- src/core/common/tsp_common_request.h	(révision 4)
+++ src/core/common/tsp_common_request.h	(révision 205)
@@ -69,7 +69,7 @@
 } TSP_request_type_t;
 
 #ifdef TSP_COMMON_REQUEST_C
-const char* tsp_reqname_tab[] = {"tsp_request_invalid",
+_EXPORT_TSP_COMMON const char* tsp_reqname_tab[] = {"tsp_request_invalid",
 				 "tsp_request_generic",
 				 "tsp_request_open",
 				 "tsp_request_close",
@@ -85,7 +85,7 @@
 				 "tsp_request_last"
 };
 
-const char* tsp_reqhelp_tab[] = {"invalid tsp request",
+_EXPORT_TSP_COMMON const char* tsp_reqhelp_tab[] = {"invalid tsp request",
 				 "Generic interface to TSP request",
 				 "Send a TSP request open then close",
 				 "Same as request_open",
@@ -101,8 +101,8 @@
 				 "TSP LAST REQUEST"
 };
 #else
-extern const char* tsp_reqname_tab[];
-extern const char* tsp_reqhelp_tab[];
+_EXTERN_TSP_COMMON const char* tsp_reqname_tab[];
+_EXTERN_TSP_COMMON const char* tsp_reqhelp_tab[];
 #endif
 
 typedef struct TSP_request {
@@ -118,7 +118,7 @@
  * @param req 
  * @param req_type
  */
-void TSP_request_create(TSP_request_t* req, TSP_request_type_t req_type);
+_EXPORT_TSP_COMMON void TSP_request_create(TSP_request_t* req, TSP_request_type_t req_type);
 
 
 /** @} */
Index: src/core/common/tsp_common_ssi.c
===================================================================
--- src/core/common/tsp_common_ssi.c	(révision 4)
+++ src/core/common/tsp_common_ssi.c	(révision 205)
@@ -103,8 +103,9 @@
 		   int32_t nelem,
 		   int32_t period,
 		   int32_t phase) {
-  assert(ssi);
+  
   int32_t retcode = TSP_STATUS_OK;
+  assert(ssi);  
 
   if (NULL!=ssi->name) {
     free(ssi->name);    
@@ -133,8 +134,9 @@
 
 int32_t
 TSP_SSI_finalize(TSP_sample_symbol_info_t* ssi) {
-  assert(ssi);
+  
   int32_t retcode = TSP_STATUS_OK;
+  assert(ssi);
 
   TSP_SSI_initialize(ssi,
 		     NULL,
Index: src/core/driver/Makefile
===================================================================
--- src/core/driver/Makefile	(révision 4)
+++ src/core/driver/Makefile	(révision 205)
@@ -1,32 +0,0 @@
-include $(DEVBASE)/make/Makeparams
-
-XINC    = tsp_consumer.h
-
-XSCRIPT = 
-
-
-SOURCES = \
-	tsp_consumer.c \
-    tsp_group.c \
-    tsp_stream_receiver.c \
-    tsp_data_receiver.c  
-
-OBJECTS=$(SOURCES:%.c=$(DIROBJ)/%.o) 
-
-TARGET=$(DIRLIB)/libtsp_consumer.a
-
-CPPFLAGS += -I../rpc -I../misc_utils -I../common
-
-# -----------------------------------------------------------
-# No label all:: because it's in Makeparams and calls build::	
-# same thing for clean:: that calls destroy::
-# -----------------------------------------------------------
-
-build:: export_include $(TARGET)($(OBJECTS))
-
-destroy::
-	$(RM) 	 $(TARGET) 
-	$(MAKE) remove_include
-
-include $(DEVBASE)/make/Makerules
-
Index: src/core/driver/tsp_consumer.c
===================================================================
--- src/core/driver/tsp_consumer.c	(révision 4)
+++ src/core/driver/tsp_consumer.c	(révision 205)
@@ -307,6 +307,9 @@
   int found_stream_stop = FALSE;
   char* p;
   int32_t retcode = TSP_STATUS_OK;
+#if defined (WIN32)
+  WSADATA WSAData;
+#endif
 
   X_argv = (char**)calloc(*argc, sizeof(char*));
   X_argc = *argc;
@@ -392,6 +395,13 @@
   *argc = final_argc;
   *argv = X_argv;
 
+#if defined (WIN32)  
+  if (WSAStartup(MAKEWORD(2,2), &WSAData)) {
+	WSACleanup();
+	retcode = TSP_STATUS_NOK;
+   }
+#endif
+
   if (TSP_STATUS_OK==retcode) {
     X_tsp_init_ok = TRUE;
   } else {
@@ -404,12 +414,14 @@
 
 
 void 
-TSP_consumer_end(void) {	
+TSP_consumer_end() {	
 
   /* This is the end my friend ... the end ...*/
 
   /* Some day, we will find stuff to do here ;) */
-
+#if defined (WIN32)
+   WSACleanup();
+#endif
    /* By the way. do ->NOT<- free X_tsp_argv and X_argv,
      the main code may be using them... */
 
@@ -1060,8 +1072,12 @@
     
   TSP_otsp_t* otsp = (TSP_otsp_t*)arg;
   int is_fifo_full;  
-                    
+
+#if defined(WIN32)
+  STRACE_INFO(("Receiver thread started. Id=%u", (uint32_t)pthread_self().p)); 
+#else
   STRACE_INFO(("Receiver thread started. Id=%u", (uint32_t)pthread_self())); 
+#endif
 
   while(TRUE)
     {
@@ -1110,23 +1126,26 @@
       if(otsp->receiver)
 	{
 	  int status;
-
+	  
 	  /* Create receiver fifo */
 	  RINGBUF_PTR_INIT(TSP_sample_ringbuf_t,
 			   otsp->sample_fifo,
 			   TSP_sample_t,
 			   0,
 			   RINGBUF_SZ(TSP_CONSUMER_RINGBUF_SIZE) )
-	  	    
-	    
-	  /* Begin to receive */
-	  status = pthread_create(&(otsp->thread_receiver), 
-				  NULL,
-				  TSP_request_provider_thread_receiver,
-				  otsp);
 	  
-	  TSP_CHECK_THREAD(status, TSP_STATUS_ERROR_THREAD_CREATE);
-	  retcode = TSP_STATUS_OK;
+	  if (NULL==otsp->sample_fifo) {
+	    retcode = TSP_STATUS_ERROR_MEMORY_ALLOCATION;
+	  } else {	    	    	    
+	    /* Begin to receive */
+	    status = pthread_create(&(otsp->thread_receiver), 
+				    NULL,
+				    TSP_request_provider_thread_receiver,
+				    otsp);
+	    
+	    TSP_CHECK_THREAD(status, TSP_STATUS_ERROR_THREAD_CREATE);
+	    retcode = TSP_STATUS_OK;
+	  }
 	  
 	}
       else
Index: src/core/driver/tsp_stream_receiver.c
===================================================================
--- src/core/driver/tsp_stream_receiver.c	(révision 4)
+++ src/core/driver/tsp_stream_receiver.c	(révision 205)
@@ -37,10 +37,15 @@
 
 #include "tsp_sys_headers.h"
 
+#if defined (WIN32)
+#include <Windows.h>
+#include <WinSock2.h>
+#else
 #include <netdb.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 #include <sys/socket.h>
+#endif
 
 #ifndef SHUT_RDWR
 #define SHUT_RDWR 2
@@ -259,24 +264,34 @@
     {
       while ( bufferLen > 0)
 	{
-	  if ( (nread = read(identSocket, &buffer[Total], bufferLen)) < 0)
-	    {
+	  
+/* AP : Migration sous Windows */
+/* sous windows _errno est la variable globale */
+#ifdef WIN32
+		if ( (nread = recv(identSocket, &buffer[Total], bufferLen,0)) < 0)
+	  {
+          if( _errno == EINTR )
+#else
+		if ( (nread = read(identSocket, &buffer[Total], bufferLen)) < 0)
+	  {
 	      if( errno == EINTR )
-		{
-		  /* The read might have been interrupted by a signal */
-		  nread = 0;
-		}
+#endif
+		  {
+		    /* The read might have been interrupted by a signal */
+		    nread = 0;
+		  }
 	      else 
-		{
+		  {
 		  
-		  STRACE_INFO(("read failed"));
+		    STRACE_INFO(("read failed"));
+		    return FALSE;
+		  }
+	  }
+      else if (nread == 0)
+	  {
+		  STRACE_INFO(("Received socket EOF"));
 		  return FALSE;
-		}
-	    }else if (nread == 0)
-	      {
-		STRACE_INFO(("Received socket EOF"));
-		return FALSE;
-	      }
+	  }
 	  
 	  Total += nread;
 	  bufferLen -= nread;
Index: src/core/driver/tsp_consumer.h
===================================================================
--- src/core/driver/tsp_consumer.h	(révision 4)
+++ src/core/driver/tsp_consumer.h	(révision 205)
@@ -43,6 +43,17 @@
 #include <tsp_abs_types.h>
 #include <tsp_common.h>
 
+#undef _EXPORT_TSP_CONSUMER
+#if defined (WIN32) && defined (TSP_SHARED_LIBS)
+#  ifdef tsp_consumer_EXPORTS
+#    define _EXPORT_TSP_CONSUMER __declspec(dllexport) 
+#  else
+#    define _EXPORT_TSP_CONSUMER __declspec(dllimport) 
+#  endif
+#else
+#  define _EXPORT_TSP_CONSUMER
+#endif
+
 /**
  * @defgroup TSP_ConsumerLib Consumer Core Library
  * @ingroup TSP_CoreLib
@@ -132,7 +143,7 @@
  * @param argv Use the argv main arg before using it
  * @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxx on error.
  */
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_init(int* argc, char** argv[]);
 
 /**
@@ -140,7 +151,7 @@
  * call this function when you are done with the librairy.
  * This function must be called once.
  */
-void 
+_EXPORT_TSP_CONSUMER void 
 TSP_consumer_end();
 
 
@@ -188,7 +199,7 @@
 \t\tvoid, /, //, /// or :///   = rpc://localhost/(find any):(find first)     \n\
 \tOthers may have unpredictable results .. \n"
 
-TSP_provider_t TSP_consumer_connect_url(const char *url);
+_EXPORT_TSP_CONSUMER TSP_provider_t TSP_consumer_connect_url(const char *url);
 
 
 /** 
@@ -198,18 +209,18 @@
  * @param provider The provider handle
  * @return The provider name
  */				  
-const char* TSP_consumer_get_connected_name(TSP_provider_t provider);		
+_EXPORT_TSP_CONSUMER const char* TSP_consumer_get_connected_name(TSP_provider_t provider);		
 
 /**
  * Disconnect one given provider.
  * @param provider IN, the provider to be disconnected from.
  */ 
-void TSP_consumer_disconnect_one(TSP_provider_t provider);
+_EXPORT_TSP_CONSUMER void TSP_consumer_disconnect_one(TSP_provider_t provider);
 
 
 /** 
  * Ask the provider for a new consumer session.
- * This function must be called and must succed for the program to be able to call
+ * This function must be called and must succeed for the program to be able to call
  * other TSP_REQUEST_* functions.
  * @param provider The provider handle
  * @param custom_argc Custom provider data stream initialisation (optional : set 0)
@@ -232,7 +243,8 @@
  * It is a way to prevent the user from providing initialisation parameters thrue the command
  * line.
  */
-int32_t 
+
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_request_open(TSP_provider_t provider, int custom_argc, char* custom_argv[]);
 
 /**
@@ -242,7 +254,7 @@
  * @param provider the TSP session to provider
  * @return the channel Id  if the session is open -1 if session not opened. 
  */
-uint32_t
+_EXPORT_TSP_CONSUMER uint32_t
 TSP_consumer_get_channel_id(TSP_provider_t provider);
 
 /**
@@ -250,7 +262,7 @@
  * @param provider The provider handle
  * @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxx on error.
  */
-int32_t
+_EXPORT_TSP_CONSUMER int32_t
 TSP_consumer_request_close(TSP_provider_t provider);
 
 
@@ -263,7 +275,7 @@
  * @param provider The provider handle
  * @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxx on error.
  */				  
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_request_information(TSP_provider_t provider);
 
 /** 
@@ -277,7 +289,7 @@
  * @param filter_string the filter string
  * @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxx on error.
  */				  
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_request_filtered_information(TSP_provider_t provider, int filter_kind, char* filter_string);
 
 /** 
@@ -290,7 +302,7 @@
  * @param[in] pgis_len the length of the pgis array
  * @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxx on error.
  */
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_request_extended_information(TSP_provider_t provider, int32_t* pgis, int32_t pgis_len);
 
 /** 
@@ -300,7 +312,7 @@
  * @param provider The provider handle
  * @return the provider extended information structure
  */
-const TSP_sample_symbol_extended_info_list_t*  
+_EXPORT_TSP_CONSUMER const TSP_sample_symbol_extended_info_list_t*  
 TSP_consumer_get_extended_information(TSP_provider_t provider);
 
 /** 
@@ -310,7 +322,7 @@
  * @param provider The provider handle
  * @return the provider information structure
  */				  
-const TSP_answer_sample_t* TSP_consumer_get_information(TSP_provider_t provider);
+_EXPORT_TSP_CONSUMER const TSP_answer_sample_t* TSP_consumer_get_information(TSP_provider_t provider);
 
 /** 
  * Ask the provider for a list of symbols.
@@ -326,7 +338,7 @@
  * @param symbols The request symbols list
  * @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxx on error.
  */				  
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_request_sample(TSP_provider_t provider,
 			    TSP_sample_symbol_info_list_t* symbols);
 
@@ -350,7 +362,7 @@
  * function is CPU friendlier (theoricaly at least...)
  * @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxx on error.
  */				      
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_request_sample_init(TSP_provider_t provider, TSP_sample_callback_t callback, void* user_data);    
 
 /** 
@@ -358,7 +370,7 @@
  * @param provider The provider handle
  * @return TSP_STATUS_OK on success TSP_STATUS_ERROR_xxx on error.
  */				      
-int32_t
+_EXPORT_TSP_CONSUMER int32_t
 TSP_consumer_request_sample_destroy(TSP_provider_t provider);    
 
 /** 
@@ -374,7 +386,7 @@
  *  - When the other types will be implemented (RAW, STRING) the TSP_sample_t
  *    type will not work anymore as it is double specific for now.
  */				          
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_read_sample(TSP_provider_t provider,
 			 TSP_sample_t* sample,
 			 int* new_sample);
@@ -386,7 +398,7 @@
  * @param[in] async_sample_write the async write message itself
  * @return TSP_STATUS_OK on success other TSP_STATUS_ERROR on failure.
  */
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_request_async_sample_write(TSP_provider_t provider,
 					TSP_consumer_async_sample_t* async_sample_write);
 
@@ -398,7 +410,7 @@
  *                on return contains the read value (if success)
  * @return TSP_STATUS_OK on success other TSP_STATUS_ERROR on failure.
  */
-int32_t 
+_EXPORT_TSP_CONSUMER int32_t 
 TSP_consumer_request_async_sample_read(TSP_provider_t provider,
 				       TSP_consumer_async_sample_t* async_sample_read);
 
Index: src/core/misc_utils/Makefile
===================================================================
--- src/core/misc_utils/Makefile	(révision 4)
+++ src/core/misc_utils/Makefile	(révision 205)
@@ -1,31 +0,0 @@
-include $(DEVBASE)/make/Makeparams
-
-XINC    = tsp_ringbuf.h  tsp_time.h
-#XINC    = tsp_time.h tsp_ringbuf.h  tsp_mtgprof.h
-
-XSCRIPT = 
-
-SOURCES = \
-	tsp_time.c \
-	tsp_mtgprof.c 
-
-CPPFLAGS += -I.
-
-OBJECTS=$(SOURCES:%.c=$(DIROBJ)/%.o) 
-
-TARGET=$(DIRLIB)/libtsp_services.a
-
-
-# -----------------------------------------------------------
-# No label all:: because it's in Makeparams and calls build::	
-# same thing for clean:: that calls destroy::
-# -----------------------------------------------------------
-
-build:: export_include $(TARGET)($(OBJECTS))
-
-destroy::
-	$(RM) 	$(TARGET) $(OBJECTS)
-	$(MAKE) remove_include
-
-
-include $(DEVBASE)/make/Makerules
Index: src/core/misc_utils/tsp_services.h
===================================================================
--- src/core/misc_utils/tsp_services.h	(révision 0)
+++ src/core/misc_utils/tsp_services.h	(révision 205)
@@ -0,0 +1,51 @@
+/*
+
+$Header:$
+
+-----------------------------------------------------------------------
+
+TSP Library - core components for a generic Transport Sampling Protocol.
+
+Copyright (c) 2002 Alan PRAT 
+
+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 : Services
+
+-----------------------------------------------------------------------
+
+Purpose   : Interface for tsp services functions
+
+-----------------------------------------------------------------------
+ */
+#ifndef _TSP_SERVICES_H
+#define _TSP_SERVICES_H
+
+#undef _EXPORT_TSP_SERVICES
+#if defined (WIN32) && defined (TSP_SHARED_LIBS)
+#  ifdef tsp_services_EXPORTS
+#    define _EXPORT_TSP_SERVICES __declspec(dllexport) 
+#  else
+#    define _EXPORT_TSP_SERVICES __declspec(dllimport) 
+#  endif
+#else
+#  define _EXPORT_TSP_SERVICES
+#endif
+
+#endif
Index: src/core/misc_utils/tsp_mtgprof.c
===================================================================
--- src/core/misc_utils/tsp_mtgprof.c	(révision 4)
+++ src/core/misc_utils/tsp_mtgprof.c	(révision 205)
@@ -20,7 +20,11 @@
     /* Initialize the wrapper structure */
     wrapper_data.start_routine = start_routine;
     wrapper_data.arg = arg;
+#if defined (WIN32)
+    /* FIXME under Windows : interval timer */
+#else
     getitimer(ITIMER_PROF, &wrapper_data.itimer);
+#endif
     pthread_cond_init(&wrapper_data.wait, NULL);
     pthread_mutex_init(&wrapper_data.lock, NULL);
     pthread_mutex_lock(&wrapper_data.lock);
@@ -51,7 +55,11 @@
     void * arg = ((wrapper_t*)data)->arg;
 
     /* Set the profile timer value */
+#if defined (WIN32)
+    /* FIXME under Windows : interval timer */
+#else
     setitimer(ITIMER_PROF, &((wrapper_t*)data)->itimer, NULL);
+#endif
 
     /* Tell the calling thread that we don't need its data anymore */
     pthread_mutex_lock(&((wrapper_t*)data)->lock);
Index: src/core/misc_utils/tsp_time.c
===================================================================
--- src/core/misc_utils/tsp_time.c	(révision 4)
+++ src/core/misc_utils/tsp_time.c	(révision 205)
@@ -35,13 +35,16 @@
 -----------------------------------------------------------------------
  */
 
-#include "tsp_sys_headers.h"
 #include <time.h>
 
-#include "tsp_time.h"
+#include "tsp_sys_headers.h"
 
+#include "tsp_time.h"
 
-tsp_hrtime_t tsp_gethrtime(void)
+#if defined (WIN32)
+#include <rpc/rpc.h>
+#endif
+tsp_hrtime_t tsp_gethrtime()
 {
 #ifdef TSP_SYSTEM_HAVE_GETHRTIME
   return gethrtime();
@@ -67,7 +70,14 @@
 #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*/
Index: src/core/misc_utils/tsp_ringbuf.h
===================================================================
--- src/core/misc_utils/tsp_ringbuf.h	(révision 4)
+++ src/core/misc_utils/tsp_ringbuf.h	(révision 205)
@@ -231,17 +231,19 @@
 
 
 
-#define RINGBUF_PTR_INIT(TypeName, name, ItemType, nbSpareBytes, sz) \
-	{ \
-          int mul_offset =  RINGBUF_MULTSUP((sizeof(ItemType) + nbSpareBytes),sizeof(ItemType)) / sizeof(ItemType);\
-	  name = (TypeName*)malloc(sizeof(TypeName) + (sizeof(ItemType) * mul_offset  * sz)); \
-	  (name)->size   = sz; \
-	  (name)->put   = 0; \
-	  (name)->get   = 0; \
-	  (name)->missed = 0; \
-          (name)->mul_offset = mul_offset; \
-          (name)->buf = (ItemType*)((name)+1); \
-	}
+#define RINGBUF_PTR_INIT(TypeName, name, ItemType, nbSpareBytes, sz)	\
+  {									\
+    int mul_offset =  RINGBUF_MULTSUP((sizeof(ItemType) + nbSpareBytes),sizeof(ItemType)) / sizeof(ItemType); \
+    name = (TypeName*)malloc(sizeof(TypeName) + (sizeof(ItemType) * mul_offset  * sz)); \
+    if(NULL!=name) {							\
+      (name)->size   = sz;						\
+      (name)->put   = 0;						\
+      (name)->get   = 0;						\
+      (name)->missed = 0;						\
+      (name)->mul_offset = mul_offset;					\
+      (name)->buf = (ItemType*)((name)+1);				\
+    }									\
+  }
 
 #define RINGBUF_PTR_DESTROY(name)  \
 	{ \
Index: src/core/misc_utils/tsp_mtgprof.h
===================================================================
--- src/core/misc_utils/tsp_mtgprof.h	(révision 4)
+++ src/core/misc_utils/tsp_mtgprof.h	(révision 205)
@@ -7,7 +7,33 @@
  */
 
 #include <pthread.h>
+#if defined (WIN32)
+/*
+ * Names of the interval timers, and structure
+ * defining a timer setting.
+ */
+#define	ITIMER_REAL	0
+#define	ITIMER_VIRTUAL	1
+#define	ITIMER_PROF	2
+/*
+ * Structure used under UNIX which are not defined under Windows
+ */
+/* define also in tsp_time.c because used into */
+typedef 	 long suseconds_t;
+struct timeval
+{
+	time_t		tv_sec;		/* seconds */
+	suseconds_t	tv_usec;	/* and microseconds */
+};
+/* end of the define also in tsp_time.c */
+struct	itimerval
+{
+	struct	timeval it_interval;	/* timer interval */
+	struct	timeval it_value;	/* current value */
+};
+#else
 #include <sys/time.h>
+#endif
 
 #ifndef __TSP_MTGPROG
 #define __TSP_MTGPROG 1
Index: src/core/misc_utils/tsp_time.h
===================================================================
--- src/core/misc_utils/tsp_time.h	(révision 4)
+++ src/core/misc_utils/tsp_time.h	(révision 205)
@@ -37,15 +37,16 @@
 #ifndef _TSP_TIME_H
 #define _TSP_TIME_H
 
+#include "tsp_services.h"
 #include "tsp_prjcfg.h"
 
 typedef uint64_t  tsp_hrtime_t;
 
 BEGIN_C_DECLS
 
-tsp_hrtime_t tsp_gethrtime(void);
+_EXPORT_TSP_SERVICES tsp_hrtime_t tsp_gethrtime();
 
-int tsp_usleep(int useconds);
+_EXPORT_TSP_SERVICES int tsp_usleep(int useconds);
 
 END_C_DECLS
 
Index: src/core/CMakeLists.txt
===================================================================
--- src/core/CMakeLists.txt	(révision 4)
+++ src/core/CMakeLists.txt	(révision 205)
@@ -1,3 +1,21 @@
+
+# Generate tsp_prjcfg header
+TSP_CONFIGURE_FILE_AUTOTOOLS_COMPAT(
+  include/tsp_prjcfg.h.in 
+  ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h)
+
+TSP_XINCLUDE(${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h)
+
+SET (INCLUDE_CORE_FILE 
+	include/tsp_abs_types.h
+	include/tsp_const_def.h
+	include/tsp_glu.h
+	include/tsp_simple_trace.h
+	include/tsp_sys_headers.h
+	rpc/tsp_rpc.h
+	rpc/tsp_datastruct.h)
+TSP_XINCLUDE(${INCLUDE_CORE_FILE})
+
 #
 # Services library
 #
@@ -6,7 +24,12 @@
   misc_utils/tsp_time
   misc_utils/tsp_mtgprof)
 
+TSP_XINCLUDE(${SERVICES_LIB_SRCS} misc_utils/tsp_ringbuf misc_utils/tsp_services)
 ADD_LIBRARY(tsp_services ${SERVICES_LIB_SRCS})
+IF (WIN32) 
+  TARGET_LINK_LIBRARIES(tsp_services ${PTHREAD_LIBRARY_NAME} Ws2_32 oncrpc)
+ENDIF (WIN32)
+TSP_LIBRARY_INSTALL(tsp_services)
 
 #
 # Common library
@@ -22,54 +45,96 @@
   common/tsp_encoder
   common/tsp_decoder)
 
-ADD_LIBRARY(tsp_common ${COMMON_LIB_SRCS})
-ADD_DEPENDENCIES(tsp_common tsp_consumer)
+TSP_XINCLUDE(${COMMON_LIB_SRCS} common/tsp_common_filter)
 
-SET(RPCGEN_OUTPUT_CNLT
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc_clnt
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc_xdr
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc.h)
+ADD_LIBRARY(tsp_common ${COMMON_LIB_SRCS})
+IF(ACPLT_ONCRPC_FOUND)
+	TARGET_LINK_LIBRARIES(tsp_common Ws2_32 oncrpc)
+ENDIF(ACPLT_ONCRPC_FOUND)
+TSP_LIBRARY_INSTALL(tsp_common) 
+ADD_DEPENDENCIES(tsp_common rpcgen_exec_clnt)
 
-SET(RPCGEN_OUTPUT_SRV
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc_svc.c
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc_xdr.c
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc.h)
-
-# Generate tsp_prjcfg header
-TSP_CONFIGURE_FILE_AUTOTOOLS_COMPAT(
-  include/tsp_prjcfg.h.in 
-  ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h)
+# Setup RPC machinery
 
 # FIXME Should write FindRPC CMake module
 # Exec rpcgen
 SET(RPCGEN "rpcgen")
-SET(RPC "rpc/tsp_rpc")
-ADD_CUSTOM_COMMAND(
-  OUTPUT 
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc_svc.c 
-  COMMAND echo "#ifdef VXWORKS" > ${RPC}_svc.c
-  COMMAND echo "#define static extern" >> ${RPC}_svc.c
-  COMMAND echo "#endif /* !VXWORKS */" >> ${RPC}_svc.c
-  COMMAND ${RPCGEN} -N -C -m ${RPC}.x >> ${RPC}_svc.c
-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h)
-
-ADD_CUSTOM_COMMAND(
-  OUTPUT 
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc_clnt.c 
-  COMMAND ${RPCGEN} -N -C -l ${RPC}.x > ${RPC}_clnt.c
-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h)
-
-ADD_CUSTOM_COMMAND(
-  OUTPUT 
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc_xdr.c
-  COMMAND ${RPCGEN} -N -C -c ${RPC}.x > ${RPC}_xdr.c
-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h)
-
-ADD_CUSTOM_COMMAND(
-  OUTPUT 
-  ${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc.h
-  COMMAND ${RPCGEN} -N -C -h ${RPC}.x > ${RPC}.h
-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h)
+
+SET(RPC_INPUT_FILE_PREFIX "rpc/tsp_rpc")
+SET(RPC_GENERATED_DIR_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/rpc")
+FILE(MAKE_DIRECTORY ${RPC_GENERATED_DIR_PREFIX})
+SET(RPC_GENERATED_FILE_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/rpc/tsp_rpc")
+#SET(RPC_GENERATED_FILE_PREFIX "${RPC_INPUT_FILE_PREFIX}")
+
+SET(RPCGEN_OUTPUT_CNLT
+  ${RPC_GENERATED_FILE_PREFIX}_clnt.c
+  ${RPC_GENERATED_FILE_PREFIX}_xdr.c
+  ${RPC_GENERATED_FILE_PREFIX}.h)
+
+SET(RPCGEN_OUTPUT_SRV
+  ${RPC_GENERATED_FILE_PREFIX}_svc.c
+  ${RPC_GENERATED_FILE_PREFIX}_xdr.c
+  ${RPC_GENERATED_FILE_PREFIX}.h)
+
+ADD_CUSTOM_TARGET(rpcgen_exec_svc
+  DEPENDS ${RPCGEN_OUTPUT_SRV}
+  )
+ADD_CUSTOM_TARGET(rpcgen_exec_clnt
+  DEPENDS ${RPCGEN_OUTPUT_CNLT}
+  )		  
+
+IF (WIN32)
+	
+  # Currently NO RPCGEN on Windows 
+  # Just using Linux generated files.
+  CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_svc.c
+	 	 ${RPC_GENERATED_FILE_PREFIX}_svc.c
+		 COPYONLY)
+
+  CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_clnt.c
+	 	 ${RPC_GENERATED_FILE_PREFIX}_clnt.c
+		 COPYONLY)
+
+  CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_xdr.c
+	 	 ${RPC_GENERATED_FILE_PREFIX}_xdr.c
+		 COPYONLY)
+
+  CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}.h
+	 	 ${RPC_GENERATED_FILE_PREFIX}.h
+		 COPYONLY)
+
+ELSE (WIN32)
+
+#  Note how CMake forced us to escape '#' sequence using '\\#'
+		    
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${RPC_GENERATED_FILE_PREFIX}_svc.c 
+    COMMAND echo "\\#ifdef VXWORKS" >  ${RPC_GENERATED_FILE_PREFIX}_svc.c
+    COMMAND echo "\\#define static extern" >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
+    COMMAND echo "\\#endif /* !VXWORKS */" >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
+    COMMAND ${RPCGEN} -N -C -m ${RPC_INPUT_FILE_PREFIX}.x >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+	
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${RPC_GENERATED_FILE_PREFIX}_clnt.c 
+    COMMAND ${RPCGEN} -N -C -l ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}_clnt.c
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+  
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${RPC_GENERATED_FILE_PREFIX}_xdr.c
+    COMMAND ${RPCGEN} -N -C -c ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}_xdr.c
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+  
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${RPC_GENERATED_FILE_PREFIX}.h
+    COMMAND ${RPCGEN} -N -C -h ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}.h
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/tsp_prjcfg.h
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+ENDIF (WIN32)
 
 #
 #Consumer library
@@ -81,15 +146,22 @@
 	driver/tsp_consumer
 	driver/tsp_group
 	driver/tsp_stream_receiver)
+	
+	TSP_XINCLUDE(${CONSUMER_LIB_SRCS})
+	
 	#RPC
 	SET(CONSUMER_LIB_SRCS
 	${CONSUMER_LIB_SRCS}
 	${RPCGEN_OUTPUT_CNLT}
 	rpc/tsp_client
-	rpc/tsp_rpc_confprogid)
-
+	rpc/tsp_rpc_confprogid)	
+	
 	ADD_LIBRARY(tsp_consumer ${CONSUMER_LIB_SRCS})
-	#ADD_DEPENDENCIES(tsp_consumer)
+	TSP_LIBRARY_INSTALL(tsp_consumer) 
+	ADD_DEPENDENCIES(tsp_consumer tsp_common rpcgen_exec_clnt)
+	IF (WIN32)
+		TARGET_LINK_LIBRARIES(tsp_consumer tsp_services ${PTHREAD_LIBRARY_NAME} Ws2_32 oncrpc)
+	ENDIF (WIN32)
 ENDIF(BUILD_CONSUMER)
 
 #
@@ -117,10 +189,15 @@
 	ctrl/tsp_group_algo
 	ctrl/tsp_data_sender
 	ctrl/tsp_stream_sender
-	ctrl/tsp_request_handler
-	ctrl/tsp_filter_symbol
 	ctrl_init/tsp_provider_init)
-
+	
+	TSP_XINCLUDE(${PROVIDER_LIB_SRCS})
+	
+	SET(PROVIDER_LIB_SRCS
+	${PROVIDER_LIB_SRCS}
+	ctrl/tsp_request_handler
+	ctrl/tsp_filter_symbol)	
+	
 	#RPC
 	SET(PROVIDER_LIB_SRCS
 	${PROVIDER_LIB_SRCS}
@@ -128,7 +205,18 @@
 	rpc/tsp_server
 	rpc/tsp_rpc_confprogid)
     
-    # PROVIDER LIB
+    # PROVIDER LIB    
 	ADD_LIBRARY(tsp_provider ${PROVIDER_LIB_SRCS})
-
-ENDIF(BUILD_PROVIDER)
+	TSP_LIBRARY_INSTALL(tsp_provider) 
+	ADD_DEPENDENCIES(tsp_provider tsp_common)
+	IF (WIN32)		
+		TARGET_LINK_LIBRARIES(tsp_provider tsp_services ${PTHREAD_LIBRARY_NAME} Ws2_32 oncrpc)
+	ENDIF (WIN32)
+	
+	ADD_EXECUTABLE(tsp_rpc_cleanup rpc/tsp_rpc_cleanup.c rpc/tsp_rpc_confprogid)
+	TSP_PROGRAM_INSTALL(tsp_rpc_cleanup)
+	ADD_DEPENDENCIES(tsp_rpc_cleanup tsp_common tsp_provider tsp_services)
+	IF (WIN32)		
+		TARGET_LINK_LIBRARIES(tsp_rpc_cleanup tsp_services Ws2_32 oncrpc)		
+	ENDIF (WIN32)	
+ENDIF(BUILD_PROVIDER)
\ Pas de fin de ligne à la fin du fichier.
