Lines Matching refs:ll
56 struct sockaddr_ll ll; in l2_packet_send() local
57 os_memset(&ll, 0, sizeof(ll)); in l2_packet_send()
58 ll.sll_family = AF_PACKET; in l2_packet_send()
59 ll.sll_ifindex = l2->ifindex; in l2_packet_send()
60 ll.sll_protocol = htons(proto); in l2_packet_send()
61 ll.sll_halen = ETH_ALEN; in l2_packet_send()
62 os_memcpy(ll.sll_addr, dst_addr, ETH_ALEN); in l2_packet_send()
63 ret = sendto(l2->fd, buf, len, 0, (struct sockaddr *) &ll, in l2_packet_send()
64 sizeof(ll)); in l2_packet_send()
77 struct sockaddr_ll ll; in l2_packet_receive() local
80 os_memset(&ll, 0, sizeof(ll)); in l2_packet_receive()
81 fromlen = sizeof(ll); in l2_packet_receive()
82 res = recvfrom(sock, buf, sizeof(buf), 0, (struct sockaddr *) &ll, in l2_packet_receive()
89 l2->rx_callback(l2->rx_callback_ctx, ll.sll_addr, buf, res); in l2_packet_receive()
101 struct sockaddr_ll ll; in l2_packet_init() local
127 os_memset(&ll, 0, sizeof(ll)); in l2_packet_init()
128 ll.sll_family = PF_PACKET; in l2_packet_init()
129 ll.sll_ifindex = ifr.ifr_ifindex; in l2_packet_init()
130 ll.sll_protocol = htons(protocol); in l2_packet_init()
131 if (bind(l2->fd, (struct sockaddr *) &ll, sizeof(ll)) < 0) { in l2_packet_init()