Home
last modified time | relevance | path

Searched refs:eh (Results 1 – 17 of 17) sorted by relevance

/xnu-12377.1.9/bsd/net/
H A Dether_inet_pr_module.c185 struct ether_header *eh __single = mbuf_pkthdr_header(m); in ether_inet_input()
199 if (__probable(eh->ether_type == htons(ETHERTYPE_IP))) { in ether_inet_input()
206 memcmp(eh->ether_shost, cached_shost, ETHER_ADDR_LEN) != 0))) { in ether_inet_input()
207 memcpy(eh->ether_shost, cached_shost, ETHER_ADDR_LEN); in ether_inet_input()
210 arp_llreach_set_reachable(mifp, eh->ether_shost, in ether_inet_input()
219 if (eh->ether_type == htons(ETHERTYPE_ARP)) { in ether_inet_input()
244 const struct ether_header *eh; in ether_inet_pre_output() local
275 eh = (const struct ether_header *)__DECONST(void *, dst_netaddr->sa_data); in ether_inet_pre_output()
276 bcopy(eh->ether_dhost, dst_host_lladdr, ETHER_ADDR_LEN); in ether_inet_pre_output()
277 bcopy(&eh->ether_type, frame_type, sizeof(eh->ether_type)); in ether_inet_pre_output()
[all …]
H A Dether_if_module.c451 struct ether_header * __single eh = (struct ether_header *)(void *)frame_header; in ether_demux() local
462 if (__improbable(eh == NULL)) { in ether_demux()
465 ether_type = eh->ether_type; in ether_demux()
467 if ((eh->ether_dhost[0] & 1) != 0) { in ether_demux()
469 if (_ether_cmp(etherbroadcastaddr, eh->ether_dhost) == 0) { in ether_demux()
482 if (_ether_cmp(eh->ether_dhost, IF_LLADDR(ifp))) { in ether_demux()
528 eh = mbuf_pkthdr_header(m); in ether_demux()
637 struct ether_header *eh; in ether_frameout_extended() local
687 eh = mtod(*m, struct ether_header *); in ether_frameout_extended()
688 (void) memcpy(&eh->ether_type, frame_type, sizeof(eh->ether_type)); in ether_frameout_extended()
[all …]
H A Dether_inet6_pr_module.c114 struct ether_header *eh = (struct ether_header *)(void *)header; in ether_inet6_input() local
117 bcopy(&eh->ether_type, &ether_type, sizeof(ether_type)); in ether_inet6_input()
131 if (bcmp(eh->ether_shost, etherbroadcastaddr, in ether_inet6_input()
133 nd6_llreach_set_reachable(mifp, eh->ether_shost, in ether_inet6_input()
138 if (!bcmp(eh->ether_dhost, etherip6allnodes, ETHER_ADDR_LEN)) { in ether_inet6_input()
144 bcopy(eh->ether_shost, ip6a->ip6a_ehsrc, in ether_inet6_input()
H A Dif_bridge.c1415 brlog_ether_header(struct ether_header *eh) in brlog_ether_header() argument
1420 eh->ether_shost[0], eh->ether_shost[1], eh->ether_shost[2], in brlog_ether_header()
1421 eh->ether_shost[3], eh->ether_shost[4], eh->ether_shost[5], in brlog_ether_header()
1422 eh->ether_dhost[0], eh->ether_dhost[1], eh->ether_dhost[2], in brlog_ether_header()
1423 eh->ether_dhost[3], eh->ether_dhost[4], eh->ether_dhost[5], in brlog_ether_header()
1424 ntohs(eh->ether_type)); in brlog_ether_header()
4548 struct ether_header *eh;
4569 eh = mtod(m, struct ether_header *);
4570 switch (eh->ether_type) {
4572 did_sw = in_finalize_cksum(m, sizeof(*eh), csum_flags);
[all …]
H A Dbridgestp.c298 struct ether_header *eh; in bstp_transmit_tcn() local
316 m->m_pkthdr.len = sizeof(*eh) + sizeof(bpdu); in bstp_transmit_tcn()
319 eh = mtod(m, struct ether_header *); in bstp_transmit_tcn()
321 memcpy(eh->ether_shost, IF_LLADDR(ifp), ETHER_ADDR_LEN); in bstp_transmit_tcn()
322 memcpy(eh->ether_dhost, bstp_etheraddr, ETHER_ADDR_LEN); in bstp_transmit_tcn()
323 eh->ether_type = htons(sizeof(bpdu)); in bstp_transmit_tcn()
331 memcpy(mtod(m, caddr_t) + sizeof(*eh), &bpdu, sizeof(bpdu)); in bstp_transmit_tcn()
416 struct ether_header *eh; in bstp_send_bpdu() local
431 eh = mtod(m, struct ether_header *); in bstp_send_bpdu()
437 memcpy(eh->ether_shost, IF_LLADDR(ifp), ETHER_ADDR_LEN); in bstp_send_bpdu()
[all …]
H A Dbpf.c331 bpf_set_bcast_mcast(mbuf_t m, struct ether_header * eh) in bpf_set_bcast_mcast() argument
333 if (ETHER_IS_MULTICAST(eh->ether_dhost)) { in bpf_set_bcast_mcast()
334 if (_ether_cmp(etherbroadcastaddr, eh->ether_dhost) == 0) { in bpf_set_bcast_mcast()
511 struct ether_header * eh; in bpf_movein() local
513 eh = (struct ether_header *)(void *)sockp->sa_data; in bpf_movein()
514 bpf_set_bcast_mcast(m, eh); in bpf_movein()
536 struct ether_header *eh; in bpf_movein() local
538 eh = mtod(m, struct ether_header *); in bpf_movein()
539 bpf_set_bcast_mcast(m, eh); in bpf_movein()
3894 struct ether_header eh = {}; in get_ether_trunc_len() local
[all …]
H A Ddlil_input.c888 struct ether_header eh; in dlil_input_packet_list_common() local
901 bcopy(fh, (caddr_t)&eh, ETHER_HDR_LEN); in dlil_input_packet_list_common()
941 eh.ether_type = htons(ETHERTYPE_IP); in dlil_input_packet_list_common()
942 bcopy((caddr_t)&eh, fh, ETHER_HDR_LEN); in dlil_input_packet_list_common()
H A Dpf.c2671 u_int16_t rtag, struct ether_header *eh, struct ifnet *ifp) in pf_send_tcp() argument
2673 #pragma unused(eh, ifp) in pf_send_tcp()
5581 r->return_ttl, 1, 0, pd->eh, kif->pfik_ifp); in pf_test_rule()
7514 pd->eh, kif->pfik_ifp); in pf_test_state_tcp()
9692 struct ether_header *eh, struct ip_fw_args *fwa) in pf_test_mbuf() argument
9700 rv = pf_test(dir, ifp, &pbuf, eh, fwa); in pf_test_mbuf()
9715 struct ether_header *eh, struct ip_fw_args *fwa) in pf_test() argument
9781 pd.eh = eh; in pf_test()
9825 pd.eh = eh; in pf_test()
10290 struct ether_header *eh, struct ip_fw_args *fwa) in pf_test6_mbuf() argument
[all …]
H A Ddlil.c3016 struct ether_header *eh; in ifnet_enqueue_single() local
3027 eh = mtod(p->cp_mbuf, struct ether_header *); in ifnet_enqueue_single()
3028 etype = ntohs(eh->ether_type); in ifnet_enqueue_single()
3055 eh = mtod(p->cp_mbuf, struct ether_header *); in ifnet_enqueue_single()
3057 mcast_buf = (uint8_t *)(eh + 1); in ifnet_enqueue_single()
3110 struct ether_header *eh; in ifnet_enqueue_single() local
3120 eh = (struct ether_header *)(void *)baddr; in ifnet_enqueue_single()
3121 etype = ntohs(eh->ether_type); in ifnet_enqueue_single()
3143 mcast_buf = (uint8_t *)(eh + 1); in ifnet_enqueue_single()
H A Dpfvar.h1444 struct ether_header *eh; member
/xnu-12377.1.9/osfmk/kdp/
H A Dkdp_udp.c553 struct kdp_ether_header *eh = NULL; in kdp_reply() local
603 eh = (struct kdp_ether_header *)&pkt.data[pkt.off]; in kdp_reply()
604 enaddr_copy(eh->ether_shost, &tmp_enaddr); in kdp_reply()
605 enaddr_copy(eh->ether_dhost, eh->ether_shost); in kdp_reply()
606 enaddr_copy(&tmp_enaddr, eh->ether_dhost); in kdp_reply()
607 eh->ether_type = htons(ETHERTYPE_IP); in kdp_reply()
631 struct kdp_ether_header *eh; in kdp_send() local
680 eh = (struct kdp_ether_header *)&pkt.data[pkt.off]; in kdp_send()
681 enaddr_copy(&adr.loc.ea, eh->ether_shost); in kdp_send()
682 enaddr_copy(&adr.rmt.ea, eh->ether_dhost); in kdp_send()
[all …]
/xnu-12377.1.9/bsd/skywalk/nexus/netif/
H A Dnx_netif_flow.c128 ether_header_t *eh; in netif_flow_ethertype_info() local
142 eh = (ether_header_t *)(void *)buf; in netif_flow_ethertype_info()
144 etype = eh->ether_type; in netif_flow_ethertype_info()
146 bcopy(&eh->ether_type, &etype, sizeof(etype)); in netif_flow_ethertype_info()
174 evh = (struct ether_vlan_header *)eh; in netif_flow_ethertype_info()
210 ether_header_t *eh; in netif_flow_ipv6_ula_info() local
218 err = netif_flow_get_buf(pkt, sizeof(*eh) + sizeof(*ip6h), in netif_flow_ipv6_ula_info()
225 eh = (ether_header_t *)(void *)buf; in netif_flow_ipv6_ula_info()
226 ip6h = (struct ip6_hdr *)(eh + 1); in netif_flow_ipv6_ula_info()
228 bcopy(&eh->ether_type, &etype, sizeof(etype)); in netif_flow_ipv6_ula_info()
[all …]
/xnu-12377.1.9/bsd/skywalk/nexus/flowswitch/
H A Dfsw_ethernet.c553 const struct ether_header *eh; in fsw_ethernet_demux() local
560 eh = (struct ether_header *)(void *)baddr; in fsw_ethernet_demux()
562 if (__improbable(sizeof(*eh) > pkt->pkt_length)) { in fsw_ethernet_demux()
568 if (__improbable(pkt->pkt_headroom + sizeof(*eh) > bdlim)) { in fsw_ethernet_demux()
584 if ((eh->ether_dhost[0] & 1) == 0) { in fsw_ethernet_demux()
592 if (_ether_cmp(eh->ether_dhost, IF_LLADDR(fsw->fsw_ifp))) { in fsw_ethernet_demux()
598 uint16_t ether_type = ntohs(eh->ether_type); in fsw_ethernet_demux()
/xnu-12377.1.9/tests/skywalk/
H A Dskt_filter.c248 ether_header_t *eh = buf; in custom_ether_build_packet() local
250 bcopy(dst_mac_addr.octet, eh->ether_dhost, sizeof(ether_addr_t)); in custom_ether_build_packet()
251 bcopy(src_mac_addr.octet, eh->ether_shost, sizeof(ether_addr_t)); in custom_ether_build_packet()
252 eh->ether_type = htons(args->ethertype); in custom_ether_build_packet()
375 ether_header_t *eh = buf; in custom_ether_verify() local
378 etype = ntohs(eh->ether_type); in custom_ether_verify()
H A Dskywalk_test_common.c2539 os_channel_event_handle_t eh; in skt_process_chan_event_common() local
2544 error = os_channel_get_next_event_handle(chan, &eh, &etype, in skt_process_chan_event_common()
2547 error = os_channel_event_get_next_event(eh, 0, &ev); in skt_process_chan_event_common()
2585 error = os_channel_event_free(chan, eh); in skt_process_chan_event_common()
/xnu-12377.1.9/bsd/netinet6/
H A Dicmp6.c1008 struct ip6_ext *eh; in icmp6_notify_error() local
1017 eh = (struct ip6_ext *)(mtod(m, caddr_t) in icmp6_notify_error()
1020 IP6_EXTHDR_GET(eh, struct ip6_ext *, m, in icmp6_notify_error()
1021 eoff, sizeof(*eh)); in icmp6_notify_error()
1022 if (eh == NULL) { in icmp6_notify_error()
1029 eoff += (eh->ip6e_len + 2) << 2; in icmp6_notify_error()
1031 eoff += (eh->ip6e_len + 1) << 3; in icmp6_notify_error()
1033 nxt = eh->ip6e_nxt; in icmp6_notify_error()
H A Dip6_output.c565 struct ip6_ext *__single eh = (struct ip6_ext *)(hp); \ in ip6_output_list()
567 ((eh)->ip6e_len + 1) << 3); \ in ip6_output_list()