Skip to content

Commit fef180b

Browse files
rlubosmbolivar-nordic
authored andcommitted
[nrf noup]: net: socket: Add SO_RCVTIMEO and SO_BINDTODEVICE options
Socket options symbols were recently introduced upstream, now we just need to complement them with the ones we need. Signed-off-by: Robert Lubos <[email protected]> Signed-off-by: Marti Bolivar <[email protected]> (cherry picked from commit 77ca277) (cherry picked from commit b672601) Signed-off-by: Martí Bolívar <[email protected]>
1 parent b07cc7e commit fef180b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/net/socket.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ static inline char *inet_ntop(sa_family_t family, const void *src, char *dst,
757757
#define SO_REUSEADDR 2
758758
/** sockopt: Async error (ignored, for compatibility) */
759759
#define SO_ERROR 4
760+
#define SO_RCVTIMEO 20
761+
#define SO_BINDTODEVICE 25
760762

761763
/** sockopt: Timestamp TX packets */
762764
#define SO_TIMESTAMPING 37
@@ -780,6 +782,13 @@ static inline char *inet_ntop(sa_family_t family, const void *src, char *dst,
780782
/** sockopt: Enable SOCKS5 for Socket */
781783
#define SO_SOCKS5 60
782784

785+
/* Interface description structure */
786+
#define IFNAMSIZ 64
787+
788+
struct ifreq {
789+
char ifr_name[IFNAMSIZ]; /* Interface name */
790+
};
791+
783792
/** @cond INTERNAL_HIDDEN */
784793
/**
785794
* @brief Registration information for a given BSD socket family.

0 commit comments

Comments
 (0)