mirror of
https://github.com/apache/nuttx.git
synced 2025-12-08 19:02:43 +08:00
icmp/icmpv6: fix the level parameter type
use a more standard definition Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -230,10 +230,12 @@
|
||||
|
||||
/* Protocol-level socket operations. */
|
||||
|
||||
#define SOL_IP IPPROTO_IP /* See options in include/netinet/ip.h */
|
||||
#define SOL_IPV6 IPPROTO_IPV6 /* See options in include/netinet/ip6.h */
|
||||
#define SOL_TCP IPPROTO_TCP /* See options in include/netinet/tcp.h */
|
||||
#define SOL_UDP IPPROTO_UDP /* See options in include/netinit/udp.h */
|
||||
#define SOL_IP IPPROTO_IP /* See options in include/netinet/in.h */
|
||||
#define SOL_IPV6 IPPROTO_IPV6 /* See options in include/netinet/in.h */
|
||||
#define SOL_TCP IPPROTO_TCP /* See options in include/netinet/in.h */
|
||||
#define SOL_UDP IPPROTO_UDP /* See options in include/netinet/in.h */
|
||||
#define SOL_RAW IPPROTO_RAW /* See options in include/netinet/in.h */
|
||||
#define SOL_ICMPV6 IPPROTO_ICMPV6 /* See options in include/netinet/in.h */
|
||||
|
||||
/* Bluetooth-level operations. */
|
||||
|
||||
|
||||
@@ -383,10 +383,10 @@ static int icmp_getsockopt(FAR struct socket *psock, int level, int option,
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
case IPPROTO_IP:
|
||||
case SOL_IP:
|
||||
return ipv4_getsockopt(psock, option, value, value_len);
|
||||
|
||||
case IPPROTO_ICMP:
|
||||
case SOL_RAW:
|
||||
return icmp_getsockopt_internal(psock, option, value, value_len);
|
||||
|
||||
default:
|
||||
@@ -486,10 +486,10 @@ static int icmp_setsockopt(FAR struct socket *psock, int level, int option,
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
case IPPROTO_IP:
|
||||
case SOL_IP:
|
||||
return ipv4_setsockopt(psock, option, value, value_len);
|
||||
|
||||
case IPPROTO_ICMP:
|
||||
case SOL_RAW:
|
||||
return icmp_setsockopt_internal(psock, option, value, value_len);
|
||||
|
||||
default:
|
||||
|
||||
@@ -381,10 +381,10 @@ static int icmpv6_getsockopt(FAR struct socket *psock, int level, int option,
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
case IPPROTO_IPV6:
|
||||
case SOL_IPV6:
|
||||
return ipv6_getsockopt(psock, option, value, value_len);
|
||||
|
||||
case IPPROTO_ICMPV6:
|
||||
case SOL_ICMPV6:
|
||||
return icmpv6_getsockopt_internal(psock, option, value, value_len);
|
||||
|
||||
default:
|
||||
@@ -484,10 +484,10 @@ static int icmpv6_setsockopt(FAR struct socket *psock, int level, int option,
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
case IPPROTO_IPV6:
|
||||
case SOL_IPV6:
|
||||
return ipv6_setsockopt(psock, option, value, value_len);
|
||||
|
||||
case IPPROTO_ICMPV6:
|
||||
case SOL_ICMPV6:
|
||||
return icmpv6_setsockopt_internal(psock, option, value, value_len);
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user