1
2
3
4
5
6#include "qemu/osdep.h"
7#include "qemu-common.h"
8#include "slirp.h"
9
10
11
12#define IF6_THRESH 10
13
14
15
16
17int ip6_output(struct socket *so, struct mbuf *m, int fast)
18{
19 struct ip6 *ip = mtod(m, struct ip6 *);
20
21 DEBUG_CALL("ip6_output");
22 DEBUG_ARG("so = %lx", (long)so);
23 DEBUG_ARG("m = %lx", (long)m);
24
25
26 ip->ip_v = IP6VERSION;
27 ip->ip_hl = IP6_HOP_LIMIT;
28 ip->ip_tc_hi = 0;
29 ip->ip_tc_lo = 0;
30 ip->ip_fl_hi = 0;
31 ip->ip_fl_lo = 0;
32
33 if (fast) {
34 if_encap(m->slirp, m);
35 } else {
36 if_output(so, m);
37 }
38
39 return 0;
40}
41