[component][net]add more socket flag
This commit is contained in:
parent
49c39d4a8d
commit
fb02e7934d
|
@ -41,6 +41,10 @@
|
|||
#define INTF_SO_SNDBUF 7
|
||||
#define INTF_SO_SNDLOWAT 19
|
||||
#define INTF_SO_RCVLOWAT 18
|
||||
#define INTF_SO_BINDTODEVICE 25
|
||||
#define INTF_SO_TIMESTAMPNS 35
|
||||
#define INTF_SO_TIMESTAMPING 37
|
||||
#define INTF_SO_SELECT_ERR_QUEUE 45
|
||||
|
||||
#define IMPL_SO_BROADCAST 0x0020
|
||||
#define IMPL_SO_KEEPALIVE 0x0008
|
||||
|
@ -59,6 +63,10 @@
|
|||
#define IMPL_SO_SNDBUF 0x1001
|
||||
#define IMPL_SO_SNDLOWAT 0x1003
|
||||
#define IMPL_SO_RCVLOWAT 0x1004
|
||||
#define IMPL_SO_BINDTODEVICE 0x100b
|
||||
#define IMPL_SO_TIMESTAMPNS INTF_SO_TIMESTAMPNS
|
||||
#define IMPL_SO_TIMESTAMPING INTF_SO_TIMESTAMPING
|
||||
#define IMPL_SO_SELECT_ERR_QUEUE INTF_SO_SELECT_ERR_QUEUE
|
||||
|
||||
/* IPPROTO_IP option names */
|
||||
#define INTF_IP_TTL 2
|
||||
|
|
|
@ -198,6 +198,18 @@ void lwp_cleanup(struct rt_thread *tid);
|
|||
case INTF_SO_NO_CHECK:
|
||||
*optname = IMPL_SO_NO_CHECK;
|
||||
break;
|
||||
case INTF_SO_BINDTODEVICE:
|
||||
*optname = IMPL_SO_BINDTODEVICE;
|
||||
break;
|
||||
case INTF_SO_TIMESTAMPNS:
|
||||
*optname = IMPL_SO_TIMESTAMPNS;
|
||||
break;
|
||||
case INTF_SO_TIMESTAMPING:
|
||||
*optname = IMPL_SO_TIMESTAMPING;
|
||||
break;
|
||||
case INTF_SO_SELECT_ERR_QUEUE:
|
||||
*optname = IMPL_SO_SELECT_ERR_QUEUE;
|
||||
break;
|
||||
|
||||
/*
|
||||
* SO_DONTLINGER (*level = ((int)(~SO_LINGER))),
|
||||
|
@ -3126,6 +3138,11 @@ static int netflags_muslc_2_lwip(int flags)
|
|||
{
|
||||
flgs |= MSG_MORE;
|
||||
}
|
||||
if (flags & MSG_ERRQUEUE)
|
||||
{
|
||||
flgs |= MSG_ERRQUEUE;
|
||||
}
|
||||
|
||||
return flgs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue