* RFC Patch [2/2] PXE Add support for proxy DHCP -- EFI Code
@ 2014-04-19 0:26 Mroczek, Joseph T
0 siblings, 0 replies; 2+ messages in thread
From: Mroczek, Joseph T @ 2014-04-19 0:26 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 4096 bytes --]
Hello:
Here is the uEFI specific portion. I have tested it on three different platforms without issue.
~joe
diff -Naur grub-2.02~beta2/grub-core/net/drivers/efi/efinet.c grub-2.02~beta2-jtm-clean/grub-core/net/drivers/efi/efinet.c
--- grub-2.02~beta2/grub-core/net/drivers/efi/efinet.c 2013-12-24 11:29:27.000000000 -0500
+++ grub-2.02~beta2-jtm-clean/grub-core/net/drivers/efi/efinet.c 2014-04-18 19:26:44.862208600 -0400
@@ -223,6 +223,7 @@
{
struct grub_net_card *card;
grub_efi_device_path_t *dp;
+ struct grub_net_bootp_packet *combined_bootp = NULL;
dp = grub_efi_get_device_path (hnd);
if (! dp)
@@ -245,11 +246,22 @@
if (! pxe)
continue;
pxe_mode = pxe->mode;
- grub_net_configure_by_dhcp_ack (card->name, card, 0,
- (struct grub_net_bootp_packet *)
- &pxe_mode->dhcp_ack,
- sizeof (pxe_mode->dhcp_ack),
- 1, device, path);
+ if (pxe_mode->proxy_offer_received)
+ {
+ combined_bootp = grub_zalloc (sizeof (*combined_bootp));
+ grub_net_merge_dhcp_ack (combined_bootp, (struct grub_net_bootp_packet *) pxe_mode->proxy_offer);
+ grub_net_merge_dhcp_ack (combined_bootp, (struct grub_net_bootp_packet *) pxe_mode->dhcp_ack);
+ grub_net_configure_by_dhcp_ack (card->name, card, 0,
+ combined_bootp,
+ sizeof (combined_bootp),
+ 1, device, path);
+ }
+ else
+ grub_net_configure_by_dhcp_ack (card->name, card, 0,
+ (struct grub_net_bootp_packet *)
+ &pxe_mode->dhcp_ack,
+ sizeof (pxe_mode->dhcp_ack),
+ 1, device, path);
return;
}
}
diff -Naur grub-2.02~beta2/include/grub/efi/api.h grub-2.02~beta2-jtm-clean/include/grub/efi/api.h
--- grub-2.02~beta2/include/grub/efi/api.h 2013-12-24 12:04:54.000000000 -0500
+++ grub-2.02~beta2-jtm-clean/include/grub/efi/api.h 2014-04-18 19:26:44.866208600 -0400
@@ -526,7 +526,7 @@
typedef grub_uint8_t grub_efi_mac_address_t[32];
typedef grub_uint8_t grub_efi_ipv4_address_t[4];
typedef grub_uint16_t grub_efi_ipv6_address_t[8];
-typedef grub_uint8_t grub_efi_ip_address_t[8] __attribute__ ((aligned(4)));
+typedef grub_uint8_t grub_efi_ip_address_t[16] __attribute__ ((aligned(4)));
typedef grub_efi_uint64_t grub_efi_physical_address_t;
typedef grub_efi_uint64_t grub_efi_virtual_address_t;
@@ -1342,12 +1342,33 @@
typedef struct grub_efi_pxe_mode
{
- grub_uint8_t unused[52];
+ grub_uint8_t started;
+ grub_uint8_t ipv6_available;
+ grub_uint8_t ipv6_supported;
+ grub_uint8_t using_ipv6;
+ grub_uint8_t bis_supported;
+ grub_uint8_t bis_detected;
+ grub_uint8_t auto_arp;
+ grub_uint8_t send_guid;
+ grub_uint8_t dhcp_discover_valid;
+ grub_uint8_t dhcp_ack_received;
+ grub_uint8_t proxy_offer_received;
+ grub_uint8_t pxe_discover_valid;
+ grub_uint8_t pxe_reply_received;
+ grub_uint8_t pxe_bis_reply_received;
+ grub_uint8_t icmp_error_received;
+ grub_uint8_t tftp_error_received;
+ grub_uint8_t make_callbacks;
+ grub_uint8_t ttl;
+ grub_uint8_t tos;
+ grub_efi_ip_address_t station_ip;
+ grub_efi_ip_address_t subnet_mask;
grub_efi_pxe_packet_t dhcp_discover;
grub_efi_pxe_packet_t dhcp_ack;
grub_efi_pxe_packet_t proxy_offer;
grub_efi_pxe_packet_t pxe_discover;
grub_efi_pxe_packet_t pxe_reply;
+ grub_efi_pxe_packet_t pxe_bis_reply;
} grub_efi_pxe_mode_t;
typedef struct grub_efi_pxe
[-- Attachment #2: Type: text/html, Size: 13638 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* RFC Patch [2/2] PXE Add support for proxy DHCP -- EFI Code
@ 2014-04-19 0:34 Mroczek, Joseph T
0 siblings, 0 replies; 2+ messages in thread
From: Mroczek, Joseph T @ 2014-04-19 0:34 UTC (permalink / raw)
To: The development of GNU GRUB
Sorry about the HTML in previous message.
Hello:
Here is the uEFI specific portion. I have tested it on three different platforms without issue.
~joe
diff -Naur grub-2.02~beta2/grub-core/net/drivers/efi/efinet.c grub-2.02~beta2-jtm-clean/grub-core/net/drivers/efi/efinet.c
--- grub-2.02~beta2/grub-core/net/drivers/efi/efinet.c 2013-12-24 11:29:27.000000000 -0500
+++ grub-2.02~beta2-jtm-clean/grub-core/net/drivers/efi/efinet.c 2014-04-18 19:26:44.862208600 -0400
@@ -223,6 +223,7 @@
{
struct grub_net_card *card;
grub_efi_device_path_t *dp;
+ struct grub_net_bootp_packet *combined_bootp = NULL;
dp = grub_efi_get_device_path (hnd);
if (! dp)
@@ -245,11 +246,22 @@
if (! pxe)
continue;
pxe_mode = pxe->mode;
- grub_net_configure_by_dhcp_ack (card->name, card, 0,
- (struct grub_net_bootp_packet *)
- &pxe_mode->dhcp_ack,
- sizeof (pxe_mode->dhcp_ack),
- 1, device, path);
+ if (pxe_mode->proxy_offer_received)
+ {
+ combined_bootp = grub_zalloc (sizeof (*combined_bootp));
+ grub_net_merge_dhcp_ack (combined_bootp, (struct grub_net_bootp_packet *) pxe_mode->proxy_offer);
+ grub_net_merge_dhcp_ack (combined_bootp, (struct grub_net_bootp_packet *) pxe_mode->dhcp_ack);
+ grub_net_configure_by_dhcp_ack (card->name, card, 0,
+ combined_bootp,
+ sizeof (combined_bootp),
+ 1, device, path);
+ }
+ else
+ grub_net_configure_by_dhcp_ack (card->name, card, 0,
+ (struct grub_net_bootp_packet *)
+ &pxe_mode->dhcp_ack,
+ sizeof (pxe_mode->dhcp_ack),
+ 1, device, path);
return;
}
}
diff -Naur grub-2.02~beta2/include/grub/efi/api.h grub-2.02~beta2-jtm-clean/include/grub/efi/api.h
--- grub-2.02~beta2/include/grub/efi/api.h 2013-12-24 12:04:54.000000000 -0500
+++ grub-2.02~beta2-jtm-clean/include/grub/efi/api.h 2014-04-18 19:26:44.866208600 -0400
@@ -526,7 +526,7 @@
typedef grub_uint8_t grub_efi_mac_address_t[32];
typedef grub_uint8_t grub_efi_ipv4_address_t[4];
typedef grub_uint16_t grub_efi_ipv6_address_t[8];
-typedef grub_uint8_t grub_efi_ip_address_t[8] __attribute__ ((aligned(4)));
+typedef grub_uint8_t grub_efi_ip_address_t[16] __attribute__ ((aligned(4)));
typedef grub_efi_uint64_t grub_efi_physical_address_t;
typedef grub_efi_uint64_t grub_efi_virtual_address_t;
@@ -1342,12 +1342,33 @@
typedef struct grub_efi_pxe_mode
{
- grub_uint8_t unused[52];
+ grub_uint8_t started;
+ grub_uint8_t ipv6_available;
+ grub_uint8_t ipv6_supported;
+ grub_uint8_t using_ipv6;
+ grub_uint8_t bis_supported;
+ grub_uint8_t bis_detected;
+ grub_uint8_t auto_arp;
+ grub_uint8_t send_guid;
+ grub_uint8_t dhcp_discover_valid;
+ grub_uint8_t dhcp_ack_received;
+ grub_uint8_t proxy_offer_received;
+ grub_uint8_t pxe_discover_valid;
+ grub_uint8_t pxe_reply_received;
+ grub_uint8_t pxe_bis_reply_received;
+ grub_uint8_t icmp_error_received;
+ grub_uint8_t tftp_error_received;
+ grub_uint8_t make_callbacks;
+ grub_uint8_t ttl;
+ grub_uint8_t tos;
+ grub_efi_ip_address_t station_ip;
+ grub_efi_ip_address_t subnet_mask;
grub_efi_pxe_packet_t dhcp_discover;
grub_efi_pxe_packet_t dhcp_ack;
grub_efi_pxe_packet_t proxy_offer;
grub_efi_pxe_packet_t pxe_discover;
grub_efi_pxe_packet_t pxe_reply;
+ grub_efi_pxe_packet_t pxe_bis_reply;
} grub_efi_pxe_mode_t;
typedef struct grub_efi_pxe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-19 0:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-19 0:26 RFC Patch [2/2] PXE Add support for proxy DHCP -- EFI Code Mroczek, Joseph T
2014-04-19 0:34 Mroczek, Joseph T
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.