INN commit: trunk/include/portable (getnameinfo.h)

INN Commit Russ_Allbery at isc.org
Fri Feb 9 02:47:01 UTC 2007


    Date: Thursday, February 8, 2007 @ 18:47:01
  Author: eagle
Revision: 7600

Add NI_MAXHOST and NI_MAXSERV constants, which are part of the
documented API.

Modified:
  trunk/include/portable/getnameinfo.h

---------------+
 getnameinfo.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

Modified: getnameinfo.h
===================================================================
--- getnameinfo.h	2007-02-09 02:46:39 UTC (rev 7599)
+++ getnameinfo.h	2007-02-09 02:47:01 UTC (rev 7600)
@@ -32,6 +32,16 @@
 #define NI_NUMERICSERV  0x0008
 #define NI_DGRAM        0x0010
 
+/* Maximum length of hostnames and service names.  Our implementation doesn't
+   use these values, so they're taken from Linux.  They're provided just for
+   code that uses them to size buffers. */
+#ifndef NI_MAXHOST
+# define NI_MAXHOST     1025
+#endif
+#ifndef NI_MAXSERV
+# define NI_MAXSERV     32
+#endif
+
 BEGIN_DECLS
 
 int getnameinfo(const struct sockaddr *sa, socklen_t salen,



More information about the inn-committers mailing list