MINOR: stream_interface: add an init callback to sock_ops
This will be needed for some socket layers such as SSL. It's not used
at the moment.
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index 2c57acd..fb89f50 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -106,6 +106,7 @@
};
struct sock_ops {
+ int (*init)(struct stream_interface *, void *); /* init function */
void (*update)(struct stream_interface *); /* I/O update function */
void (*shutr)(struct stream_interface *); /* shutr function */
void (*shutw)(struct stream_interface *); /* shutw function */
diff --git a/src/sock_raw.c b/src/sock_raw.c
index 7e0d4c9..4712362 100644
--- a/src/sock_raw.c
+++ b/src/sock_raw.c
@@ -1151,6 +1151,7 @@
/* stream sock operations */
struct sock_ops sock_raw = {
+ .init = NULL,
.update = sock_raw_data_finish,
.shutr = sock_raw_shutr,
.shutw = sock_raw_shutw,
diff --git a/src/stream_interface.c b/src/stream_interface.c
index 9dfda93..69db42f 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -42,6 +42,7 @@
/* socket operations for embedded tasks */
struct sock_ops stream_int_embedded = {
+ .init = NULL,
.update = stream_int_update_embedded,
.shutr = stream_int_shutr,
.shutw = stream_int_shutw,
@@ -53,6 +54,7 @@
/* socket operations for external tasks */
struct sock_ops stream_int_task = {
+ .init = NULL,
.update = stream_int_update,
.shutr = stream_int_shutr,
.shutw = stream_int_shutw,