Lines Matching refs:udp
94 struct udphdr udp; in send_packet() local
104 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size); in send_packet()
114 udp.source = htons(sport); in send_packet()
115 udp.dest = htons(dport); in send_packet()
116 udp.len = htons(sizeof(udp) + size); in send_packet()
117 udp.check = 0; in send_packet()
124 temp = udp.len; in send_packet()
128 udpsum = checksum(&udp, sizeof(udp), udpsum); in send_packet()
132 udp.check = finish_sum(udpsum); in send_packet()
136 iov[1].iov_base = (char *)&udp; in send_packet()
137 iov[1].iov_len = sizeof(udp); in send_packet()
163 struct udphdr udp; in receive_packet() member
197 } else if (packet.udp.dest != htons(PORT_BOOTP_CLIENT)) { in receive_packet()
199 ALOGD("UDP dest port (%d) is not DHCP client", ntohs(packet.udp.dest)); in receive_packet()
221 dhcp_size = ntohs(packet.udp.len) - sizeof(packet.udp); in receive_packet()
229 packet.ip.tot_len = packet.udp.len; in receive_packet()
230 temp = packet.udp.check; in receive_packet()
231 packet.udp.check = 0; in receive_packet()
233 packet.udp.check = temp; in receive_packet()