Add Virtual LAN support.
This patch adds support for virtual LAN (VLAN) tagging. VLAN tagging allows multiple VLANs in a bridged network to share the same physical network link but maintain isolation: http://en.wikipedia.org/wiki/IEEE_802.1Q * grub-core/net/ethernet.c: Add check, get, and set vlan tag id. * grub-core/net/drivers/ieee1275/ofnet.c: Get vlan tag id from bootargs. * grub-core/net/arp.c: Add check. * grub-core/net/ip.c: Likewise. * include/grub/net/arp.h: Add vlantag attribute. * include/grub/net/ip.h: Likewise.
This commit is contained in:
parent
99ab28563b
commit
5696d56d33
7 changed files with 92 additions and 20 deletions
|
@ -292,6 +292,7 @@ struct grub_net_network_level_interface
|
|||
grub_net_interface_flags_t flags;
|
||||
struct grub_net_bootp_packet *dhcp_ack;
|
||||
grub_size_t dhcp_acklen;
|
||||
grub_uint16_t vlantag;
|
||||
void *data;
|
||||
};
|
||||
|
||||
|
@ -562,4 +563,6 @@ extern char *grub_net_default_server;
|
|||
#define GRUB_NET_INTERVAL 400
|
||||
#define GRUB_NET_INTERVAL_ADDITION 20
|
||||
|
||||
#define VLANTAG_IDENTIFIER 0x8100
|
||||
|
||||
#endif /* ! GRUB_NET_HEADER */
|
||||
|
|
|
@ -22,10 +22,11 @@
|
|||
#include <grub/net.h>
|
||||
|
||||
extern grub_err_t grub_net_arp_receive (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card);
|
||||
struct grub_net_card *card,
|
||||
grub_uint16_t *vlantag);
|
||||
|
||||
grub_err_t
|
||||
grub_net_arp_send_request (struct grub_net_network_level_interface *inf,
|
||||
const grub_net_network_level_address_t *proto_addr);
|
||||
const grub_net_network_level_address_t *proto_addr);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -48,7 +48,8 @@ grub_err_t
|
|||
grub_net_recv_ip_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
const grub_net_link_level_address_t *src_hwaddress);
|
||||
const grub_net_link_level_address_t *src_hwaddress,
|
||||
grub_uint16_t *vlantag);
|
||||
|
||||
grub_err_t
|
||||
grub_net_send_ip_packet (struct grub_net_network_level_interface *inf,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue