From 9302d584dcf68489a9c4739a3a42a468323ccda6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Jul 2013 07:55:29 +0000 Subject: struct mog_ni: document reasoning for the ':' in ni_serv This is somewhat strange, but makes the code base slightly easier to reuse for non-HTTP purposes. --- cmogstored.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmogstored.h b/cmogstored.h index c12234b..f7fa022 100644 --- a/cmogstored.h +++ b/cmogstored.h @@ -615,6 +615,12 @@ verify(sizeof(in_port_t) <= sizeof(uint16_t)); */ struct mog_ni { char ni_host[INET6_ADDRSTRLEN + sizeof("[]") - 1]; + + /* + * we may not always be serving protocols with port numbers in them, + * so we embed space for the ":" in the ni_serv field to make managing + * syslog(3) format strings more flexible. + */ char ni_serv[sizeof(":65536")]; }; -- cgit v1.2.3-24-ge0c7