Lines Matching defs:ethhdr
124 struct l2_ethhdr *ethhdr;
130 if (packet == NULL || hdr.caplen < sizeof(*ethhdr))
133 ethhdr = (struct l2_ethhdr *) packet;
135 buf = (unsigned char *) ethhdr;
138 buf = (unsigned char *) (ethhdr + 1);
139 len = hdr.caplen - sizeof(*ethhdr);
141 l2->rx_callback(l2->rx_callback_ctx, ethhdr->h_source, buf, len);
151 struct l2_ethhdr *ethhdr;
155 if (pkt_data == NULL || hdr->caplen < sizeof(*ethhdr))
158 ethhdr = (struct l2_ethhdr *) pkt_data;
160 buf = (unsigned char *) ethhdr;
163 buf = (unsigned char *) (ethhdr + 1);
164 len = hdr->caplen - sizeof(*ethhdr);
166 l2->rx_callback(l2->rx_callback_ctx, ethhdr->h_source, buf, len);