casper service declaration macro
Casper Library (libcasper, -lcasper)
typedef int service_limit_func_t(const nvlist_t *, const nvlist_t *);
typedef int service_command_func_t(const char *, const nvlist_t *, nvlist_t *,
CREATE_SERVICE macro to create a new Casper service.
The name is a string containing the service name, which
will be used in the
function to identify it.
The limit_func is a function of type
service_limit_func_t. The first argument of the
old service limits and second one the new limits. If the services wasn't
limited the old limits will be set to
function should not allow to extend service limits and only limit it
further. The command_func is a function of type
service_command_func_t. First argument is the name
of the command that should be executed. The first
contains the current limits. Next one contains a
with current request. The last one contains an output
which contains the response from Casper.
The flags argument defines limits of the
service. The supported flags are:
- The Casper service has access to the stdio descriptors from the process it
was spawned from.
- The Casper service has access to all descriptors besides stdio descriptors
from the process it was spawned from.
- The whole Casper communication is using
libcasper library first appeared in
libcasper library was implemented by
Pawel Jakub Dawidek
under sponsorship from the FreeBSD Foundation. The
libcasper new architecture was implemented by