MAJOR: stream/conn_stream: Move the stream-interface into the conn-stream
Thanks to all previous changes, it is now possible to move the
stream-interface into the conn-stream. To do so, some SI functions are
removed and their conn-stream counterparts are added. In addition, the
conn-stream is now responsible to create and release the
stream-interface. While the stream-interfaces were inlined in the stream
structure, there is now a pointer in the conn-stream. stream-interfaces are
now dynamically allocated. Thus a dedicated pool is added. It is a temporary
change because, at the end, the stream-interface structure will most
probably disappear.
diff --git a/src/tcp_sample.c b/src/tcp_sample.c
index 4a77036..895a130 100644
--- a/src/tcp_sample.c
+++ b/src/tcp_sample.c
@@ -65,7 +65,7 @@
src = conn_src(conn);
}
else /* src */
- src = (smp->strm ? si_src(&smp->strm->si[0]) : sess_src(smp->sess));
+ src = (smp->strm ? si_src(smp->strm->csf->si) : sess_src(smp->sess));
if (!src)
return 0;
@@ -109,7 +109,7 @@
src = conn_src(conn);
}
else /* src_port */
- src = (smp->strm ? si_src(&smp->strm->si[0]) : sess_src(smp->sess));
+ src = (smp->strm ? si_src(smp->strm->csf->si) : sess_src(smp->sess));
if (!src)
return 0;
@@ -144,7 +144,7 @@
dst = conn_dst(conn);
}
else /* dst */
- dst = (smp->strm ? si_dst(&smp->strm->si[0]) : sess_dst(smp->sess));
+ dst = (smp->strm ? si_dst(smp->strm->csf->si) : sess_dst(smp->sess));
if (!dst)
return 0;
@@ -181,7 +181,7 @@
dst = conn_dst(conn);
}
else /* dst_is_local */
- dst = (smp->strm ? si_dst(&smp->strm->si[0]) : sess_dst(smp->sess));
+ dst = (smp->strm ? si_dst(smp->strm->csf->si) : sess_dst(smp->sess));
if (!dst)
return 0;
@@ -207,7 +207,7 @@
src = conn_src(conn);
}
else /* src_is_local */
- src = (smp->strm ? si_src(&smp->strm->si[0]) : sess_src(smp->sess));
+ src = (smp->strm ? si_src(smp->strm->csf->si) : sess_src(smp->sess));
if (!src)
return 0;
@@ -240,7 +240,7 @@
dst = conn_dst(conn);
}
else /* dst_port */
- dst = (smp->strm ? si_dst(&smp->strm->si[0]) : sess_dst(smp->sess));
+ dst = (smp->strm ? si_dst(smp->strm->csf->si) : sess_dst(smp->sess));
if (!dst)
return 0;