[sr-dev] async processing: t_suspend and t_continue

Matthew Williams matthew at flowroute.com
Sat Jun 25 17:36:10 CEST 2011


So, we found the route_get function from route.h, which we can use like so
to get the first action of a given named route:

n = route_get(&main_rt, "foo");
> struct action *a = main_rt.rlist[n];


Related to this question, though... is there a way to obtain the currently
processing action, so that we could continue with the next action?

And one more question: is there a way to copy all private memory into shared
memory, and then later restore it? I ask this, as $var (and probably other)
data is lost between t_suspend and t_resume.

Thank you for any assistance!

On Fri, Jun 24, 2011 at 7:00 PM, Matthew Williams <matthew at flowroute.com>wrote:

> Hi,
>
> We are working on a module in which we plan to utilize the
> t_suspend/t_continue functions of the tm module. t_suspend is
> straightforward and is working as expected, it seems.
>
> The last parameter of t_continue is of type 'struct action', which I can
> see is defined in route_struct.h as:
>
> struct action{
>         int cline;
>         char *cfile;
>         enum action_type type;  /* forward, drop, log, send ...*/
>         int count;
>         struct action* next;
>         action_u_t val[MAX_ACTIONS];
> };
>
> Does anyone have any practical advice on how to create an action to be used
> in t_continue?
>
> Also... when t_continue is called, does it continue processing in the
> process that calls t_continue, or is execution handed off to another
> process?
>
> Thank you!
>
> Matthew Williams
> FlowRoute
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20110625/bf1fd57b/attachment.htm>


More information about the sr-dev mailing list