Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/sctputil.c
Show First 20 Lines • Show All 7,088 Lines • ▼ Show 20 Lines | sctp_log_trace(uint32_t subsys, const char *str SCTP_UNUSED, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f) | ||||
SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[1] = b; | SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[1] = b; | ||||
SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[2] = c; | SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[2] = c; | ||||
SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[3] = d; | SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[3] = d; | ||||
SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[4] = e; | SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[4] = e; | ||||
SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[5] = f; | SCTP_BASE_SYSCTL(sctp_log).entry[saveindex].params[5] = f; | ||||
} | } | ||||
#endif | #endif | ||||
static void | static bool | ||||
sctp_recv_udp_tunneled_packet(struct mbuf *m, int off, struct inpcb *inp, | sctp_recv_udp_tunneled_packet(struct mbuf *m, int off, struct inpcb *inp, | ||||
const struct sockaddr *sa SCTP_UNUSED, void *ctx SCTP_UNUSED) | const struct sockaddr *sa SCTP_UNUSED, void *ctx SCTP_UNUSED) | ||||
{ | { | ||||
struct ip *iph; | struct ip *iph; | ||||
#ifdef INET6 | #ifdef INET6 | ||||
struct ip6_hdr *ip6; | struct ip6_hdr *ip6; | ||||
#endif | #endif | ||||
struct mbuf *sp, *last; | struct mbuf *sp, *last; | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | case IPV6_VERSION >> 4: | ||||
ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - sizeof(struct udphdr)); | ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - sizeof(struct udphdr)); | ||||
sctp6_input_with_port(&m, &off, port); | sctp6_input_with_port(&m, &off, port); | ||||
break; | break; | ||||
#endif | #endif | ||||
default: | default: | ||||
goto out; | goto out; | ||||
break; | break; | ||||
} | } | ||||
return; | return (true); | ||||
out: | out: | ||||
m_freem(m); | m_freem(m); | ||||
return (true); | |||||
} | } | ||||
#ifdef INET | #ifdef INET | ||||
static void | static void | ||||
sctp_recv_icmp_tunneled_packet(int cmd, struct sockaddr *sa, void *vip, void *ctx SCTP_UNUSED) | sctp_recv_icmp_tunneled_packet(int cmd, struct sockaddr *sa, void *vip, void *ctx SCTP_UNUSED) | ||||
{ | { | ||||
struct ip *outer_ip, *inner_ip; | struct ip *outer_ip, *inner_ip; | ||||
struct sctphdr *sh; | struct sctphdr *sh; | ||||
▲ Show 20 Lines • Show All 482 Lines • Show Last 20 Lines |