scripts/qemu.py: log QEMU launch command line
[qemu/ar7.git] / slirp / ip6_output.c
blob19d1ae77489f0508dd6de1a457102fc22da08d4e
1 /*
2 * Copyright (c) 2013
3 * Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
4 */
6 #include "slirp.h"
8 /* Number of packets queued before we start sending
9 * (to prevent allocing too many mbufs) */
10 #define IF6_THRESH 10
13 * IPv6 output. The packet in mbuf chain m contains a IP header
15 int ip6_output(struct socket *so, struct mbuf *m, int fast)
17 struct ip6 *ip = mtod(m, struct ip6 *);
19 DEBUG_CALL("ip6_output");
20 DEBUG_ARG("so = %p", so);
21 DEBUG_ARG("m = %p", m);
23 /* Fill IPv6 header */
24 ip->ip_v = IP6VERSION;
25 ip->ip_hl = IP6_HOP_LIMIT;
26 ip->ip_tc_hi = 0;
27 ip->ip_tc_lo = 0;
28 ip->ip_fl_hi = 0;
29 ip->ip_fl_lo = 0;
31 if (fast) {
32 if_encap(m->slirp, m);
33 } else {
34 if_output(so, m);
37 return 0;