1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-06 16:06:19 +02:00

qrap: Connect to the first available instance of passt, probe via ARP request

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-05-21 11:14:52 +02:00
parent 19d254bbbb
commit ad4a85c860
3 changed files with 68 additions and 25 deletions

14
arp.h
View file

@ -1 +1,15 @@
/**
* struct arpmsg - 802.2 ARP IPv4 payload
* @sha: Sender hardware address
* @sip: Sender IP address
* @tha: Target hardware address
* @tip: Target IP address
*/
struct arpmsg {
unsigned char sha[ETH_ALEN];
unsigned char sip[4];
unsigned char tha[ETH_ALEN];
unsigned char tip[4];
} __attribute__((__packed__));
int arp(struct ctx *c, struct ethhdr *eh, size_t len);