Lines Matching refs:interface_bpf
114 struct _ndbootd_interface_bpf *interface_bpf; in ndbootd_raw_open() local
196 interface_bpf = ndbootd_new0(struct _ndbootd_interface_bpf, 1); in ndbootd_raw_open()
197 interface_bpf->_ndbootd_interface_bpf_buffer_size = packet_buffer_size; in ndbootd_raw_open()
198 interface_bpf->_ndbootd_interface_bpf_buffer = ndbootd_new(char, packet_buffer_size); in ndbootd_raw_open()
199 interface->_ndbootd_interface_raw_private = interface_bpf; in ndbootd_raw_open()
208 struct _ndbootd_interface_bpf *interface_bpf; in ndbootd_raw_read() local
214 interface_bpf = (struct _ndbootd_interface_bpf *) interface->_ndbootd_interface_raw_private; in ndbootd_raw_read()
222 if (interface_bpf->_ndbootd_interface_bpf_buffer_offset in ndbootd_raw_read()
223 >= interface_bpf->_ndbootd_interface_bpf_buffer_end) { in ndbootd_raw_read()
246 interface_bpf->_ndbootd_interface_bpf_buffer, in ndbootd_raw_read()
247 interface_bpf->_ndbootd_interface_bpf_buffer_size); in ndbootd_raw_read()
253 interface_bpf->_ndbootd_interface_bpf_buffer_offset = 0; in ndbootd_raw_read()
254 interface_bpf->_ndbootd_interface_bpf_buffer_end = buffer_end; in ndbootd_raw_read()
257 if ((interface_bpf->_ndbootd_interface_bpf_buffer_offset in ndbootd_raw_read()
259 > interface_bpf->_ndbootd_interface_bpf_buffer_end) { in ndbootd_raw_read()
261 interface_bpf->_ndbootd_interface_bpf_buffer_end = 0; in ndbootd_raw_read()
266 interface_bpf->_ndbootd_interface_bpf_buffer in ndbootd_raw_read()
267 + interface_bpf->_ndbootd_interface_bpf_buffer_offset, in ndbootd_raw_read()
269 interface_bpf->_ndbootd_interface_bpf_buffer_offset += the_bpf_header.bh_hdrlen; in ndbootd_raw_read()
273 || ((interface_bpf->_ndbootd_interface_bpf_buffer_offset + the_bpf_header.bh_datalen) in ndbootd_raw_read()
274 > interface_bpf->_ndbootd_interface_bpf_buffer_end)) { in ndbootd_raw_read()
276 interface_bpf->_ndbootd_interface_bpf_buffer_offset += the_bpf_header.bh_datalen; in ndbootd_raw_read()
283 (interface_bpf->_ndbootd_interface_bpf_buffer in ndbootd_raw_read()
284 + interface_bpf->_ndbootd_interface_bpf_buffer_offset))->ether_shost, in ndbootd_raw_read()
288 interface_bpf->_ndbootd_interface_bpf_buffer_offset += the_bpf_header.bh_datalen; in ndbootd_raw_read()
294 interface_bpf->_ndbootd_interface_bpf_buffer_offset += the_bpf_header.bh_datalen; in ndbootd_raw_read()
299 interface_bpf->_ndbootd_interface_bpf_buffer in ndbootd_raw_read()
300 + interface_bpf->_ndbootd_interface_bpf_buffer_offset, in ndbootd_raw_read()
302 interface_bpf->_ndbootd_interface_bpf_buffer_offset += the_bpf_header.bh_datalen; in ndbootd_raw_read()