Lines Matching refs:src_pk
53 struct sockaddr_ll src_pk, dst_pk; variable
112 arp_h->ar_hln = src_pk.sll_halen; in send_packet()
117 ptr = mempcpy(ptr, &src_pk.sll_addr, src_pk.sll_halen); in send_packet()
120 (toys.optflags & FLAG_A) ? &src_pk.sll_addr : &dst_pk.sll_addr, in send_packet()
121 src_pk.sll_halen); in send_packet()
150 || (arp_hdr->ar_hln != src_pk.sll_halen) in recv_from()
160 if (!memcmp(p, &src_pk.sll_addr, src_pk.sll_halen)) return; in recv_from()
183 memcpy(dst_pk.sll_addr, p, src_pk.sll_halen); in recv_from()
220 src_pk.sll_ifindex = if_index; in arping_main()
267 src_pk.sll_family = AF_PACKET; in arping_main()
268 src_pk.sll_protocol = htons(ETH_P_ARP); in arping_main()
269 if (bind(TT.sockfd, (struct sockaddr *)&src_pk, sizeof(src_pk))) in arping_main()
272 socklen_t alen = sizeof(src_pk); in arping_main()
273 getsockname(TT.sockfd, (struct sockaddr *)&src_pk, &alen); in arping_main()
274 if (!src_pk.sll_halen) { in arping_main()
284 dst_pk = src_pk; in arping_main()