netutils: add NETLIB_SOCK_TYPE for AF_RPMSG

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-09-02 17:59:50 +08:00 committed by Xiang Xiao
parent 5a5448df04
commit 5c1626c764

View File

@ -110,6 +110,8 @@
# define NETLIB_SOCK_FAMILY AF_INET # define NETLIB_SOCK_FAMILY AF_INET
#elif defined(CONFIG_NET_NETLINK) #elif defined(CONFIG_NET_NETLINK)
# define NETLIB_SOCK_FAMILY AF_NETLINK # define NETLIB_SOCK_FAMILY AF_NETLINK
#elif defined(CONFIG_NET_RPMSG)
# define NETLIB_SOCK_FAMILY AF_RPMSG
#else #else
# define NETLIB_SOCK_FAMILY AF_UNSPEC # define NETLIB_SOCK_FAMILY AF_UNSPEC
#endif #endif
@ -162,6 +164,8 @@
# define NETLIB_SOCK_TYPE SOCK_RAW # define NETLIB_SOCK_TYPE SOCK_RAW
#elif NETLIB_SOCK_FAMILY == AF_NETLINK #elif NETLIB_SOCK_FAMILY == AF_NETLINK
# define NETLIB_SOCK_TYPE SOCK_DGRAM # define NETLIB_SOCK_TYPE SOCK_DGRAM
#elif NETLIB_SOCK_FAMILY == AF_RPMSG
# define NETLIB_SOCK_TYPE SOCK_STREAM
#endif #endif
/**************************************************************************** /****************************************************************************