Home | History | Annotate | Download | only in l2_packet

Lines Matching refs:ethhdr

123 	struct l2_ethhdr *ethhdr;
129 if (packet == NULL || hdr.caplen < sizeof(*ethhdr))
132 ethhdr = (struct l2_ethhdr *) packet;
134 buf = (unsigned char *) ethhdr;
137 buf = (unsigned char *) (ethhdr + 1);
138 len = hdr.caplen - sizeof(*ethhdr);
140 l2->rx_callback(l2->rx_callback_ctx, ethhdr->h_source, buf, len);
150 struct l2_ethhdr *ethhdr;
154 if (pkt_data == NULL || hdr->caplen < sizeof(*ethhdr))
157 ethhdr = (struct l2_ethhdr *) pkt_data;
159 buf = (unsigned char *) ethhdr;
162 buf = (unsigned char *) (ethhdr + 1);
163 len = hdr->caplen - sizeof(*ethhdr);
165 l2->rx_callback(l2->rx_callback_ctx, ethhdr->h_source, buf, len);