]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/remote/mc_protocol.h
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'python-repr' into 'master'
[simgrid.git] / src / mc / remote / mc_protocol.h
index 920f43f379ac64611e47668a68e6bd1359edadc2..e4cac55a475270ffa8babfafbb968d89052536f5 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <array>
 #include <cstdint>
+#include <sys/un.h>
 
 // ***** Messages
 namespace simgrid::mc {
@@ -32,11 +33,12 @@ XBT_DECLARE_ENUM_CLASS(MessageType, NONE, NEED_MEMINFO, NEED_MEMINFO_REPLY, FORK
 } // namespace simgrid::mc
 
 constexpr unsigned MC_MESSAGE_LENGTH                 = 512;
+constexpr unsigned MC_SOCKET_NAME_LEN                = sizeof(sockaddr_un::sun_path);
 constexpr unsigned SIMCALL_SERIALIZATION_BUFFER_SIZE = 2048;
 
 /** Basic structure for a MC message
  *
- *  The current version of the client/server protocol sends C structures over `AF_LOCAL`
+ *  The current version of the client/server protocol sends C structures over `AF_UNIX`
  *  `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.
  *
@@ -87,6 +89,11 @@ struct s_mc_message_need_meminfo_reply_t {
   xbt_mheap_t mmalloc_default_mdp;
 };
 
+struct s_mc_message_fork_t {
+  simgrid::mc::MessageType type;
+  std::array<char, MC_SOCKET_NAME_LEN> socket_name;
+};
+
 struct s_mc_message_simcall_execute_t {
   simgrid::mc::MessageType type;
   aid_t aid_;