diff options
-rw-r--r-- | slirp/arp_table.c | 3 | ||||
-rw-r--r-- | slirp/bootp.c | 1 | ||||
-rw-r--r-- | slirp/cksum.c | 1 | ||||
-rw-r--r-- | slirp/dhcpv6.c | 1 | ||||
-rw-r--r-- | slirp/dnssearch.c | 1 | ||||
-rw-r--r-- | slirp/if.c | 1 | ||||
-rw-r--r-- | slirp/ip6.h | 1 | ||||
-rw-r--r-- | slirp/ip6_icmp.c | 1 | ||||
-rw-r--r-- | slirp/ip6_input.c | 1 | ||||
-rw-r--r-- | slirp/ip6_output.c | 2 | ||||
-rw-r--r-- | slirp/ip_icmp.c | 1 | ||||
-rw-r--r-- | slirp/ip_input.c | 1 | ||||
-rw-r--r-- | slirp/ip_output.c | 1 | ||||
-rw-r--r-- | slirp/mbuf.c | 1 | ||||
-rw-r--r-- | slirp/misc.c | 2 | ||||
-rw-r--r-- | slirp/ncsi.c | 1 | ||||
-rw-r--r-- | slirp/ndp_table.c | 2 | ||||
-rw-r--r-- | slirp/sbuf.c | 1 | ||||
-rw-r--r-- | slirp/slirp.c | 2 | ||||
-rw-r--r-- | slirp/socket.c | 2 | ||||
-rw-r--r-- | slirp/tcp_input.c | 1 | ||||
-rw-r--r-- | slirp/tcp_output.c | 1 | ||||
-rw-r--r-- | slirp/tcp_subr.c | 1 | ||||
-rw-r--r-- | slirp/tcp_timer.c | 1 | ||||
-rw-r--r-- | slirp/tftp.c | 6 | ||||
-rw-r--r-- | slirp/udp.c | 1 | ||||
-rw-r--r-- | slirp/udp6.c | 2 | ||||
-rw-r--r-- | slirp/util.h | 21 |
28 files changed, 28 insertions, 33 deletions
diff --git a/slirp/arp_table.c b/slirp/arp_table.c index bf71b98..58eafdc 100644 --- a/slirp/arp_table.c +++ b/slirp/arp_table.c @@ -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 = diff --git a/slirp/bootp.c b/slirp/bootp.c index 4c9a77e..d396849 100644 --- a/slirp/bootp.c +++ b/slirp/bootp.c @@ -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) diff --git a/slirp/cksum.c b/slirp/cksum.c index 84c858f..25bfa67 100644 --- a/slirp/cksum.c +++ b/slirp/cksum.c @@ -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" /* diff --git a/slirp/dhcpv6.c b/slirp/dhcpv6.c index e27d9a4..9ffba38 100644 --- a/slirp/dhcpv6.c +++ b/slirp/dhcpv6.c @@ -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" diff --git a/slirp/dnssearch.c b/slirp/dnssearch.c index 8fb5633..c459cec 100644 --- a/slirp/dnssearch.c +++ b/slirp/dnssearch.c @@ -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 diff --git a/slirp/ip6.h b/slirp/ip6.h index 5361bd7..1b3364f 100644 --- a/slirp/ip6.h +++ b/slirp/ip6.h @@ -7,6 +7,7 @@ #define SLIRP_IP6_H #include <glib.h> +#include <string.h> #define ALLNODES_MULTICAST { .s6_addr = \ { 0xff, 0x02, 0x00, 0x00,\ diff --git a/slirp/ip6_icmp.c b/slirp/ip6_icmp.c index b3b7e50..2a432eb 100644 --- a/slirp/ip6_icmp.c +++ b/slirp/ip6_icmp.c @@ -3,7 +3,6 @@ * Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne. */ -#include "qemu/osdep.h" #include "slirp.h" #include "ip6_icmp.h" diff --git a/slirp/ip6_input.c b/slirp/ip6_input.c index ab656a0..1b8c003 100644 --- a/slirp/ip6_input.c +++ b/slirp/ip6_input.c @@ -3,7 +3,6 @@ * Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne. */ -#include "qemu/osdep.h" #include "slirp.h" #include "ip6_icmp.h" diff --git a/slirp/ip6_output.c b/slirp/ip6_output.c index 52c88ad..19d1ae7 100644 --- a/slirp/ip6_output.c +++ b/slirp/ip6_output.c @@ -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 diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c index 19e247f..6b6344b 100644 --- a/slirp/ip_icmp.c +++ b/slirp/ip_icmp.c @@ -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" diff --git a/slirp/ip_input.c b/slirp/ip_input.c index d360620..774ce66 100644 --- a/slirp/ip_input.c +++ b/slirp/ip_input.c @@ -38,7 +38,6 @@ * terms and conditions of the copyright. */ -#include "qemu/osdep.h" #include "slirp.h" #include "ip_icmp.h" diff --git a/slirp/ip_output.c b/slirp/ip_output.c index db403f0..f6ec141 100644 --- a/slirp/ip_output.c +++ b/slirp/ip_output.c @@ -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 diff --git a/slirp/mbuf.c b/slirp/mbuf.c index d8d275e..521c02c 100644 --- a/slirp/mbuf.c +++ b/slirp/mbuf.c @@ -15,7 +15,6 @@ * the flags */ -#include "qemu/osdep.h" #include "slirp.h" #define MBUF_THRESH 30 diff --git a/slirp/misc.c b/slirp/misc.c index ee77aff..3c02510 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -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) diff --git a/slirp/ncsi.c b/slirp/ncsi.c index 8594382..327f175 100644 --- a/slirp/ncsi.c +++ b/slirp/ncsi.c @@ -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" diff --git a/slirp/ndp_table.c b/slirp/ndp_table.c index b7b7372..34ea4fd 100644 --- a/slirp/ndp_table.c +++ b/slirp/ndp_table.c @@ -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, diff --git a/slirp/sbuf.c b/slirp/sbuf.c index c83e4dd..51a9f0c 100644 --- a/slirp/sbuf.c +++ b/slirp/sbuf.c @@ -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); diff --git a/slirp/slirp.c b/slirp/slirp.c index ec1f606..730b782 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -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 diff --git a/slirp/socket.c b/slirp/socket.c index 2e8dc22..dea201f 100644 --- a/slirp/socket.c +++ b/slirp/socket.c @@ -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__ diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c index 7c1fe18..864da7d 100644 --- a/slirp/tcp_input.c +++ b/slirp/tcp_input.c @@ -38,7 +38,6 @@ * terms and conditions of the copyright. */ -#include "qemu/osdep.h" #include "slirp.h" #include "ip_icmp.h" diff --git a/slirp/tcp_output.c b/slirp/tcp_output.c index 6dd1ecf..2b4335e 100644 --- a/slirp/tcp_output.c +++ b/slirp/tcp_output.c @@ -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] = { diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index d8846a3..879a7dc 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -38,7 +38,6 @@ * terms and conditions of the copyright. */ -#include "qemu/osdep.h" #include "slirp.h" /* patchable/settable parameters for tcp */ diff --git a/slirp/tcp_timer.c b/slirp/tcp_timer.c index a843e57..703907e 100644 --- a/slirp/tcp_timer.c +++ b/slirp/tcp_timer.c @@ -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); diff --git a/slirp/tftp.c b/slirp/tftp.c index 5c31886..2d8f978 100644 --- a/slirp/tftp.c +++ b/slirp/tftp.c @@ -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) { diff --git a/slirp/udp.c b/slirp/udp.c index 3915971..ac42be0 100644 --- a/slirp/udp.c +++ b/slirp/udp.c @@ -38,7 +38,6 @@ * terms and conditions of the copyright. */ -#include "qemu/osdep.h" #include "slirp.h" #include "ip_icmp.h" diff --git a/slirp/udp6.c b/slirp/udp6.c index fa531e0..be5cba1 100644 --- a/slirp/udp6.c +++ b/slirp/udp6.c @@ -3,8 +3,6 @@ * Guillaume Subiron */ -#include "qemu/osdep.h" -#include "qemu-common.h" #include "slirp.h" #include "udp.h" #include "dhcpv6.h" diff --git a/slirp/util.h b/slirp/util.h index ef75804..4963747 100644 --- a/slirp/util.h +++ b/slirp/util.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 |