MEDIUM: stream-int: add a flag indicating which side the SI is on
This new flag "SI_FL_ISBACK" is set only on the back SI and is cleared
on the front SI. That way it's possible only by looking at the SI to
know what side it is.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 4dfd20f..aba94c7 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -108,7 +108,7 @@
si->err_type = SI_ET_NONE;
si->conn_retries = 0; /* used for logging too */
si->exp = TICK_ETERNITY;
- si->flags = SI_FL_NONE;
+ si->flags &= SI_FL_ISBACK;
si->end = NULL;
si->state = si->prev_state = SI_ST_INI;
}
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index 03cdd6e..49507a4 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -72,7 +72,7 @@
SI_FL_ERR = 0x0002, /* a non-recoverable error has occurred */
SI_FL_WAIT_ROOM = 0x0004, /* waiting for space to store incoming data */
SI_FL_WAIT_DATA = 0x0008, /* waiting for more data to send */
- /* unused 0x0010 */
+ SI_FL_ISBACK = 0x0010, /* 0 for front-side SI, 1 for back-side */
SI_FL_DONT_WAKE = 0x0020, /* resync in progress, don't wake up */
SI_FL_INDEP_STR = 0x0040, /* independent streams = don't update rex on write */
SI_FL_NOLINGER = 0x0080, /* may close without lingering. One-shot. */