common = net/udp.c;
common = net/ethernet.c;
common = net/arp.c;
- common = net/interface.c;
common = net/netbuff.c;
};
#include <grub/net/arp.h>
#include <grub/net/netbuff.h>
-#include <grub/net/interface.h>
#include <grub/mm.h>
#include <grub/net.h>
#include <grub/net/ethernet.h>
return GRUB_ERR_NONE;
}
current_time = grub_get_time_ms();
- if (current_time - start_time > TIMEOUT_TIME_MS)
+ if (current_time - start_time > 3000)
break;
} while (! entry);
grub_netbuff_clear(nb);
#include <grub/net/ip.h>
#include <grub/net/arp.h>
#include <grub/net/netbuff.h>
-#include <grub/net/interface.h>
#include <grub/net.h>
#include <grub/time.h>
#include <grub/net/arp.h>
+++ /dev/null
-/*#include <grub/net/interface.h>
-
-#define INTERFACE_REGISTER_FUNCTIONS(layerprevious,layernext) \
-struct grub_net_##layername_layer_protocol *grub_net_##layername_layer_protocols;\
-\
-void grub_net_##layerprevious_##layernext_interface_register (struct grub_net_##layername_layer_protocol *prot)\
-{\
- grub_list_push (GRUB_AS_LIST_P (&grub_net_##layername_layer_protocols),\
- GRUB_AS_LIST (prot));\
-}\
-\
-void grub_net_##layerprevious_##layernext_interface_unregister (struct grub_net_##layername_layer_protocol *prot);\
-{\
- grub_list_remove (GRUB_AS_LIST_P (&grub_net_##layername_layer_protocols),\
- GRUB_AS_LIST (prot));\
-}\
-
-INTERFACE_REGISTER_FUNCTIONS("application","transport");
-INTERFACE_REGISTER_FUNCTIONS("transport","network");
-INTERFACE_REGISTER_FUNCTIONS("network","link");
-INTERFACE_REGISTER_FUNCTIONS("link");*/
-
-#include <grub/mm.h>
-#include <grub/net/interface.h>
-struct grub_net_protocol_stack
- *grub_net_protocol_stack_get (char *name)
-{
- struct grub_net_protocol_stack *p;
-
- for (p = grub_net_protocol_stacks; p; p = p->next)
- {
- if (!grub_strcmp(p->name,name))
- return p;
- }
-
- return NULL;
-}
#include <grub/misc.h>
#include <grub/net/arp.h>
#include <grub/net/ethernet.h>
-#include <grub/net/interface.h>
-#include <grub/net/type_net.h>
#include <grub/net.h>
#include <grub/net/netbuff.h>
#include <grub/mm.h>
len = ALIGN_UP (len,NETBUFF_ALIGN);
data = grub_memalign (NETBUFF_ALIGN, len + sizeof (*nb));
- nb = (struct grub_net_buff *) ((int)data + len);
+ nb = (struct grub_net_buff *) ((grub_uint8_t *) data + len);
nb->head = nb->data = nb->tail = data;
nb->end = (char *) nb;
#include <grub/net/ip.h>
#include <grub/net/ethernet.h>
#include <grub/net/netbuff.h>
-#include <grub/net/interface.h>
-#include <grub/net/type_net.h>
#include <grub/net.h>
#include <grub/mm.h>
#include <grub/dl.h>
#include <grub/net.h>
#include <grub/net/udp.h>
#include <grub/net/ip.h>
-#include <grub/net/type_net.h>
#include <grub/net/netbuff.h>
-#include <grub/net/protocol.h>
-#include <grub/net/interface.h>
#include <grub/time.h>
grub_err_t
#include <grub/err.h>
#include <grub/list.h>
#include <grub/fs.h>
+#include <grub/mm.h>
#include <grub/net/netbuff.h>
-#include <grub/net/type_net.h>
-#include <grub/net/protocol.h>
typedef struct grub_fs *grub_net_app_level_t;
#define GRUB_NET_ARP_HEADER 1
#include <grub/misc.h>
#include <grub/net.h>
-#include <grub/net/protocol.h>
/* IANA ARP constant to define hardware type as ethernet */
#define ARPHRD_ETHERNET 1
+++ /dev/null
-#ifndef GRUB_INTERFACE_HEADER
-#define GRUB_INTERFACE_HEADER
-//#include <grub/net.h>
-#include <grub/net/type_net.h>
-#include <grub/list.h>
-#include <grub/misc.h>
-
-struct grub_net_protocol_stack
-{
- struct grub_net_protocol_stack *next;
- char *name;
- grub_net_protocol_id_t id;
- void *interface;
-};
-
-struct grub_net_application_transport_interface
-{
- struct grub_net_transport_network_interface *inner_layer;
- void *data;
- struct grub_net_application_layer_protocol *app_prot;
- struct grub_net_transport_layer_protocol *trans_prot;
-};
-
-struct grub_net_transport_network_interface
-{
- struct grub_net_network_link_interface *inner_layer;
- void *data;
- struct grub_net_transport_layer_protocol *trans_prot;
- struct grub_net_network_layer_protocol *net_prot;
-};
-
-struct grub_net_network_link_interface
-{
- void *data;
- struct grub_net_network_layer_protocol *net_prot;
- struct grub_net_link_layer_protocol *link_prot;
-};
-
-
-struct grub_net_protocol_stack *grub_net_protocol_stacks;
-static inline void
-grub_net_stack_register (struct grub_net_protocol_stack *stack)
-{
-
- grub_list_push (GRUB_AS_LIST_P (&grub_net_protocol_stacks),
- GRUB_AS_LIST (stack));
-}
-/*
-void grub_net_stack_unregister (struct grub_net_protocol_stack *stack)
-{
- grub_list_remove (GRUB_AS_LIST_P (&grub_net_protocol_stacks),
- GRUB_AS_LIST (stack));
-}*/
-
-struct grub_net_protocol_stack *grub_net_protocol_stack_get (char *name);
-
-/*
-static inline void
-grub_net_interface_application_transport_register (struct grub_net_application_transport_interface);
-static inline void
-grub_net_interface_application_transport_unregister (struct grub_net_application_transport_interface);
-static inline void
-grub_net_interface_transport_network_register (struct grub_net_transport_network_interface);
-static inline void
-grub_net_interface_transport_network_unregister (struct grub_net_transport_network_interface);
-static inline void
-grub_net_interface_network_link_register (struct grub_net_network_link_interface);
-static inline void
-grub_net_interface_network_link_unregister (struct grub_net_network_link_interface);*/
-#endif
+++ /dev/null
-#ifndef GRUB_PROTOCOL_HEADER
-#define GRUB_PROTOCOL_HEADER
-#include <grub/err.h>
-#include <grub/mm.h>
-#include <grub/net/interface.h>
-#include <grub/net/netbuff.h>
-#include <grub/net/type_net.h>
-
-#endif
+++ /dev/null
-#ifndef GRUB_TYPES_NET_HEADER
-#define GRUB_TYPES_NET_HEADER 1
-#include <grub/misc.h>
-
-
-#define UDP_PCKT 0x11
-#define IP_PCKT 0x0800
-#define TIMEOUT_TIME_MS 3*1000
-typedef enum
-{
- GRUB_NET_TFTP_ID,
- GRUB_NET_UDP_ID,
- GRUB_NET_IPV4_ID,
- GRUB_NET_IPV6_ID,
- GRUB_NET_ETHERNET_ID,
- GRUB_NET_ARP_ID,
- GRUB_NET_DHCP_ID
-}grub_net_protocol_id_t;
-
-
-typedef union grub_net_network_layer_netaddress
-{
- grub_uint32_t ipv4;
-} grub_net_network_layer_address_t;
-
-typedef union grub_net_network_layer_address
-{
- struct {
- grub_uint32_t base;
- int masksize;
- } ipv4;
-} grub_net_network_layer_netaddress_t;
-#endif