* 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 =
* 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)
* in_cksum.c,v 1.2 1994/08/02 07:48:16 davidg Exp
*/
-#include "qemu/osdep.h"
#include "slirp.h"
/*
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "dhcpv6.h"
* THE SOFTWARE.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static const uint8_t RFC3397_OPT_DOMAIN_SEARCH = 119;
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static void
#define SLIRP_IP6_H
#include <glib.h>
+#include <string.h>
#define ALLNODES_MULTICAST { .s6_addr = \
{ 0xff, 0x02, 0x00, 0x00,\
* Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip6_icmp.h"
* Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip6_icmp.h"
* 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
* 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"
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
/* Number of packets queued before we start sending
* the flags
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#define MBUF_THRESH 30
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
-#include "libslirp.h"
inline void
insque(void *a, void *b)
* 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"
* 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,
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static void sbappendsb(struct sbuf *sb, struct mbuf *m);
* 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
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "slirp.h"
#include "ip_icmp.h"
#ifdef __sun__
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
static const u_char tcp_outflags[TCP_NSTATES] = {
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
/* patchable/settable parameters for tcp */
* 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);
* 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)
{
* terms and conditions of the copyright.
*/
-#include "qemu/osdep.h"
#include "slirp.h"
#include "ip_icmp.h"
* Guillaume Subiron
*/
-#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "slirp.h"
#include "udp.h"
#include "dhcpv6.h"
# 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