This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit c6d9e5977814013b02c0932e8332882c30fdfe04 Author: Marco Casaroli <[email protected]> AuthorDate: Tue Oct 27 19:19:14 2026 +0100 include/netinet/in.h: Add IN6_ARE_ADDR_EQUAL(). IN6_ARE_ADDR_EQUAL(a, b) tells if two IPv6 addresses are the same. The BSDs, glibc and musl have it beside the IN6_IS_ADDR_*() macros, and programs use it (Tcl's socket code did not compile without it). Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- include/netinet/in.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/netinet/in.h b/include/netinet/in.h index 96e05437996..5f31d4e84df 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -251,6 +251,12 @@ #define IN6_IS_ADDR_SITELOCAL(a) \ (((a)->s6_addr16[0] & HTONS(0xffc0)) == HTONS(0xfec0)) +#define IN6_ARE_ADDR_EQUAL(a, b) \ + ((a)->s6_addr32[0] == (b)->s6_addr32[0] && \ + (a)->s6_addr32[1] == (b)->s6_addr32[1] && \ + (a)->s6_addr32[2] == (b)->s6_addr32[2] && \ + (a)->s6_addr32[3] == (b)->s6_addr32[3]) + /* This macro to convert a 16/32-bit constant values quantity from host byte * order to network byte order. The 16-bit version of this macro is required * for uIP:
