/hostap-latest/src/l2_packet/ |
D | l2_packet_pcap.c | 31 eth_t *eth; member 55 l2->eth = eth_open(l2->ifname); in l2_packet_init_libdnet() 56 if (!l2->eth) { in l2_packet_init_libdnet() 63 if (eth_get(l2->eth, &own_addr) < 0) { in l2_packet_init_libdnet() 67 eth_close(l2->eth); in l2_packet_init_libdnet() 68 l2->eth = NULL; in l2_packet_init_libdnet() 82 struct l2_ethhdr *eth; in l2_packet_send() local 91 ret = eth_send(l2->eth, buf, len); in l2_packet_send() 94 size_t mlen = sizeof(*eth) + len; in l2_packet_send() 95 eth = os_malloc(mlen); in l2_packet_send() [all …]
|
D | l2_packet_freebsd.c | 64 struct l2_ethhdr *eth = os_malloc(sizeof(*eth) + len); in l2_packet_send() local 65 if (eth == NULL) in l2_packet_send() 67 os_memcpy(eth->h_dest, dst_addr, ETH_ALEN); in l2_packet_send() 68 os_memcpy(eth->h_source, l2->own_addr, ETH_ALEN); in l2_packet_send() 69 eth->h_proto = htons(proto); in l2_packet_send() 70 os_memcpy(eth + 1, buf, len); in l2_packet_send() 71 ret = pcap_inject(l2->pcap, (u8 *) eth, len + sizeof(*eth)); in l2_packet_send() 72 os_free(eth); in l2_packet_send()
|
D | l2_packet_winpcap.c | 76 struct l2_ethhdr *eth; in l2_packet_send() local 84 size_t mlen = sizeof(*eth) + len; in l2_packet_send() 85 eth = os_malloc(mlen); in l2_packet_send() 86 if (eth == NULL) in l2_packet_send() 89 os_memcpy(eth->h_dest, dst_addr, ETH_ALEN); in l2_packet_send() 90 os_memcpy(eth->h_source, l2->own_addr, ETH_ALEN); in l2_packet_send() 91 eth->h_proto = htons(proto); in l2_packet_send() 92 os_memcpy(eth + 1, buf, len); in l2_packet_send() 93 ret = pcap_sendpacket(l2->pcap, (u8 *) eth, mlen); in l2_packet_send() 94 os_free(eth); in l2_packet_send()
|
D | l2_packet_ndis.c | 96 struct l2_ethhdr *eth; in l2_packet_send() local 116 size_t mlen = sizeof(*eth) + len; in l2_packet_send() 117 eth = os_malloc(mlen); in l2_packet_send() 118 if (eth == NULL) in l2_packet_send() 121 os_memcpy(eth->h_dest, dst_addr, ETH_ALEN); in l2_packet_send() 122 os_memcpy(eth->h_source, l2->own_addr, ETH_ALEN); in l2_packet_send() 123 eth->h_proto = htons(proto); in l2_packet_send() 124 os_memcpy(eth + 1, buf, len); in l2_packet_send() 125 res = WriteFile(driver_ndis_get_ndisuio_handle(), eth, mlen, in l2_packet_send() 127 os_free(eth); in l2_packet_send()
|
D | l2_packet_linux.c | 174 const struct l2_ethhdr *eth = (const struct l2_ethhdr *) buf; in l2_packet_receive() local 182 (ether_addr_equal(eth->h_dest, l2->own_addr) || in l2_packet_receive() 183 is_multicast_ether_addr(eth->h_dest))) { in l2_packet_receive()
|
/hostap-latest/wlantest/ |
D | wired.c | 279 const struct ether_header *eth; in wlantest_process_wired() local 284 if (len < sizeof(*eth)) in wlantest_process_wired() 287 eth = (const struct ether_header *) data; in wlantest_process_wired() 288 ethertype = be_to_host16(eth->ether_type); in wlantest_process_wired() 292 process_ipv4(wt, data + sizeof(*eth), len - sizeof(*eth)); in wlantest_process_wired()
|
/hostap-latest/hostapd/ |
D | ctrl_iface.c | 1882 const struct ether_header *eth; in hostapd_data_test_rx() local 1888 if (len < sizeof(*eth) + sizeof(ip) || len > HWSIM_PACKETLEN) { in hostapd_data_test_rx() 1895 eth = (const struct ether_header *) buf; in hostapd_data_test_rx() 1896 os_memcpy(&ip, eth + 1, sizeof(ip)); in hostapd_data_test_rx() 1897 pos = &buf[sizeof(*eth) + sizeof(ip)]; in hostapd_data_test_rx() 1919 MAC2STR(eth->ether_dhost), MAC2STR(eth->ether_shost), extra); in hostapd_data_test_rx() 1974 struct ether_header *eth; in hostapd_ctrl_iface_data_test_tx() local 2010 eth = (struct ether_header *) &buf[2]; in hostapd_ctrl_iface_data_test_tx() 2011 os_memcpy(eth->ether_dhost, dst, ETH_ALEN); in hostapd_ctrl_iface_data_test_tx() 2012 os_memcpy(eth->ether_shost, src, ETH_ALEN); in hostapd_ctrl_iface_data_test_tx() [all …]
|
/hostap-latest/src/drivers/ |
D | driver_atheros.c | 1654 struct l2_ethhdr *eth; in atheros_send_eapol() local 1674 eth = (struct l2_ethhdr *) bp; in atheros_send_eapol() 1675 os_memcpy(eth->h_dest, addr, ETH_ALEN); in atheros_send_eapol() 1676 os_memcpy(eth->h_source, own_addr, ETH_ALEN); in atheros_send_eapol() 1677 eth->h_proto = host_to_be16(ETH_P_EAPOL); in atheros_send_eapol() 1678 os_memcpy(eth + 1, data, data_len); in atheros_send_eapol()
|
D | driver.h | 4933 int (*probe_mesh_link)(void *priv, const u8 *addr, const u8 *eth,
|
D | driver_nl80211.c | 12221 static int nl80211_probe_mesh_link(void *priv, const u8 *addr, const u8 *eth, in nl80211_probe_mesh_link() argument 12232 nla_put(msg, NL80211_ATTR_FRAME, len, eth)) { in nl80211_probe_mesh_link()
|
/hostap-latest/wpa_supplicant/ |
D | ctrl_iface.c | 3435 struct ether_header *eth; in wpa_supplicant_ctrl_iface_mesh_link_probe() local 3460 eth = (struct ether_header *) buf; in wpa_supplicant_ctrl_iface_mesh_link_probe() 3461 os_memcpy(eth->ether_dhost, addr, ETH_ALEN); in wpa_supplicant_ctrl_iface_mesh_link_probe() 3462 os_memcpy(eth->ether_shost, wpa_s->own_addr, ETH_ALEN); in wpa_supplicant_ctrl_iface_mesh_link_probe() 3463 eth->ether_type = htons(ETH_P_802_3); in wpa_supplicant_ctrl_iface_mesh_link_probe() 9995 const struct ether_header *eth; in wpas_data_test_rx() local 10001 if (len < sizeof(*eth) + sizeof(ip) || len > HWSIM_PACKETLEN) { in wpas_data_test_rx() 10008 eth = (const struct ether_header *) buf; in wpas_data_test_rx() 10009 os_memcpy(&ip, eth + 1, sizeof(ip)); in wpas_data_test_rx() 10010 pos = &buf[sizeof(*eth) + sizeof(ip)]; in wpas_data_test_rx() [all …]
|
D | driver_i.h | 95 const u8 *eth, size_t len) in wpa_drv_mesh_link_probe() argument 99 eth, len); in wpa_drv_mesh_link_probe()
|
D | wpa_supplicant.c | 5669 const struct l2_ethhdr *eth; in wpa_supplicant_rx_eapol_bridge() local 5671 if (len < sizeof(*eth)) in wpa_supplicant_rx_eapol_bridge() 5673 eth = (const struct l2_ethhdr *) buf; in wpa_supplicant_rx_eapol_bridge() 5675 if (os_memcmp(eth->h_dest, wpa_s->own_addr, ETH_ALEN) != 0 && in wpa_supplicant_rx_eapol_bridge() 5676 !(eth->h_dest[0] & 0x01)) { in wpa_supplicant_rx_eapol_bridge() 5679 MAC2STR(src_addr), MAC2STR(eth->h_dest)); in wpa_supplicant_rx_eapol_bridge() 5684 " (bridge)", MAC2STR(src_addr), MAC2STR(eth->h_dest)); in wpa_supplicant_rx_eapol_bridge() 5685 wpa_supplicant_rx_eapol(wpa_s, src_addr, buf + sizeof(*eth), in wpa_supplicant_rx_eapol_bridge() 5686 len - sizeof(*eth), FRAME_ENCRYPTION_UNKNOWN); in wpa_supplicant_rx_eapol_bridge()
|