From nobody Sat Apr 08 19:44:44 2023 X-Original-To: dev-commits-src-branches@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 4Pv5Km63mzz44npq; Sat, 8 Apr 2023 19:44:44 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pv5Km4ZWmz43Tg; Sat, 8 Apr 2023 19:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680983084; 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=BgJaAToWX9DBBs0RIhzDZVgvJxZzmuf+pFkslMcjDGE=; b=n4oK4I9p1UdxoRml9VJ5qOARB5yasmvBU3P0gCEn0Nctg4UC3gTbuSnGwC/38bVJki/I5J EOpuk/dZcGJGMafEBqu8PGZy9+K8jJiNiyoI0kbspgy28CEN2dKMBhE+dkVVsv61CsAUGS QP2XRmnORRhISr21NXXGcsOaSMIYVkNNe2GOvCqZcBvtfWk4zDZ7QFoLIQnF7FAaSyemng WVrjY9o/E1JBE21b6dKXvbreevFh7YannnVv0F/a1Kz4V2MryEDqSlL9E+sfsmE1fKLjux V+ELHdy6Hof7LiNTjgFcNCs9813zHuwzTHZyYn6noQZxTY4ETtLMnP+luMHzlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680983084; 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=BgJaAToWX9DBBs0RIhzDZVgvJxZzmuf+pFkslMcjDGE=; b=reiRyuC7+8mbiRN1czgSXgXIZrPeOmbLPAypCgyBncU+/wpR8XOM7T9GJxuafjtqV5Ws4h YQrMFpGEXozOmVzoo0XOCL7mVAMEZ7QIBRnLMhnlyv7Ec+FGu+opKajAieNrbfgeV54NuU 2aDgTjIPg5ArXcxEvBgs98E6C1IPQOt9yoKaQTHPUPJp02dVDHh40XB4tZKZANdg0vQ/Th AinMMoQPdK9uA4/dK/D9AdXbQk6ZGsUXT2uDbrc2JcDW1L/FzPiPoa0wTZqcbQDnRJqn2F tMnPVdOQJVI1UN/D/0Ah5hiciyMUFQnkhdI3ce6e1XI4tS5bk3aO5BfICff69Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680983084; a=rsa-sha256; cv=none; b=QSeWIiVdEX+nFXBt6xlgbIdsKGfQgZZhTiXKEKp5vmBo+5KWzW67QLWDVTkEcCLjxAnj4k 2EqP4w2N4+7l1S4RCIhQWdtfDqm15ux+Eq9CYnfXfVf5AdlZNCGcGyQhAynreD4dpWB8RV 8rdlaqVlXDKuGFsxFXuKRZb+5oLyKu2aK+66CXUx2goLuum3tXkeVvXxyXroodVNTn3c05 KsTBnSmSSDE/00yrFwTy0Fs0z9gXTmcqNFKmV4M2JDBSUsApZLGAuKamJdGc+UqULvnFav yOEZnBw1jR5PvV256YwYZhBoUQ1v3O8pmmVbhdDhJwLsNFFtBTILUtTZgl7Cng== 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 4Pv5Km3ZdPzg3K; Sat, 8 Apr 2023 19:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 338JiipW018580; Sat, 8 Apr 2023 19:44:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 338Jiidb018579; Sat, 8 Apr 2023 19:44:44 GMT (envelope-from git) Date: Sat, 8 Apr 2023 19:44:44 GMT Message-Id: <202304081944.338Jiidb018579@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: c0c42c689acc - stable/13 - netlink: add userland name mappings to all NETLINK_ROUTE messages. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c0c42c689acc76ccad72edbb316ca7dc2e326246 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=c0c42c689acc76ccad72edbb316ca7dc2e326246 commit c0c42c689acc76ccad72edbb316ca7dc2e326246 Author: Alexander V. Chernikov AuthorDate: 2023-03-01 15:22:21 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-08 19:03:13 +0000 netlink: add userland name mappings to all NETLINK_ROUTE messages. MFC after: 1 day (cherry picked from commit e6b4177c478da54e25db464ae60ddae9e890c2cb) --- sys/netlink/route/common.h | 78 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 16 deletions(-) diff --git a/sys/netlink/route/common.h b/sys/netlink/route/common.h index 1bfb888b34c0..1f1d98dc4384 100644 --- a/sys/netlink/route/common.h +++ b/sys/netlink/route/common.h @@ -97,23 +97,64 @@ enum { * Use NL_RTM_ prefix in the kernel and map it to RTM_ * for userland. */ -#define RTM_BASE NL_RTM_BASE -#define RTM_NEWLINK NL_RTM_NEWLINK -#define RTM_DELLINK NL_RTM_DELLINK -#define RTM_GETLINK NL_RTM_GETLINK -#define RTM_SETLINK NL_RTM_SETLINK -#define RTM_NEWADDR NL_RTM_NEWADDR -#define RTM_DELADDR NL_RTM_DELADDR -#define RTM_GETADDR NL_RTM_GETADDR -#define RTM_NEWROUTE NL_RTM_NEWROUTE -#define RTM_DELROUTE NL_RTM_DELROUTE -#define RTM_GETROUTE NL_RTM_GETROUTE -#define RTM_NEWNEXTHOP NL_RTM_NEWNEXTHOP -#define RTM_DELNEXTHOP NL_RTM_DELNEXTHOP -#define RTM_GETNEXTHOP NL_RTM_GETNEXTHOP -#endif +#define RTM_BASE NL_RTM_BASE +#define RTM_NEWLINK NL_RTM_NEWLINK +#define RTM_DELLINK NL_RTM_DELLINK +#define RTM_GETLINK NL_RTM_GETLINK +#define RTM_SETLINK NL_RTM_SETLINK +#define RTM_NEWADDR NL_RTM_NEWADDR +#define RTM_DELADDR NL_RTM_DELADDR +#define RTM_GETADDR NL_RTM_GETADDR +#define RTM_NEWROUTE NL_RTM_NEWROUTE +#define RTM_DELROUTE NL_RTM_DELROUTE +#define RTM_GETROUTE NL_RTM_GETROUTE +#define RTM_NEWNEIGH NL_RTM_NEWNEIGH +#define RTM_DELNEIGH NL_RTM_DELNEIGH +#define RTM_GETNEIGH NL_RTM_GETNEIGH +#define RTM_NEWRULE NL_RTM_NEWRULE +#define RTM_DELRULE NL_RTM_DELRULE +#define RTM_GETRULE NL_RTM_GETRULE +#define RTM_NEWQDISC NL_RTM_NEWQDISC +#define RTM_DELQDISC NL_RTM_DELQDISC +#define RTM_GETQDISC NL_RTM_GETQDISC +#define RTM_NEWTCLASS NL_RTM_NEWTCLASS +#define RTM_DELTCLASS NL_RTM_DELTCLASS +#define RTM_GETTCLASS NL_RTM_GETTCLASS +#define RTM_NEWTFILTER NL_RTM_NEWTFILTER +#define RTM_DELTFILTER NL_RTM_DELTFILTER +#define RTM_GETTFILTER NL_RTM_GETTFILTER +#define RTM_NEWACTION NL_RTM_NEWACTION +#define RTM_DELACTION NL_RTM_DELACTION +#define RTM_GETACTION NL_RTM_GETACTION +#define RTM_NEWPREFIX NL_RTM_NEWPREFIX +#define RTM_GETMULTICAST NL_RTM_GETMULTICAST +#define RTM_GETANYCAST NL_RTM_GETANYCAST +#define RTM_NEWNEIGHTBL NL_RTM_NEWNEIGHTBL +#define RTM_GETNEIGHTBL NL_RTM_GETNEIGHTBL +#define RTM_SETNEIGHTBL NL_RTM_SETNEIGHTBL +#define RTM_NEWNDUSEROPT NL_RTM_NEWNDUSEROPT +#define RTM_NEWADDRLABEL NL_RTM_NEWADDRLABEL +#define RTM_DELADDRLABEL NL_RTM_DELADDRLABEL +#define RTM_GETADDRLABEL NL_RTM_GETADDRLABEL +#define RTM_GETDCB NL_RTM_GETDCB +#define RTM_SETDCB NL_RTM_SETDCB +#define RTM_NEWNETCONF NL_RTM_NEWNETCONF +#define RTM_GETNETCONF NL_RTM_GETNETCONF +#define RTM_NEWMDB NL_RTM_NEWMDB +#define RTM_DELMDB NL_RTM_DELMDB +#define RTM_GETMDB NL_RTM_GETMDB +#define RTM_NEWNSID NL_RTM_NEWNSID +#define RTM_DELNSID NL_RTM_DELNSID +#define RTM_GETNSID NL_RTM_GETNSID +#define RTM_NEWSTATS NL_RTM_NEWSTATS +#define RTM_GETSTATS NL_RTM_GETSTATS +#define RTM_NEWNEXTHOP NL_RTM_NEWNEXTHOP +#define RTM_DELNEXTHOP NL_RTM_DELNEXTHOP +#define RTM_GETNEXTHOP NL_RTM_GETNEXTHOP +#define __RTM_MAX __NL_RTM_MAX + +#define RTM_MAX (roundup2(__RTM_MAX, 4)) -#ifndef _KERNEL /* rtnetlink multicast groups - backwards compatibility for userspace */ #define RTMGRP_LINK 0x01 #define RTMGRP_NOTIFY 0x02 @@ -209,5 +250,10 @@ enum rtnetlink_groups { #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) +/* Defined NETLINK_ROUTE virtual multicast address families */ +#define RTNL_FAMILY_IPMR 128 /* Not supported */ +#define RTNL_FAMILY_IP6MR 129 /* Not supported */ +#define RTNL_FAMILY_MAX 129 + #endif