From 58c24226e1d688a4eb0d5c3e041d0ee12152c045 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 14 Dec 2016 10:55:01 -0800 Subject: nn_socket_create() implemented. --- src/core/protocol.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/protocol.h') diff --git a/src/core/protocol.h b/src/core/protocol.h index a6000863..d7396456 100644 --- a/src/core/protocol.h +++ b/src/core/protocol.h @@ -47,6 +47,7 @@ struct nni_protocol { */ uint16_t proto_self; /* our 16-bit protocol ID */ uint16_t proto_peer; /* who we peer with (protocol ID) */ + const char *proto_name; /* string version of our name */ /* * Create protocol instance data, which will be stored on the socket. @@ -136,4 +137,12 @@ extern int nni_pipe_send(nng_pipe_t, nng_msg_t); extern uint32_t nni_pipe_id(nng_pipe_t); extern void nni_pipe_close(nng_pipe_t); +/* + * These functions are not used by protocols, but rather by the socket + * core implementation. The lookups can be used by transports as well. + */ +extern struct nni_protocol *nni_protocol_find(uint16_t); +extern const char *nni_protocol_name(uint16_t); +extern uint16_t nni_protocol_number(const char *); + #endif /* CORE_PROTOCOL_H */ -- cgit v1.2.3-70-g09d2