write() function - no such device or address
i want to know how to build my own packets.
especially arp packets.
here is my code for now
i checked the infos i filled the structure members with, and they were correct.
//every member is filled with the needed infos
sockfd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
write(sockfd, (struct arppacket *)&pseudarp, sizeof((struct arppacket *)&pseudoarp));
//when i do error checking on the write function
//it give me "no such device or address"
what could be my problem?