You can use a union, something like this: typedef union { struct app1_state a1; struct app2_state a2; struct app3_state a3; } uip_tcp_appstate_t;
and access the state structures through appstate->a1.var1; and so forth. This way no extra memory is required.
Hope this helps, /adam Marc Lehmann wrote:
Hello everyone out there I'm trying to build an application that has several features using uIP. Each of that features has its own structure to store the application state. And that's where the problems start. Of course it's not possible to typedef more than one structure to be uip_tcp_appstate_t. I tried the add-on module uip_app_registration, but it doesn't take care of uip_tcp_state. Any ideas? Is there any workaround? Of couse I could put all the application states together into one huge structure, but I'd rather prefer a "smart" solution. ;) Thanks Marc
-- Adam Dunkels, Swedish Institute of Computer Science http://www.sics.se/~adam/