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:<div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
n = route_get(&amp;main_rt, &quot;foo&quot;);<br>struct action *a = main_rt.rlist[n];</blockquote><div><br></div><div>Related to this question, though... is there a way to obtain the currently processing action, so that we could continue with the next action?</div>
<div><br></div><div>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.</div>
<div><br></div><div>Thank you for any assistance!</div><br><div class="gmail_quote">On Fri, Jun 24, 2011 at 7:00 PM, Matthew Williams <span dir="ltr">&lt;<a href="mailto:matthew@flowroute.com">matthew@flowroute.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi, <div><br></div><div>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. </div>
<div><br></div><div>
The last parameter of t_continue is of type &#39;struct action&#39;, which I can see is defined in route_struct.h as:</div>
<div><br></div><div><div>struct action{</div><div>        int cline;</div><div>        char *cfile;</div><div>        enum action_type type;  /* forward, drop, log, send ...*/</div><div>        int count;</div><div>        struct action* next;</div>


<div>        action_u_t val[MAX_ACTIONS];</div><div>};</div></div><div><br></div><div>Does anyone have any practical advice on how to create an action to be used in t_continue?</div><div><br></div><div>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?</div>

<div><br></div><div>Thank you!</div><div>
<br></div><font color="#888888"><div>Matthew Williams</div><div>FlowRoute</div>
</font></blockquote></div><br></div>