On 3/1/24 00:19, David Gibson wrote:
On Thu, Feb 29, 2024 at 05:59:51PM +0100, Laurent Vivier wrote:
Introduce ip.[ch] file to encapsulate IP protocol handling functions and structures. Modify various files to include the new header ip.h when it's needed.
Signed-off-by: Laurent Vivier
Reviewed-by: David Gibson --- Notes: v4: - rebase
v3: - rewrap rationale - add David's R-b
v2: - update rationale and comments
Makefile | 10 +++--- conf.c | 1 + dhcp.c | 1 + flow.c | 1 + fwd.c | 1 + icmp.c | 1 + inany.c | 1 + ip.c | 72 +++++++++++++++++++++++++++++++++++++++++++ ip.h | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++
Noe that ip.h exists, in4addr_loopback and in4addr_any should probably go in there rather than inany.h. That can be a followup change though.
Not sure they should be moved to ip.h: they depend on inany_loopback4 and inany_any4 that are both defined in inany.c and the structure inany_addr is defined in inany.h I think it's better to let them where they are. Thanks, Laurent