mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
This change implements the SO_ERROR socket option that is used to obtain the last error reported by the network.
Squashed commit of the following: Author: Gregory Nutt <gnutt@nuttx.org> net/: Trivial changes to PR from review. Biggest difference: type of s_error changed to int16_t to save a byte or two. Author: liuhuahang <liuhuahang@xiaomi.com> Implement SO_ERROR for getsockopt()
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/net/net.h
|
||||
*
|
||||
* Copyright (C) 2007, 2009-2014, 2016-2018 Gregory Nutt. All rights
|
||||
* Copyright (C) 2007, 2009-2014, 2016-2019 Gregory Nutt. All rights
|
||||
* reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
@@ -234,6 +234,7 @@ struct socket
|
||||
/* Socket options */
|
||||
|
||||
#ifdef CONFIG_NET_SOCKOPTS
|
||||
int16_t s_error; /* Last error that occurred on this socket */
|
||||
sockopt_t s_options; /* Selected socket options */
|
||||
socktimeo_t s_rcvtimeo; /* Receive timeout value (in deciseconds) */
|
||||
socktimeo_t s_sndtimeo; /* Send timeout value (in deciseconds) */
|
||||
|
||||
Reference in New Issue
Block a user