Compare commits

..

23 Commits

Author SHA1 Message Date
Vladimir Serbinenko
21e3cd33b6 Merge branch 'master' into next 2017-05-03 12:00:26 +02:00
Vladimir Serbinenko
db77aa5ad6 Merge branch 'next' of git.sv.gnu.org:/srv/git/grub into next 2017-05-03 11:56:59 +02:00
Vladimir Serbinenko
4078fb64c9 Merge branch 'phcoder/termux' of git.sv.gnu.org:/srv/git/grub into next 2017-01-30 14:42:03 +01:00
Vladimir Serbinenko
e1f9050f1a Fix -nopie/-nopie check.
We don't use lgcc_s but missing lgcc_s or another library cause test to fail.
So use -nostdlib.
Clang uses -nopie rather than -no-pie. Check both and use whichever one works.
2017-01-30 14:38:50 +01:00
Vladimir Serbinenko
0cb0bdef15 WIP: Disable hardlink test.
It doesn't wotk on termux.
2017-01-27 20:12:03 +00:00
Vladimir Serbinenko
ba8f448172 WIP: disable m4_syscmd check in gnulib.
m4_syscmd uses /bin/sh which isn't available on termux.
2017-01-27 20:12:03 +00:00
Vladimir Serbinenko
6eadd976ea Don't retrieve fstime when it's not useful. 2017-01-27 20:12:02 +00:00
Vladimir Serbinenko
36a4c40abf debashify fixup 2017-01-27 20:12:01 +00:00
Vladimir Serbinenko
55d849f1f7 Support lseek64.
Android doesn't have 64-bit off_t, so use off64_t instead.
2017-01-27 20:12:00 +00:00
Vladimir Serbinenko
f0cdef6ef5 Discover partial linking arguments dynamically.
clang for android doesn't work with -Wl,-r,-d without -static.
2017-01-27 20:12:00 +00:00
Vladimir Serbinenko
69743d7d1b po: Use @SHELL@ rather than /bin/sh.
/bin/sh might not exist.
2017-01-27 20:11:59 +00:00
Vladimir Serbinenko
39bb4f34be Add termux pathto dict. 2017-01-27 20:11:58 +00:00
Vladimir Serbinenko
ea1aab3f2e fs-tester: make sh-compatible 2017-01-27 20:11:57 +00:00
Vladimir Serbinenko
0460bb1e46 support busybox date.
Busybox date doesn't understand weekdays in -d input,
so strip them beforehand.
2017-01-27 20:11:57 +00:00
Vladimir Serbinenko
470511748d Remove bashisms from tests.
Those tests don't actually need bash. Just use common shebang.
2017-01-27 20:11:56 +00:00
Vladimir Serbinenko
eadbf47358 Use $(SHELL) rather than /bin/sh.
/bin/sh doesn't exist under termux.
2017-01-27 20:11:55 +00:00
Vladimir Serbinenko
3568b5bf80 Fix shebang for termux.
Termux doesn't have a /bin/sh. So we needto use $SHELL.
Keep /bin/sh as much as possible.
2017-01-27 20:11:54 +00:00
Vladimir Serbinenko
9ac0dca085 strtoull: Fix behaviour on chars between '9' and 'a'.
Reported by: Aaron Miller <aaronmiller@fb.com>
2016-08-10 17:49:42 +02:00
Vladimir Serbinenko
b4fc7bc2fd Merge branch 'master' into next 2016-02-28 15:22:52 +01:00
Vladimir Serbinenko
c4748ead11 Merge branch 'master' into next
Conflicts:
	ChangeLog-2015
	grub-core/net/drivers/ieee1275/ofnet.c
	include/grub/ieee1275/ieee1275.h
2015-02-27 01:05:08 +01:00
Paulo Flabiano Smorigo
af768f8d41 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.
2013-12-23 12:32:47 -02:00
Paulo Flabiano Smorigo
8ff3c31f6d Add bootargs parser for open firmware.
It enables net boot even when there is no bootp/dhcp server.

* grub-core/net/drivers/ieee1275/ofnet.c: Add grub_ieee1275_parse_bootargs and
call it at grub_ieee1275_net_config_real.
2013-12-23 12:13:48 -02:00
Paulo Flabiano Smorigo
11454e94ea Add grub_env_set_net_property function.
* grub-core/net/bootp.c: Remove set_env_limn_ro.
* grub-core/net/net.c: Add grub_env_set_net_property.
2013-12-23 12:07:31 -02:00
14 changed files with 147 additions and 41 deletions

View File

@@ -41,7 +41,7 @@ CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx
CFLAGS_MODULE = $(CFLAGS_PLATFORM) -ffreestanding
LDFLAGS_MODULE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d
LDFLAGS_MODULE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) $(TARGET_INCREMENTAL_LINK)
CPPFLAGS_MODULE = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
CCASFLAGS_MODULE = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)

View File

@@ -903,6 +903,25 @@ if test x"$target_cpu" = xsparc64 ; then
TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_mno_relax"
fi
AC_CACHE_CHECK([for incremental link options], grub_cv_target_cc_incremental_link, [
grub_cv_target_cc_incremental_link=no
for cand in "-Wl,-r,-d" "-static -Wl,-r,-d"; do
#AC_LINK_IFELSE doesn't handle non-executable output correctly
echo > conftest_inclink.c
if $TARGET_CC -o /dev/null $TARGET_CFLAGS $TARGET_CPPFLAGS $TARGET_LDFLAGS -nostdlib -Werror $cand conftest_inclink.c >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
grub_cv_target_cc_incremental_link="$cand"
break
fi
done
])
if test x"$grub_cv_target_cc_incremental_link" = xno ; then
AC_MSG_ERROR([could not find incremental link options])
fi
TARGET_INCREMENTAL_LINK="$grub_cv_target_cc_incremental_link"
AC_SUBST(TARGET_INCREMENTAL_LINK)
# By default, GCC 4.4 generates .eh_frame sections containing unwind
# information in some cases where it previously did not. GRUB doesn't need
# these and they just use up vital space. Restore the old compiler
@@ -1216,7 +1235,6 @@ CFLAGS="$TARGET_CFLAGS"
grub_CHECK_PIE
grub_CHECK_NO_PIE
grub_CHECK_NO_PIE_ONEWORD
grub_CHECK_LINK_PIE
[# Need that, because some distributions ship compilers that include
# `-fPIE' or '-fpie' and '-pie' in the default specs.
if [ x"$pie_possible" = xyes ]; then

View File

@@ -49,20 +49,20 @@ kernel = {
nostrip = emu;
emu_ldflags = '-Wl,-r,-d';
i386_efi_ldflags = '-Wl,-r,-d';
emu_ldflags = '$(TARGET_INCREMENTAL_LINK)';
i386_efi_ldflags = '$(TARGET_INCREMENTAL_LINK)';
i386_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
x86_64_efi_ldflags = '-Wl,-r,-d';
x86_64_efi_ldflags = '$(TARGET_INCREMENTAL_LINK)';
x86_64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
ia64_efi_cflags = '-fno-builtin -fpic -minline-int-divide-max-throughput';
ia64_efi_ldflags = '-Wl,-r,-d';
ia64_efi_ldflags = '$(TARGET_INCREMENTAL_LINK)';
ia64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
arm_efi_ldflags = '-Wl,-r,-d';
arm_efi_ldflags = '$(TARGET_INCREMENTAL_LINK)';
arm_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
arm64_efi_ldflags = '-Wl,-r,-d';
arm64_efi_ldflags = '$(TARGET_INCREMENTAL_LINK)';
arm64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version -R .eh_frame';
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
@@ -90,7 +90,7 @@ kernel = {
i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
emu_cflags = '$(CFLAGS_GNULIB)';
emu_cppflags = '$(CPPFLAGS_GNULIB)';
arm_uboot_ldflags = '-Wl,-r,-d';
arm_uboot_ldflags = '$(TARGET_INCREMENTAL_LINK)';
arm_uboot_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
i386_pc_startup = kern/i386/pc/startup.S;
@@ -1961,6 +1961,11 @@ module = {
common = tests/example_functional_test.c;
};
module = {
name = strtoull_test;
common = tests/strtoull_test.c;
};
module = {
name = setjmp_test;
common = tests/setjmp_test.c;

View File

@@ -79,9 +79,9 @@ else
for dep in $deps; do echo "char moddep_$dep[] __attribute__ ((section(\"_moddeps, _moddeps\"))) = \"$dep\";" >>$t2; done
if test -n "$deps"; then
@TARGET_CC@ @TARGET_LDFLAGS@ -ffreestanding -nostdlib -o $tmpfile2 $t1 $t2 $tmpfile -Wl,-r,-d
@TARGET_CC@ @TARGET_LDFLAGS@ @TARGET_INCREMENTAL_LINK@ -ffreestanding -nostdlib -o $tmpfile2 $t1 $t2 $tmpfile
else
@TARGET_CC@ @TARGET_LDFLAGS@ -ffreestanding -nostdlib -o $tmpfile2 $t1 $tmpfile -Wl,-r,-d
@TARGET_CC@ @TARGET_LDFLAGS@ @TARGET_INCREMENTAL_LINK@ -ffreestanding -nostdlib -o $tmpfile2 $t1 $tmpfile
fi
rm -f $t1 $t2 $tmpfile
mv $tmpfile2 $tmpfile

View File

@@ -391,12 +391,13 @@ grub_strtoull (const char *str, char **end, int base)
unsigned long digit;
digit = grub_tolower (*str) - '0';
if (digit > 9)
{
digit += '0' - 'a' + 10;
if (digit >= (unsigned long) base)
break;
}
if (digit >= 'a' - '0')
digit += '0' - 'a' + 10;
else if (digit > 9)
break;
if (digit >= (unsigned long) base)
break;
found = 1;

View File

@@ -19,6 +19,7 @@ grub_target_cflags='@TARGET_CFLAGS@'
grub_target_cppflags='@TARGET_CPPFLAGS@'
grub_target_ccasflags='@TARGET_CCASFLAGS@'
grub_target_ldflags='@TARGET_LDFLAGS@'
grub_target_incremental_ldflags='@TARGET_INCREMENTAL_LINK@'
grub_cflags='@CFLAGS@'
grub_cppflags='@CPPFLAGS@'
grub_ccasflags='@CCASFLAGS@'

View File

@@ -111,8 +111,8 @@ grub_net_arp_send_request (struct grub_net_network_level_interface *inf,
}
grub_err_t
grub_net_arp_receive (struct grub_net_buff *nb,
struct grub_net_card *card)
grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card,
grub_uint16_t *vlantag)
{
struct arppkt *arp_packet = (struct arppkt *) nb->data;
grub_net_network_level_address_t sender_addr, target_addr;
@@ -138,6 +138,14 @@ grub_net_arp_receive (struct grub_net_buff *nb,
FOR_NET_NETWORK_LEVEL_INTERFACES (inf)
{
/* Verify vlantag id */
if (inf->card == card && inf->vlantag != *vlantag)
{
grub_dprintf ("net", "invalid vlantag! %x != %x\n",
inf->vlantag, *vlantag);
break;
}
/* Am I the protocol address target? */
if (grub_net_addr_cmp (&inf->address, &target_addr) == 0
&& arp_packet->op == grub_cpu_to_be16_compile_time (ARP_REQUEST))

View File

@@ -146,18 +146,18 @@ enum
};
static int
grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
grub_ieee1275_parse_bootargs (const char *devpath, char *bootpath,
char **device, struct grub_net_card **card)
{
char *args;
char *comma_char = 0;
char *equal_char = 0;
grub_size_t field_counter = 0;
grub_net_network_level_address_t client_addr, gateway_addr, subnet_mask;
grub_net_link_level_address_t hw_addr;
grub_net_interface_flags_t flags = 0;
struct grub_net_network_level_interface *inter = NULL;
grub_uint16_t vlantag = 0;
hw_addr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
@@ -175,6 +175,11 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
*equal_char = 0;
grub_env_set_net_property ((*card)->name, args, equal_char + 1,
grub_strlen(equal_char + 1));
if ((grub_strcmp (args, "vtag") == 0) &&
(grub_strlen (equal_char + 1) == 8))
vlantag = grub_strtoul (equal_char + 1 + 4, 0, 16);
*equal_char = '=';
}
else
@@ -213,8 +218,10 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
hw_addr.mac, sizeof(hw_addr.mac), 0);
inter = grub_net_add_addr ((*card)->name, *card, &client_addr, &hw_addr,
flags);
inter->vlantag = vlantag;
grub_net_add_ipv4_local (inter,
__builtin_ctz (~grub_le_to_cpu32 (subnet_mask.ipv4)));
}
if (gateway_addr.ipv4 != 0)
@@ -267,7 +274,7 @@ grub_ieee1275_net_config_real (const char *devpath, char **device, char **path,
}
grub_free (canon);
grub_ieee1275_parse_bootpath (devpath, bootpath, device, &card);
grub_ieee1275_parse_bootargs (devpath, bootpath, device, &card);
for (i = 0; i < ARRAY_SIZE (bootp_response_properties); i++)
if (grub_ieee1275_get_property_length (grub_ieee1275_chosen,

View File

@@ -18,6 +18,7 @@
#include <grub/misc.h>
#include <grub/mm.h>
#include <grub/env.h>
#include <grub/net/ethernet.h>
#include <grub/net/ip.h>
#include <grub/net/arp.h>
@@ -56,10 +57,17 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
{
struct etherhdr *eth;
grub_err_t err;
grub_uint8_t etherhdr_size;
grub_uint16_t vlantag_id = VLANTAG_IDENTIFIER;
COMPILE_TIME_ASSERT (sizeof (*eth) < GRUB_NET_MAX_LINK_HEADER_SIZE);
etherhdr_size = sizeof (*eth);
COMPILE_TIME_ASSERT (sizeof (*eth) + 4 < GRUB_NET_MAX_LINK_HEADER_SIZE);
err = grub_netbuff_push (nb, sizeof (*eth));
/* Increase ethernet header in case of vlantag */
if (inf->vlantag != 0)
etherhdr_size += 4;
err = grub_netbuff_push (nb, etherhdr_size);
if (err)
return err;
eth = (struct etherhdr *) nb->data;
@@ -76,6 +84,19 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
return err;
inf->card->opened = 1;
}
/* Check and add a vlan-tag if needed. */
if (inf->vlantag != 0)
{
/* Move eth type to the right */
grub_memcpy ((char *) nb->data + etherhdr_size - 2,
(char *) nb->data + etherhdr_size - 6, 2);
/* Add the tag in the middle */
grub_memcpy ((char *) nb->data + etherhdr_size - 6, &vlantag_id, 2);
grub_memcpy ((char *) nb->data + etherhdr_size - 4, (char *) &(inf->vlantag), 2);
}
return inf->card->driver->send (inf->card, nb);
}
@@ -90,10 +111,25 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
grub_net_link_level_address_t hwaddress;
grub_net_link_level_address_t src_hwaddress;
grub_err_t err;
grub_uint8_t etherhdr_size = sizeof (*eth);
grub_uint16_t vlantag = 0;
/* Check if a vlan-tag is present. If so, the ethernet header is 4 bytes */
/* longer than the original one. The vlantag id is extracted and the header */
/* is reseted to the original size. */
if (grub_get_unaligned16 (nb->data + etherhdr_size - 2) == VLANTAG_IDENTIFIER)
{
vlantag = grub_get_unaligned16 (nb->data + etherhdr_size);
etherhdr_size += 4;
/* Move eth type to the original position */
grub_memcpy((char *) nb->data + etherhdr_size - 6,
(char *) nb->data + etherhdr_size - 2, 2);
}
eth = (struct etherhdr *) nb->data;
type = grub_be_to_cpu16 (eth->type);
err = grub_netbuff_pull (nb, sizeof (*eth));
err = grub_netbuff_pull (nb, etherhdr_size);
if (err)
return err;
@@ -121,13 +157,14 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
{
/* ARP packet. */
case GRUB_NET_ETHERTYPE_ARP:
grub_net_arp_receive (nb, card);
grub_net_arp_receive (nb, card, &vlantag);
grub_netbuff_free (nb);
return GRUB_ERR_NONE;
/* IP packet. */
case GRUB_NET_ETHERTYPE_IP:
case GRUB_NET_ETHERTYPE_IP6:
return grub_net_recv_ip_packets (nb, card, &hwaddress, &src_hwaddress);
return grub_net_recv_ip_packets (nb, card, &hwaddress, &src_hwaddress,
&vlantag);
}
grub_netbuff_free (nb);
return GRUB_ERR_NONE;

View File

@@ -228,12 +228,13 @@ handle_dgram (struct grub_net_buff *nb,
grub_net_ip_protocol_t proto,
const grub_net_network_level_address_t *source,
const grub_net_network_level_address_t *dest,
grub_uint16_t *vlantag,
grub_uint8_t ttl)
{
struct grub_net_network_level_interface *inf = NULL;
grub_err_t err;
int multicast = 0;
/* DHCP needs special treatment since we don't know IP yet. */
{
struct udphdr *udph;
@@ -293,6 +294,15 @@ handle_dgram (struct grub_net_buff *nb,
&& grub_net_addr_cmp (&inf->address, dest) == 0
&& grub_net_hwaddr_cmp (&inf->hwaddress, hwaddress) == 0)
break;
/* Verify vlantag id */
if (inf->card == card && inf->vlantag != *vlantag)
{
grub_dprintf ("net", "invalid vlantag! %x != %x\n",
inf->vlantag, *vlantag);
break;
}
/* Solicited node multicast. */
if (inf->card == card
&& inf->address.type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6
@@ -383,7 +393,8 @@ static grub_err_t
grub_net_recv_ip4_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)
{
struct iphdr *iph = (struct iphdr *) nb->data;
grub_err_t err;
@@ -458,7 +469,7 @@ grub_net_recv_ip4_packets (struct grub_net_buff *nb,
dest.ipv4 = iph->dest;
return handle_dgram (nb, card, src_hwaddress, hwaddress, iph->protocol,
&source, &dest, iph->ttl);
&source, &dest, vlantag, iph->ttl);
}
for (prev = &reassembles, rsm = *prev; rsm; prev = &rsm->next, rsm = *prev)
@@ -594,7 +605,7 @@ grub_net_recv_ip4_packets (struct grub_net_buff *nb,
dest.ipv4 = dst;
return handle_dgram (ret, card, src_hwaddress,
hwaddress, proto, &source, &dest,
hwaddress, proto, &source, &dest, vlantag,
ttl);
}
}
@@ -652,7 +663,8 @@ static grub_err_t
grub_net_recv_ip6_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)
{
struct ip6hdr *iph = (struct ip6hdr *) nb->data;
grub_err_t err;
@@ -703,21 +715,24 @@ grub_net_recv_ip6_packets (struct grub_net_buff *nb,
grub_memcpy (dest.ipv6, &iph->dest, sizeof (dest.ipv6));
return handle_dgram (nb, card, src_hwaddress, hwaddress, iph->protocol,
&source, &dest, iph->ttl);
&source, &dest, vlantag, iph->ttl);
}
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)
{
struct iphdr *iph = (struct iphdr *) nb->data;
if ((iph->verhdrlen >> 4) == 4)
return grub_net_recv_ip4_packets (nb, card, hwaddress, src_hwaddress);
return grub_net_recv_ip4_packets (nb, card, hwaddress, src_hwaddress,
vlantag);
if ((iph->verhdrlen >> 4) == 6)
return grub_net_recv_ip6_packets (nb, card, hwaddress, src_hwaddress);
return grub_net_recv_ip6_packets (nb, card, hwaddress, src_hwaddress,
vlantag);
grub_dprintf ("net", "Bad IP version: %d\n", (iph->verhdrlen >> 4));
grub_netbuff_free (nb);
return GRUB_ERR_NONE;

View File

@@ -26,14 +26,23 @@ GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_functional_test (grub_extcmd_context_t ctxt __attribute__ ((unused)),
int argc __attribute__ ((unused)),
char **args __attribute__ ((unused)))
int argc,
char **args)
{
grub_test_t test;
int ok = 1;
int i;
FOR_LIST_ELEMENTS (test, grub_test_list)
{
if (argc != 0)
{
for (i = 0; i < argc; i++)
if (grub_strcmp(args[i], test->name) == 0)
break;
if (i == argc)
continue;
}
grub_errno = 0;
ok = ok && !grub_test_run (test);
grub_errno = 0;

View File

@@ -291,6 +291,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;
};
@@ -561,4 +562,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 */

View File

@@ -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

View File

@@ -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,