Lines Matching refs:ll

130 		struct sockaddr_ll ll;  in l2_packet_send()  local
131 os_memset(&ll, 0, sizeof(ll)); in l2_packet_send()
132 ll.sll_family = AF_PACKET; in l2_packet_send()
133 ll.sll_ifindex = l2->ifindex; in l2_packet_send()
134 ll.sll_protocol = htons(proto); in l2_packet_send()
135 ll.sll_halen = ETH_ALEN; in l2_packet_send()
136 os_memcpy(ll.sll_addr, dst_addr, ETH_ALEN); in l2_packet_send()
137 ret = sendto(l2->fd, buf, len, 0, (struct sockaddr *) &ll, in l2_packet_send()
138 sizeof(ll)); in l2_packet_send()
153 struct sockaddr_ll ll; in l2_packet_receive() local
156 os_memset(&ll, 0, sizeof(ll)); in l2_packet_receive()
157 fromlen = sizeof(ll); in l2_packet_receive()
158 res = recvfrom(sock, buf, sizeof(buf), 0, (struct sockaddr *) &ll, in l2_packet_receive()
167 __func__, MAC2STR(ll.sll_addr), (int) res); in l2_packet_receive()
214 l2->rx_callback(l2->rx_callback_ctx, ll.sll_addr, buf, res); in l2_packet_receive()
224 struct sockaddr_ll ll; in l2_packet_receive_br() local
231 os_memset(&ll, 0, sizeof(ll)); in l2_packet_receive_br()
232 fromlen = sizeof(ll); in l2_packet_receive_br()
233 res = recvfrom(sock, buf, sizeof(buf), 0, (struct sockaddr *) &ll, in l2_packet_receive_br()
242 __func__, MAC2STR(ll.sll_addr), (int) res); in l2_packet_receive_br()
244 if (ether_addr_equal(ll.sll_addr, l2->own_addr)) { in l2_packet_receive_br()
266 l2->rx_callback(l2->rx_callback_ctx, ll.sll_addr, buf, res); in l2_packet_receive_br()
279 struct sockaddr_ll ll; in l2_packet_init() local
311 os_memset(&ll, 0, sizeof(ll)); in l2_packet_init()
312 ll.sll_family = PF_PACKET; in l2_packet_init()
313 ll.sll_ifindex = ifr.ifr_ifindex; in l2_packet_init()
314 ll.sll_protocol = htons(protocol); in l2_packet_init()
316 bind(l2->fd, (struct sockaddr *) &ll, sizeof(ll)) < 0) { in l2_packet_init()
363 struct sockaddr_ll ll; in l2_packet_init_bridge() local
394 os_memset(&ll, 0, sizeof(ll)); in l2_packet_init_bridge()
395 ll.sll_family = PF_PACKET; in l2_packet_init_bridge()
396 ll.sll_ifindex = if_nametoindex(ifname); in l2_packet_init_bridge()
397 ll.sll_protocol = htons(ETH_P_ALL); in l2_packet_init_bridge()
398 if (bind(l2->fd_br_rx, (struct sockaddr *) &ll, sizeof(ll)) < 0) { in l2_packet_init_bridge()