aboutsummaryrefslogtreecommitdiff
path: root/slirp/if.h
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/if.h')
-rw-r--r--slirp/if.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/slirp/if.h b/slirp/if.h
index bf24174a6..bed7152fe 100644
--- a/slirp/if.h
+++ b/slirp/if.h
@@ -13,15 +13,26 @@
#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) */
extern struct mbuf if_fastq; /* fast queue (for interactive data) */
extern struct mbuf if_batchq; /* queue for non-interactive data */
@@ -29,6 +40,7 @@ extern struct mbuf *next_m;
#define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm))
+#ifdef LOG_ENABLED
/* Interface statistics */
struct slirp_ifstats {
u_int out_pkts; /* Output packets */
@@ -46,5 +58,6 @@ struct slirp_ifstats {
u_int in_mbad; /* Bad incoming packets */
};
+#endif
#endif