Skip to content

firewall: dedicated address types and debug printouts thereof - #122

Open
nwf wants to merge 5 commits into
mainfrom
nwf/202609-address_types_and_debug
Open

nwf wants to merge 5 commits into
mainfrom
nwf/202609-address_types_and_debug

Conversation

@nwf

@nwf nwf commented Sep 4, 2026

Copy link
Copy Markdown
Member

The intent is that these become pervasive, if they're useful.

@nwf
nwf requested review from davidchisnall and rmn30 September 4, 2026 22:38
Comment thread lib/firewall/firewall.cc
Comment on lines +691 to +693
IPv4Address IPv4Header::*remoteAddress,
uint16_t TCPUDPCommonPrefix::*localPort,
uint16_t TCPUDPCommonPrefix::*remotePort,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a type for port numbers too? What is going on with the namespace prefixes here?!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are pointers to data members.

I'm generally in favor of more types...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL!

@rmn30 rmn30 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

/**
* The bytes of the address.
*/
uint8_t bytes[16];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit inconsistent to use a C array here and a std::array for MAC addresses?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering. Happy to make consistent in either direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants