/*
net_socket.c -- Handle various kinds of sockets.
Copyright (C) 1998-2005 Ivo Timmermans,
- 2000-2017 Guus Sliepen <guus@tinc-vpn.org>
+ 2000-2018 Guus Sliepen <guus@tinc-vpn.org>
2006 Scott Lamb <slamb@slamb.org>
2009 Florian Forster <octo@verplant.org>
}
#else /* if !defined(SOL_SOCKET) || !defined(SO_BINDTODEVICE) */
+ (void)sd;
logger(DEBUG_ALWAYS, LOG_WARNING, "%s not supported on this platform", "BindToInterface");
#endif
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ);
+ ifr.ifr_ifrn.ifrn_name[IFNAMSIZ - 1] = 0;
if(setsockopt(nfd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr))) {
closesocket(nfd);
send_id(c);
}
-static void do_outgoing_pipe(connection_t *c, char *command) {
+static void do_outgoing_pipe(connection_t *c, const char *command) {
#ifndef HAVE_MINGW
int fd[2];
exit(result);
#else
+ (void)c;
+ (void)command;
logger(DEBUG_ALWAYS, LOG_ERR, "Proxy type exec not supported on this platform!");
return;
#endif
}
void setup_outgoing_connection(outgoing_t *outgoing, bool verbose) {
+ (void)verbose;
timeout_del(&outgoing->ev);
node_t *n = outgoing->node;
new connection
*/
void handle_new_meta_connection(void *data, int flags) {
+ (void)flags;
listen_socket_t *l = data;
connection_t *c;
sockaddr_t sa;
accept a new UNIX socket connection
*/
void handle_new_unix_connection(void *data, int flags) {
+ (void)flags;
io_t *io = data;
connection_t *c;
sockaddr_t sa;