CLEANUP: stream_interface: stop exporting socket layer functions

Similarly to the previous patch, we don't need the socket-layer functions
outside of stream_interface. They could even move to a file dedicated to
applets, though that does not seem particularly useful at the moment.
diff --git a/src/peers.c b/src/peers.c
index 016a05f..5456410 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1177,13 +1177,12 @@
 	s->si[1].release = NULL;
 	s->si[1].send_proxy_ofs = 0;
 	set_target_proxy(&s->si[1].target, s->be);
+	stream_interface_prepare(&s->si[1], &sock_raw);
 	s->si[1].exp = TICK_ETERNITY;
 	s->si[1].flags = SI_FL_NONE;
 	if (s->be->options2 & PR_O2_INDEPSTR)
 		s->si[1].flags |= SI_FL_INDEP_STR;
 
-	stream_interface_prepare(&s->si[1], &sock_raw);
-
 	session_init_srv_conn(s);
 	set_target_proxy(&s->target, s->be);
 	s->pend_pos = NULL;
diff --git a/src/session.c b/src/session.c
index 2cb8b66..cd80b8a 100644
--- a/src/session.c
+++ b/src/session.c
@@ -199,8 +199,7 @@
 	s->si[1].release   = NULL;
 	s->si[1].send_proxy_ofs = 0;
 	clear_target(&s->si[1].target);
-	s->si[1].sock.shutr= stream_int_shutr;
-	s->si[1].sock.shutw= stream_int_shutw;
+	stream_interface_prepare(&s->si[1], &stream_int_embedded);
 	s->si[1].exp       = TICK_ETERNITY;
 	s->si[1].flags     = SI_FL_NONE;
 
diff --git a/src/stream_interface.c b/src/stream_interface.c
index 75a6dc9..9dfda93 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -1,7 +1,7 @@
 /*
  * Functions managing stream_interface structures
  *
- * Copyright 2000-2011 Willy Tarreau <w@1wt.eu>
+ * Copyright 2000-2012 Willy Tarreau <w@1wt.eu>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -32,6 +32,14 @@
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
+/* socket functions used when running a stream interface as a task */
+static void stream_int_update(struct stream_interface *si);
+static void stream_int_update_embedded(struct stream_interface *si);
+static void stream_int_shutr(struct stream_interface *si);
+static void stream_int_shutw(struct stream_interface *si);
+static void stream_int_chk_rcv(struct stream_interface *si);
+static void stream_int_chk_snd(struct stream_interface *si);
+
 /* socket operations for embedded tasks */
 struct sock_ops stream_int_embedded = {
 	.update  = stream_int_update_embedded,
@@ -107,7 +115,7 @@
 }
 
 /* default update function for scheduled tasks, not used for embedded tasks */
-void stream_int_update(struct stream_interface *si)
+static void stream_int_update(struct stream_interface *si)
 {
 	DPRINTF(stderr, "%s: si=%p, si->state=%d ib->flags=%08x ob->flags=%08x\n",
 		__FUNCTION__,
@@ -118,7 +126,7 @@
 }
 
 /* default update function for embedded tasks, to be used at the end of the i/o handler */
-void stream_int_update_embedded(struct stream_interface *si)
+static void stream_int_update_embedded(struct stream_interface *si)
 {
 	int old_flags = si->flags;
 
@@ -197,7 +205,7 @@
 }
 
 /* default shutr function for scheduled tasks */
-void stream_int_shutr(struct stream_interface *si)
+static void stream_int_shutr(struct stream_interface *si)
 {
 	DPRINTF(stderr, "%s: si=%p, si->state=%d ib->flags=%08x ob->flags=%08x\n",
 		__FUNCTION__,
@@ -227,7 +235,7 @@
 }
 
 /* default shutw function for scheduled tasks */
-void stream_int_shutw(struct stream_interface *si)
+static void stream_int_shutw(struct stream_interface *si)
 {
 	DPRINTF(stderr, "%s: si=%p, si->state=%d ib->flags=%08x ob->flags=%08x\n",
 		__FUNCTION__,
@@ -268,7 +276,7 @@
 }
 
 /* default chk_rcv function for scheduled tasks */
-void stream_int_chk_rcv(struct stream_interface *si)
+static void stream_int_chk_rcv(struct stream_interface *si)
 {
 	struct buffer *ib = si->ib;
 
@@ -293,7 +301,7 @@
 }
 
 /* default chk_snd function for scheduled tasks */
-void stream_int_chk_snd(struct stream_interface *si)
+static void stream_int_chk_snd(struct stream_interface *si)
 {
 	struct buffer *ob = si->ob;