aboutsummaryrefslogtreecommitdiff
path: root/src/core/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/protocol.c')
-rw-r--r--src/core/protocol.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/src/core/protocol.c b/src/core/protocol.c
index 113746b1..6399cd41 100644
--- a/src/core/protocol.c
+++ b/src/core/protocol.c
@@ -1,37 +1,33 @@
-/*
- * Copyright 2016 Garrett D'Amore <garrett@damore.org>
- *
- * This software is supplied under the terms of the MIT License, a
- * copy of which should be located in the distribution where this
- * file was obtained (LICENSE.txt). A copy of the license may also be
- * found online at https://opensource.org/licenses/MIT.
- */
+//
+// Copyright 2016 Garrett D'Amore <garrett@damore.org>
+//
+// This software is supplied under the terms of the MIT License, a
+// copy of which should be located in the distribution where this
+// file was obtained (LICENSE.txt). A copy of the license may also be
+// found online at https://opensource.org/licenses/MIT.
+//
#include <string.h>
#include "core/nng_impl.h"
-/*
- * Protocol related stuff - generically.
- */
+// Protocol related stuff - generically.
-/*
- * The list of protocols is hardwired. This is reasonably unlikely to
- * change, as adding new protocols is not something intended to be done
- * outside of the core.
- */
-extern struct nni_protocol nni_pair_protocol;
+// The list of protocols is hardwired. This is reasonably unlikely to
+// change, as adding new protocols is not something intended to be done
+// outside of the core.
+extern nni_protocol nni_pair_protocol;
-static struct nni_protocol *protocols[] = {
+static nni_protocol *protocols[] = {
&nni_pair_protocol,
NULL
};
-struct nni_protocol *
+nni_protocol *
nni_protocol_find(uint16_t num)
{
int i;
- struct nni_protocol *p;
+ nni_protocol *p;
for (i = 0; (p = protocols[i]) != NULL; i++) {
if (p->proto_self == num) {
@@ -45,7 +41,7 @@ nni_protocol_find(uint16_t num)
const char *
nni_protocol_name(uint16_t num)
{
- struct nni_protocol *p;
+ nni_protocol *p;
if ((p = nni_protocol_find(num)) == NULL) {
return (NULL);
@@ -57,7 +53,7 @@ nni_protocol_name(uint16_t num)
uint16_t
nni_protocol_number(const char *name)
{
- struct nni_protocol *p;
+ nni_protocol *p;
int i;
for (i = 0; (p = protocols[i]) != NULL; i++) {