summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-25 09:22:05 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-25 09:22:05 -0800
commit147d8408f577678331daf1cd06ae9aac6c231dab (patch)
treecdd8c66425dd9ae807b49337b952c20616040c35
parent00d021b7ad602e467c55757b6e39e40e0c021f9a (diff)
downloadnng-147d8408f577678331daf1cd06ae9aac6c231dab.tar.gz
nng-147d8408f577678331daf1cd06ae9aac6c231dab.tar.bz2
nng-147d8408f577678331daf1cd06ae9aac6c231dab.zip
Stubs for stats & device functions.
-rw-r--r--src/nng.c69
-rw-r--r--src/nng.h4
2 files changed, 71 insertions, 2 deletions
diff --git a/src/nng.c b/src/nng.c
index 9d20822f..4949dfe1 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -266,3 +266,72 @@ nng_msg_getopt(nng_msg *msg, int opt, void *ptr, size_t *szp)
NNI_INIT_INT();
return (nni_msg_getopt(msg, opt, ptr, szp));
}
+
+
+int
+nng_snapshot_create(nng_snapshot **snapp)
+{
+ // Stats TBD.
+ NNI_INIT_INT();
+ return (NNG_ENOTSUP);
+}
+
+
+void
+nng_snapshot_destroy(nng_snapshot *snap)
+{
+ NNI_INIT_VOID();
+ // Stats TBD.
+}
+
+
+int
+nng_snapshot_update(nng_socket *sock, nng_snapshot *snap)
+{
+ // Stats TBD.
+ NNI_INIT_INT();
+ return (NNG_ENOTSUP);
+}
+
+
+int
+nng_snapshot_next(nng_snapshot *snap, nng_stat **statp)
+{
+ // Stats TBD.
+ NNI_INIT_INT();
+ *statp = NULL;
+ return (NNG_ENOTSUP);
+}
+
+
+const char *
+nng_stat_name(nng_stat *stat)
+{
+ // Stats TBD.
+ return (NULL);
+}
+
+
+int
+nng_stat_type(nng_stat *stat)
+{
+ // Stats TBD.
+ return (0);
+}
+
+
+int64_t
+nng_stat_value(nng_stat *stat)
+{
+ // Stats TBD.
+ return (0);
+}
+
+
+int
+nng_device(nng_socket *sock1, nng_socket *sock2)
+{
+ // Device TBD.
+ NNI_INIT_INT();
+ return (NNG_ENOTSUP);
+}
diff --git a/src/nng.h b/src/nng.h
index 5afbca8d..be8b57c9 100644
--- a/src/nng.h
+++ b/src/nng.h
@@ -280,7 +280,7 @@ NNG_DECL void nng_snapshot_free(nng_snapshot *);
// sockets.
NNG_DECL int nng_snapshot_update(nng_socket *, nng_snapshot *);
-// nng_snapshot_iterate is used to iterate over the individual statistic
+// nng_snapshot_next is used to iterate over the individual statistic
// objects inside the snapshot. Note that the statistic object, and the
// meta-data for the object (name, type, units) is fixed, and does not
// change for the entire life of the snapshot. Only the value
@@ -289,7 +289,7 @@ NNG_DECL int nng_snapshot_update(nng_socket *, nng_snapshot *);
// Iteration begins by providing NULL in the value referenced. Successive
// calls will update this value, returning NULL when no more statistics
// are available in the snapshot.
-NNG_DECL nng_stat *nng_snapshot_iterate(nng_snapshot *, nng_stat *);
+NNG_DECL int nng_snapshot_next(nng_snapshot *, nng_stat **);
// nng_stat_name is used to determine the name of the statistic.
// This is a human readable name. Statistic names, as well as the presence