diff options
Diffstat (limited to 'src/core/transport.h')
| -rw-r--r-- | src/core/transport.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/core/transport.h b/src/core/transport.h index 1736f8ea..338b3f67 100644 --- a/src/core/transport.h +++ b/src/core/transport.h @@ -27,7 +27,8 @@ #define NNI_TRANSPORT_V3 0x54520003 #define NNI_TRANSPORT_V4 0x54520004 #define NNI_TRANSPORT_V5 0x54520005 -#define NNI_TRANSPORT_VERSION NNI_TRANSPORT_V5 +#define NNI_TRANSPORT_V6 0x54220006 +#define NNI_TRANSPORT_VERSION NNI_TRANSPORT_V6 // Endpoint operations are called by the socket in a // protocol-independent fashion. The socket makes individual calls, @@ -58,6 +59,12 @@ struct nni_tran_dialer_ops { // nonblocking. void (*d_close)(void *); + // d_getopt is used to obtain an option. + int (*d_getopt)(void *, const char *, void *, size_t *, nni_type); + + // d_setopt is used to set or change an option. + int (*d_setopt)(void *, const char *, const void *, size_t, nni_type); + // d_options is an array of dialer options. The final // element must have a NULL name. If this member is NULL, then // no dialer specific options are available. @@ -88,6 +95,12 @@ struct nni_tran_listener_ops { // nonblocking. void (*l_close)(void *); + // l_getopt is used to obtain an option. + int (*l_getopt)(void *, const char *, void *, size_t *, nni_type); + + // l_setopt is used to set or change an option. + int (*l_setopt)(void *, const char *, const void *, size_t, nni_type); + // l_options is an array of listener options. The final // element must have a NULL name. If this member is NULL, then // no dialer specific options are available. @@ -137,6 +150,10 @@ struct nni_tran_pipe_ops { // whatever transport specific manner is appropriate. uint16_t (*p_peer)(void *); + // p_getopt is used to obtain an option. Pipes don't implement + // option setting. + int (*p_getopt)(void *, const char *, void *, size_t *, nni_type); + // p_options is an array of pipe options. The final element // must have a NULL name. If this member is NULL, then no // transport specific options are available. |
