net: Add net_update_ether() to handle ARP and Ping replies
When the network is VLAN or SNAP, net_update_ether() will preserve
the original Ethernet packet header and simply replace the src and
dest MACs and the protocol
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/include/net.h b/include/net.h
index 09f040f..9564051 100644
--- a/include/net.h
+++ b/include/net.h
@@ -449,6 +449,7 @@
/* Set ethernet header; returns the size of the header */
extern int NetSetEther(uchar *, uchar *, uint);
+extern int net_update_ether(struct ethernet_hdr *et, uchar *addr, uint prot);
/* Set IP header */
extern void net_set_ip_header(uchar *pkt, IPaddr_t dest, IPaddr_t source);