From 64db0f085be0c9efc6dca8d9e72d3e5a47cb792e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 25 Sep 2017 12:49:10 -0700 Subject: Refactor option handling APIs. This makes the APIs use string keys, and largely eliminates the use of integer option IDs altogether. The underlying registration for options is also now a bit richer, letting protcols and transports declare the actual options they use, rather than calling down into each entry point carte blanche and relying on ENOTSUP. This code may not be as fast as the integers was, but it is more intuitive, easier to extend, and is not on any hot code paths. (If you're diddling options on a hot code path you're doing something wrong.) --- src/core/options.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/options.h') diff --git a/src/core/options.h b/src/core/options.h index 64036db1..418a5d00 100644 --- a/src/core/options.h +++ b/src/core/options.h @@ -72,4 +72,14 @@ extern const char *nni_option_name(int); extern int nni_option_sys_init(void); extern void nni_option_sys_fini(void); +extern int nni_optid_raw; +extern int nni_optid_recvmaxsz; +extern int nni_optid_maxttl; +extern int nni_optid_protocol; +extern int nni_optid_transport; +extern int nni_optid_locaddr; +extern int nni_optid_remaddr; +extern int nni_optid_req_resendtime; +extern int nni_optid_surveyor_surveytime; + #endif // CORE_OPTIONS_H -- cgit v1.2.3-70-g09d2