Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a function ls to storage
[simgrid.git] / src / simix / smx_user.c
index 3a7bd17..8fb5b34 100644 (file)
@@ -85,6 +85,26 @@ xbt_dict_t simcall_host_get_properties(smx_host_t host)
   return simcall->host_get_properties.result;
 }
 
+/**
+ * \ingroup simix_host_management
+ * \brief Returns a dict of the properties assigned to a router or AS.
+ *
+ * \param asr name of the router or AS
+ * \return The properties
+ */
+xbt_dict_t simcall_asr_get_properties(const char *name)
+{
+  smx_simcall_t simcall = SIMIX_simcall_mine();
+
+  simcall->call = SIMCALL_ASR_GET_PROPERTIES;
+  simcall->asr_get_properties.name = name;
+  if(MC_IS_ENABLED) /* Initialize result to NULL for snapshot comparison done during simcall */
+    simcall->asr_get_properties.result = NULL;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->asr_get_properties.result;
+}
+
+
 /**
  * \ingroup simix_host_management
  * \brief Returns the speed of the processor.
@@ -1598,6 +1618,24 @@ int simcall_file_unlink(smx_file_t fd)
   return simcall->file_unlink.result;
 }
 
+/**
+ * \ingroup simix_file_management
+ *
+ */
+xbt_dict_t simcall_file_ls(const char* mount, const char* path)
+{
+  smx_simcall_t simcall = SIMIX_simcall_mine();
+  simcall->call = SIMCALL_FILE_LS;
+  simcall->file_ls.mount = mount;
+  simcall->file_ls.path = path;
+  if(MC_IS_ENABLED) /* Initialize result to a default value for snapshot comparison done during simcall */
+    simcall->file_ls.result = NULL;
+
+  SIMIX_simcall_push(simcall->issuer);
+
+  return simcall->file_ls.result;
+}
+
 /* ************************************************************************** */
 
 /** @brief returns a printable string representing a simcall */