summaryrefslogtreecommitdiffstats
path: root/sys/net/bpfdesc.h
diff options
context:
space:
mode:
authorcsjp <csjp@FreeBSD.org>2005-09-05 23:08:04 +0000
committercsjp <csjp@FreeBSD.org>2005-09-05 23:08:04 +0000
commit17dd22a407f2b37e2d1bbf9e6aad12e5765e1d4b (patch)
treeba396c5fa4107b445e987d9144b13c2dc4eabcd0 /sys/net/bpfdesc.h
parentc6de1a745875dc3f71b0e969b4bc61caf81bdc77 (diff)
downloadFreeBSD-src-17dd22a407f2b37e2d1bbf9e6aad12e5765e1d4b.zip
FreeBSD-src-17dd22a407f2b37e2d1bbf9e6aad12e5765e1d4b.tar.gz
Instead of caching the PID which opened the bpf descriptor, continuously
refresh the PID which has the descriptor open. The PID is refreshed in various operations like ioctl(2), kevent(2) or poll(2). This produces more accurate information about current bpf consumers. While we are here remove the bd_pcomm member of the bpf stats structure because now that we have an accurate PID we can lookup the via the kern.proc.pid sysctl variable. This is the trick that NetBSD decided to use to deal with this issue. Special care needs to be taken when MFC'ing this change, as we have made a change to the bpf stats structure. What will end up happening is we will leave the pcomm structure but just mark it as being un-used. This way we keep the ABI in tact. MFC after: 1 month Discussed with: Rui Paulo < rpaulo at NetBSD dot org >
Diffstat (limited to 'sys/net/bpfdesc.h')
-rw-r--r--sys/net/bpfdesc.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h
index 39a1340..d2cb985 100644
--- a/sys/net/bpfdesc.h
+++ b/sys/net/bpfdesc.h
@@ -95,7 +95,6 @@ struct bpf_d {
struct label *bd_label; /* MAC label for descriptor */
u_long bd_fcount; /* number of packets which matched filter */
pid_t bd_pid; /* PID which created descriptor */
- char bd_pcomm[MAXCOMLEN + 1];
int bd_locked; /* true if descriptor is locked */
};
@@ -148,7 +147,6 @@ struct xbpf_d {
int bd_bufsize;
pid_t bd_pid;
char bd_ifname[IFNAMSIZ];
- char bd_pcomm[MAXCOMLEN + 1];
int bd_locked;
};
OpenPOWER on IntegriCloud