- it spaws a child process for the SimGrid simulator/maestro and the simulated
processes.
-They communicate using a `AF_UNIX` `SOCK_DGRAM` socket and exchange messages
+They communicate using a `AF_UNIX` `SOCK_SEQPACKET` socket and exchange messages
defined in `mc_protocol.h`. The `SIMGRID_MC_SOCKET_FD` environment variable it
set to the file descriptor of this socket in the child process.
// process:
int res;
int sockets[2];
- res = socketpair(AF_LOCAL, SOCK_DGRAM | SOCK_CLOEXEC, 0, sockets);
+ res = socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, sockets);
if (res == -1)
throw simgrid::xbt::errno_error("Could not create socketpair");
/** A channel for exchanging messages between model-checker and model-checked
*
* This abstracts away the way the messages are transferred. Currently, they
- * are sent over a (connected) `SOCK_DGRAM` socket.
+ * are sent over a (connected) `SOCK_SEQPACKET` socket.
*/
class Channel {
int socket_ = -1;
socklen_t socklen = sizeof(type);
if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &socklen) != 0)
xbt_die("Could not check socket type");
- if (type != SOCK_DGRAM)
+ if (type != SOCK_SEQPACKET)
xbt_die("Unexpected socket type %i", type);
XBT_DEBUG("Model-checked application found expected socket type");
/** Basic structure for a MC message
*
* The current version of the client/server protocol sends C structures over `AF_LOCAL`
- * `SOCK_DGRAM` sockets. This means that the protocol is ABI/architecture specific:
+ * `SOCK_SEQPACKET` sockets. This means that the protocol is ABI/architecture specific:
* we currently can't model-check a x86 process from a x86_64 process.
*
* Moreover the protocol is not stable. The same version of the library should be used