Index: trunk/kernel/syscalls/sys_display.c
===================================================================
--- trunk/kernel/syscalls/sys_display.c	(revision 657)
+++ trunk/kernel/syscalls/sys_display.c	(revision 664)
@@ -35,5 +35,5 @@
 #include <vfs.h>
 #include <mapper.h>
-
+#include <ksocket.h>
 #include <syscalls.h>
 
@@ -57,4 +57,5 @@
     else if( type == DISPLAY_BARRIER           ) return "BARRIER";
     else if( type == DISPLAY_FAT               ) return "FAT";
+    else if( type == DISPLAY_SOCKET            ) return "SOCKET";
     else                                         return "undefined";
 }
@@ -81,6 +82,7 @@
 tm_start = hal_get_cycles();
 if( DEBUG_SYS_DISPLAY < tm_start )
-printk("\n[%s] thread[%x,%x] enter / type  %s / cycle = %d\n",
-__FUNCTION__, process->pid, this->trdid, display_type_str(type), (uint32_t)tm_start );
+printk("\n[%s] thread[%x,%x] enter / type  %s / arg0 %x / arg1 %x / arg2 %x / cycle = %d\n",
+__FUNCTION__, process->pid, this->trdid, display_type_str(type),
+(uint32_t)arg0, (uint32_t)arg1, (uint32_t)arg2, (uint32_t)tm_start );
 #endif
 
@@ -114,5 +116,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for STRING : string length %d too large\n",
+printk("\n[ERROR] in %s STRING : string length %d too large\n",
 __FUNCTION__ , length );
 #endif
@@ -143,5 +145,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for VMM : process %x in cluster %x not found\n",
+printk("\n[ERROR] in %s VMM : process %x in cluster %x not found\n",
 __FUNCTION__ , pid , cxy );
 #endif
@@ -156,5 +158,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for VMM : process %x in cluster %x not found\n",
+printk("\n[ERROR] in %s VMM : process %x in cluster %x not found\n",
 __FUNCTION__ , pid , cxy );
 #endif
@@ -179,5 +181,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for SCHED : illegal cxy argument %x\n",
+printk("\n[ERROR] in %s SCHED : illegal cxy argument %x\n",
 __FUNCTION__ , cxy );
 #endif
@@ -191,5 +193,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for SCHED : illegal lid argument %x\n",
+printk("\n[ERROR] in %s SCHED : illegal lid argument %x\n",
 __FUNCTION__ , lid );
 #endif
@@ -214,5 +216,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for CLUSTER_PROCESSES : illegal cxy argument %x\n",
+printk("\n[ERROR] in %s CLUSTER_PROCESSES : illegal cxy argument %x\n",
 __FUNCTION__ , cxy );
 #endif
@@ -249,5 +251,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for TXT_PROCESSES : illegal txt_id argument %d\n",
+printk("\n[ERROR] in %s TXT_PROCESSES : illegal txt_id argument %d\n",
 __FUNCTION__ , txt_id );
 #endif
@@ -280,5 +282,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for BUSYLOCKS : thread[%x,%x] not found\n",
+printk("\n[ERROR] in %s BUSYLOCKS : thread[%x,%x] not found\n",
 __FUNCTION__ , pid, trdid );
 #endif
@@ -313,5 +315,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for MAPPER : pathname too long\n",
+printk("\n[ERROR] in %s MAPPER : pathname too long\n",
  __FUNCTION__ );
 #endif
@@ -325,5 +327,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for MAPPER : nbytes cannot be larger than 4096\n",
+printk("\n[ERROR] in %s MAPPER : nbytes cannot be larger than 4096\n",
  __FUNCTION__ );
 #endif
@@ -386,5 +388,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for MAPPER : cannot get page %d\n",
+printk("\n[ERROR] in %s MAPPER : cannot get page %d\n",
 __FUNCTION__ , page_id );
 #endif
@@ -414,5 +416,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for BARRIER : process %x not found\n",
+printk("\n[ERROR] in %s BARRIER : process %x not found\n",
 __FUNCTION__ , pid );
 #endif
@@ -428,5 +430,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for BARRIER : no registered barrier in process %x\n",
+printk("\n[ERROR] in %s BARRIER : no registered barrier in process %x\n",
 __FUNCTION__ , pid );
 #endif
@@ -452,5 +454,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for FAT : nb_slots larger than 1024\n",
+printk("\n[ERROR] in %s FAT : nb_slots larger than 1024\n",
 __FUNCTION__ );
 #endif
@@ -467,5 +469,5 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s for FAT : illegal cxy argument %x\n",
+printk("\n[ERROR] in %s FAT : illegal cxy argument %x\n",
 __FUNCTION__ , cxy );
 #endif
@@ -482,4 +484,48 @@
                 fatfs_display_fat( min , slots );
             }
+
+            break;
+        }
+        ////////////////////
+        case DISPLAY_SOCKET:
+        {
+            pid_t   pid   = (pid_t)arg0;
+            trdid_t fdid  = (trdid_t)arg1;
+
+            // get extended pointer on owner process descriptor
+            xptr_t owner_xp = cluster_get_owner_process_from_pid( pid );
+
+            if( owner_xp == XPTR_NULL )
+            {
+
+#if DEBUG_SYSCALLS_ERROR
+printk("\n[ERROR] in %s SOCKET : pid %x not found\n", __FUNCTION__ , pid );
+#endif
+                this->errno = EINVAL;
+                return -1;
+            }
+
+            // get extended pointer on file descriptor 
+            xptr_t file_xp = process_fd_get_xptr_from_owner( owner_xp , fdid );
+
+            if( file_xp == XPTR_NULL )
+            {
+
+#if DEBUG_SYSCALLS_ERROR
+printk("\n[ERROR] in %s SOCKET : fdid %d not found\n", __FUNCTION__ , fdid );
+#endif
+                this->errno = EINVAL;
+                return -1;
+            }
+
+            // get local pointer and cluster for file
+            vfs_file_t * file_ptr = GET_PTR( file_xp );
+            cxy_t        file_cxy = GET_CXY( file_xp );
+
+            // get local pointer on socket descriptor
+            socket_t * socket = hal_remote_lpt( XPTR( file_cxy , &file_ptr->socket ) );
+
+            // display socket descriptor on TXT0
+            socket_display( XPTR( file_cxy , socket ), NULL );
 
             break;
