/*
* 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/>.
*/
GRUB_MOD_LICENSE ("GPLv3+");
struct grub_ofnetcard_data
{
char *path;
};
static grub_err_t
{
int status;
/* The full string will prevent a bootp packet to be sent. Just put some valid ip in there. */
":speed=auto,duplex=auto,1.1.1.1,dummy,1.1.1.1,1.1.1.1,5,5,1.1.1.1,512");
if (status)
return GRUB_ERR_NONE;
}
static void
{
}
static grub_err_t
{
int status;
if (status)
return GRUB_ERR_NONE;
}
static struct grub_net_buff *
{
int rc;
/* Reserve 2 bytes so that 2 + 14/18 bytes of ethernet header is divisible
by 4. So that IP header is aligned on 4 bytes. */
if (!nb)
{
return NULL;
}
start_time = grub_get_time_ms ();
do
if (actual)
{
return nb;
}
return NULL;
}
{
.name = "ofnet",
.close = card_close,
.send = send_card_buffer,
};
static const struct
{
const char *name;
int offset;
}
{
};
static void
{
/* FIXME: Check that it's the right card. */
{
char *bootp_response;
char *cardpath;
char *canon;
unsigned int i;
continue;
{
continue;
}
for (i = 0; i < ARRAY_SIZE (bootp_response_properties); i++)
&size) >= 0)
break;
if (size < 0)
return;
if (!bootp_response)
{
grub_print_error ();
return;
}
bootp_response, size, 0) < 0)
return;
(struct grub_net_bootp_packet *)
return;
}
}
static char *
{
{
{
return 1;
}
return 0;
}
return ret;
}
static void
grub_ofnet_findcards (void)
{
{
{
char *shortname;
if (!ofdata)
{
grub_print_error ();
return 1;
}
if (!card)
{
grub_print_error ();
return 1;
}
{
"max-frame-size", &t,
sizeof (t), 0))
else
}
{
grub_print_error ();
return 0;
}
return 0;
}
return 0;
}
/* Look at all nodes for devices of the type network. */
}
{
}
{
}