Lines Matching defs:hdrlen
566 struct sockaddr *sockp, int *hdrlen, struct bpf_d *d)
708 *hdrlen = hlen;
2499 int hdrlen;
2501 hdrlen = d->bd_bif->bif_hdrlen;
2507 hdrlen += SIZEOF_BPF_HDR(struct bpf_hdr32);
2510 hdrlen += SIZEOF_BPF_HDR(struct bpf_hdr);
2513 hdrlen += SIZEOF_BPF_HDR(struct bpf_xhdr);
2516 hdrlen = BPF_WORDALIGN32(hdrlen);
2519 hdrlen = BPF_WORDALIGN(hdrlen);
2521 return (hdrlen - d->bd_bif->bif_hdrlen);
2575 int caplen, curlen, hdrlen, pad, totlen;
2607 hdrlen = bpf_hdrlen(d);
2608 totlen = hdrlen + min(snaplen, pktlen);
2660 caplen = totlen - hdrlen;
2676 hdr32_old.bh_hdrlen = hdrlen;
2689 hdr_old.bh_hdrlen = hdrlen;
2705 hdr.bh_hdrlen = hdrlen;
2715 (*cpfn)(d, d->bd_sbuf, curlen + hdrlen, pkt, caplen);
2768 * Attach an interface to bpf. dlt is the link layer type; hdrlen is the
2772 bpfattach(struct ifnet *ifp, u_int dlt, u_int hdrlen)
2775 bpfattach2(ifp, dlt, hdrlen, &ifp->if_bpf);
2781 * and hdrlen is the fixed size of the link header (variable length
2785 bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen,
2799 bp->bif_hdrlen = hdrlen;
2819 * query the dlt and hdrlen before detach so we can re-attch the if_bpf
3151 bpfattach(struct ifnet *ifp, u_int dlt, u_int hdrlen)
3154 bpfattach2(ifp, dlt, hdrlen, &ifp->if_bpf);
3158 bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen, struct bpf_if **driverp)