From nobody Mon Jul 6 19:44:14 2026 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 4gvFDH1Twqz6k5XS for ; Mon, 06 Jul 2026 19:44:15 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvFDG5hm4z3nbL for ; Mon, 06 Jul 2026 19:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783367054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3DnOuqr66zVwYe6FIP6rq+20h8rKDINDOS8RadX5EU=; b=UpIl3AOLeKGbjJWfitrrG/4HZ2pK49ckVyUee5sV3oQFai011rJhMvqXv+TVLHNrXZdHNp 8JpDTdAkTMYr/i5ME4TcijPZwZs/yR0cZCB0MdYT9h+dx8OOF+XI0eB5oPDfQkHvRk8iMN uhl5/fn1P1TnPUI73XTgzNFtp62o21I3j522+2N1Qc43d1cXwZvrSpBojEc2EieSDI4t6W Y7UhCF3ANUwggXBNJX/cwS+ympK65fSy2iXS8EU9fjojJirZwqIxN5oNINhZatFJu7RXYP SWxl92nY0K6qT874oFLniy6BDI71TMVjIFQWwGV2DlorxE3c14okeywtTx5GJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783367054; a=rsa-sha256; cv=none; b=vLfSqI5W00YASAjiv9MA3UXHzRCJuDTDXMiMhiAoDaUvvT6HcZGVZyIXkQd/u1k8bjXrUE MKTQfj2bXmd5qiHze9U/F6eHuK2w3HNXn0ye/lgMuf77QOf0bh6nt/1q/ZO3EDqTN1e7gD EwdIIfPul7rHWNMEmZjK1B5wc8Maq+qEr5f5VtrtU5tB+5ZvWqmWrZzlZB0pgQZWuvJj+i kjyvKgQ7jaDbuiwKQe/vgQa4/48XDMcbZrl68NDKe71f76DIWXJxo5cNbdHWArSvgGSNnF XA4Lzmx29g/lawIQYDzWOE7LFCxGHDt+c39v3lEuPz52/1BTzLexqy471VibzA== 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=1783367054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3DnOuqr66zVwYe6FIP6rq+20h8rKDINDOS8RadX5EU=; b=N0EG50iK8CjebJ4ZJXQR5D00eZwouEOOFWQz79FSUTu9ufVUNuhfR2ItPr+ZxPmoHBJFLH AeqNgvj+o1JZ01ad/cFuYc6kCuedTwcHSh0ZSAQj8cs/vRGGu+WqDdMvZBrQJkarSh7wrw W3PmJhhfdDRUw7y5scTcqj9Df/ltzixmiNvXzBLws2rbNMY1OkX8sj9KmZTVyg72XkGEzN ZgWfOp3bDJgqFxL2O+FOoIDoErqzx4ApnHXhKOgFDhpbvB/meX0Wp58rTQMvhD6soVvAnV 9xtU8L+mWmfH+HJxDObxeUVPX4yjXChb+2jnXkclW4pJImj0mF3j0wCNeT4Lsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvFDG4XTLz1HC8 for ; Mon, 06 Jul 2026 19:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f2f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 19:44:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Gleb Smirnoff From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: f01c509568f2 - main - pf: revert netlink commands back to enum 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f01c509568f25c8003bf2b0c5f6fa008e5f8f810 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 19:44:14 +0000 Message-Id: <6a4c058e.3f2f3.76baf8c3@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f01c509568f25c8003bf2b0c5f6fa008e5f8f810 commit f01c509568f25c8003bf2b0c5f6fa008e5f8f810 Author: Gleb Smirnoff AuthorDate: 2026-07-06 19:41:25 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-06 19:41:25 +0000 pf: revert netlink commands back to enum Revert pf_nl.h part of 017690e50913 and use new libsysdecode build glue that parses enums. Reviewed by: kp, glebius Differential Revision: https://reviews.freebsd.org/D57866 --- lib/libsysdecode/mktables | 2 +- sys/netpfil/pf/pf_nl.h | 103 +++++++++++++++++++++++----------------------- 2 files changed, 53 insertions(+), 52 deletions(-) diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index df742ff62f39..9e08246d50cc 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -189,7 +189,7 @@ else fi gen_table "shmflags" "SHM_[A-Z_]+[[:space:]]+0x[0-9]+" "sys/mman.h" "SHM_ANON" gen_table "itimerwhich" "ITIMER_[A-Z]+[[:space:]]+[0-9]+" "sys/time.h" -gen_table "pfnl_cmd" "PFNL_CMD_[A-Z_]+[[:space:]]+[0-9]+" "netpfil/pf/pf_nl.h" +gen_table_enum "pfnl_cmd" "PFNL_CMD_[A-Z_]+" "netpfil/pf/pf_nl.h" gen_table "nlm_flag" "NLM_F_[A-Z]+[[:space:]]+0x[0-9]+" "netlink/netlink.h" # Generate a .depend file for our output file diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index 34ad5be75917..4d0186ea86a5 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -34,57 +34,58 @@ #define PFNL_FAMILY_NAME "pfctl" /* available commands */ -#define PFNL_CMD_UNSPEC 0 -#define PFNL_CMD_GETSTATES 1 -#define PFNL_CMD_GETCREATORS 2 -#define PFNL_CMD_START 3 -#define PFNL_CMD_STOP 4 -#define PFNL_CMD_ADDRULE 5 -#define PFNL_CMD_GETRULES 6 -#define PFNL_CMD_GETRULE 7 -#define PFNL_CMD_CLRSTATES 8 -#define PFNL_CMD_KILLSTATES 9 -#define PFNL_CMD_SET_STATUSIF 10 -#define PFNL_CMD_GET_STATUS 11 -#define PFNL_CMD_CLEAR_STATUS 12 -#define PFNL_CMD_NATLOOK 13 -#define PFNL_CMD_SET_DEBUG 14 -#define PFNL_CMD_SET_TIMEOUT 15 -#define PFNL_CMD_GET_TIMEOUT 16 -#define PFNL_CMD_SET_LIMIT 17 -#define PFNL_CMD_GET_LIMIT 18 -#define PFNL_CMD_BEGIN_ADDRS 19 -#define PFNL_CMD_ADD_ADDR 20 -#define PFNL_CMD_GET_ADDRS 21 -#define PFNL_CMD_GET_ADDR 22 -#define PFNL_CMD_GET_RULESETS 23 -#define PFNL_CMD_GET_RULESET 24 -#define PFNL_CMD_GET_SRCNODES 25 -#define PFNL_CMD_CLEAR_TABLES 26 -#define PFNL_CMD_ADD_TABLE 27 -#define PFNL_CMD_DEL_TABLE 28 -#define PFNL_CMD_GET_TSTATS 29 -#define PFNL_CMD_CLR_TSTATS 30 -#define PFNL_CMD_CLR_ADDRS 31 -#define PFNL_CMD_TABLE_ADD_ADDR 32 -#define PFNL_CMD_TABLE_DEL_ADDR 33 -#define PFNL_CMD_TABLE_SET_ADDR 34 -#define PFNL_CMD_TABLE_GET_ADDR 35 -#define PFNL_CMD_TABLE_GET_ASTATS 36 -#define PFNL_CMD_TABLE_CLEAR_ASTATS 37 -#define PFNL_CMD_STATE_LIMITER_ADD 38 -#define PFNL_CMD_STATE_LIMITER_GET 39 -#define PFNL_CMD_STATE_LIMITER_NGET 40 -#define PFNL_CMD_SOURCE_LIMITER_ADD 41 -#define PFNL_CMD_SOURCE_LIMITER_GET 42 -#define PFNL_CMD_SOURCE_LIMITER_NGET 43 -#define PFNL_CMD_SOURCE_GET 44 -#define PFNL_CMD_SOURCE_NGET 45 -#define PFNL_CMD_SOURCE_CLEAR 46 -#define PFNL_CMD_TABLE_TEST_ADDRS 47 - -#define __PFNL_CMD_MAX 48 -#define PFNL_CMD_MAX (__PFNL_CMD_MAX - 1) +enum { + PFNL_CMD_UNSPEC = 0, + PFNL_CMD_GETSTATES = 1, + PFNL_CMD_GETCREATORS = 2, + PFNL_CMD_START = 3, + PFNL_CMD_STOP = 4, + PFNL_CMD_ADDRULE = 5, + PFNL_CMD_GETRULES = 6, + PFNL_CMD_GETRULE = 7, + PFNL_CMD_CLRSTATES = 8, + PFNL_CMD_KILLSTATES = 9, + PFNL_CMD_SET_STATUSIF = 10, + PFNL_CMD_GET_STATUS = 11, + PFNL_CMD_CLEAR_STATUS = 12, + PFNL_CMD_NATLOOK = 13, + PFNL_CMD_SET_DEBUG = 14, + PFNL_CMD_SET_TIMEOUT = 15, + PFNL_CMD_GET_TIMEOUT = 16, + PFNL_CMD_SET_LIMIT = 17, + PFNL_CMD_GET_LIMIT = 18, + PFNL_CMD_BEGIN_ADDRS = 19, + PFNL_CMD_ADD_ADDR = 20, + PFNL_CMD_GET_ADDRS = 21, + PFNL_CMD_GET_ADDR = 22, + PFNL_CMD_GET_RULESETS = 23, + PFNL_CMD_GET_RULESET = 24, + PFNL_CMD_GET_SRCNODES = 25, + PFNL_CMD_CLEAR_TABLES = 26, + PFNL_CMD_ADD_TABLE = 27, + PFNL_CMD_DEL_TABLE = 28, + PFNL_CMD_GET_TSTATS = 29, + PFNL_CMD_CLR_TSTATS = 30, + PFNL_CMD_CLR_ADDRS = 31, + PFNL_CMD_TABLE_ADD_ADDR = 32, + PFNL_CMD_TABLE_DEL_ADDR = 33, + PFNL_CMD_TABLE_SET_ADDR = 34, + PFNL_CMD_TABLE_GET_ADDR = 35, + PFNL_CMD_TABLE_GET_ASTATS = 36, + PFNL_CMD_TABLE_CLEAR_ASTATS = 37, + PFNL_CMD_STATE_LIMITER_ADD = 38, + PFNL_CMD_STATE_LIMITER_GET = 39, + PFNL_CMD_STATE_LIMITER_NGET = 40, + PFNL_CMD_SOURCE_LIMITER_ADD = 41, + PFNL_CMD_SOURCE_LIMITER_GET = 42, + PFNL_CMD_SOURCE_LIMITER_NGET = 43, + PFNL_CMD_SOURCE_GET = 44, + PFNL_CMD_SOURCE_NGET = 45, + PFNL_CMD_SOURCE_CLEAR = 46, + PFNL_CMD_TABLE_TEST_ADDRS = 47, + __PFNL_CMD_MAX, +}; +#define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) enum pfstate_key_type_t { PF_STK_UNSPEC,