diff options
author | Sverker Eriksson <[email protected]> | 2019-03-22 19:41:17 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-03-22 19:41:17 +0100 |
commit | 167c5ef4d804ab84979284ef4f572a69d6d9ddf8 (patch) | |
tree | a24d699beea5868374d9e86828336be2918e8ba3 /erts/epmd/src/epmd_int.h | |
parent | 6f01f562418c26e37233c2f1ca1dc62c53418ca8 (diff) | |
parent | bd8f6106d44a58c261920eef72842bb3bc5a4968 (diff) | |
download | otp-167c5ef4d804ab84979284ef4f572a69d6d9ddf8.tar.gz otp-167c5ef4d804ab84979284ef4f572a69d6d9ddf8.tar.bz2 otp-167c5ef4d804ab84979284ef4f572a69d6d9ddf8.zip |
Merge branch 'sverker/enable-big-creation/OTP-15603'
* sverker/enable-big-creation/OTP-15603:
epmd: Support 32-bit creation values in local node
erts: Robustify epmd reply function
erts: Reject decoded local refs with too large first word
erts: Fix bug in list_to_ref
erl_interface: Remove old encoding of pid,port,refs
erts: Remove old encoding of pids, ports and refs
erts: Make DFLAG_BIG_CREATION mandatory
Diffstat (limited to 'erts/epmd/src/epmd_int.h')
-rw-r--r-- | erts/epmd/src/epmd_int.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h index ed9bbdb8cd..a5156a142e 100644 --- a/erts/epmd/src/epmd_int.h +++ b/erts/epmd/src/epmd_int.h @@ -277,6 +277,12 @@ static const struct in6_addr in6addr_loopback = #define put_int16(i, s) {((unsigned char*)(s))[0] = ((i) >> 8) & 0xff; \ ((unsigned char*)(s))[1] = (i) & 0xff;} +#define put_int32(i, s) do {((char*)(s))[0] = (char)((i) >> 24) & 0xff; \ + ((char*)(s))[1] = (char)((i) >> 16) & 0xff; \ + ((char*)(s))[2] = (char)((i) >> 8) & 0xff; \ + ((char*)(s))[3] = (char)(i) & 0xff;} \ + while (0) + #if defined(__GNUC__) # define EPMD_INLINE __inline__ #elif defined(__WIN32__) @@ -307,10 +313,10 @@ struct enode { int fd; /* The socket in use */ unsigned short port; /* Port number of Erlang node */ char symname[MAXSYMLEN+1]; /* Name of the Erlang node */ - short creation; /* Started as a random number 1..3 */ + unsigned int cr_counter; /* Used to generate 'creation' numbers */ char nodetype; /* 77 = normal erlang node 72 = hidden (c-node */ char protocol; /* 0 = tcp/ipv4 */ - unsigned short highvsn; /* 0 = OTP-R3 erts-4.6.x, 1 = OTP-R4 erts-4.7.x*/ + unsigned short highvsn; /* 5: creation=1..3, 6: creation=1..(2^32-1)*/ unsigned short lowvsn; int extralen; char extra[MAXSYMLEN+1]; |