size_t section_offset; //!< Where to look in the process instance for
///< a pointer to the section we should execute.
rlm_rcode_t rcode; //!< Default rcode
- unlang_module_resume_t resume; //!< Function to call after running a recv section.
+ module_method_t resume; //!< Function to call after running a recv section.
/*
* Each state has only one "recv" or "send".
*/
union {
module_method_t recv; //!< Method to call when receiving this type of packet.
- unlang_module_resume_t send; //!< Method to call when sending this type of packet.
+ module_method_t send; //!< Method to call when sending this type of packet.
};
PROCESS_STATE_EXTRA_FIELDS
} fr_process_state_t;
*/
#define CALL_SEND_TYPE(_x) call_send_type(process_state_reply[(request->reply->code = _x)].send, p_result, mctx, request)
-static inline unlang_action_t call_send_type(unlang_module_resume_t send, \
+static inline unlang_action_t call_send_type(module_method_t send, \
rlm_rcode_t *p_result, module_ctx_t const *mctx,
request_t *request)
{
* - <0 on error
* - 0 on success
*/
-int unlang_module_set_resume(request_t *request, unlang_module_resume_t resume)
+int unlang_module_set_resume(request_t *request, module_method_t resume)
{
unlang_stack_t *stack = request->stack;
unlang_stack_frame_t *frame = &stack->frame[stack->depth];
*/
unlang_action_t unlang_module_yield_to_xlat(TALLOC_CTX *ctx, bool *p_success, fr_value_box_list_t *out,
request_t *request, xlat_exp_head_t const *exp,
- unlang_module_resume_t resume,
+ module_method_t resume,
unlang_module_signal_t signal, void *rctx)
{
/*
unlang_action_t unlang_module_yield_to_tmpl(TALLOC_CTX *ctx, fr_value_box_list_t *out,
request_t *request, tmpl_t const *vpt,
unlang_tmpl_args_t *args,
- unlang_module_resume_t resume,
+ module_method_t resume,
unlang_module_signal_t signal, void *rctx)
{
/*
unlang_action_t unlang_module_yield_to_section(rlm_rcode_t *p_result,
request_t *request, CONF_SECTION *subcs,
rlm_rcode_t default_rcode,
- unlang_module_resume_t resume,
+ module_method_t resume,
unlang_module_signal_t signal, void *rctx)
{
if (!subcs) {
* - UNLANG_ACTION_YIELD.
*/
unlang_action_t unlang_module_yield(request_t *request,
- unlang_module_resume_t resume, unlang_module_signal_t signal, void *rctx)
+ module_method_t resume, unlang_module_signal_t signal, void *rctx)
{
unlang_stack_t *stack = request->stack;
unlang_stack_frame_t *frame = &stack->frame[stack->depth];
{
unlang_frame_state_module_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_module_t);
unlang_module_t *mc = unlang_generic_to_module(frame->instruction);
- unlang_module_resume_t resume;
+ module_method_t resume;
unlang_action_t ua;
/*
*/
typedef void (*unlang_module_fd_event_t)(module_ctx_t const *mctx, request_t *request, int fd);
-/** A callback for when the request is resumed.
- *
- * The resumed request cannot call the normal "authorize", etc. method. It needs a separate callback.
- *
- * @param[out] p_result result of the operation.
- * @param[in] mctx calling context for the module.
- * Contains global, thread-specific, and call-specific data for a module.
- * @param[in] request the current request.
- * @return an instruction for the interpreter.
- */
-typedef unlang_action_t (*unlang_module_resume_t)(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request);
-
/** A callback when the request gets a fr_state_signal_t.
*
* A module may call unlang_yeild(), but still need to do something on FR_SIGNAL_DUP. If so, it's
module_instance_t *module_instance, module_method_t method, bool top_frame)
CC_HINT(warn_unused_result);
-int unlang_module_set_resume(request_t *request, unlang_module_resume_t resume);
+int unlang_module_set_resume(request_t *request, module_method_t resume);
unlang_action_t unlang_module_yield_to_subrequest(rlm_rcode_t *p_result, request_t *child,
- unlang_module_resume_t resume,
+ module_method_t resume,
unlang_module_signal_t signal,
unlang_subrequest_session_t const *session,
void *rctx);
unlang_action_t unlang_module_yield_to_section(rlm_rcode_t *p_result,
request_t *request, CONF_SECTION *subcs,
rlm_rcode_t default_rcode,
- unlang_module_resume_t resume,
+ module_method_t resume,
unlang_module_signal_t signal, void *rctx);
unlang_action_t unlang_module_yield_to_xlat(TALLOC_CTX *ctx, bool *p_success, fr_value_box_list_t *out,
request_t *request, xlat_exp_head_t const *xlat,
- unlang_module_resume_t resume,
+ module_method_t resume,
unlang_module_signal_t signal, void *rctx);
unlang_action_t unlang_module_yield_to_tmpl(TALLOC_CTX *ctx, fr_value_box_list_t *out,
request_t *request, tmpl_t const *vpt,
unlang_tmpl_args_t *args,
- unlang_module_resume_t resume,
+ module_method_t resume,
unlang_module_signal_t signal, void *rctx);
unlang_action_t unlang_module_yield(request_t *request,
- unlang_module_resume_t resume,
+ module_method_t resume,
unlang_module_signal_t signal, void *rctx);
#ifdef __cplusplus
* @{
*/
void *rctx; //!< for resume / signal
- unlang_module_resume_t resume; //!< resumption handler
+ module_method_t resume; //!< resumption handler
unlang_module_signal_t signal; //!< for signal handlers
/** @} */
module_t common; //!< Common fields to all loadable modules.
rlm_radius_io_enqueue_t enqueue; //!< Enqueue a request_t with an IO submodule.
unlang_module_signal_t signal; //!< Send a signal to an IO module.
- unlang_module_resume_t resume; //!< Resume a request, and get rcode.
+ module_method_t resume; //!< Resume a request, and get rcode.
};
module_t common; //!< Common fields to all loadable modules.
rlm_tacacs_io_enqueue_t enqueue; //!< Enqueue a request_t with an IO submodule.
unlang_module_signal_t signal; //!< Send a signal to an IO module.
- unlang_module_resume_t resume; //!< Resume a request, and get rcode.
+ module_method_t resume; //!< Resume a request, and get rcode.
};