aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/epmd/epmd_port.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-08-24 14:43:18 +0200
committerPatrik Nyblom <[email protected]>2010-08-31 15:42:52 +0200
commitf5be3aeaef131d19741084dbf8fee16458d31513 (patch)
tree42cb876e653504b5f29378dd45113593b7a872d4 /lib/erl_interface/src/epmd/epmd_port.c
parent6499bf2816c3834059ebdeff75d98f310cb305b4 (diff)
downloadotp-f5be3aeaef131d19741084dbf8fee16458d31513.tar.gz
otp-f5be3aeaef131d19741084dbf8fee16458d31513.tar.bz2
otp-f5be3aeaef131d19741084dbf8fee16458d31513.zip
Remove all support for ancient EPMD protocol
Diffstat (limited to 'lib/erl_interface/src/epmd/epmd_port.c')
-rw-r--r--lib/erl_interface/src/epmd/epmd_port.c71
1 files changed, 2 insertions, 69 deletions
diff --git a/lib/erl_interface/src/epmd/epmd_port.c b/lib/erl_interface/src/epmd/epmd_port.c
index 663b38d2d4..3dd3da7aae 100644
--- a/lib/erl_interface/src/epmd/epmd_port.c
+++ b/lib/erl_interface/src/epmd/epmd_port.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2009. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2010. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -92,64 +92,6 @@ int ei_epmd_connect_tmo(struct in_addr *inaddr, unsigned ms)
return sd;
}
-/* get the given node's listen port using old epmd protocol */
-static int ei_epmd_r3_port (struct in_addr *addr, const char *alive,
- unsigned ms)
-{
- char buf[EPMDBUF];
- char *s = buf;
- int len = strlen(alive) + 1;
- int fd;
- int port;
- int res;
-#if defined(VXWORKS)
- char ntoabuf[32];
-#endif
-
- put16be(s,len);
- put8(s,EI_EPMD_PORT_REQ);
- strcpy(s,alive);
-
- /* connect to epmd */
- if ((fd = ei_epmd_connect_tmo(addr,ms)) < 0)
- {
- /* ei_epmd_connect_tmo() sets erl_errno */
- return -1;
- }
-
- if ((res = ei_write_fill_t(fd, buf, len+2, ms)) != len+2) {
- closesocket(fd);
- erl_errno = (res == -2) ? ETIMEDOUT : EIO;
- return -1;
- }
-
-#ifdef VXWORKS
- /* FIXME use union/macro for level. Correct level? */
- if (ei_tracelevel > 2) {
- inet_ntoa_b(*addr,ntoabuf);
- EI_TRACE_CONN2("ei_epmd_r3_port",
- "-> PORT_REQ alive=%s ip=%s",alive,ntoabuf);
- }
-#else
- EI_TRACE_CONN2("ei_epmd_r3_port",
- "-> PORT_REQ alive=%s ip=%s",alive,inet_ntoa(*addr));
-#endif
-
- if ((res = ei_read_fill_t(fd, buf, 2, ms)) != 2) {
- EI_TRACE_ERR0("ei_epmd_r3_port","<- CLOSE");
- closesocket(fd);
- erl_errno = (res == -2) ? ETIMEDOUT : EIO;
- return -1;
- }
- closesocket(fd);
- s = buf;
- port = get16be(s);
-
- EI_TRACE_CONN1("ei_epmd_r3_port","<- PORT_RESP port=%d",port);
-
- return port;
-}
-
static int ei_epmd_r4_port (struct in_addr *addr, const char *alive,
int *dist, unsigned ms)
{
@@ -285,15 +227,6 @@ int ei_epmd_port_tmo (struct in_addr *addr, const char *alive, int *dist,
{
int i;
- /* try the new one first, then the old one */
- i = ei_epmd_r4_port(addr,alive,dist,ms);
-
- /* -2: new protocol not understood */
- if (i == -2) {
- *dist = 0;
- i = ei_epmd_r3_port(addr,alive,ms);
- }
-
- return i;
+ return ei_epmd_r4_port(addr,alive,dist,ms);
}