*: fix SO_BINDTODEVICE. Kernel wants at least IFNAMSIZ bytes there.

This commit is contained in:
Denis Vlasenko
2008-12-10 11:12:16 +00:00
parent 0d94820adf
commit e53738558f
5 changed files with 21 additions and 6 deletions

View File

@@ -437,6 +437,7 @@ ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to,
* Turn it on before you call bind(). */
void setsockopt_reuseaddr(int fd) FAST_FUNC; /* On Linux this never fails. */
int setsockopt_broadcast(int fd) FAST_FUNC;
int setsockopt_bindtodevice(int fd, const char *iface) FAST_FUNC;
/* NB: returns port in host byte order */
unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) FAST_FUNC;
typedef struct len_and_sockaddr {