Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/udp_usrreq.c
Show First 20 Lines • Show All 1,145 Lines • ▼ Show 20 Lines | udp_output(struct inpcb *inp, struct mbuf *m, struct sockaddr *addr, | ||||
int len = m->m_pkthdr.len; | int len = m->m_pkthdr.len; | ||||
struct in_addr faddr, laddr; | struct in_addr faddr, laddr; | ||||
struct cmsghdr *cm; | struct cmsghdr *cm; | ||||
struct inpcbinfo *pcbinfo; | struct inpcbinfo *pcbinfo; | ||||
struct sockaddr_in *sin, src; | struct sockaddr_in *sin, src; | ||||
struct epoch_tracker et; | struct epoch_tracker et; | ||||
int cscov_partial = 0; | int cscov_partial = 0; | ||||
int error = 0; | int error = 0; | ||||
int ipflags; | int ipflags = 0; | ||||
u_short fport, lport; | u_short fport, lport; | ||||
u_char tos; | u_char tos; | ||||
uint8_t pr; | uint8_t pr; | ||||
uint16_t cscov = 0; | uint16_t cscov = 0; | ||||
uint32_t flowid = 0; | uint32_t flowid = 0; | ||||
uint8_t flowtype = M_HASHTYPE_NONE; | uint8_t flowtype = M_HASHTYPE_NONE; | ||||
if (len + sizeof(struct udpiphdr) > IP_MAXPACKET) { | if (len + sizeof(struct udpiphdr) > IP_MAXPACKET) { | ||||
▲ Show 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | #endif /* RSS */ | ||||
*/ | */ | ||||
if (inp->inp_flags & INP_DONTFRAG) { | if (inp->inp_flags & INP_DONTFRAG) { | ||||
struct ip *ip; | struct ip *ip; | ||||
ip = (struct ip *)&ui->ui_i; | ip = (struct ip *)&ui->ui_i; | ||||
ip->ip_off |= htons(IP_DF); | ip->ip_off |= htons(IP_DF); | ||||
} | } | ||||
ipflags = 0; | |||||
if (inp->inp_socket->so_options & SO_DONTROUTE) | if (inp->inp_socket->so_options & SO_DONTROUTE) | ||||
ipflags |= IP_ROUTETOIF; | ipflags |= IP_ROUTETOIF; | ||||
if (inp->inp_socket->so_options & SO_BROADCAST) | if (inp->inp_socket->so_options & SO_BROADCAST) | ||||
ipflags |= IP_ALLOWBROADCAST; | ipflags |= IP_ALLOWBROADCAST; | ||||
if (inp->inp_flags & INP_ONESBCAST) | if (inp->inp_flags & INP_ONESBCAST) | ||||
ipflags |= IP_SENDONES; | ipflags |= IP_SENDONES; | ||||
#ifdef MAC | #ifdef MAC | ||||
▲ Show 20 Lines • Show All 348 Lines • Show Last 20 Lines |