Home
last modified time | relevance | path

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

/external/libpcap/
Dpcap-usb-linux.c480 struct pcap_pkthdr pkth; in usb_read_linux() local
524 if (gettimeofday(&pkth.ts, NULL) < 0) in usb_read_linux()
531 uhdr->ts_sec = pkth.ts.tv_sec; in usb_read_linux()
532 uhdr->ts_usec = pkth.ts.tv_usec; in usb_read_linux()
562 pkth.caplen = sizeof(pcap_usb_header); in usb_read_linux()
610 pkth.len = urb_len+pkth.caplen; in usb_read_linux()
639 while ((string[0] != 0) && (string[1] != 0) && (pkth.caplen < handle->snapshot)) in usb_read_linux()
646 pkth.caplen++; in usb_read_linux()
652 if (pkth.caplen > handle->snapshot) in usb_read_linux()
653 pkth.caplen = handle->snapshot; in usb_read_linux()
[all …]
Dpcap-bt-monitor-linux.c73 struct pcap_pkthdr pkth; in bt_monitor_read() local
84 memset(&pkth.ts, 0, sizeof(pkth.ts)); in bt_monitor_read()
106 pkth.caplen = ret - MGMT_HDR_SIZE + sizeof(pcap_bluetooth_linux_monitor_header); in bt_monitor_read()
107 pkth.len = pkth.caplen; in bt_monitor_read()
113 memcpy(&pkth.ts, CMSG_DATA(cmsg), sizeof(pkth.ts)); in bt_monitor_read()
122 pkth.len, pkth.caplen)) { in bt_monitor_read()
123 callback(user, &pkth, &handle->buffer[handle->offset]); in bt_monitor_read()
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 == -1) 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.c397 struct pcap_pkthdr pkth; in canusb_read_linux() local
406 pkth.caplen = pkth.len = n; in canusb_read_linux()
407 pkth.caplen -= 4; in canusb_read_linux()
408 pkth.caplen -= 8 - msg.length; in canusb_read_linux()
413 pkth.ts.tv_usec = firstpacket.tv_usec + (msg.timestamp % 100) * 10000; in canusb_read_linux()
414 pkth.ts.tv_sec = firstpacket.tv_usec + (msg.timestamp / 100); in canusb_read_linux()
415 if (pkth.ts.tv_usec > 1000000) in canusb_read_linux()
417 pkth.ts.tv_usec -= 1000000; in canusb_read_linux()
418 pkth.ts.tv_sec++; in canusb_read_linux()
421 callback(user, &pkth, (void*)&msg.id); in canusb_read_linux()
Dpcap-bt-linux.c306 struct pcap_pkthdr pkth; in bt_read_linux() local
335 pkth.caplen = ret; in bt_read_linux()
346 memcpy(&pkth.ts, CMSG_DATA(cmsg), in bt_read_linux()
347 sizeof pkth.ts); in bt_read_linux()
357 pkth.caplen+=sizeof(pcap_bluetooth_h4_header); in bt_read_linux()
358 pkth.len = pkth.caplen; in bt_read_linux()
361 pkth.len, pkth.caplen)) { in bt_read_linux()
362 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.c128 struct pcap_pkthdr pkth; in netfilter_read_linux() local
174 pkth.len = pkth.caplen = NFA_PAYLOAD(payload_attr); in netfilter_read_linux()
179 pkth.caplen = pkth.len = nlh->nlmsg_len-NLMSG_ALIGN(sizeof(struct nlmsghdr)); in netfilter_read_linux()
185 gettimeofday(&pkth.ts, NULL); in netfilter_read_linux()
187 bpf_filter(handle->fcode.bf_insns, payload, pkth.len, pkth.caplen)) in netfilter_read_linux()
190 callback(user, &pkth, payload); in netfilter_read_linux()