2 * Copyright (C) 2008 Tobias Brunner
3 * Copyright (C) 2007 Martin Willi
4 * Hochschule fuer Technik Rapperswil
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 #include <utils/enumerator.h>
28 typedef struct dumm_t dumm_t
;
31 * @brief dumm - Dynamic Uml Mesh Modeler
33 * Controls a group of UML guests and their networks.
38 * @brief Starts a new UML guest
40 * @param name name of the guest
41 * @param kernel UML kernel to use for guest
42 * @param master mounted read only master filesystem
43 * @param args additional args to pass to kernel
44 * @return guest if started, NULL if failed
46 guest_t
* (*create_guest
) (dumm_t
*this, char *name
, char *kernel
,
47 char *master
, char *args
);
50 * @brief Create an enumerator over all guests.
52 * @return enumerator over guest_t's
54 enumerator_t
* (*create_guest_enumerator
) (dumm_t
*this);
57 * @brief Delete a guest from disk.
59 * @param guest guest to destroy
61 void (*delete_guest
) (dumm_t
*this, guest_t
*guest
);
64 * @brief Create a new bridge.
66 * @param name name of the bridge to create
67 * @return created bridge
69 bridge_t
* (*create_bridge
)(dumm_t
*this, char *name
);
72 * @brief Create an enumerator over all bridges.
74 * @return enumerator over bridge_t's
76 enumerator_t
* (*create_bridge_enumerator
)(dumm_t
*this);
79 * @brief Delete a bridge.
81 * @param bridge bridge to destroy
83 void (*delete_bridge
) (dumm_t
*this, bridge_t
*bridge
);
86 * @brief Loads a template, create a new one if it does not exist.
88 * @param name dir to the template, NULL to close
89 * @return FALSE if load/create failed
91 bool (*load_template
)(dumm_t
*this, char *dir
);
94 * @brief stop all guests and destroy the modeler
96 void (*destroy
) (dumm_t
*this);
100 * @brief Create a group of UML hosts and networks.
102 * @param dir directory to create guests/load from, NULL for cwd
103 * @return created UML group, or NULL if failed.
105 dumm_t
*dumm_create(char *dir
);