3 * Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
6 #include "qemu/osdep.h"
11 * IP initialization: fill in IP protocol switch table.
12 * All protocols not implemented in kernel go to raw IP protocol handler.
14 void ip6_init(Slirp
*slirp
)
19 void ip6_cleanup(Slirp
*slirp
)
24 void ip6_input(struct mbuf
*m
)
28 DEBUG_CALL("ip6_input");
29 DEBUG_ARG("m = %lx", (long)m
);
30 DEBUG_ARG("m_len = %d", m
->m_len
);
32 if (m
->m_len
< sizeof(struct ip6
)) {
36 ip6
= mtod(m
, struct ip6
*);
38 if (ip6
->ip_v
!= IP6VERSION
) {
42 if (ntohs(ip6
->ip_pl
) > IF_MTU
) {
43 icmp6_send_error(m
, ICMP6_TOOBIG
, 0);
47 /* check ip_ttl for a correct ICMP reply */
48 if (ip6
->ip_hl
== 0) {
49 icmp6_send_error(m
, ICMP6_TIMXCEED
, ICMP6_TIMXCEED_INTRANS
);
54 * Switch out to protocol's input routine.
59 tcp_input(m
, sizeof(struct ip6
), (struct socket
*)NULL
, AF_INET6
);