From nobody Sat Sep 14 20:30:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X5jVQ6jqJz5Vvxt; Sat, 14 Sep 2024 20:30:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X5jVQ4YxYz4MQx; Sat, 14 Sep 2024 20:30:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726345838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qyC4BFgI+wqQZjpUYHTA7m4RzhaPHdcfaAI4lrRWdT4=; b=dxuKxFDxLK48YgIW6cRfo9JqORln5fm5Gi0Sqb8JveHZq7T2YQmvS5IpaBOMAmpsHvo27A CsMDkn/bY2KvK/kUPvMX7gTyErKVVxHcSyDLVpvdB99PNfg779IIMSrpvd+efMimEq5twy kDkpk/fSOvLJrqSFmHGoo3rEehswYo6PkT+PJeTeNKRKouTpur1JFosY9bi1rJ/cbiOdog e7D9S5FtLsNRHaIMSfyd36T5qOlI9oOagEQ9kHItvTnqxBUHQmEICHb6x3sl1L5re1k5ff 1TZfUQm8F+fWYnwxVWsvgXDfF+IXmFlKg3wEvn/rHxMuPleLKXQDJMea/kywJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726345838; a=rsa-sha256; cv=none; b=dhPOh4fP3qdtfWRmou96OeDcRskAGJpRksiZRiACGSCDnBtuuzDJd3w62tMf4g1+6Frl2Y 1tElCFIggUm1xfnuQNW9naS+uY1cDCVeiMQ9e73X5B4Wopg/QYKGGU4/I+9k9/1ss8qAzJ QgSP1WpSsn+9/SJ2K5MMPM0sBPQig7226LreUUePj864qWwMWukp3mEUWIJzkT0B4xnR5K hx1pjbCsxTg/Z+ThqgD87kvSoNA/mQExmb5pDT02ZBbUxmfS37y5pThrh8oWggWhb6Vml8 zcomG4KKS48WvJiIl+KQRlRzhwkUQeH+ufD7Enb6qmARwNHyAcOPxh6v9dd47w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726345838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qyC4BFgI+wqQZjpUYHTA7m4RzhaPHdcfaAI4lrRWdT4=; b=K67VBOGNCpMWq3p/zjIuMIXdbOv6trdnG3Qzp988UQgF61liHGrrsGSWgVGt0BZ8xzg6RO PmJ6gZXrcmti+RAona0pi0fZywDdgc3GM2BaC4RnBmopHLyQdnRP+5O3txCMfRtnTu1isQ 4C3yHgZlMxJx+RJXNWCP9xSj1+CbdnimKgz7WcFXswNlWP7AL774aQ5RIVfS3aZkWyssVX shAKxXzVI65/bRbTNBp9IrWPu4mVqiOT8wjCyVlHP4Qbn0HBX+E4artwQAco+CUwxA/x5n gWg5uA88P+GPQDX9MBjxVvpkFEvPy9uW2dFJBdvi2ODTcVvbfeQviMkMODBgAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X5jVQ3J88zhLL; Sat, 14 Sep 2024 20:30:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48EKUc9x049204; Sat, 14 Sep 2024 20:30:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48EKUcfJ049201; Sat, 14 Sep 2024 20:30:38 GMT (envelope-from git) Date: Sat, 14 Sep 2024 20:30:38 GMT Message-Id: <202409142030.48EKUcfJ049201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: f0bcebe67ef6 - main - pflogd: Define structures removed in libpcap-1.10.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0bcebe67ef6cf9f104535d6cd9f151c1b61dd6a Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=f0bcebe67ef6cf9f104535d6cd9f151c1b61dd6a commit f0bcebe67ef6cf9f104535d6cd9f151c1b61dd6a Author: Joseph Mingrone AuthorDate: 2024-09-14 19:52:36 +0000 Commit: Joseph Mingrone CommitDate: 2024-09-14 20:28:27 +0000 pflogd: Define structures removed in libpcap-1.10.5 In libpcap-1.10.5, two structures that we rely on, pcap_timeval and pcap_sf_pkthdr, were made private. https://github.com/the-tcpdump-group/libpcap/commit/c2d8cbb977963be1f6cb07863e5bb59609e87fae Temporarily define them here to fix the build. kp and I will investigate a permanent solution at EuroBSDCon in Dublin. Reviewed by: kp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46676 --- contrib/pf/pflogd/pflogd.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/contrib/pf/pflogd/pflogd.h b/contrib/pf/pflogd/pflogd.h index 596e69692614..6e6b588d24bf 100644 --- a/contrib/pf/pflogd/pflogd.h +++ b/contrib/pf/pflogd/pflogd.h @@ -40,6 +40,19 @@ int priv_open_log(void); int priv_move_log(void); pcap_t *pcap_open_live_fd(int fd, int snaplen, char *ebuf); +/* XXX TODO: Investigate a permanent solution, rather than defining these two + structures here. */ +struct pcap_timeval { + bpf_u_int32 tv_sec; /* seconds */ + bpf_u_int32 tv_usec; /* microseconds */ +}; + +struct pcap_sf_pkthdr { + struct pcap_timeval ts; /* time stamp */ + bpf_u_int32 caplen; /* length of portion present */ + bpf_u_int32 len; /* length of this packet (off wire) */ +}; + void set_pcap_filter(void); /* File descriptor send/recv */ void send_fd(int, int);