summaryrefslogtreecommitdiff
path: root/if.h
diff options
context:
space:
mode:
authorYonit <yhalperi@redhat.com>2009-05-27 12:20:10 +0300
committerYonit <yhalperi@redhat.com>2009-05-27 12:20:10 +0300
commit0cc49020edd88d4a914c67407bc6ae0bda30bf48 (patch)
tree304e0f5c59de0c37dec9d08e6509945a40a6ffd0 /if.h
parent47de9909ff0eb29285e62e5494dcc7ca4abb9da9 (diff)
slirp that uses user defined interface for sockets instead of operating system
sockets. Currently supports only TCP. some addtional changes: 1) DHCP NACK support 2) moving prototypes from slirp.h to specific header files 3) not supporting emulated sockets slirp
Diffstat (limited to 'if.h')
-rw-r--r--if.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/if.h b/if.h
index bed7152..d83ac56 100644
--- a/if.h
+++ b/if.h
@@ -8,6 +8,15 @@
#ifndef _IF_H_
#define _IF_H_
+#include "mbuf.h"
+#include "socket.h"
+
+#define ETH_ALEN 6
+#define ETH_HLEN 14
+
+#define ETH_P_IP 0x0800 /* Internet Protocol packet */
+#define ETH_P_ARP 0x0806 /* Address Resolution packet */
+
#define IF_COMPRESS 0x01 /* We want compression */
#define IF_NOCOMPRESS 0x02 /* Do not do compression */
#define IF_AUTOCOMP 0x04 /* Autodetect (default) */
@@ -60,4 +69,7 @@ struct slirp_ifstats {
};
#endif
+void if_init();
+void arp_input(const uint8_t *pkt, int pkt_len);
+void if_output(struct socket *so, struct mbuf *ifm);
#endif