Home | History | Annotate | Download | only in l2_packet

Lines Matching defs:l2

30 int l2_packet_get_own_addr(struct l2_packet_data *l2, u8 *addr)
32 os_memcpy(addr, l2->own_addr, ETH_ALEN);
37 int l2_packet_send(struct l2_packet_data *l2, const u8 *dst_addr, u16 proto,
40 if (l2 == NULL)
45 * whether l2->l2_hdr is set).
54 struct l2_packet_data *l2 = eloop_ctx;
62 l2->rx_callback(l2->rx_callback_ctx, NULL /* TODO: src addr */,
73 struct l2_packet_data *l2;
75 l2 = os_zalloc(sizeof(struct l2_packet_data));
76 if (l2 == NULL)
78 os_strlcpy(l2->ifname, ifname, sizeof(l2->ifname));
79 l2->rx_callback = rx_callback;
80 l2->rx_callback_ctx = rx_callback_ctx;
81 l2->l2_hdr = l2_hdr;
86 l2->fd = -1;
87 if (l2->fd >= 0)
88 eloop_register_read_sock(l2->fd, l2_packet_receive, l2, NULL);
90 return l2;
106 void l2_packet_deinit(struct l2_packet_data *l2)
108 if (l2 == NULL)
111 if (l2->fd >= 0) {
112 eloop_unregister_read_sock(l2->fd);
116 os_free(l2);
120 int l2_packet_get_ip_addr(struct l2_packet_data *l2, char *buf, size_t len)
127 void l2_packet_notify_auth_start(struct l2_packet_data *l2)
133 int l2_packet_set_packet_filter(struct l2_packet_data *l2,