/freebsd/sys/dev/usb/net/ |
H A D | if_cdceem.c | 323 uint16_t pktlen; in cdceem_handle_cmd() local 338 pktlen = hdr & CDCEEM_ECHO_LEN_MASK; in cdceem_handle_cmd() 339 CDCEEM_DEBUG(sc, "received Echo, length %d", pktlen); in cdceem_handle_cmd() 341 if (pktlen > (actlen - off)) { in cdceem_handle_cmd() 344 pktlen, actlen - off); in cdceem_handle_cmd() 348 if (pktlen > sizeof(sc->sc_echo_buffer)) { in cdceem_handle_cmd() 351 pktlen, sizeof(sc->sc_echo_buffer)); in cdceem_handle_cmd() 356 sc->sc_echo_len = pktlen; in cdceem_handle_cmd() 357 usbd_copy_out(pc, off, sc->sc_echo_buffer, pktlen); in cdceem_handle_cmd() 358 off += pktlen; in cdceem_handle_cmd() [all …]
|
H A D | if_smsc.c | 956 int pktlen; in smsc_bulk_read_callback() local 989 pktlen = (uint16_t)SMSC_RX_STAT_FRM_LENGTH(rxhdr); in smsc_bulk_read_callback() 992 "off %d\n", rxhdr, pktlen, actlen, off); in smsc_bulk_read_callback() 1002 if ((pktlen < ETHER_HDR_LEN) || (pktlen > (actlen - off))) in smsc_bulk_read_callback() 1012 if (pktlen > m->m_len) { in smsc_bulk_read_callback() 1014 pktlen, m->m_len); in smsc_bulk_read_callback() 1019 usbd_copy_out(pc, off, mtod(m, uint8_t *), pktlen); in smsc_bulk_read_callback() 1028 pktlen -= 2; in smsc_bulk_read_callback() 1041 (pktlen > ETHER_MIN_LEN)) { in smsc_bulk_read_callback() 1054 usbd_copy_out(pc, (off + pktlen), in smsc_bulk_read_callback() [all …]
|
H A D | if_muge.c | 1168 int pktlen; in muge_bulk_read_callback() local 1220 pktlen = (rx_cmd_a & RX_CMD_A_LEN_MASK_); in muge_bulk_read_callback() 1224 " pktlen %d actlen %d off %d\n", in muge_bulk_read_callback() 1225 rx_cmd_a, rx_cmd_b, rx_cmd_c, pktlen, actlen, off); in muge_bulk_read_callback() 1233 if ((pktlen < ETHER_HDR_LEN) || in muge_bulk_read_callback() 1234 (pktlen > (actlen - off))) in muge_bulk_read_callback() 1246 if (pktlen > m->m_len) { in muge_bulk_read_callback() 1249 pktlen, m->m_len); in muge_bulk_read_callback() 1255 pktlen); in muge_bulk_read_callback() 1280 if (pktlen > ETHER_MIN_LE in muge_bulk_read_callback() [all...] |
/freebsd/sys/net80211/ |
H A D | ieee80211_rssadapt.c | 221 bucket(int pktlen) in bucket() argument 229 if (pktlen <= top) in bucket() 239 u_int pktlen = iarg; in rssadapt_rate() local 257 thrs = &ra->ra_rate_thresh[bucket(pktlen)]; in rssadapt_rate() 271 ni->ni_txrate, pktlen, rssi); in rssadapt_rate() 283 rssadapt_lower_rate(struct ieee80211_rssadapt_node *ra, int pktlen, int rssi) in rssadapt_lower_rate() argument 289 thrs = &ra->ra_rate_thresh[bucket(pktlen)]; in rssadapt_lower_rate() 303 rssadapt_raise_rate(struct ieee80211_rssadapt_node *ra, int pktlen, int rssi) in rssadapt_raise_rate() argument 309 thrs = &ra->ra_rate_thresh[bucket(pktlen)]; in rssadapt_raise_rate() 335 int pktlen, rssi; in rssadapt_tx_complete() local [all …]
|
/freebsd/sys/dev/rtwn/pci/ |
H A D | rtwn_pci_rx.c | 93 int infosz, pktlen, shift, error; in rtwn_pci_rx_frame() local 116 pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); in rtwn_pci_rx_frame() 117 if (__predict_false(pktlen < sizeof(struct ieee80211_frame_ack) || in rtwn_pci_rx_frame() 118 pktlen > MJUMPAGESIZE)) { in rtwn_pci_rx_frame() 120 "%s: frame is too short/long: %d\n", __func__, pktlen); in rtwn_pci_rx_frame() 154 m->m_pkthdr.len = m->m_len = pktlen + infosz + shift; in rtwn_pci_rx_frame() 160 __func__, pktlen, infosz, shift); in rtwn_pci_rx_frame() 186 int desc_size, pktlen; in rtwn_pci_rx_buf_copy() local 199 pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); in rtwn_pci_rx_buf_copy() 201 if (pktlen > sizeof(pc->pc_rx_buf) - desc_size) in rtwn_pci_rx_buf_copy() [all …]
|
H A D | rtwn_pci_tx.c | 132 txd->pktlen = htole16(m->m_pkthdr.len); in rtwn_pci_tx_start_frame() 220 if (!own || txd->pktlen != htole16(m->m_pkthdr.len)) { in rtwn_pci_tx_start_beacon() 239 txd->pktlen = htole16(m->m_pkthdr.len); in rtwn_pci_tx_start_beacon()
|
/freebsd/sys/dev/rtwn/usb/ |
H A D | rtwn_usb_rx.c | 72 int pktlen; in rtwn_rx_check_pre_alloc() local 95 pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); in rtwn_rx_check_pre_alloc() 96 if (__predict_false(pktlen < sizeof(struct ieee80211_frame_ack))) { in rtwn_rx_check_pre_alloc() 101 "%s: frame is too short: %d\n", __func__, pktlen); in rtwn_rx_check_pre_alloc() 157 int totlen, pktlen, infosz, min_len; in rtwn_rxeof_fragmented() local 186 pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); in rtwn_rxeof_fragmented() 188 totlen = sizeof(*stat) + infosz + pktlen; in rtwn_rxeof_fragmented() 244 int totlen, pktlen, infosz; in rtwn_rxeof() local 257 pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); in rtwn_rxeof() 258 if (__predict_false(pktlen == 0)) in rtwn_rxeof() [all …]
|
/freebsd/sys/dev/ath/ |
H A D | if_ath_tx_ht.c | 405 uint16_t pktlen, int is_first) in ath_compute_num_delims() argument 443 ndelim = ATH_AGGR_GET_NDELIM(pktlen); in ath_compute_num_delims() 478 __func__, pktlen, ndelim, mpdudensity); in ath_compute_num_delims() 519 if (pktlen < minlen) { in ath_compute_num_delims() 520 mindelim = (minlen - pktlen) / ATH_AGGR_DELIM_SZ; in ath_compute_num_delims() 526 __func__, pktlen, minlen, rix, rc, width, half_gi, ndelim); in ath_compute_num_delims() 622 int pktlen; in ath_rateseries_setup() local 634 pktlen = bf->bf_state.bfs_al; in ath_rateseries_setup() 636 pktlen = bf->bf_state.bfs_pktlen; in ath_rateseries_setup() 698 ath_computedur_ht(pktlen in ath_rateseries_setup() [all …]
|
/freebsd/contrib/unbound/sldns/ |
H A D | wire2str.h | 165 size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); 180 size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); 195 size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); 240 size_t* str_len, uint16_t rrtype, uint8_t* pkt, size_t pktlen, 274 size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); 526 size_t* str_len, int rdftype, uint8_t* pkt, size_t pktlen, 829 size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); 1060 size_t* str_len, uint8_t* pkt, size_t pktlen);
|
H A D | wire2str.c | 441 size_t pktlen = *dlen; in sldns_wire2str_pkt_scan() local 455 pkt, pktlen, &comprloop); in sldns_wire2str_pkt_scan() 461 w += sldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop); in sldns_wire2str_pkt_scan() 467 w += sldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop); in sldns_wire2str_pkt_scan() 473 w += sldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop); in sldns_wire2str_pkt_scan() 477 w += sldns_str_print(s, slen, ";; MSG SIZE rcvd: %d\n", (int)pktlen); in sldns_wire2str_pkt_scan() 522 uint8_t* pkt, size_t pktlen, int* comprloop) in sldns_wire2str_rr_scan() argument 532 return sldns_wire2str_edns_scan(d, dlen, s, slen, pkt, pktlen); in sldns_wire2str_rr_scan() 537 w += sldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop); in sldns_wire2str_rr_scan() 581 w += sldns_wire2str_rdata_scan(d, &rdlen, s, slen, rrtype, pkt, pktlen, in sldns_wire2str_rr_scan() [all …]
|
/freebsd/libexec/bootpd/ |
H A D | bootpd.c | 143 int pktlen; variable 550 pktlen = n; in main() 1102 if (sendto(s, pktbuf, pktlen, 0, in sendreply() 1232 pktlen = hp->msg_size; in dovend_rfc1048() 1239 if (pktlen > sizeof(*bp)) { in dovend_rfc1048() 1241 report(LOG_INFO, "request message length=%d", pktlen); in dovend_rfc1048() 1283 pktlen = msgsz - BP_MSG_OVERHEAD; in dovend_rfc1048() 1288 if (pktlen < sizeof(*bp)) { in dovend_rfc1048() 1289 report(LOG_ERR, "invalid response length=%d", pktlen); in dovend_rfc1048() 1290 pktlen = sizeof(*bp); in dovend_rfc1048() [all …]
|
/freebsd/usr.sbin/bhyve/ |
H A D | net_backend_slirp.c | 566 size_t pktlen; in slirp_send() local 568 pktlen = 0; in slirp_send() 570 pktlen += iov[i].iov_len; in slirp_send() 571 pkt = malloc(pktlen); in slirp_send() 574 pktlen = 0; in slirp_send() 576 memcpy(pkt + pktlen, iov[i].iov_base, iov[i].iov_len); in slirp_send() 577 pktlen += iov[i].iov_len; in slirp_send() 580 slirp_input_p(priv->slirp, pkt, (int)pktlen); in slirp_send() 583 return (pktlen); in slirp_send()
|
/freebsd/sys/net/ |
H A D | debugnet.c | 265 uint32_t i, pktlen, sent_so_far; in debugnet_send() local 279 pktlen = datalen - sent_so_far; in debugnet_send() 282 pktlen = min(pktlen, pcb->dp_ifp->if_mtu - in debugnet_send() 290 sent_so_far += pktlen; in debugnet_send() 309 dn_msg_hdr->mh_len = htonl(pktlen); in debugnet_send() 320 if (pktlen != 0) { in debugnet_send() 328 pktlen, debugnet_mbuf_free, NULL, NULL, 0, in debugnet_send() 330 m2->m_len = pktlen; in debugnet_send() 333 m->m_pkthdr.len += pktlen; in debugnet_send() 341 sent_so_far += pktlen; in debugnet_send()
|
H A D | bpf.c | 2300 bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) in bpf_tap() argument 2324 slen = (*(bf->func))(pkt, pktlen, pktlen); in bpf_tap() 2327 slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); in bpf_tap() 2340 catchpacket(d, pkt, pktlen, slen, in bpf_tap() 2349 bpf_tap_if(if_t ifp, u_char *pkt, u_int pktlen) in bpf_tap_if() argument 2352 bpf_tap(ifp->if_bpf, pkt, pktlen); in bpf_tap_if() 2372 u_int pktlen, slen; in bpf_mtap() local 2381 pktlen = m_length(m, NULL); in bpf_mtap() 2393 slen = (*(bf->func))(mtod(m, u_char *), pktlen, in bpf_mtap() 2394 pktlen); in bpf_mtap() [all …]
|
H A D | debugnet_inet.c | 235 int pktlen; in debugnet_send_arp() local 246 pktlen = arphdr_len2(ETHER_ADDR_LEN, sizeof(struct in_addr)); in debugnet_send_arp() 247 m->m_len = pktlen; in debugnet_send_arp() 248 m->m_pkthdr.len = pktlen; in debugnet_send_arp() 249 MH_ALIGN(m, pktlen); in debugnet_send_arp()
|
/freebsd/sys/netgraph/ |
H A D | ng_tcpmss.c | 277 int iphlen, tcphlen, pktlen; in ng_tcpmss_rcvdata() local 288 pktlen = m->m_pkthdr.len; in ng_tcpmss_rcvdata() 289 priv->stats.Octets += pktlen; in ng_tcpmss_rcvdata() 315 if (iphlen < sizeof(struct ip) || iphlen > pktlen ) in ng_tcpmss_rcvdata() 329 if (tcphlen < sizeof(struct tcphdr) || tcphlen > pktlen - iphlen) in ng_tcpmss_rcvdata()
|
/freebsd/sys/dev/hyperv/vmbus/ |
H A D | vmbus_chan.c | 1089 int pktlen, pad_pktlen, hlen, error; in vmbus_chan_send() 1095 pktlen = hlen + dlen; in vmbus_chan_send() 1096 pad_pktlen = VMBUS_CHANPKT_TOTLEN(pktlen); in vmbus_chan_send() 1111 iov[2].iov_len = pad_pktlen - pktlen; in vmbus_chan_send() 1124 int pktlen, pad_pktlen, hlen, error; in vmbus_chan_send_sglist() 1130 pktlen = hlen + dlen; in vmbus_chan_send_sglist() 1131 pad_pktlen = VMBUS_CHANPKT_TOTLEN(pktlen); in vmbus_chan_send_sglist() 1150 iov[3].iov_len = pad_pktlen - pktlen; in vmbus_chan_send_sglist() 1164 int pktlen, pad_pktlen, hlen, error; in vmbus_chan_send_prplist() 1171 pktlen in vmbus_chan_send_prplist() 1091 int pktlen, pad_pktlen, hlen, error; vmbus_chan_send() local 1126 int pktlen, pad_pktlen, hlen, error; vmbus_chan_send_sglist() local 1166 int pktlen, pad_pktlen, hlen, error; vmbus_chan_send_prplist() local 1251 int error, pktlen, pkt_hlen; vmbus_chan_recv_pkt() local [all...] |
/freebsd/sys/netpfil/ipfw/ |
H A D | ip_fw2.c | 1434 int pktlen; in ipfw_chk() local 1474 pktlen = IPFW_ARGS_LENGTH(args->flags); in ipfw_chk() 1492 pktlen = m->m_pkthdr.len; in ipfw_chk() 1513 if (__predict_false(pktlen < x)) { \ in ipfw_chk() 1550 if (pktlen >= sizeof(struct ip6_hdr) && in ipfw_chk() 1578 if (pktlen >= hlen + sizeof(struct sctphdr) + in ipfw_chk() 1585 else if (pktlen >= hlen + sizeof(struct sctphdr)) in ipfw_chk() 1586 PULLUP_LEN(hlen, ulp, pktlen - hlen); in ipfw_chk() 1742 } else if (pktlen >= sizeof(struct ip) && in ipfw_chk() 1769 if (pktlen >= hlen + sizeof(struct sctphdr) + in ipfw_chk() [all …]
|
H A D | ip_fw_dynamic.c | 117 #define DYN_COUNTER_INC(d, dir, pktlen) do { \ argument 119 (d)->bcnt_ ## dir += pktlen; \ 1005 const void *ulp, int pktlen, int dir) in dyn_update_proto_state() argument 1029 DYN_COUNTER_INC(data, fwd, pktlen); in dyn_update_proto_state() 1031 DYN_COUNTER_INC(data, rev, pktlen); in dyn_update_proto_state() 1040 struct ipfw_dyn_info *info, int pktlen) in dyn_lookup_ipv4_state() argument 1070 dyn_update_proto_state(s->data, pkt, ulp, pktlen, in dyn_lookup_ipv4_state() 1081 const void *ulp, int pktlen, uint32_t bucket, uint16_t kidx) in dyn_lookup_ipv4_state_locked() argument 1105 dyn_update_proto_state(s->data, pkt, ulp, pktlen, dir); in dyn_lookup_ipv4_state_locked() 1187 const void *ulp, struct ipfw_dyn_info *info, int pktlen) in dyn_lookup_ipv6_state() argument [all …]
|
H A D | ip_fw_bpf.c | 141 ipfw_bpf_tap(u_char *pkt, u_int pktlen) in ipfw_bpf_tap() argument 147 BPF_TAP(ifp, pkt, pktlen); in ipfw_bpf_tap()
|
/freebsd/sys/dev/hyperv/include/ |
H A D | vmbus.h | 76 #define VMBUS_CHANPKT_GETLEN(pktlen) \ argument 77 (((int)(pktlen)) << VMBUS_CHANPKT_SIZE_SHIFT) 206 struct vmbus_chanpkt_hdr *pkt, int *pktlen);
|
/freebsd/sys/dev/rtwn/rtl8192c/pci/ |
H A D | r92ce_tx.c | 74 txd->txbufsize = txd->pktlen; in r92ce_tx_postsetup() 103 __func__, le16toh(txd->pktlen), txd->offset, txd->flags0, in r92ce_dump_tx_desc()
|
/freebsd/libexec/bootpd/bootpgw/ |
H A D | bootpgw.c | 124 int pktlen; variable 465 pktlen = n; in main() 587 if (sendto(s, pktbuf, pktlen, 0, in handle_request() 656 if (sendto(s, pktbuf, pktlen, 0, in handle_reply()
|
/freebsd/tests/sys/netinet/ |
H A D | ip_reass_test.c | 79 size_t pktlen; in alloc_lopacket() local 81 pktlen = sizeof(*packet) + payloadlen; in alloc_lopacket() 82 packet = malloc(pktlen); in alloc_lopacket() 85 memset(packet, 0, pktlen); in alloc_lopacket()
|
/freebsd/sys/dev/cxgbe/crypto/ |
H A D | t6_kern_tls.c | 1117 int len16, ndesc, pktlen; in ktls_write_tcp_options() local 1128 pktlen = m->m_len; in ktls_write_tcp_options() 1129 ctrl = sizeof(struct cpl_tx_pkt_core) + pktlen; in ktls_write_tcp_options() 1147 cpl->len = htobe16(pktlen); in ktls_write_tcp_options() 1159 newip.ip_len = htons(pktlen - m->m_pkthdr.l2hlen); in ktls_write_tcp_options() 1170 newip6.ip6_plen = htons(pktlen - m->m_pkthdr.l2hlen); in ktls_write_tcp_options() 1187 copy_to_txd(&txq->eq, (caddr_t)(tcp + 1), &out, pktlen - in ktls_write_tcp_options() 1211 int len16, ndesc, pktlen; in ktls_write_tunnel_packet() local 1228 pktlen = m->m_len + m_tls->m_len; in ktls_write_tunnel_packet() 1229 ctrl = sizeof(struct cpl_tx_pkt_core) + pktlen; in ktls_write_tunnel_packet() 1859 int len16, ndesc, pktlen; ktls_write_tcp_fin() local [all...] |