Lines Matching refs:udp
173 struct udphdr udp; in sendRawUdp() local
178 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + message.size()); in sendRawUdp()
188 udp.source = htons(sourcePort); in sendRawUdp()
189 udp.dest = htons(destinationPort); in sendRawUdp()
190 udp.len = htons(sizeof(udp) + message.size()); in sendRawUdp()
191 udp.check = 0; in sendRawUdp()
197 udpChecksum = addChecksum(udp.len, udpChecksum); in sendRawUdp()
198 udpChecksum = addChecksum(udp, udpChecksum); in sendRawUdp()
200 udp.check = finishChecksum(udpChecksum); in sendRawUdp()
206 iov[1].iov_base = static_cast<void*>(&udp); in sendRawUdp()
207 iov[1].iov_len = sizeof(udp); in sendRawUdp()
271 struct udphdr udp; in receiveRawUdp() local
276 iov[1].iov_base = &udp; in receiveRawUdp()
277 iov[1].iov_len = sizeof(udp); in receiveRawUdp()
285 if (static_cast<size_t>(bytesRead) < sizeof(ip) + sizeof(udp)) { in receiveRawUdp()
293 udp.dest == htons(expectedPort); in receiveRawUdp()
295 message->setSize(bytesRead - sizeof(ip) - sizeof(udp)); in receiveRawUdp()