diff --git a/include/nuttx/net/ip.h b/include/nuttx/net/ip.h index 897eb80c73..f28ff315d4 100644 --- a/include/nuttx/net/ip.h +++ b/include/nuttx/net/ip.h @@ -409,24 +409,30 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1, const net_ipv6addr_t mask); #endif -/* Mask out the network part of an IP address, given the address and - * the netmask. +/**************************************************************************** + * Function: net_ipaddr_mask * - * Example: + * Description: + * Mask out the network part of an IP address, given the address and + * the netmask. * - * in_addr_t ipaddr1, ipaddr2, netmask; + * Example: * - * net_ipaddr(&ipaddr1, 192,16,1,2); - * net_ipaddr(&netmask, 255,255,255,0); - * net_ipaddr_mask(&ipaddr2, &ipaddr1, &netmask); + * in_addr_t ipaddr1, ipaddr2, netmask; * - * In the example above, the variable "ipaddr2" will contain the IP - * address 192.168.1.0. + * net_ipaddr(&ipaddr1, 192,16,1,2); + * net_ipaddr(&netmask, 255,255,255,0); + * net_ipaddr_mask(&ipaddr2, &ipaddr1, &netmask); * - * dest Where the result is to be placed. - * src The IP address. - * mask The netmask. - */ + * In the example above, the variable "ipaddr2" will contain the IP + * address 192.168.1.0. + * + * Parameters: + * dest Where the result is to be placed. + * src The IP address. + * mask The netmask. + * + ****************************************************************************/ #define net_ipaddr_mask(dest, src, mask) \ do { \ diff --git a/net/utils/net_ipv6_maskcmp.c b/net/utils/net_ipv6_maskcmp.c index 95f55d0b5d..a5165e4817 100644 --- a/net/utils/net_ipv6_maskcmp.c +++ b/net/utils/net_ipv6_maskcmp.c @@ -39,7 +39,6 @@ #include -#include #include #include "utils/utils.h" diff --git a/net/utils/net_ipv6_pref2mask.c b/net/utils/net_ipv6_pref2mask.c index 6dcb63d874..40a1eb8dd6 100644 --- a/net/utils/net_ipv6_pref2mask.c +++ b/net/utils/net_ipv6_pref2mask.c @@ -39,7 +39,6 @@ #include -#include #include #include "utils/utils.h"