-
Notifications
You must be signed in to change notification settings - Fork 8.3k
drivers: nsos: Add support for AF_UNIX and AF_PACKET families #80557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,7 @@ | |
| IPPROTO_IP = 0, /**< IP protocol (pseudo-val for setsockopt() */ | ||
| IPPROTO_ICMP = 1, /**< ICMP protocol */ | ||
| IPPROTO_IGMP = 2, /**< IGMP protocol */ | ||
| IPPROTO_ETH_P_ALL = 3, /**< Every packet. from linux if_ether.h */ | ||
| IPPROTO_IPIP = 4, /**< IPIP tunnels */ | ||
| IPPROTO_TCP = 6, /**< TCP protocol */ | ||
| IPPROTO_UDP = 17, /**< UDP protocol */ | ||
|
|
@@ -231,6 +232,12 @@ | |
| uint8_t *sll_addr; /**< Physical-layer address, big endian */ | ||
| }; | ||
|
|
||
| /** Socket address struct for unix socket where address is a pointer */ | ||
| struct sockaddr_un_ptr { | ||
| sa_family_t sun_family; /**< Always AF_UNIX */ | ||
| char *sun_path; /**< pathname */ | ||
| }; | ||
|
Check notice on line 239 in include/zephyr/net/net_ip.h
|
||
|
|
||
| struct sockaddr_can_ptr { | ||
| sa_family_t can_family; | ||
| int can_ifindex; | ||
|
|
@@ -373,14 +380,27 @@ | |
| #endif | ||
| #endif | ||
|
|
||
| #if defined(CONFIG_NET_NATIVE_OFFLOADED_SOCKETS) | ||
| #define UNIX_PATH_MAX 108 | ||
| #undef NET_SOCKADDR_MAX_SIZE | ||
|
||
| /* Define NET_SOCKADDR_MAX_SIZE to be struct of sa_family_t + char[UNIX_PATH_MAX] */ | ||
| #define NET_SOCKADDR_MAX_SIZE (UNIX_PATH_MAX+sizeof(sa_family_t)) | ||
| #if !defined(CONFIG_NET_SOCKETS_PACKET) | ||
|
Check notice on line 388 in include/zephyr/net/net_ip.h
|
||
| #undef NET_SOCKADDR_PTR_MAX_SIZE | ||
| #define NET_SOCKADDR_PTR_MAX_SIZE (sizeof(struct sockaddr_un_ptr)) | ||
| #endif | ||
| #endif | ||
|
|
||
| #if !defined(CONFIG_NET_IPV4) | ||
| #if !defined(CONFIG_NET_IPV6) | ||
| #if !defined(CONFIG_NET_SOCKETS_PACKET) | ||
| #if !defined(CONFIG_NET_NATIVE_OFFLOADED_SOCKETS) | ||
| #define NET_SOCKADDR_MAX_SIZE (sizeof(struct sockaddr_in6)) | ||
| #define NET_SOCKADDR_PTR_MAX_SIZE (sizeof(struct sockaddr_in6_ptr)) | ||
| #endif | ||
| #endif | ||
| #endif | ||
| #endif | ||
|
|
||
| /** @endcond */ | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.