On Tue, Jan 13, 2026 at 11:13:31PM +0100, Stefano Brivio wrote:
On Tue, 13 Jan 2026 16:28:27 +1100 David Gibson
wrote: On Tue, Jan 13, 2026 at 12:26:22AM +0100, Stefano Brivio wrote:
On Thu, 8 Jan 2026 13:29:39 +1100 David Gibson
wrote: @@ -74,6 +83,8 @@ enum fwd_ports_mode { * @rules: Array of forwarding rules * @map: Bitmap describing which ports are forwarded * @delta: Offset between the original destination and mapped port number + * @listen_sock_count: Number of entries used in @listen_socks + * @listen_socks: Listening sockets for forwarding
To keep those aligned:
/** * fwd_ports() - Describes port forwarding for one protocol and direction * @mode: Overall forwarding mode (all, none, auto, some ports) * @scan4: /proc/net fd to scan for IPv4 ports when in AUTO mode * @scan6: /proc/net fd to scan for IPv6 ports when in AUTO mode * @count: Number of forwarding rules * @rules: Array of forwarding rules * @map: Bitmap describing which ports are forwarded * @delta: Offset between original and mapped destination port * @listen_sock_count: Number of entries used in @listen_socks * @listen_socks: Listening sockets for forwarding */
Done. I'd also be very open to more succinct names for these fields, but they haven't occurred to me yet.
@sockets: Array of listening sockets for inbound port forwarding @sockets_count: Count of used @sockets
? I mean, they're obviously listening sockets.
I wasn't sure about that. But that fact it's obvious to you is evidence in that direction. So, I've gone with 'sock_count' and 'socks'. -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson