Home | History | Annotate | Download | only in src

Lines Matching refs:eth_hdr

394         tETH_HDR eth_hdr;
396 // memcpy(&eth_hdr.h_dest, local_addr, ETH_ADDR_LEN);
398 memcpy(&eth_hdr.h_dest, dst, ETH_ADDR_LEN);
399 memcpy(&eth_hdr.h_src, src, ETH_ADDR_LEN);
400 eth_hdr.h_proto = htons(proto);
402 memcpy(packet, &eth_hdr, sizeof(tETH_HDR));
491 static void forward_bnep(tETH_HDR* eth_hdr, char * packet, int size)
493 int broadcast = eth_hdr->h_dest[0] & 1;
499 (broadcast || memcmp(btpan_cb.conns[i].eth_addr, eth_hdr->h_dest, sizeof(BD_ADDR)) == 0
500 || memcmp(btpan_cb.conns[i].peer, eth_hdr->h_dest, sizeof(BD_ADDR)) == 0))
503 bta_pan_ci_rx_write(handle, eth_hdr->h_dest, eth_hdr->h_src,
504 ntohs(eth_hdr->h_proto), (UINT8*)packet, size, 0);
608 tETH_HDR eth_hdr;
618 memcpy(&eth_hdr, &packet, sizeof(tETH_HDR));
620 /* eth_hdr.h_src[0], eth_hdr.h_src[1], eth_hdr.h_src[2], eth_hdr.h_src[3], */
621 /* eth_hdr.h_src[4], eth_hdr.h_src[5]); */
623 /* eth_hdr.h_dest[0], eth_hdr.h_dest[1], eth_hdr.h_dest[2], eth_hdr.h_dest[3], */
624 /* eth_hdr.h_dest[4], eth_hdr.h_dest[5]); */
626 if(should_forward(&eth_hdr))
628 forward_bnep(&eth_hdr, packet + sizeof(tETH_HDR), size - sizeof(tETH_HDR));