Home
last modified time | relevance | path

Searched refs:pkth (Results 1 – 6 of 6) sorted by relevance

/external/libpcap/
Dpcap-usb-linux.c477 struct pcap_pkthdr pkth; in usb_read_linux() local
521 if (gettimeofday(&pkth.ts, NULL) < 0) in usb_read_linux()
528 uhdr->ts_sec = pkth.ts.tv_sec; in usb_read_linux()
529 uhdr->ts_usec = pkth.ts.tv_usec; in usb_read_linux()
559 pkth.caplen = sizeof(pcap_usb_header); in usb_read_linux()
607 pkth.len = urb_len+pkth.caplen; in usb_read_linux()
636 while ((string[0] != 0) && (string[1] != 0) && (pkth.caplen < handle->snapshot)) in usb_read_linux()
643 pkth.caplen++; in usb_read_linux()
649 if (pkth.caplen > handle->snapshot) in usb_read_linux()
650 pkth.caplen = handle->snapshot; in usb_read_linux()
[all …]
Dpcap-can-linux.c223 struct pcap_pkthdr pkth; in can_read_linux() local
238 pkth.caplen = recvmsg(handle->fd, &msg, 0); in can_read_linux()
244 } while ((pkth.caplen == -1) && (errno == EINTR)); in can_read_linux()
246 if (pkth.caplen < 0) in can_read_linux()
255 pkth.caplen -= 8 - cf->can_dlc; in can_read_linux()
256 pkth.len = pkth.caplen; in can_read_linux()
260 if( -1 == gettimeofday(&pkth.ts, NULL) ) in can_read_linux()
267 callback(user, &pkth, &handle->buffer[8]); in can_read_linux()
Dpcap-canusb-linux.c395 struct pcap_pkthdr pkth; in canusb_read_linux() local
404 pkth.caplen = pkth.len = n; in canusb_read_linux()
405 pkth.caplen -= 4; in canusb_read_linux()
406 pkth.caplen -= 8 - msg.length; in canusb_read_linux()
411 pkth.ts.tv_usec = firstpacket.tv_usec + (msg.timestamp % 100) * 10000; in canusb_read_linux()
412 pkth.ts.tv_sec = firstpacket.tv_usec + (msg.timestamp / 100); in canusb_read_linux()
413 if (pkth.ts.tv_usec > 1000000) in canusb_read_linux()
415 pkth.ts.tv_usec -= 1000000; in canusb_read_linux()
416 pkth.ts.tv_sec++; in canusb_read_linux()
419 callback(user, &pkth, (void*)&msg.id); in canusb_read_linux()
Dpcap-bt-linux.c310 struct pcap_pkthdr pkth; in bt_read_linux() local
339 pkth.caplen = ret; in bt_read_linux()
350 memcpy(&pkth.ts, CMSG_DATA(cmsg), in bt_read_linux()
351 sizeof pkth.ts); in bt_read_linux()
361 pkth.caplen+=sizeof(pcap_bluetooth_h4_header); in bt_read_linux()
362 pkth.len = pkth.caplen; in bt_read_linux()
365 pkth.len, pkth.caplen)) { in bt_read_linux()
366 callback(user, &pkth, &handle->buffer[handle->offset]); in bt_read_linux()
Dpcap-dbus.c58 struct pcap_pkthdr pkth; in dbus_read() local
89 pkth.caplen = pkth.len = raw_msg_len; in dbus_read()
92 gettimeofday(&pkth.ts, NULL); in dbus_read()
94 bpf_filter(handle->fcode.bf_insns, (u_char *)raw_msg, pkth.len, pkth.caplen)) { in dbus_read()
96 callback(user, &pkth, (u_char *)raw_msg); in dbus_read()
Dpcap-netfilter-linux.c129 struct pcap_pkthdr pkth; in netfilter_read_linux() local
175 pkth.len = pkth.caplen = NFA_PAYLOAD(payload_attr); in netfilter_read_linux()
180 pkth.caplen = pkth.len = nlh->nlmsg_len-NLMSG_ALIGN(sizeof(struct nlmsghdr)); in netfilter_read_linux()
186 gettimeofday(&pkth.ts, NULL); in netfilter_read_linux()
188 bpf_filter(handle->fcode.bf_insns, payload, pkth.len, pkth.caplen)) in netfilter_read_linux()
191 callback(user, &pkth, payload); in netfilter_read_linux()