You do realize that the example you gave is just as general as all the tutorials.
Here is an example I was working, but it gives a segmentation fault for some reason:
example.h
typedef struct
{
unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
} IP;
IP* shiftIP(IP* addr);
example.c
#include "example.h"
IP* shiftIP(IP* addr){
unsigned char t;
t = addr->a;
addr->a = addr->b;
addr->b = addr->c;
addr->c = addr->d;
addr->d = t;
}
Example.hsc