From b867041c62b48e89c9f00430cde4c33f13a2da09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sat, 7 Apr 2018 16:04:51 -0400 Subject: [PATCH] Increase LTTNG_HOST_NAME_MAX from 64 to 255 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit POSIX guarantees that a host name will not exceed 255 characters. Moreover, RFC 1035 limits the length of a fully qualified domain name (FQDN) to 255 characters. This limit will be used as part of the lttngctl communication protocol. Signed-off-by: Jérémie Galarneau --- include/lttng/constant.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/lttng/constant.h b/include/lttng/constant.h index 00074a2e4..1235c346f 100644 --- a/include/lttng/constant.h +++ b/include/lttng/constant.h @@ -56,7 +56,14 @@ #define LTTNG_NAME_MAX 255 -#define LTTNG_HOST_NAME_MAX 64 +/* + * POSIX guarantees that a host name will not exceed 255 characters. + * Moreover, RFC 1035 limits the length of a fully qualified domain name (FQDN) + * to 255 characters. + * + * 256 is used to include a trailing NULL character. + */ +#define LTTNG_HOST_NAME_MAX 256 #define LTTNG_PATH_MAX 4096 -- 2.34.1