1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-06 07:56:38 +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

15
arp.c
View file

@ -26,20 +26,7 @@
#include "dhcp.h"
#include "util.h"
#include "tap.h"
/**
* 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__));
#include "arp.h"
/**
* arp() - Check if this is an ARP message, reply as needed