]> Git Repo - qemu.git/blob - slirp/ip6_output.c
spice: use a default name for the server
[qemu.git] / slirp / ip6_output.c
1 /*
2  * Copyright (c) 2013
3  * Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
4  */
5
6 #include "slirp.h"
7
8 /* Number of packets queued before we start sending
9  * (to prevent allocing too many mbufs) */
10 #define IF6_THRESH 10
11
12 /*
13  * IPv6 output. The packet in mbuf chain m contains a IP header
14  */
15 int ip6_output(struct socket *so, struct mbuf *m, int fast)
16 {
17     struct ip6 *ip = mtod(m, struct ip6 *);
18
19     DEBUG_CALL("ip6_output");
20     DEBUG_ARG("so = %p", so);
21     DEBUG_ARG("m = %p", m);
22
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;
30
31     if (fast) {
32         if_encap(m->slirp, m);
33     } else {
34         if_output(so, m);
35     }
36
37     return 0;
38 }
This page took 0.025696 seconds and 4 git commands to generate.