Fix a bunch of net issues
This commit is contained in:
parent
ce3a2ec025
commit
04d22dddd9
9 changed files with 181 additions and 196 deletions
|
@ -3,13 +3,11 @@
|
|||
#include <grub/misc.h>
|
||||
#include <grub/net.h>
|
||||
|
||||
/* IANA ARP constant to define hardware type as ethernet */
|
||||
#define ARPHRD_ETHERNET 1
|
||||
/* IANA Ethertype */
|
||||
#define ARP_ETHERTYPE 0x806
|
||||
|
||||
/* Size for cache table */
|
||||
#define SIZE_ARP_TABLE 5
|
||||
enum
|
||||
{
|
||||
/* IANA ARP constant to define hardware type as ethernet. */
|
||||
GRUB_NET_ARPHRD_ETHERNET = 1
|
||||
};
|
||||
|
||||
/* ARP header operation codes */
|
||||
#define ARP_REQUEST 1
|
||||
|
|
|
@ -38,6 +38,14 @@ struct snaphdr
|
|||
grub_uint16_t type;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* IANA Ethertype */
|
||||
enum
|
||||
{
|
||||
GRUB_NET_ETHERTYPE_IP = 0x0800,
|
||||
GRUB_NET_ETHERTYPE_ARP = 0x0806
|
||||
};
|
||||
|
||||
|
||||
grub_err_t
|
||||
send_ethernet_packet (struct grub_net_network_level_interface *inf,
|
||||
struct grub_net_buff *nb,
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
#define GRUB_NET_IP_HEADER 1
|
||||
#include <grub/misc.h>
|
||||
|
||||
#define IP_ETHERTYPE 0x800 /* IANA Ethertype */
|
||||
|
||||
struct iphdr {
|
||||
grub_uint8_t verhdrlen;
|
||||
grub_uint8_t service;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue