All of lore.kernel.org
 help / color / mirror / Atom feed
* integers byte order in netlink/NETLINK_NETFILTER messages
@ 2021-09-17  8:45 Cristian Constantin
  2021-09-17  9:44 ` Florian Westphal
  2021-09-30 14:03 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Cristian Constantin @ 2021-09-17  8:45 UTC (permalink / raw)
  To: netfilter

hi!

in general, how are the integers encoded in the attributes of the
NETLINK_NETFILTER messages: host byte order or network byte order? is
the same byte order supposed to be used by both user space tools and
the kernel?

in particular, how is the chain policy attribute encoded by the kernel
when it sends an reply to a NFT_MSG_GETCHAIN request?

thanks,
cristian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: integers byte order in netlink/NETLINK_NETFILTER messages
  2021-09-17  8:45 integers byte order in netlink/NETLINK_NETFILTER messages Cristian Constantin
@ 2021-09-17  9:44 ` Florian Westphal
  2021-09-30 14:03 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2021-09-17  9:44 UTC (permalink / raw)
  To: Cristian Constantin; +Cc: netfilter

Cristian Constantin <const.crist@googlemail.com> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: integers byte order in netlink/NETLINK_NETFILTER messages
  2021-09-17  8:45 integers byte order in netlink/NETLINK_NETFILTER messages Cristian Constantin
  2021-09-17  9:44 ` Florian Westphal
@ 2021-09-30 14:03 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2021-09-30 14:03 UTC (permalink / raw)
  To: Cristian Constantin; +Cc: netfilter

On Fri, Sep 17, 2021 at 10:45:30AM +0200, Cristian Constantin wrote:
> hi!
> 
> in general, how are the integers encoded in the attributes of the
> NETLINK_NETFILTER messages: host byte order or network byte order? is
> the same byte order supposed to be used by both user space tools and
> the kernel?

nfnetlink attribute data is exposed in 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?

Through the NFTA_CHAIN_POLICY attribute.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-30 14:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17  8:45 integers byte order in netlink/NETLINK_NETFILTER messages Cristian Constantin
2021-09-17  9:44 ` Florian Westphal
2021-09-30 14:03 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.