Home
last modified time | relevance | path

Searched refs:totlen (Results 1 – 25 of 28) sorted by relevance

12

/dragonfly/sbin/dhclient/
HDprivsep.c100 servername_len, prefix_len, totlen; in dispatch_imsg() local
127 totlen = sizeof(hdr) + sizeof(lease) + sizeof(size_t); in dispatch_imsg()
128 if (hdr.len < totlen) in dispatch_imsg()
133 totlen += filename_len + sizeof(size_t); in dispatch_imsg()
134 if (hdr.len < totlen || filename_len == SIZE_T_MAX) in dispatch_imsg()
144 totlen += servername_len + sizeof(size_t); in dispatch_imsg()
145 if (hdr.len < totlen || servername_len == SIZE_T_MAX) in dispatch_imsg()
156 totlen += prefix_len; in dispatch_imsg()
157 if (hdr.len < totlen || prefix_len == SIZE_T_MAX) in dispatch_imsg()
167 totlen += sizeof(optlen); in dispatch_imsg()
[all …]
/dragonfly/sys/netgraph7/bpf/
HDng_bpf.c412 int totlen; in ng_bpf_rcvdata() local
421 totlen = m->m_pkthdr.len; in ng_bpf_rcvdata()
426 hip->stats.recvOctets += totlen; in ng_bpf_rcvdata()
429 if (totlen == 0) { in ng_bpf_rcvdata()
440 if (m->m_next != NULL && totlen > MHLEN) { in ng_bpf_rcvdata()
442 data = kmalloc(totlen, M_NETGRAPH_BPF, M_NOWAIT); in ng_bpf_rcvdata()
448 m_copydata(m, 0, totlen, data); in ng_bpf_rcvdata()
452 NGI_M(item) = m = m_pullup(m, totlen); in ng_bpf_rcvdata()
464 len = (*(hip->jit_prog->func))(data, totlen, totlen); in ng_bpf_rcvdata()
468 len = bpf_filter(hip->prog->bpf_prog, data, totlen, totlen); in ng_bpf_rcvdata()
[all …]
/dragonfly/sys/netgraph/bpf/
HDng_bpf.c376 int totlen = m->m_pkthdr.len; in ng_bpf_rcvdata() local
385 hip->stats.recvOctets += totlen; in ng_bpf_rcvdata()
389 if (totlen > sizeof(buf)) { in ng_bpf_rcvdata()
390 data = kmalloc(totlen, M_NETGRAPH, M_NOWAIT); in ng_bpf_rcvdata()
398 m_copydata(m, 0, totlen, data); in ng_bpf_rcvdata()
403 len = bpf_filter(hip->prog->bpf_prog, data, totlen, totlen); in ng_bpf_rcvdata()
412 hip->stats.recvMatchOctets += totlen; in ng_bpf_rcvdata()
415 if (len < totlen) { in ng_bpf_rcvdata()
416 m_adj(m, -(totlen - len)); in ng_bpf_rcvdata()
417 totlen -= len; in ng_bpf_rcvdata()
[all …]
/dragonfly/sys/bus/u4b/
HDusb_pf.c316 uint32_t totlen; in usbpf_xfer_precompute_size() local
325 totlen = USBPF_HDR_LEN + (USBPF_FRAME_HDR_LEN * nframes); in usbpf_xfer_precompute_size()
331 totlen += USBPF_FRAME_ALIGN( in usbpf_xfer_precompute_size()
336 totlen += USBPF_FRAME_ALIGN( in usbpf_xfer_precompute_size()
341 return (totlen); in usbpf_xfer_precompute_size()
351 uint32_t totlen; in usbpf_xfertap() local
368 totlen = usbpf_xfer_precompute_size(xfer, type); in usbpf_xfertap()
381 buf = ptr = kmalloc(totlen, M_TEMP, M_NOWAIT); in usbpf_xfertap()
392 up->up_totlen = htole32(totlen); in usbpf_xfertap()
488 bpf_tap(bus->ifp->if_bpf, buf, totlen); in usbpf_xfertap()
HDusb_util.c219 uint8_t totlen; in usb_make_str_desc() local
239 totlen = (max_len + 1) * 2; in usb_make_str_desc()
241 p->bLength = totlen; in usb_make_str_desc()
247 return (totlen); in usb_make_str_desc()
/dragonfly/lib/libc/db/hash/
HDhash_bigkey.c448 int mylen, totlen; in collect_data() local
456 totlen = len + mylen; in collect_data()
459 if ((hashp->tmp_buf = (char *)malloc(totlen)) == NULL) in collect_data()
479 if (!xbp || ((totlen = in collect_data()
488 return (totlen); in collect_data()
513 int mylen, totlen; in collect_key() local
521 totlen = len + mylen; in collect_key()
525 if ((hashp->tmp_key = (char *)malloc(totlen)) == NULL) in collect_key()
531 if (!xbp || ((totlen = in collect_key()
532 collect_key(hashp, xbp, totlen, val, set)) < 1)) in collect_key()
[all …]
/dragonfly/sys/dev/netif/lnc/
HDlance.c334 lance_get(struct lance_softc *sc, int boff, int totlen) in lance_get() argument
341 if (totlen <= ETHER_HDR_LEN || totlen > LEBLEN - ETHER_CRC_LEN) { in lance_get()
343 if_printf(ifp, "invalid packet size %d; dropping\n", totlen); in lance_get()
349 newm = m_getl(totlen, M_NOWAIT, MT_DATA, in lance_get()
359 m0->m_pkthdr.len = totlen; in lance_get()
369 m->m_len = min(totlen, mlen); in lance_get()
372 totlen -= m->m_len; in lance_get()
373 } while (totlen > 0); in lance_get()
/dragonfly/usr.sbin/lpr/common_source/
HDrmjob.c300 int i, elem, firstreq, niov, rem, totlen; in rmremote() local
349 for (totlen = i = 0; i < niov; i++) in rmremote()
350 totlen += (iov[i].iov_len = strlen(iov[i].iov_base)); in rmremote()
361 if (writev(rem, iov, niov) != totlen) in rmremote()
/dragonfly/sys/netgraph7/
HDng_tag.c511 int totlen; in ng_tag_rcvdata() local
515 totlen = m->m_pkthdr.len; in ng_tag_rcvdata()
519 hip->stats.recvOctets += totlen; in ng_tag_rcvdata()
550 hip->stats.recvMatchOctets += totlen; in ng_tag_rcvdata()
566 dhip->stats.xmitOctets += totlen; in ng_tag_rcvdata()
/dragonfly/tools/tools/net80211/wesside/wesside/
HDwesside.c2302 static unsigned char *get_80211(unsigned char **data, int *totlen, int *plen) in get_80211() argument
2312 assert(*totlen); in get_80211()
2317 *totlen -= bpfh->bh_hdrlen; in get_80211()
2320 if ((int)bpfh->bh_caplen < *totlen) { in get_80211()
2325 *totlen -= offset - tot; /* take into account align bytes */ in get_80211()
2326 } else if ((int)bpfh->bh_caplen > *totlen) in get_80211()
2330 *totlen -= bpfh->bh_caplen; in get_80211()
2331 assert(*totlen >= 0); in get_80211()
2364 static int totlen = 0; in read_packet() local
2372 if (totlen == 0) { in read_packet()
[all …]
/dragonfly/tools/tools/net80211/wlaninject/
HDwlaninject.c124 int totlen; in inject() local
132 totlen = iov[0].iov_len + iov[1].iov_len; in inject()
137 if (rc != totlen) { in inject()
138 printf("Wrote only %d/%d\n", rc, totlen); in inject()
/dragonfly/contrib/tcpdump/
HDprint-isakmp.c914 u_int totlen; in ikev1_attrmap_print() local
918 totlen = 4; in ikev1_attrmap_print()
920 totlen = 4 + GET_BE_U_2(p + 2); in ikev1_attrmap_print()
922 if (ep2 < p + totlen) { in ikev1_attrmap_print()
945 ND_PRINT("len=%u value=", totlen - 4); in ikev1_attrmap_print()
946 if (!rawprint(ndo, (const uint8_t *)(p + 4), totlen - 4)) { in ikev1_attrmap_print()
952 return p + totlen; in ikev1_attrmap_print()
961 u_int totlen; in ikev1_attr_print() local
965 totlen = 4; in ikev1_attr_print()
967 totlen = 4 + GET_BE_U_2(p + 2); in ikev1_attr_print()
[all …]
/dragonfly/sys/net/
HDbpf.c1409 int totlen, curlen; in catchpacket() local
1418 totlen = hdrlen + min(snaplen, pktlen); in catchpacket()
1419 if (totlen > d->bd_bufsize) in catchpacket()
1420 totlen = d->bd_bufsize; in catchpacket()
1426 if (curlen + totlen > d->bd_bufsize) { in catchpacket()
1462 (*cpfn)(pkt, (u_char *)hp + hdrlen, (hp->bh_caplen = totlen - hdrlen)); in catchpacket()
1463 d->bd_slen = curlen + totlen; in catchpacket()
/dragonfly/contrib/wpa_supplicant/src/eap_server/
HDeap_server_pwd.c419 u16 totlen = 0; in eap_pwd_build_req() local
491 totlen = wpabuf_len(data->outbuf) + in eap_pwd_build_req()
495 "total length = %d", totlen); in eap_pwd_build_req()
506 (totlen ? sizeof(u16) : 0), in eap_pwd_build_req()
515 wpabuf_put_be16(req, totlen); in eap_pwd_build_req()
/dragonfly/sys/dev/crypto/hifn/
HDhifn7751.c1902 int totlen, len; in hifn_crypto() local
1917 totlen = cmd->src_mapsize; in hifn_crypto()
1934 if (totlen >= MINCLSIZE) { in hifn_crypto()
1944 totlen -= len; in hifn_crypto()
1948 while (totlen > 0) { in hifn_crypto()
1957 if (totlen >= MINCLSIZE) { in hifn_crypto()
1971 totlen -= len; in hifn_crypto()
2815 int totlen, i, u, ivlen; in hifn_callback() local
2830 totlen = cmd->src_mapsize; in hifn_callback()
2832 if (totlen < m->m_len) { in hifn_callback()
[all …]
/dragonfly/sys/dev/netif/iwm/
HDif_iwm_util.c219 size_t totlen = hdrlen + paylen; in iwm_send_cmd() local
223 totlen); in iwm_send_cmd()
/dragonfly/sbin/mountd/
HDmountd.c2255 int totlen, cont_line; in get_line() local
2261 totlen = 0; in get_line()
2278 if (linesize < len + totlen + 1) { in get_line()
2279 linesize = len + totlen + 1; in get_line()
2284 memcpy(line + totlen, p, len); in get_line()
2285 totlen += len; in get_line()
2286 line[totlen] = '\0'; in get_line()
2287 } while (totlen == 0 || cont_line); in get_line()
/dragonfly/sys/kern/
HDkern_varsym.c288 int totlen = namelen + datalen + 2; in sys_varsym_list() local
303 if (bytes + totlen > uap->maxsize) { in sys_varsym_list()
HDuipc_mbuf.c2333 int mlen, tlen, nsize, totlen = 0, error = ENOBUFS; in _m_copyback2() local
2349 totlen += m->m_len; in _m_copyback2()
2374 totlen += mlen + off; in _m_copyback2()
2391 if ((m0->m_flags & M_PKTHDR) && (m0->m_pkthdr.len < totlen)) in _m_copyback2()
2392 m0->m_pkthdr.len = totlen; in _m_copyback2()
/dragonfly/sys/dev/crypto/safe/
HDsafe.c1304 int totlen, len; in safe_process() local
1319 totlen = re->re_src_mapsize; in safe_process()
1337 if (totlen >= MINCLSIZE) { in safe_process()
1352 while (totlen > 0) { in safe_process()
1364 if (top && totlen >= MINCLSIZE) { in safe_process()
1376 m->m_len = len = min(totlen, len); in safe_process()
1377 totlen -= len; in safe_process()
/dragonfly/sys/dev/netif/wpi/
HDif_wpi.c2655 int error, i, nsegs, totlen, frag; in wpi_cmd2() local
2671 totlen = buf->m->m_pkthdr.len; in wpi_cmd2()
2674 if (__predict_false(totlen < sizeof(struct ieee80211_frame_min))) { in wpi_cmd2()
2766 __func__, ring->qid, cur, totlen, nsegs); in wpi_cmd2()
2769 desc->nsegs = WPI_PAD32(totlen + pad) << 4 | (1 + nsegs); in wpi_cmd2()
2831 int swcrypt, ismcast, totlen; in wpi_tx_data() local
2879 totlen = m->m_pkthdr.len; in wpi_tx_data()
2910 if (totlen + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) { in wpi_tx_data()
2972 tx->len = htole16(totlen); in wpi_tx_data()
3002 int swcrypt, totlen; in wpi_tx_data_raw() local
[all …]
/dragonfly/sys/dev/netif/wi/
HDif_wi.c1938 wi_mwrite_bap(struct wi_softc *sc, int id, int off, struct mbuf *m0, int totlen) in wi_mwrite_bap() argument
1943 for (m = m0; m != NULL && totlen > 0; m = m->m_next) { in wi_mwrite_bap()
1947 len = min(m->m_len, totlen); in wi_mwrite_bap()
1950 m_copydata(m, 0, totlen, &sc->sc_txbuf); in wi_mwrite_bap()
1952 totlen); in wi_mwrite_bap()
1959 totlen -= len; in wi_mwrite_bap()
/dragonfly/sys/bus/u4b/wlan/
HDif_urtwn.c850 int totlen) in urtwn_rx_copy_to_mbuf() argument
884 if (__predict_false(totlen > MCLBYTES)) { in urtwn_rx_copy_to_mbuf()
887 __func__, pktlen, totlen); in urtwn_rx_copy_to_mbuf()
899 memcpy(mtod(m, uint8_t *), (uint8_t *)stat, totlen); in urtwn_rx_copy_to_mbuf()
900 m->m_pkthdr.len = m->m_len = totlen; in urtwn_rx_copy_to_mbuf()
972 int totlen, pktlen, infosz, npkts; in urtwn_rxeof() local
994 totlen = sizeof(*stat) + infosz + pktlen; in urtwn_rxeof()
995 if (totlen > len) in urtwn_rxeof()
998 m = urtwn_rx_copy_to_mbuf(sc, stat, totlen); in urtwn_rxeof()
1009 totlen = (totlen + 127) & ~127; in urtwn_rxeof()
[all …]
/dragonfly/sys/dev/crypto/ubsec/
HDubsec.c1353 int totlen, len; in ubsec_process() local
1357 totlen = q->q_src_mapsize; in ubsec_process()
1374 if (totlen >= MINCLSIZE) { in ubsec_process()
1388 while (totlen > 0) { in ubsec_process()
1399 if (top && totlen >= MINCLSIZE) { in ubsec_process()
1410 m->m_len = len = min(totlen, len); in ubsec_process()
1411 totlen -= len; in ubsec_process()
/dragonfly/sys/dev/netif/iwn/
HDif_iwn.c4453 int ac, i, totlen, error, pad, nsegs = 0, rate; in iwn_tx_data() local
4533 totlen = m->m_pkthdr.len; in iwn_tx_data()
4575 if (totlen + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) { in iwn_tx_data()
4626 tx->len = htole16(totlen); in iwn_tx_data()
4735 ops->update_sched(sc, ring->qid, ring->cur, tx->id, totlen); in iwn_tx_data()
4766 int ac, totlen, error, pad, nsegs = 0, i, rate; in iwn_tx_data_raw() local
4785 totlen = m->m_pkthdr.len; in iwn_tx_data_raw()
4848 tx->len = htole16(totlen); in iwn_tx_data_raw()
4945 ops->update_sched(sc, ring->qid, ring->cur, tx->id, totlen); in iwn_tx_data_raw()
5226 int totlen, error; local
[all …]

12