mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 18:19:23 +00:00
Reintroduce open/close of net cards. Clean up ofnet.
This commit is contained in:
1 parent
382077365b
commit
0bc2cd0f82
12 files changed
+313
-285
No files matched your search
@@ -64,12 +64,9 @@ struct grub_ieee1275_common_hdr
|
||||
typedef grub_uint32_t grub_ieee1275_ihandle_t;
|
||||
typedef grub_uint32_t grub_ieee1275_phandle_t;
|
||||
|
||||
struct grub_ofnetcard_data
|
||||
{
|
||||
char *path;
|
||||
grub_ieee1275_ihandle_t handle;
|
||||
grub_uint32_t mtu;
|
||||
};
|
||||
extern void (*EXPORT_VAR(grub_ieee1275_net_config)) (const char *dev,
|
||||
char **device,
|
||||
char **path);
|
||||
|
||||
/* Maps a device alias to a pathname. */
|
||||
extern grub_ieee1275_phandle_t EXPORT_VAR(grub_ieee1275_chosen);
|
||||
@@ -203,5 +200,6 @@ int EXPORT_FUNC(grub_ieee1275_devices_iterate) (int (*hook)
|
||||
alias));
|
||||
char *EXPORT_FUNC(grub_ieee1275_get_aliasdevname) (const char *path);
|
||||
char *EXPORT_FUNC(grub_ieee1275_canonicalise_devname) (const char *path);
|
||||
char *EXPORT_FUNC(grub_ieee1275_get_device_type) (const char *path);
|
||||
|
||||
#endif /* ! GRUB_IEEE1275_HEADER */
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2007 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_OFNET_HEADER
|
||||
#define GRUB_OFNET_HEADER 1
|
||||
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
struct grub_ofnet
|
||||
{
|
||||
/* The net name. */
|
||||
const char *name;
|
||||
|
||||
/* The OF device string. */
|
||||
char *dev;
|
||||
/*server ip*/
|
||||
char *sip;
|
||||
/*client ip*/
|
||||
char *cip;
|
||||
/*gateway*/
|
||||
char *gat;
|
||||
/**/
|
||||
int type;
|
||||
};
|
||||
|
||||
typedef struct grub_ofnet *grub_ofnet_t;
|
||||
|
||||
struct grub_bootp {
|
||||
grub_uint8_t op; /* 1 = BOOTREQUEST, 2 = BOOTREPLY */
|
||||
grub_uint8_t htype; /* Hardware address type. */
|
||||
grub_uint8_t hlen; /* Hardware address length */
|
||||
grub_uint8_t hops; /* Used by gateways in cross-gateway booting. */
|
||||
grub_uint32_t xid; /* Transaction ID */
|
||||
grub_uint16_t secs; /* Seconds elapsed. */
|
||||
grub_uint16_t unused; /* Unused. */
|
||||
grub_uint32_t ciaddr; /* Client IP address, */
|
||||
grub_uint32_t yiaddr; /* Client IP address filled by server. */
|
||||
grub_uint32_t siaddr; /* Server IP address. */
|
||||
grub_uint32_t giaddr; /* Gateway IP address. */
|
||||
unsigned char chaddr [16]; /* Client hardware address */
|
||||
char sname [64]; /* Server name */
|
||||
char file [128]; /* Boot filename */
|
||||
unsigned char vend [64];
|
||||
};
|
||||
|
||||
typedef struct grub_bootp* grub_bootp_t;
|
||||
|
||||
extern grub_bootp_t (*EXPORT_VAR (grub_getbootp)) (void);
|
||||
#endif /* ! GRUB_NET_HEADER */
|
||||
Reference in new issue
Block a user