Put a id variable as the first variable of all your different structs.
Than, take the void in the function like this:
void yourFunction(void* structVoid)
{
Copy the the first byte into a temponary struct, to identfy the struct.
INDENTSTRUCT* newIdent = sys_malloc(sizeof(INDENTSTRUCT));
memcpy(newIdent, structVoid, 4); //in case you are using a var, as it has 4 bytes
if(newIdent.id == 1) //Your first Struct
{
YOURFIRSTSTRUCT* tempStruct;
memcpy(tempStruct, structVoid, sizeof(YOURFIRSTSTRUCT));
the same goes for id two and so on
Hope this helps