[Bug 237973] pf: implement egress keyword to simplify rules across different hardware
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 01 Aug 2022 15:15:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237973 --- Comment #19 from Alexander V. Chernikov <melifaro@FreeBSD.org> --- (In reply to Goran Mekić 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()). rtsock 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 can either create multiple processes or create multiple rtsock sockets, using setfib() calls prior to calling socket(). -- You are receiving this mail because: You are the assignee for the bug.