Lines Matching refs:udphdr
195 struct udp_header *udphdr; in udp_tx() local
212 udphdr = iob_push ( iobuf, sizeof ( *udphdr ) ); in udp_tx()
214 udphdr->dest = dest->st_port; in udp_tx()
215 udphdr->src = src->st_port; in udp_tx()
216 udphdr->len = htons ( len ); in udp_tx()
217 udphdr->chksum = 0; in udp_tx()
218 udphdr->chksum = tcpip_chksum ( udphdr, len ); in udp_tx()
222 ntohs ( udphdr->src ), ntohs ( udphdr->dest ), in udp_tx()
223 ntohs ( udphdr->len ) ); in udp_tx()
227 &udphdr->chksum ) ) != 0 ) { in udp_tx()
272 struct udp_header *udphdr = iobuf->data; in udp_rx() local
280 if ( iob_len ( iobuf ) < sizeof ( *udphdr ) ) { in udp_rx()
282 iob_len ( iobuf ), sizeof ( *udphdr ) ); in udp_rx()
287 ulen = ntohs ( udphdr->len ); in udp_rx()
288 if ( ulen < sizeof ( *udphdr ) ) { in udp_rx()
290 "(header is %zd bytes)\n", ulen, sizeof ( *udphdr ) ); in udp_rx()
300 if ( udphdr->chksum ) { in udp_rx()
311 st_src->st_port = udphdr->src; in udp_rx()
312 st_dest->st_port = udphdr->dest; in udp_rx()
315 iob_pull ( iobuf, sizeof ( *udphdr ) ); in udp_rx()
319 ntohs ( udphdr->dest ), ntohs ( udphdr->src ), ulen ); in udp_rx()
324 ntohs ( udphdr->dest ) ); in udp_rx()