/* pxe.c - Driver to provide access to the pxe filesystem */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008,2009,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+");
#ifdef __sun__
/* Do not enable promiscuous mode */
#define NO_PROMISCUOUS
#endif
struct grub_pxe_undi_initialize
{
} __attribute__ ((packed));
struct grub_pxe_undi_get_state
{
} __attribute__ ((packed));
struct grub_pxe_undi_startup
{
} __attribute__ ((packed));
struct grub_pxe_undi_shutdown
{
} __attribute__ ((packed));
struct grub_pxe_undi_open
{
} __attribute__ ((packed));
struct grub_pxe_undi_info
{
} __attribute__ ((packed));
struct grub_pxe_undi_isr
{
} __attribute__ ((packed));
enum
{
};
enum
{
};
enum
{
};
struct grub_pxe_undi_transmit
{
} __attribute__ ((packed));
struct grub_pxe_undi_tbd
{
struct
{
} __attribute__ ((packed));
static grub_uint8_t
{
ptr++)
return ret;
}
static struct grub_pxe_bangpxe *
grub_pxe_scan (void)
{
return NULL;
!= 0)
return NULL;
return NULL;
if (!bangpxe)
return NULL;
return NULL;
{
return NULL;
}
return bangpxe;
}
static struct grub_net_buff *
{
static int in_progress = 0;
isr = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
if (!in_progress)
{
/* Do NOT check the isr->func_flag for GRUB_PXE_ISR_OUT_OURS, because
our grub_pxe_call could have raced with the ISR itself and there
is no harm in continuing on with ISR_IN_PROCESS */
{
in_progress = 0;
return NULL;
}
}
else
{
}
{
{
in_progress = 0;
return NULL;
}
}
if (!buf)
return NULL;
/* 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 (!buf)
{
return NULL;
}
{
{
in_progress = 1;
return NULL;
}
}
in_progress = 1;
return buf;
}
static grub_err_t
struct grub_net_buff *pack)
{
char *buf;
trans = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
return 0;
}
static void
grub_pxe_shutdown(void)
{
us = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
}
static void
{
if (pxe_rm_entry)
{
(void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR,
}
}
static grub_err_t
grub_pxe_call_open(void)
{
ou = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
#ifdef NO_PROMISCUOUS
#else
#endif
return GRUB_ERR_NONE;
}
static grub_err_t
{
err = grub_pxe_call_open();
if (err == GRUB_ERR_NONE)
return GRUB_ERR_NONE;
/* If the initial call to UNDI_OPEN fails due to invalid state,
call UNDI_GET_STATE to determine if we need to reinitialize
the UNDI.
*/
gs = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
{
us = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
return grub_error(GRUB_ERR_IO,
}
{
ui = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
return grub_error(GRUB_ERR_IO,
}
/* Finally, try UNDI_OPEN again */
err = grub_pxe_call_open();
return err;
}
{
.open = grub_pxe_open,
.close = grub_pxe_close,
.send = grub_pxe_send,
};
{
.name = "pxe"
};
static void
{
ci.buffer_size = 0;
return;
}
{
unsigned i;
pxenv = grub_pxe_scan ();
if (! pxenv)
return;
ui = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
break;
{
break;
}
}
{
grub_pc_net_config = 0;
}