mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 23:02:40 +00:00
Added ARP protocol to network stack and fixed bug in grub_netbuff_alloc function.
* include/grub/net/arp.h: added arp header, arp cache entry and related constants and functions * net/arp.c: added functions arp_init_table, arp_find_entry, arp_resolve and arp_receive * net/ethernet.c (send_ethernet_packet): replaced hardcoded hardware address by parameter target_addr * net/ethernet.c (recv_ethernet_packet): added call to arp_receive when packet is of type 0x803 (ARP) and only return when packet is of type determined by parameter ethertype * net/ip.c (send_ip_packet): added call to arp_resolve to determine hardware address of destination * net/netbuff.c (grub_netbuff_alloc): fixed swapped parameters in call to grub_memalign
This commit is contained in:
1 parent
7c978f0690
commit
10830203a0
12 files changed
+335
-56
No files matched your search
+1
-1
@@ -72,7 +72,7 @@ struct grub_net_buff *grub_netbuff_alloc ( grub_size_t len )
|
||||
len = NETBUFFMINLEN;
|
||||
|
||||
len = ALIGN_UP (len,NETBUFF_ALIGN);
|
||||
data = grub_memalign (len + sizeof (*nb),NETBUFF_ALIGN);
|
||||
data = grub_memalign (NETBUFF_ALIGN, len + sizeof (*nb));
|
||||
nb = (struct grub_net_buff *) ((int)data + len);
|
||||
nb->head = nb->data = nb->tail = data;
|
||||
nb->end = (char *) nb;
|
||||
|
||||
Reference in new issue
Block a user