1/* 2 * Copyright 2016, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(D61_BSD) 11 */ 12 13#ifndef _TIMESERV_DISPATCH_DISPATCH_H_ 14#define _TIMESERV_DISPATCH_DISPATCH_H_ 15 16#include "../state.h" 17 18 /*! @file 19 @brief Common timer server dispatcher helper functions. */ 20 21#define TIMESERV_DISPATCH_ANON_CLIENT_MAGIC 0xC099F13E 22 23/*! @brief Helper function to check for an interface. 24 25 Most of the other check_dispatcher_*_interface functions use call this helper function, that 26 does most of the real work. It generates a usable userptr containing the client_t structure of 27 the calling process. If the calling syscall label enum is outside of given range, DISPATCH_PASS 28 is returned. 29 30 @param m The recieved message structure. 31 @param userptr Output userptr containing corresponding client, to be passed into generated 32 interface dispatcher function. 33 @param labelMin The minimum syscall label to accept. 34 @param labelMax The maximum syscall label to accept. 35*/ 36int check_dispatch_interface(srv_msg_t *m, void **userptr, int labelMin, int labelMax); 37 38#endif /* _TIMESERV_DISPATCH_DISPATCH_H_ */