Home | History | Annotate | Download | only in ap

Lines Matching defs:ethhdr

48 	struct l2_ethhdr *ethhdr;
52 if (len < sizeof(*ethhdr) + sizeof(*hdr)) {
58 ethhdr = (struct l2_ethhdr *) buf;
59 hdr = (struct ieee802_1x_hdr *) (ethhdr + 1);
61 if (os_memcmp(ethhdr->h_dest, hapd->own_addr, ETH_ALEN) != 0) {
63 MACSTR, MAC2STR(ethhdr->h_dest));
67 sta = ap_get_sta(hapd, ethhdr->h_source);
74 sta = ap_sta_add(hapd, ethhdr->h_source);
92 ieee802_1x_receive(hapd, ethhdr->h_source, (u8 *) (ethhdr + 1),
93 len - sizeof(*ethhdr));
235 struct l2_ethhdr *ethhdr;
250 ethhdr = os_malloc(sizeof(*ethhdr) + len);
251 if (ethhdr == NULL)
254 os_memcpy(ethhdr->h_dest, sta->addr, ETH_ALEN);
255 os_memcpy(ethhdr->h_source, hapd->own_addr, ETH_ALEN);
256 ethhdr->h_proto = host_to_be16(ETH_P_PREAUTH);
257 os_memcpy(ethhdr + 1, buf, len);
259 if (l2_packet_send(piface->l2, sta->addr, ETH_P_PREAUTH, (u8 *) ethhdr,
260 sizeof(*ethhdr) + len) < 0) {
264 os_free(ethhdr);