Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Aug 2022 15:15:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 237973] pf: implement egress keyword to simplify rules across different hardware
Message-ID:  <bug-237973-7501-Sxg1xd7eFm@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-237973-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-237973-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237973

--- Comment #19 from Alexander V. Chernikov <melifaro@FreeBSD.org> ---
(In reply to Goran Meki=C4=87 from comment #18)
The rest is the prefix information, in sockaddr form.

Basically, rtm_addrs contains a bitmask of sockaddrs available, and these
remaining bytes are 4/8-bytes aligned 'struct sockaddr_in[6]', representing
dst,netmask and gateway. You can look at the example parsing code here:
https://github.com/freebsd/freebsd-src/blob/main/sys/net/rtsock.c#L1311

Interface is present in rtm_ifindex (and you can use if_indextoname()). rts=
ock
sockets are bound the the fib of the process at the time of socket creation=
, so
the fib is the process fib. If you need to monitor more than one fib, you c=
an
either create multiple processes or create multiple rtsock sockets, using
setfib() calls prior to calling socket().

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-237973-7501-Sxg1xd7eFm>