@@ -22,9 +22,10 @@
* THE SOFTWARE.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
+#include <string.h>
+
void arp_table_add(Slirp *slirp, uint32_t ip_addr, uint8_t ethaddr[ETH_ALEN])
{
const uint32_t broadcast_addr =
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#if defined(_WIN32)
@@ -30,7 +30,6 @@
* in_cksum.c,v 1.2 1994/08/02 07:48:16 davidg Exp
*/
-#include "qemu/osdep.h"
#include "slirp.h"
/*
@@ -20,7 +20,6 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "dhcpv6.h"
@@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static const uint8_t RFC3397_OPT_DOMAIN_SEARCH = 119;
@@ -5,7 +5,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static void
@@ -7,6 +7,7 @@
#define SLIRP_IP6_H
#include <glib.h>
+#include <string.h>
#define ALLNODES_MULTICAST { .s6_addr = \
{ 0xff, 0x02, 0x00, 0x00,\
@@ -3,7 +3,6 @@
* Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip6_icmp.h"
@@ -3,7 +3,6 @@
* Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip6_icmp.h"
@@ -3,8 +3,6 @@
* Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
*/
-#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "slirp.h"
/* Number of packets queued before we start sending
@@ -30,7 +30,6 @@
* ip_icmp.c,v 1.7 1995/05/30 08:09:42 rgrimes Exp
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
@@ -38,7 +38,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
@@ -38,7 +38,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
/* Number of packets queued before we start sending
@@ -15,7 +15,6 @@
* the flags
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#define MBUF_THRESH 30
@@ -5,9 +5,7 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
-#include "libslirp.h"
inline void
insque(void *a, void *b)
@@ -6,7 +6,6 @@
* This code is licensed under the GPL version 2 or later. See the
* COPYING file in the top-level directory.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ncsi-pkt.h"
@@ -3,8 +3,6 @@
* Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
*/
-#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "slirp.h"
void ndp_table_add(Slirp *slirp, struct in6_addr ip_addr,
@@ -5,7 +5,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static void sbappendsb(struct sbuf *sb, struct mbuf *m);
@@ -21,8 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "slirp.h"
#ifdef WITH_QEMU
@@ -5,8 +5,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "slirp.h"
#include "ip_icmp.h"
#ifdef __sun__
@@ -38,7 +38,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
@@ -38,7 +38,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static const u_char tcp_outflags[TCP_NSTATES] = {
@@ -38,7 +38,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
/* patchable/settable parameters for tcp */
@@ -30,7 +30,6 @@
* tcp_timer.c,v 1.2 1994/08/02 07:49:10 davidg Exp
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer);
@@ -22,9 +22,11 @@
* THE SOFTWARE.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
-#include "qemu-common.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
static inline int tftp_session_in_use(struct tftp_session *spt)
{
@@ -38,7 +38,6 @@
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
@@ -3,8 +3,6 @@
* Guillaume Subiron
*/
-#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "slirp.h"
#include "udp.h"
#include "dhcpv6.h"
@@ -48,6 +48,27 @@
# define SLIRP_PACKED __attribute__((packed))
#endif
+#ifndef DIV_ROUND_UP
+#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
+#endif
+
+#ifndef container_of
+#define container_of(ptr, type, member) __extension__ ({ \
+ void *__mptr = (void *)(ptr); \
+ ((type *)(__mptr - offsetof(type, member))); })
+#endif
+
+#if defined(_WIN32) /* CONFIG_IOVEC */
+# if !defined(IOV_MAX) /* XXX: to avoid duplicate with QEMU osdep.h */
+struct iovec {
+ void *iov_base;
+ size_t iov_len;
+};
+# endif
+#else
+#include <sys/uio.h>
+#endif
+
#define SCALE_MS 1000000
#define ETH_ALEN 6