mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
net/icmp: check the checksum field when recieve icmp message
According to RFC 792 page 4, do the icmp checksum if CONFIG_NET_ICMP_CHECKSUMS is set. Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
* include/nuttx/net/icmp.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2007-2009, 2012, 2014 Gregory Nutt. All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2007-2009, 2012, 2014 Gregory Nutt. All rights
|
||||
* reserved.
|
||||
* SPDX-FileCopyrightText: 2001-2003, Adam Dunkels. All rights reserved.
|
||||
* SPDX-FileContributor: Gregory Nutt <gnutt@nuttx.org>
|
||||
* SPDX-FileContributor: Adam Dunkels <adam@dunkels.com>
|
||||
@@ -159,6 +160,7 @@ struct icmp_stats_s
|
||||
net_stats_t recv; /* Number of received ICMP packets */
|
||||
net_stats_t sent; /* Number of sent ICMP packets */
|
||||
net_stats_t typeerr; /* Number of ICMP packets with a wrong type */
|
||||
net_stats_t csumerr; /* Number of ICMP packets with a wrong checksum */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user