Home
last modified time | relevance | path

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

/external/libpcap/
Dpcap-usb-linux-common.c39 fix_linux_usb_mmapped_length(struct pcap_pkthdr *pkth, const u_char *bp) in fix_linux_usb_mmapped_length() argument
48 bytes_left = pkth->caplen; in fix_linux_usb_mmapped_length()
55 pkth->len == sizeof(pcap_usb_header_mmapped) + in fix_linux_usb_mmapped_length()
103 if (pre_truncation_len >= pkth->caplen) in fix_linux_usb_mmapped_length()
104 pkth->len = pre_truncation_len; in fix_linux_usb_mmapped_length()
127 if (pkth->caplen > pkth->len) in fix_linux_usb_mmapped_length()
128 pkth->len = pkth->caplen; in fix_linux_usb_mmapped_length()
Dpcap-bt-monitor-linux.c100 struct pcap_pkthdr pkth; in bt_monitor_read() local
113 memset(&pkth.ts, 0, sizeof(pkth.ts)); in bt_monitor_read()
139 pkth.caplen = (bpf_u_int32)(ret - sizeof(hdr) + sizeof(pcap_bluetooth_linux_monitor_header)); in bt_monitor_read()
140 pkth.len = pkth.caplen; in bt_monitor_read()
146 memcpy(&pkth.ts, CMSG_DATA(cmsg), sizeof(pkth.ts)); in bt_monitor_read()
154 pcap_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { in bt_monitor_read()
155 callback(user, &pkth, pktd); in bt_monitor_read()
Dpcap-usb-linux.c669 struct pcap_pkthdr pkth; in usb_read_linux_bin() local
717 pkth.caplen = sizeof(pcap_usb_header) + clen; in usb_read_linux_bin()
724 pkth.len = sizeof(pcap_usb_header) + info.hdr->data_len; in usb_read_linux_bin()
732 pkth.len = sizeof(pcap_usb_header) + info.hdr->urb_len; in usb_read_linux_bin()
734 pkth.ts.tv_sec = (time_t)info.hdr->ts_sec; in usb_read_linux_bin()
735 pkth.ts.tv_usec = info.hdr->ts_usec; in usb_read_linux_bin()
739 pkth.len, pkth.caplen)) { in usb_read_linux_bin()
741 callback(user, &pkth, handle->buffer); in usb_read_linux_bin()
759 struct pcap_pkthdr pkth; in usb_read_linux_mmap() local
877 pkth.caplen = sizeof(pcap_usb_header_mmapped) + clen; in usb_read_linux_mmap()
[all …]
Dpcap-bt-linux.c325 struct pcap_pkthdr pkth; in bt_read_linux() local
361 pkth.caplen = (bpf_u_int32)ret; in bt_read_linux()
371 memcpy(&pkth.ts, CMSG_DATA(cmsg), in bt_read_linux()
372 sizeof pkth.ts); in bt_read_linux()
394 pkth.caplen+=sizeof(pcap_bluetooth_h4_header); in bt_read_linux()
395 pkth.len = pkth.caplen; in bt_read_linux()
397 pcap_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { in bt_read_linux()
398 callback(user, &pkth, pktd); 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 pcap_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-rdmasniff.c121 struct pcap_pkthdr pkth; in rdmasniff_read() local
168 pkth.len = wc.byte_len; in rdmasniff_read()
169 pkth.caplen = min(pkth.len, (u_int)handle->snapshot); in rdmasniff_read()
170 gettimeofday(&pkth.ts, NULL); in rdmasniff_read()
175 pcap_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { in rdmasniff_read()
176 callback(user, &pkth, pktd); in rdmasniff_read()
Dpcap-netfilter-linux.c203 struct pcap_pkthdr pkth; in netfilter_read_linux() local
249 pkth.len = pkth.caplen = NFA_PAYLOAD(payload_attr); in netfilter_read_linux()
254 pkth.caplen = pkth.len = nlh->nlmsg_len-NLMSG_ALIGN(sizeof(struct nlmsghdr)); in netfilter_read_linux()
260 gettimeofday(&pkth.ts, NULL); in netfilter_read_linux()
262 pcap_filter(handle->fcode.bf_insns, payload, pkth.len, pkth.caplen)) in netfilter_read_linux()
265 callback(user, &pkth, payload); in netfilter_read_linux()
Dpcap-usb-linux-common.h25 extern void fix_linux_usb_mmapped_length(struct pcap_pkthdr *pkth,