aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd/src/epmd_int.h
diff options
context:
space:
mode:
authorRickard Green <rickard@erlang.org>2013-01-22 18:35:35 +0100
committerRickard Green <rickard@erlang.org>2013-01-22 18:35:35 +0100
commit3aa60cc472bc330dbe9360eb27a1f340b7e23dc6 (patch)
tree5ca569797dfe588914c83abc599e03d120cce9cc /erts/epmd/src/epmd_int.h
parent5ee4c7136ce8f311e3d3384ae0feb29bcbff6e85 (diff)
downloadotp-3aa60cc472bc330dbe9360eb27a1f340b7e23dc6.tar.gz
otp-3aa60cc472bc330dbe9360eb27a1f340b7e23dc6.tar.bz2
otp-3aa60cc472bc330dbe9360eb27a1f340b7e23dc6.zip
Add UTF-8 node name support for epmd
Diffstat (limited to 'erts/epmd/src/epmd_int.h')
-rw-r--r--erts/epmd/src/epmd_int.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
index 14d05c3f19..b25412c905 100644
--- a/erts/epmd/src/epmd_int.h
+++ b/erts/epmd/src/epmd_int.h
@@ -226,13 +226,25 @@
#define MAX_UNREG_COUNT 1000
#define DEBUG_MAX_UNREG_COUNT 5
-/* Maximum length of a node name == atom name */
-#define MAXSYMLEN 255
+/*
+ * Maximum length of a node name == atom name
+ * 255 characters; UTF-8 encoded -> max 255*4
+ */
+#define MAXSYMLEN (255*4)
#define MAX_LISTEN_SOCKETS 16
-#define INBUF_SIZE 1024
-#define OUTBUF_SIZE 1024
+/*
+ * Largest request: ALIVE2_REQ
+ * 2 + 13 + 2*MAXSYMLEN
+ * Largest response: PORT2_RESP
+ * 2 + 14 + 2*MAXSYMLEN
+ *
+ * That is, 3*MAXSYMLEN should be large enough
+ */
+
+#define INBUF_SIZE (3*MAXSYMLEN)
+#define OUTBUF_SIZE (3*MAXSYMLEN)
#define get_int16(s) ((((unsigned char*) (s))[0] << 8) | \
(((unsigned char*) (s))[1]))