diff --git a/doc/Development.md b/doc/Development.md new file mode 100644 index 000000000..c91ecd5d9 --- /dev/null +++ b/doc/Development.md @@ -0,0 +1,36 @@ +# Development + +Developement is currently coordinated by Steffen Vogel using [GitHub](http://github.com/RWTH-ACS/S2SS). +Please feel free to submit pull requests or bug reports. + +## Extensibilty + +There are two main places where S2SS can easily extended: + +#### New node-type + + REGISTER_NODE_TYPE(struct node_type *vt) + +#### New hook functions + + /** The type of a hook defines when a hook will be exectuted. This is used as a bitmask. */ + enum hook_type { + HOOK_PATH_START = 1 << 0, /**< Called whenever a path is started; before threads are created. */ + + [...] + + HOOK_ASYNC = 1 << 6, /**< Called asynchronously with fixed rate (see path::rate). */ + + HOOK_PERIODIC = 1 << 7, /**< Called periodically. Period is set by global 'stats' option in the configuration file. */ + + /** @{ Classes of hooks */ + /** Internal hooks are mandatory. */ + HOOK_INTERNAL = 1 << 16, + /** All hooks */ + HOOK_ALL = HOOK_INTERNAL - 1 + /** @} */ + }; + + typedef int (*hook_cb_t)(struct path *p, struct hook *h, int when); + + REGISTER_HOOK(char *name, int priority, hook_cb_t cb, enum hook_type when) diff --git a/doc/Install.md b/doc/Install.md index 74bb89f4c..f94db3baf 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -29,7 +29,7 @@ Checkout the `Makefile` and `include/config.h` for some options which have to be Afterwards, start the compilation with: - $ make + $ make Append `V=5` to `make` for a more verbose debugging output. Append `DEBUG=1` to `make` to add debug symbols. @@ -38,7 +38,7 @@ Append `DEBUG=1` to `make` to add debug symbols. Install the files to your search path: - $ make install + $ make install Append `PREFIX=/opt/local` to change the installation destination. @@ -46,6 +46,6 @@ Append `PREFIX=/opt/local` to change the installation destination. Verify everything is working and required node-types are compiled-in: - $ s2ss server + $ s2ss server Will show you the current version of the server including a list of all supported node-types.