>write(sockfd, (struct arppacket *)&pseudarp, sizeof((struct arppacket *)&pseudoarp));
should this not be like:
Code:
write(sockfd, (struct arppacket *)&pseudarp, sizeof(pseudoarp));
???

The sizeof() in your case will always return the same number irrespective of the members in it, because you are getting the size of the Pointer variable, which will be constant on your machine for any given dat type. Instead, sizeof(pseudoarp) gives you the right number of bytes used for this structure instance.