3 * Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
10 * IP initialization: fill in IP protocol switch table.
11 * All protocols not implemented in kernel go to raw IP protocol handler.
13 void ip6_init(Slirp
*slirp
)
18 void ip6_cleanup(Slirp
*slirp
)
23 void ip6_input(struct mbuf
*m
)
26 Slirp
*slirp
= m
->slirp
;
28 if (!slirp
->in6_enabled
) {
32 DEBUG_CALL("ip6_input");
33 DEBUG_ARG("m = %p", m
);
34 DEBUG_ARG("m_len = %d", m
->m_len
);
36 if (m
->m_len
< sizeof(struct ip6
)) {
40 ip6
= mtod(m
, struct ip6
*);
42 if (ip6
->ip_v
!= IP6VERSION
) {
46 if (ntohs(ip6
->ip_pl
) > IF_MTU
) {
47 icmp6_send_error(m
, ICMP6_TOOBIG
, 0);
51 /* check ip_ttl for a correct ICMP reply */
52 if (ip6
->ip_hl
== 0) {
53 icmp6_send_error(m
, ICMP6_TIMXCEED
, ICMP6_TIMXCEED_INTRANS
);
58 * Switch out to protocol's input routine.
63 tcp_input(m
, sizeof(struct ip6
), (struct socket
*)NULL
, AF_INET6
);