aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_int.h
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-07-19 16:39:13 +0200
committerMicael Karlberg <[email protected]>2018-09-18 14:50:18 +0200
commit7a5b320b5bb5ec45b21839005e8538172908fb57 (patch)
treea901cc18fb10ed7fe6352a0205456f89f378c29a /erts/emulator/nifs/common/socket_int.h
parentf0a2e68a31ac585780ad05f777f1b7551770420e (diff)
downloadotp-7a5b320b5bb5ec45b21839005e8538172908fb57.tar.gz
otp-7a5b320b5bb5ec45b21839005e8538172908fb57.tar.bz2
otp-7a5b320b5bb5ec45b21839005e8538172908fb57.zip
[socket-nif] Add (partial) support for socket (level sctp) option associnfo
Added support for the SCTP option ASSOCINFO. This option is a bit tricky. As the underlying structure (sctp_assocparams) contains the assoc_id, it begs the question what happens if this option is fetched for: * The own assoc (which means that we might have the assoc id in the descriptor and can initiate that part of the struct accordningly). * Another assoc: From assoc A asks for info with assoc_id set to that of assoc B. * The "owning" endpoint. * Another endpoint (an endpoint to which the assoc does not belong). So, if the user calls socket:[getopt|setopt] for an association socket, shall we require that the assoc_id field is set to -1? Or not set at all and therefor filled in automatically by the nif-code? And, if the user calls socket:[getopt|setopt] for an endpoint socket, shall we require that the assoc_id field is set to a valid id? Or shall it not be allowed? Questions, questions... OTP-14831
Diffstat (limited to 'erts/emulator/nifs/common/socket_int.h')
-rw-r--r--erts/emulator/nifs/common/socket_int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/nifs/common/socket_int.h b/erts/emulator/nifs/common/socket_int.h
index 67e4baba27..28f42a7345 100644
--- a/erts/emulator/nifs/common/socket_int.h
+++ b/erts/emulator/nifs/common/socket_int.h
@@ -167,6 +167,7 @@ extern ERL_NIF_TERM esock_atom_einval;
#define MKT8(E,E1,E2,E3,E4,E5,E6,E7,E8) \
enif_make_tuple8((E), (E1), (E2), (E3), (E4), (E5), (E6), (E7), (E8))
#define MKTA(E, A, AL) enif_make_tuple_from_array((E), (A), (AL))
+#define MKUI(E,I) enif_make_uint((E), (I))
#define MCREATE(N) enif_mutex_create((N))
#define MDESTROY(M) enif_mutex_destroy((M))