ARP listen function
This commit is contained in:
parent
a549e2fcba
commit
6388075d50
2 changed files with 69 additions and 0 deletions
11
arp.h
11
arp.h
|
@ -50,4 +50,15 @@ int send_arp_request(int sockfd, int ifindex, struct sockaddr_in *ipaddr, unsign
|
|||
*/
|
||||
int send_arp_reply(int sockfd, int ifindex, struct sockaddr_in *sender_ip, unsigned char *sender_mac, struct in_addr target_ip, unsigned char *target_mac);
|
||||
|
||||
|
||||
/* Listens to an ARP frame
|
||||
|
||||
sockfd: the socket file descriptor
|
||||
result: the parsed ARP frame
|
||||
|
||||
Returns 0 if an ARP answer was found, -1 otherwise.
|
||||
*/
|
||||
int listen_arp_frame(int sockfd, struct ether_arp *result);
|
||||
|
||||
|
||||
#endif /* ARP_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue