summaryrefslogtreecommitdiffstats
path: root/slirp/if.h
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-26 19:01:16 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-26 19:01:16 +0000
commit9634d9031c140b24c7ca0d8872632207f6ce7275 (patch)
tree34ba241de1f12fcbd4e3301f081c50ff2db654da /slirp/if.h
parent31a60e22752d3daaa248ca10930f3cf4bc5f02e8 (diff)
downloadhqemu-9634d9031c140b24c7ca0d8872632207f6ce7275.zip
hqemu-9634d9031c140b24c7ca0d8872632207f6ce7275.tar.gz
Use const and static as needed, disable unused code
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3452 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp/if.h')
-rw-r--r--slirp/if.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/slirp/if.h b/slirp/if.h
index 8f78ce7..ea96696 100644
--- a/slirp/if.h
+++ b/slirp/if.h
@@ -13,12 +13,25 @@
#define IF_AUTOCOMP 0x04 /* Autodetect (default) */
#define IF_NOCIDCOMP 0x08 /* CID compression */
-/* Needed for FreeBSD */
-#undef if_mtu
-extern int if_mtu;
-extern int if_mru; /* MTU and MRU */
-extern int if_comp; /* Flags for compression */
-extern int if_maxlinkhdr;
+#define IF_MTU 1500
+#define IF_MRU 1500
+#define IF_COMP IF_AUTOCOMP /* Flags for compression */
+
+#if 0
+/*
+ * Set if_maxlinkhdr to 48 because it's 40 bytes for TCP/IP,
+ * and 8 bytes for PPP, but need to have it on an 8byte boundary
+ */
+#ifdef USE_PPP
+#define IF_MAXLINKHDR 48
+#else
+#define IF_MAXLINKHDR 40
+#endif
+#else
+ /* 2 for alignment, 14 for ethernet, 40 for TCP/IP */
+#define IF_MAXLINKHDR (2 + 14 + 40)
+#endif
+
extern int if_queued; /* Number of packets queued so far */
extern int if_thresh; /* Number of packets queued before we start sending
* (to prevent allocing too many mbufs) */
OpenPOWER on IntegriCloud