Add interface struct for communication between protocols and protocols stack.

Changed the protocols structs to use one struct for each layer.
This commit is contained in:
Manoel R. Abranches committed 2010-06-21 19:05:14 -03:00
1 parent 8d402bc9a8
commit d17a9fea4a
8 files changed
+194 -68

No files matched your search

+10 -9
View File
@@ -1,22 +1,23 @@
#ifndef GRUB_NET_UDP_HEADER
#define GRUB_NET_UDP_HEADER 1
#include <grub/misc.h>
/*
typedef enum
{
GRUB_PROT_TFTP
} protocol_type;
*/
#define GRUB_PROT_TFTP 1
struct udphdr {
struct udphdr
{
grub_uint16_t src;
grub_uint16_t dst;
grub_uint16_t len;
grub_uint16_t chksum;
} __attribute__ ((packed));
struct udp_interf
{
grub_uint16_t src;
grub_uint16_t dst;
};
void udp_ini(void);
void udp_fini(void);
#endif