bootp support
This commit is contained in:
parent
4700d08bb4
commit
8b51fd98b9
12 changed files with 360 additions and 91 deletions
|
|
@ -12,19 +12,6 @@ struct etherhdr
|
|||
grub_uint16_t type;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define PCP(x) x & 0xe000
|
||||
#define CFI(x) x & 0x1000
|
||||
#define VID(x) x & 0x0fff
|
||||
#define PRINT_ETH_ADDR(name,addr) grub_printf("%s %x:%x:%x:%x:%x:%x\n",\
|
||||
name,\
|
||||
addr[0],\
|
||||
addr[1],\
|
||||
addr[2],\
|
||||
addr[3],\
|
||||
addr[4],\
|
||||
addr[5]\
|
||||
)
|
||||
|
||||
struct llchdr
|
||||
{
|
||||
grub_uint8_t dsap;
|
||||
|
|
@ -52,6 +39,7 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
|
|||
grub_net_link_level_address_t target_addr,
|
||||
grub_uint16_t ethertype);
|
||||
grub_err_t
|
||||
grub_net_recv_ethernet_packet (struct grub_net_buff *nb);
|
||||
grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
|
||||
const struct grub_net_card *card);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -26,5 +26,5 @@ grub_err_t grub_netbuff_reserve (struct grub_net_buff *net_buff ,grub_size_t len
|
|||
grub_err_t grub_netbuff_clear (struct grub_net_buff *net_buff);
|
||||
struct grub_net_buff * grub_netbuff_alloc ( grub_size_t len );
|
||||
grub_err_t grub_netbuff_free (struct grub_net_buff *net_buff);
|
||||
grub_err_t grub_netbuff_clear (struct grub_net_buff *net_buff);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,8 +14,9 @@ struct udphdr
|
|||
grub_err_t
|
||||
grub_net_send_udp_packet (const grub_net_socket_t socket , struct grub_net_buff *nb);
|
||||
|
||||
grub_err_t
|
||||
grub_net_recv_udp_packet (struct grub_net_buff *nb);
|
||||
grub_err_t
|
||||
grub_net_recv_udp_packet (struct grub_net_buff *nb,
|
||||
struct grub_net_network_level_interface *inf);
|
||||
|
||||
|
||||
#define FOR_NET_UDP_PACKETS(inf, var) FOR_PACKETS(inf->udp_pending, var)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue