aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2021-07-10 17:01:58 -0700
committerGarrett D'Amore <garrett@damore.org>2021-07-10 17:03:24 -0700
commitba34c3a22a9244f5b2afca3c7ca766503ed63f16 (patch)
treeb45b70e760dd8bdf561213cfe9df5ee143f9b5ab /src/sp/transport.h
parent16597cc81cc9fbdfd15349be1b0bd57fb9392241 (diff)
downloadnng-ba34c3a22a9244f5b2afca3c7ca766503ed63f16.tar.gz
nng-ba34c3a22a9244f5b2afca3c7ca766503ed63f16.tar.bz2
nng-ba34c3a22a9244f5b2afca3c7ca766503ed63f16.zip
More work on moving SP stuff out of common. Remove unused defs.
Diffstat (limited to 'src/sp/transport.h')
-rw-r--r--src/sp/transport.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/sp/transport.h b/src/sp/transport.h
index b2da2c7a..d28053b9 100644
--- a/src/sp/transport.h
+++ b/src/sp/transport.h
@@ -22,15 +22,8 @@
// during the life of the project. If we add a new version, please keep
// the old version around -- it may be possible to automatically convert
// older versions in the future.
-#define NNI_TRANSPORT_V0 0x54520000
-#define NNI_TRANSPORT_V1 0x54520001
-#define NNI_TRANSPORT_V2 0x54520002
-#define NNI_TRANSPORT_V3 0x54520003
-#define NNI_TRANSPORT_V4 0x54520004
-#define NNI_TRANSPORT_V5 0x54520005
-#define NNI_TRANSPORT_V6 0x54220006
-#define NNI_TRANSPORT_V7 0x54220006
-#define NNI_TRANSPORT_VERSION NNI_TRANSPORT_V7
+#define NNI_TRANSPORT_V8 0x54220008
+#define NNI_TRANSPORT_VERSION NNI_TRANSPORT_V8
// Endpoint operations are called by the socket in a
// protocol-independent fashion. The socket makes individual calls,
@@ -42,7 +35,7 @@
// point is run exclusively of the others. (Transports must still guard
// against any asynchronous operations they manage themselves, though.)
-struct nni_tran_dialer_ops {
+struct nni_sp_dialer_ops {
// d_init creates a vanilla dialer. The value created is
// used for the first argument for all other dialer functions.
int (*d_init)(void **, nni_url *, nni_dialer *);
@@ -73,7 +66,7 @@ struct nni_tran_dialer_ops {
nni_option *d_options;
};
-struct nni_tran_listener_ops {
+struct nni_sp_listener_ops {
// l_init creates a vanilla listener. The value created is
// used for the first argument for all other listener functions.
int (*l_init)(void **, nni_url *, nni_listener *);
@@ -114,7 +107,7 @@ struct nni_tran_listener_ops {
// to call back into the socket at this point. (Which is one reason
// pointers back to socket or even enclosing pipe state, are not
// provided.)
-struct nni_tran_pipe_ops {
+struct nni_sp_pipe_ops {
// p_init initializes the pipe data structures. The main
// purpose of this is so that the pipe will see the upper
// layer nni_pipe and get a chance to register stats and such.
@@ -159,7 +152,7 @@ struct nni_tran_pipe_ops {
// Transport implementation details. Transports must implement the
// interfaces in this file.
-struct nni_tran {
+struct nni_sp_tran {
// tran_version is the version of the transport ops that this
// transport implements. We only bother to version the main
// ops vector.
@@ -169,13 +162,13 @@ struct nni_tran {
const char *tran_scheme;
// tran_dialer links our dialer-specific operations.
- const nni_tran_dialer_ops *tran_dialer;
+ const nni_sp_dialer_ops *tran_dialer;
// tran_listener links our listener-specific operations.
- const nni_tran_listener_ops *tran_listener;
+ const nni_sp_listener_ops *tran_listener;
// tran_pipe links our pipe-specific operations.
- const nni_tran_pipe_ops *tran_pipe;
+ const nni_sp_pipe_ops *tran_pipe;
// tran_init, if not NULL, is called once during library
// initialization.
@@ -188,9 +181,9 @@ struct nni_tran {
// These APIs are used by the framework internally, and not for use by
// transport implementations.
-extern nni_tran *nni_tran_find(nni_url *);
+extern nni_sp_tran *nni_tran_find(nni_url *);
extern int nni_tran_sys_init(void);
extern void nni_tran_sys_fini(void);
-extern int nni_tran_register(const nni_tran *);
+extern int nni_tran_register(const nni_sp_tran *);
#endif // CORE_TRANSPORT_H