typedef unsigned short sh; typedef unsigned int ui; typedef unsigned char uc; extern long int booty; // coded here for a big endian machine. typedef struct {ui M; sh P, L; uc s, c; char p[40];} pk; int NewDG(pk * pp, int ifi){ // New datagram from interface ifi int toll = 3*((int)(pp->P)+pp->L); pp->M -= toll; booty += toll; {int to = ({int s = (pp->c)++; 15&(*(pp->p + s/2) >> ((s&1)<<2));}); return ifi^to; // ifo is outgoing interface. }} long int booty; #include int main(){pk x = {1000000, 60, 60, 80, 0, "abcdefg"}; long int cc = 0; {int i=10000000; while(i--){x.c = 0; int k = 100; while(k--) cc += NewDG(&x, 13);}} printf("done %ld\n", cc); return 0;}