2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2002,2007 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_NET_HEADER
20 #define GRUB_NET_HEADER 1
22 #include <grub/symbol.h>
24 #include <grub/types.h>
30 /* The device name. */
33 /* FIXME: Just a template. */
34 int (*probe
) (struct grub_net
*net
, const void *addr
);
35 void (*reset
) (struct grub_net
*net
);
36 int (*poll
) (struct grub_net
*net
);
37 void (*transmit
) (struct grub_net
*net
, const void *destip
,
38 unsigned srcsock
, unsigned destsock
, const void *packet
);
39 void (*disable
) (struct grub_net
*net
);
41 /* The next net device. */
42 struct grub_net_dev
*next
;
44 typedef struct grub_net_dev
*grub_net_dev_t
;
53 /* The underlying disk device. */
56 /* The binding filesystem. */
59 /* FIXME: More data would be required, such as an IP address, a mask,
62 /* Device-specific data. */
65 typedef struct grub_net
*grub_net_t
;
67 /* FIXME: How to abstract networks? More consideration is necessary. */
69 /* Note: Networks are very different from disks, because networks must
70 be initialized before used, and the status is persistent. */
72 #endif /* ! GRUB_NET_HEADER */