| /f-stack/freebsd/mips/mips/ |
| H A D | elf_trampoline.c | 108 Elf64_Ehdr *eh; in load_kernel() local 112 Elf32_Ehdr *eh; in load_kernel() 125 eh = (Elf64_Ehdr *)kstart; in load_kernel() 127 eh = (Elf32_Ehdr *)kstart; in load_kernel() 129 entry_point = mkptr(eh->e_entry); in load_kernel() 130 memcpy(phdr, (void *)(kstart + eh->e_phoff), in load_kernel() 131 eh->e_phnum * sizeof(phdr[0])); in load_kernel() 134 sizeof(*shdr) * eh->e_shnum); in load_kernel() 136 if (eh->e_shnum * eh->e_shentsize != 0 && eh->e_shoff != 0) { in load_kernel() 137 for (i = 0; i < eh->e_shnum; i++) { in load_kernel() [all …]
|
| /f-stack/freebsd/netgraph/ |
| H A D | ng_ether_echo.c | 110 struct ether_header *eh; in ngee_rcvdata() local 115 if (m->m_len < sizeof(*eh) ) { in ngee_rcvdata() 116 m = m_pullup(m, sizeof(*eh)); in ngee_rcvdata() 122 eh = mtod(m, struct ether_header *); in ngee_rcvdata() 125 bcopy(eh->ether_dhost, &tmpaddr, ETHER_ADDR_LEN); in ngee_rcvdata() 126 bcopy(eh->ether_shost, eh->ether_dhost, ETHER_ADDR_LEN); in ngee_rcvdata() 127 bcopy(&tmpaddr, eh->ether_shost, ETHER_ADDR_LEN); in ngee_rcvdata()
|
| H A D | ng_pppoe.c | 286 struct ether_header eh; member 1075 privp->eh.ether_type = in ng_pppoe_rcvmsg() 1158 if (wh->eh.ether_type == in ng_pppoe_rcvmsg() 1203 if (wh->eh.ether_type == in ng_pppoe_rcvmsg() 1279 memcpy((void *)&neg->pkt->pkt_header.eh, &privp->eh, in pppoe_start() 1485 neg->pkt->pkt_header.eh.ether_type = wh->eh.ether_type; in ng_pppoe_rcvdata() 1496 bcopy(wh->eh.ether_shost, in ng_pppoe_rcvdata() 1596 switch(wh->eh.ether_type) { in ng_pppoe_rcvdata_ether() 1732 bcopy(wh->eh.ether_shost, in ng_pppoe_rcvdata_ether() 1830 sp->pkt_hdr.eh.ether_type in ng_pppoe_rcvdata_ether() [all …]
|
| H A D | ng_etf.c | 367 struct ether_header *eh; in ng_etf_rcvdata() local 385 if (m->m_len < sizeof(*eh) ) { in ng_etf_rcvdata() 386 m = m_pullup(m, sizeof(*eh)); in ng_etf_rcvdata() 393 eh = mtod(m, struct ether_header *); in ng_etf_rcvdata() 394 ethertype = eh->ether_type; in ng_etf_rcvdata()
|
| H A D | ng_bridge.c | 660 struct ether_header *eh; in ng_bridge_rcvdata() local 679 eh = mtod(ctx.m, struct ether_header *); in ng_bridge_rcvdata() 680 if ((eh->ether_shost[0] & 1) != 0) { in ng_bridge_rcvdata() 698 if ((ctx.manycast = (eh->ether_dhost[0] & 1)) != 0) { in ng_bridge_rcvdata() 699 if (ETHER_EQUAL(eh->ether_dhost, ng_bridge_bcast_addr)) { in ng_bridge_rcvdata() 707 if ((host = ng_bridge_get(priv, eh->ether_shost)) != NULL) { in ng_bridge_rcvdata() 754 if (!ng_bridge_put(priv, eh->ether_shost, ctx.incoming)) { in ng_bridge_rcvdata() 775 if ((host = ng_bridge_get(priv, eh->ether_dhost)) != NULL) { in ng_bridge_rcvdata()
|
| H A D | ng_pppoe.h | 244 struct ether_header eh; member
|
| /f-stack/dpdk/lib/librte_bpf/ |
| H A D | bpf_load_elf.c | 104 check_elf_header(const Elf64_Ehdr *eh) in check_elf_header() argument 111 if (eh->e_ident[EI_DATA] != ELFDATA2LSB) in check_elf_header() 113 if (eh->e_ident[EI_DATA] != ELFDATA2MSB) in check_elf_header() 118 else if (eh->e_type != ET_REL) in check_elf_header() 120 else if (eh->e_machine != EM_NONE && eh->e_machine != EM_BPF) in check_elf_header() 138 const Elf64_Ehdr *eh; in find_elf_code() local 144 eh = elf64_getehdr(elf); in find_elf_code() 145 if (eh == NULL) { in find_elf_code() 152 if (check_elf_header(eh) != 0) in find_elf_code() 191 const Elf64_Ehdr *eh; in process_reloc() local [all …]
|
| /f-stack/freebsd/net/ |
| H A D | if_ethersubr.c | 149 struct ether_header *eh; in ether_requestencap() local 194 memcpy(&eh->ether_type, &etype, sizeof(eh->ether_type)); in ether_requestencap() 207 struct ether_header *eh; in ether_resolve_addr() local 216 eh = (struct ether_header *)phdr; in ether_resolve_addr() 288 struct ether_header *eh; in ether_output() local 375 memcpy(eh, phdr, hlen); in ether_output() 445 struct ether_header *eh; in ether_set_pcp() local 491 struct ether_header *eh; in ether_output_frame() local 521 struct ether_header *eh; in ether_input_internal() local 545 etype = ntohs(eh->ether_type); in ether_input_internal() [all …]
|
| H A D | debugnet.c | 132 struct ether_header *eh; in debugnet_ether_output() local 147 eh = mtod(m, struct ether_header *); in debugnet_ether_output() 148 memcpy(eh->ether_shost, IF_LLADDR(ifp), ETHER_ADDR_LEN); in debugnet_ether_output() 149 memcpy(eh->ether_dhost, dst.octet, ETHER_ADDR_LEN); in debugnet_ether_output() 150 eh->ether_type = htons(etype); in debugnet_ether_output() 521 struct ether_header *eh; in debugnet_pkt_in() local 539 eh = mtod(m, struct ether_header *); in debugnet_pkt_in() 540 etype = ntohs(eh->ether_type); in debugnet_pkt_in() 549 if (memcmp(ifr.ifr_addr.sa_data, eh->ether_dhost, in debugnet_pkt_in() 551 (etype != ETHERTYPE_ARP || !ETHER_IS_BROADCAST(eh->ether_dhost))) { in debugnet_pkt_in()
|
| H A D | if_infiniband.c | 128 struct ether_header eh; in infiniband_bpf_mtap() local 134 eh.ether_type = ibh->ib_protocol; in infiniband_bpf_mtap() 135 memset(eh.ether_shost, 0, ETHER_ADDR_LEN); in infiniband_bpf_mtap() 136 memcpy(eh.ether_dhost, ibh->ib_hwaddr + 4, ETHER_ADDR_LEN); in infiniband_bpf_mtap() 140 bpf_mtap2(ifp->if_bpf, &eh, sizeof(eh), mb); in infiniband_bpf_mtap()
|
| H A D | bridgestp.c | 233 struct ether_header *eh; in bstp_transmit_tcn() local 246 m->m_pkthdr.len = sizeof(*eh) + sizeof(bpdu); in bstp_transmit_tcn() 249 eh = mtod(m, struct ether_header *); in bstp_transmit_tcn() 253 eh->ether_type = htons(sizeof(bpdu)); in bstp_transmit_tcn() 346 struct ether_header *eh; in bstp_send_bpdu() local 359 eh = mtod(m, struct ether_header *); in bstp_send_bpdu() 372 eh->ether_type = htons(BSTP_BPDU_STP_LEN); in bstp_send_bpdu() 381 eh->ether_type = htons(BSTP_BPDU_RSTP_LEN); in bstp_send_bpdu() 457 struct ether_header *eh; in bstp_input() local 468 eh = mtod(m, struct ether_header *); in bstp_input() [all …]
|
| H A D | if_bridge.c | 2051 struct ether_header *eh; in bridge_output() local 2064 eh = mtod(m, struct ether_header *); in bridge_output() 2084 if (ETHER_IS_MULTICAST(eh->ether_dhost)) in bridge_output() 2159 struct ether_header *eh; in bridge_transmit() local 2167 eh = mtod(m, struct ether_header *); in bridge_transmit() 2199 struct ether_header *eh; in bridge_forward() local 2217 eh = mtod(m, struct ether_header *); in bridge_forward() 2218 dst = eh->ether_dhost; in bridge_forward() 2345 struct ether_header *eh; in bridge_input() local 2377 eh = mtod(m, struct ether_header *); in bridge_input() [all …]
|
| H A D | if_gif.c | 433 struct ether_header *eh; in gif_input() local 550 eh = mtod(m, struct ether_header *); in gif_input() 551 if (ETHER_IS_MULTICAST(eh->ether_dhost)) { in gif_input() 552 if (ETHER_IS_BROADCAST(eh->ether_dhost)) in gif_input()
|
| /f-stack/freebsd/net80211/ |
| H A D | ieee80211_input.c | 278 if (ETHER_IS_MULTICAST(eh->ether_dhost)) { in ieee80211_deliver_data() 279 if (ETHER_IS_BROADCAST(eh->ether_dhost)) in ieee80211_deliver_data() 300 struct ether_header *eh; in ieee80211_decap() local 323 m_adj(m, hdrlen - sizeof(*eh)); in ieee80211_decap() 325 eh = mtod(m, struct ether_header *); in ieee80211_decap() 328 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr1); in ieee80211_decap() 329 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr2); in ieee80211_decap() 346 m = ieee80211_realign(vap, m, sizeof(*eh)); in ieee80211_decap() 352 eh = mtod(m, struct ether_header *); in ieee80211_decap() 353 eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh)); in ieee80211_decap() [all …]
|
| H A D | ieee80211_wds.c | 239 const struct ether_header *eh = mtod(m, const struct ether_header *); in ieee80211_dwds_mcast() local 246 KASSERT(ETHER_IS_MULTICAST(eh->ether_dhost), in ieee80211_dwds_mcast() 247 ("%s not mcast", ether_sprintf(eh->ether_dhost))); in ieee80211_dwds_mcast() 268 ni = ieee80211_find_txnode(vap, eh->ether_dhost); in ieee80211_dwds_mcast() 279 eh->ether_dhost, NULL, in ieee80211_dwds_mcast() 421 struct ether_header *eh; in wds_input() local 637 eh = mtod(m, struct ether_header *); in wds_input() 647 if (eh->ether_type != htons(ETHERTYPE_PAE)) { in wds_input() 649 eh->ether_shost, "data", in wds_input() 651 eh->ether_type, m->m_pkthdr.len); in wds_input() [all …]
|
| H A D | ieee80211_output.c | 348 struct ether_header *eh; in ieee80211_start_pkt() local 1268 if (eh && eh->ether_type == htons(ETHERTYPE_IP)) { in ieee80211_classify() 1281 if (eh && eh->ether_type == htons(ETHERTYPE_IPV6)) { in ieee80211_classify() 1470 struct ether_header eh; in ieee80211_encap() local 1531 eh.ether_dhost, in ieee80211_encap() 1589 eh.ether_dhost, in ieee80211_encap() 1733 eh.ether_dhost); in ieee80211_encap() 1735 eh.ether_shost); in ieee80211_encap() 1741 eh.ether_dhost); in ieee80211_encap() 1757 eh.ether_shost); in ieee80211_encap() [all …]
|
| H A D | ieee80211_hostap.c | 378 if (ETHER_IS_MULTICAST(eh->ether_dhost)) { in hostap_deliver_data() 483 struct ether_header *eh; in hostap_input() local 760 eh = mtod(m, struct ether_header *); in hostap_input() 770 if (eh->ether_type != htons(ETHERTYPE_PAE)) { in hostap_input() 772 eh->ether_shost, "data", in hostap_input() 774 eh->ether_type, m->m_pkthdr.len); in hostap_input() 787 eh->ether_type != htons(ETHERTYPE_PAE)) { in hostap_input() 1620 struct ether_header eh; member 1639 struct ether_header *eh; in ieee80211_deliver_l2uf() local 1649 eh = &l2uf->eh; in ieee80211_deliver_l2uf() [all …]
|
| H A D | ieee80211_adhoc.c | 317 struct ether_header *eh; in adhoc_input() local 574 eh = mtod(m, struct ether_header *); in adhoc_input() 584 if (eh->ether_type != htons(ETHERTYPE_PAE)) { in adhoc_input() 586 eh->ether_shost, "data", in adhoc_input() 588 eh->ether_type, m->m_pkthdr.len); in adhoc_input() 601 eh->ether_type != htons(ETHERTYPE_PAE)) { in adhoc_input()
|
| /f-stack/freebsd/kern/ |
| H A D | uipc_mbufhash.c | 163 const struct ether_header *eh; in m_ether_tcpip_hash() local 168 off = sizeof(*eh); in m_ether_tcpip_hash() 171 eh = mtod(m, struct ether_header *); in m_ether_tcpip_hash() 172 etype = ntohs(eh->ether_type); in m_ether_tcpip_hash() 174 p = fnv_32_buf(&eh->ether_shost, ETHER_ADDR_LEN, p); in m_ether_tcpip_hash() 175 p = fnv_32_buf(&eh->ether_dhost, ETHER_ADDR_LEN, p); in m_ether_tcpip_hash() 189 off += sizeof(*vlan) - sizeof(*eh); in m_ether_tcpip_hash()
|
| /f-stack/dpdk/lib/librte_net/ |
| H A D | rte_net.c | 225 const struct rte_ether_hdr *eh; in rte_net_get_ptype() local 235 eh = rte_pktmbuf_read(m, off, sizeof(*eh), &eh_copy); in rte_net_get_ptype() 236 if (unlikely(eh == NULL)) in rte_net_get_ptype() 238 proto = eh->ether_type; in rte_net_get_ptype() 239 off = sizeof(*eh); in rte_net_get_ptype() 388 eh = rte_pktmbuf_read(m, off, sizeof(*eh), &eh_copy); in rte_net_get_ptype() 389 if (unlikely(eh == NULL)) in rte_net_get_ptype() 392 proto = eh->ether_type; in rte_net_get_ptype() 393 off += sizeof(*eh); in rte_net_get_ptype() 394 hdr_lens->inner_l2_len = sizeof(*eh); in rte_net_get_ptype()
|
| H A D | rte_ether.h | 317 struct rte_ether_hdr *eh in rte_vlan_strip() local 321 if (eh->ether_type != rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN)) in rte_vlan_strip() 324 vh = (struct rte_vlan_hdr *)(eh + 1); in rte_vlan_strip() 330 eh, 2 * RTE_ETHER_ADDR_LEN); in rte_vlan_strip()
|
| /f-stack/freebsd/netinet/ |
| H A D | tcp_lro.c | 209 struct ether_header *eh; in tcp_lro_get_th() local 218 eh = mtod(m, struct ether_header *); in tcp_lro_get_th() 222 ip6 = (struct ip6_hdr *)(eh + 1); in tcp_lro_get_th() 228 ip4 = (struct ip *)(eh + 1); in tcp_lro_get_th() 576 struct ether_header *eh; in tcp_set_le_to_m() local 591 eh = mtod(m, struct ether_header *); in tcp_set_le_to_m() 609 l3hdr = ip4 = (struct ip *)(eh + 1); in tcp_set_le_to_m() 1139 struct ether_header *eh; in tcp_lro_rx2() local 1162 eh = mtod(m, struct ether_header *); in tcp_lro_rx2() 1163 eh_type = ntohs(eh->ether_type); in tcp_lro_rx2() [all …]
|
| /f-stack/freebsd/netgraph/netflow/ |
| H A D | ng_netflow.c | 695 struct ether_header *eh; in ng_netflow_rcvdata() local 699 eh = mtod(m, struct ether_header *); in ng_netflow_rcvdata() 702 etype = ntohs(eh->ether_type); in ng_netflow_rcvdata() 707 eh = mtod(m, struct ether_header *); in ng_netflow_rcvdata() 708 ip = (struct ip *)(eh + 1); in ng_netflow_rcvdata() 720 eh = mtod(m, struct ether_header *); in ng_netflow_rcvdata() 721 ip6 = (struct ip6_hdr *)(eh + 1); in ng_netflow_rcvdata()
|
| /f-stack/freebsd/netinet/tcp_stacks/ |
| H A D | rack_bbr_common.c | 250 struct ether_header *eh; in ctf_process_inbound_raw() local 287 eh = mtod(m, struct ether_header *); in ctf_process_inbound_raw() 288 etype = ntohs(eh->ether_type); in ctf_process_inbound_raw() 292 m_adj(m, sizeof(*eh)); in ctf_process_inbound_raw() 306 ip6 = (struct ip6_hdr *)(eh + 1); in ctf_process_inbound_raw() 352 ip = (struct ip *)(eh + 1); in ctf_process_inbound_raw()
|
| /f-stack/freebsd/netpfil/ipfw/ |
| H A D | ip_fw2.c | 1348 struct ether_header *eh; in ipfw_chk() local 1437 ip = (struct ip *)(eh + 1); in ipfw_chk() 1439 eh = NULL; in ipfw_chk() 1455 ip = (struct ip *)(eh + 1); in ipfw_chk() 1457 eh = NULL; in ipfw_chk() 1476 #define EHLEN (eh != NULL ? ((char *)ip - (char *)eh) : 0) in ipfw_chk() 1508 if (eh != NULL) { \ in ipfw_chk() 1510 ip = (struct ip *)(eh + 1); \ in ipfw_chk() 1519 (eh == NULL || eh->ether_type == htons(ETHERTYPE_IPV6)) && in ipfw_chk() 1705 (eh == NULL || eh->ether_type == htons(ETHERTYPE_IP)) && in ipfw_chk() [all …]
|