/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2010,2011 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
/* ARP header operation codes */
enum
{
};
enum
{
/* IANA ARP constant to define hardware type as ethernet. */
};
struct arphdr {
} __attribute__ ((packed));
{
int i;
{
addrlen = 4;
}
else
/* Build a request packet. */
grub_netbuff_clear (&nb);
if (err)
return err;
/* Sender hardware address. */
aux += 6;
/* Sender protocol address */
/* Target hardware address */
for (i = 0; i < 6; i++)
aux[i] = 0x00;
aux += 6;
/* Target protocol address */
for (i = 0; i < GRUB_NET_TRIES; i++)
{
return GRUB_ERR_NONE;
return GRUB_ERR_NONE;
}
return GRUB_ERR_NONE;
}
struct grub_net_card *card)
{
{
}
else
return GRUB_ERR_NONE;
sizeof (sender_hw_addr.mac));
{
/* Am I the protocol address target? */
{
/* We've already checked that pln is either 4 or 16. */
arp_header->pln);
/* Change operation to REPLY and send packet */
}
}
return GRUB_ERR_NONE;
}