| Main index | Section 3 | Options |
#include <sys/nv.h>
#include <libcasper.h>
#include <libcasper_service.h>
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 *, nvlist_t *);
The limit_func is a function of type service_limit_func_t where the first argument of the function contains an nvlist(9), old service limits and the second argument contains the new limits. If the service was not limited then the old limits will be set to NULL. This function must not allow the extension of service limits. The command_func is a function of type service_command_func_t where the first argument is the name of the command that should be executed. The first nvlist(9) contains the current limits and the second contains an nvlist(9) with the current request. The last argument contains a return value nvlist(9) which contains the response from casper.
The flags argument defines the limits of the service. The supported flags are:
| CASPER_SERVICE_STDIO | The casper service has access to the stdio descriptors from the process it was spawned from. |
| CASPER_SERVICE_FD | The casper service has access to all of the descriptors, besides the stdio descriptors, from the process it was spawned from. |
| CASPER_SERVICE_NO_UNIQ_LIMITS | The whole casper communication is using an nvlist(9) with the NV_FLAG_NO_UNIQUE flag. |
| LIBCASPER (3) | November 15, 2021 |
| Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | "I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act." | ” |
| — Ken Pier, Xerox PARC | ||