Lines Matching defs:hdr
751 pktap_set_procinfo(struct pktap_header *hdr, struct so_procinfo *soprocinfo)
753 hdr->pth_pid = soprocinfo->spi_pid;
754 proc_name(soprocinfo->spi_pid, hdr->pth_comm, MAXCOMLEN);
756 uuid_copy(hdr->pth_uuid, soprocinfo->spi_uuid);
762 hdr->pth_flags |= PTH_FLAG_PROC_DELEGATED;
763 hdr->pth_epid = soprocinfo->spi_epid;
764 proc_name(soprocinfo->spi_epid, hdr->pth_ecomm, MAXCOMLEN);
766 uuid_copy(hdr->pth_uuid, soprocinfo->spi_euuid);
771 pktap_finalize_proc_info(struct pktap_header *hdr)
776 if (!(hdr->pth_flags & PTH_FLAG_DELAY_PKTAP))
782 hdr->pth_flags &= ~PTH_FLAG_DELAY_PKTAP;
784 if (hdr->pth_ipproto == IPPROTO_TCP)
785 found = inp_findinpcb_procinfo(&tcbinfo, hdr->pth_flowid,
787 else if (hdr->pth_ipproto == IPPROTO_UDP)
788 found = inp_findinpcb_procinfo(&udbinfo, hdr->pth_flowid,
791 found = inp_findinpcb_procinfo(&ripcbinfo, hdr->pth_flowid,
795 pktap_set_procinfo(hdr, &soprocinfo);
799 pktap_fill_proc_info(struct pktap_header *hdr, protocol_family_t proto,
822 hdr->pth_flags |= PTH_FLAG_DELAY_PKTAP;
823 hdr->pth_flowid = m->m_pkthdr.pkt_flowid;
825 hdr->pth_ipproto = IPPROTO_RAW;
827 hdr->pth_ipproto = m->m_pkthdr.pkt_proto;
845 hdr->pth_ifname);
873 hdr->pth_ifname);
886 if (inp == NULL && hdr->pth_iftype != IFT_LOOP)
889 hdr->pth_ifname);
893 ip.ip_p, hdr->pth_ifname);
920 hdr->pth_ifname);
936 hdr->pth_ifname);
950 if (inp == NULL && hdr->pth_iftype != IFT_LOOP)
953 hdr->pth_ifname);
957 ip6.ip6_nxt, hdr->pth_ifname);
973 hdr->pth_pid = -1;
974 hdr->pth_epid = -1;
976 pktap_set_procinfo(hdr, &soprocinfo);
1018 struct pktap_header hdr;
1021 struct pktap_header *hdr = &hdr_buffer.hdr;
1031 hdr->pth_length = sizeof(struct pktap_header);
1032 hdr->pth_type_next = PTH_TYPE_PACKET;
1050 hdr->pth_dlt = DLT_NULL;
1061 hdr->pth_dlt = DLT_EN10MB;
1064 hdr->pth_dlt = DLT_PPP;
1067 hdr->pth_dlt = DLT_APPLE_IP_OVER_IEEE1394;
1089 hdr->pth_dlt = DLT_NULL;
1096 hdr->pth_dlt = DLT_RAW;
1107 snprintf(hdr->pth_ifname, sizeof(hdr->pth_ifname), "%s",
1109 hdr->pth_flags |= outgoing ? PTH_FLAG_DIR_OUT : PTH_FLAG_DIR_IN;
1110 hdr->pth_protocol_family = proto;
1111 hdr->pth_frame_pre_length = pre + pre_adjust;
1112 hdr->pth_frame_post_length = post;
1113 hdr->pth_iftype = ifp->if_type;
1114 hdr->pth_ifunit = ifp->if_unit;
1116 pktap_fill_proc_info(hdr, proto, m, pre, outgoing, ifp);
1118 hdr->pth_svc = so_svc2tc(m->m_pkthdr.pkt_svc);
1121 bpf_tap_func(pktap->pktp_ifp, DLT_PKTAP, m, hdr, hdr_size);
1129 bpf_tap_func(pktap->pktp_ifp, DLT_PKTAP, m, hdr, hdr_size);
1144 char *hdr = (char *)mbuf_data(m);
1152 if (frame_header != NULL && frame_header >= start && frame_header <= hdr) {
1154 u_int32_t pre = hdr - frame_header;
1161 mbuf_setdata(m, hdr, o_len);