feat: 保存已验证的CH390网络打通基线

This commit is contained in:
2026-04-17 07:09:55 +08:00
parent 59eecf428f
commit 6aba77df9a
44 changed files with 6428 additions and 3372 deletions
+14
View File
@@ -55,6 +55,7 @@
#include "lwip/acd.h"
#include "lwip/prot/iana.h"
#include "netif/ethernet.h"
#include "../../../../../App/app_runtime.h"
#include <string.h>
@@ -694,6 +695,19 @@ etharp_input(struct pbuf *p, struct netif *netif)
from_us = (u8_t)ip4_addr_eq(&sipaddr, netif_ip4_addr(netif));
}
g_eth_lwip_arp_seen_count += 1u;
g_eth_lwip_arp_opcode = (uint32_t)lwip_htons(hdr->opcode);
g_eth_lwip_arp_for_us = (uint32_t)for_us;
g_eth_lwip_arp_from_us = (uint32_t)from_us;
g_eth_lwip_arp_sip[0] = ip4_addr1(&sipaddr);
g_eth_lwip_arp_sip[1] = ip4_addr2(&sipaddr);
g_eth_lwip_arp_sip[2] = ip4_addr3(&sipaddr);
g_eth_lwip_arp_sip[3] = ip4_addr4(&sipaddr);
g_eth_lwip_arp_dip[0] = ip4_addr1(&dipaddr);
g_eth_lwip_arp_dip[1] = ip4_addr2(&dipaddr);
g_eth_lwip_arp_dip[2] = ip4_addr3(&dipaddr);
g_eth_lwip_arp_dip[3] = ip4_addr4(&dipaddr);
/* ARP message directed to us?
-> add IP address in ARP cache; assume requester wants to talk to us,
can result in directly sending the queued packets for this host.