From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: integers byte order in netlink/NETLINK_NETFILTER messages Date: Fri, 17 Sep 2021 11:44:28 +0200 Message-ID: <20210917094428.GC15906@breakpoint.cc> References: Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Cristian Constantin Cc: netfilter@vger.kernel.org Cristian Constantin wrote: > in general, how are the integers encoded in the attributes of the > NETLINK_NETFILTER messages: host byte order or network byte order? Network byte order. > the same byte order supposed to be used by both user space tools and > the kernel? Yes, all need to use network byte order. > in particular, how is the chain policy attribute encoded by the kernel > when it sends an reply to a NFT_MSG_GETCHAIN request? Network byte order.