Home
last modified time | relevance | path

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

/external/libpcap/
Dpcap-bt-monitor-linux.c92 struct pcap_pkthdr pkth; in bt_monitor_read() local
105 memset(&pkth.ts, 0, sizeof(pkth.ts)); in bt_monitor_read()
127 pkth.caplen = ret - sizeof(hdr) + sizeof(pcap_bluetooth_linux_monitor_header); in bt_monitor_read()
128 pkth.len = pkth.caplen; in bt_monitor_read()
134 memcpy(&pkth.ts, CMSG_DATA(cmsg), sizeof(pkth.ts)); in bt_monitor_read()
142 bpf_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { in bt_monitor_read()
143 callback(user, &pkth, pktd); in bt_monitor_read()
Dpcap-usb-linux.c739 struct pcap_pkthdr pkth; in usb_read_linux() local
783 if (gettimeofday(&pkth.ts, NULL) < 0) in usb_read_linux()
789 uhdr->ts_sec = pkth.ts.tv_sec; in usb_read_linux()
790 uhdr->ts_usec = pkth.ts.tv_usec; in usb_read_linux()
820 pkth.caplen = sizeof(pcap_usb_header); in usb_read_linux()
868 pkth.len = urb_len+pkth.caplen; in usb_read_linux()
897 while ((string[0] != 0) && (string[1] != 0) && (pkth.caplen < (bpf_u_int32)handle->snapshot)) in usb_read_linux()
904 pkth.caplen++; in usb_read_linux()
910 if (pkth.caplen > (bpf_u_int32)handle->snapshot) in usb_read_linux()
911 pkth.caplen = (bpf_u_int32)handle->snapshot; in usb_read_linux()
[all …]
Dpcap-bt-linux.c316 struct pcap_pkthdr pkth; in bt_read_linux() local
348 pkth.caplen = ret; in bt_read_linux()
358 memcpy(&pkth.ts, CMSG_DATA(cmsg), in bt_read_linux()
359 sizeof pkth.ts); in bt_read_linux()
369 pkth.caplen+=sizeof(pcap_bluetooth_h4_header); in bt_read_linux()
370 pkth.len = pkth.caplen; in bt_read_linux()
372 bpf_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { in bt_read_linux()
373 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 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-rdmasniff.c120 struct pcap_pkthdr pkth; in rdmasniff_read() local
152 pkth.len = wc.byte_len; in rdmasniff_read()
153 pkth.caplen = min(pkth.len, (u_int)handle->snapshot); in rdmasniff_read()
154 gettimeofday(&pkth.ts, NULL); in rdmasniff_read()
159 bpf_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { in rdmasniff_read()
160 callback(user, &pkth, pktd); in rdmasniff_read()
Dpcap-netfilter-linux.c184 struct pcap_pkthdr pkth; in netfilter_read_linux() local
230 pkth.len = pkth.caplen = NFA_PAYLOAD(payload_attr); in netfilter_read_linux()
235 pkth.caplen = pkth.len = nlh->nlmsg_len-NLMSG_ALIGN(sizeof(struct nlmsghdr)); in netfilter_read_linux()
241 gettimeofday(&pkth.ts, NULL); in netfilter_read_linux()
243 bpf_filter(handle->fcode.bf_insns, payload, pkth.len, pkth.caplen)) in netfilter_read_linux()
246 callback(user, &pkth, payload); in netfilter_read_linux()