diff options
Diffstat (limited to 'src/core/options.h')
| -rw-r--r-- | src/core/options.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/options.h b/src/core/options.h index 2d843a4c..ec5cce90 100644 --- a/src/core/options.h +++ b/src/core/options.h @@ -37,6 +37,17 @@ extern int nni_setopt_int(int *, const void *, size_t, int, int); // nni_getopt_int gets an integer. extern int nni_getopt_int(int *, void *, size_t *); +// nni_setopt_size sets a size_t option. +extern int nni_setopt_size(size_t *, const void *, size_t, size_t, size_t); + +// We limit the maximum size to 4GB. That's intentional because some of the +// underlying protocols cannot cope with anything bigger than 32-bits. +#define NNI_MINSZ (0) +#define NNI_MAXSZ ((size_t) 0xffffffff) + +// nni_getopt_size obtains a size_t option. +extern int nni_getopt_size(size_t *, void *, size_t *); + // nni_getopt_fd obtains a notification file descriptor. extern int nni_getopt_fd(nni_sock *, nni_notifyfd *, int, void *, size_t *); |
