Loading src/its_bridge_server.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -148,12 +148,14 @@ int main(const int32_t p_argc, char* const p_argv[]) { ifr.ifr_addr.sa_family = AF_INET; ifr.ifr_addr.sa_family = AF_INET; snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", udp_nic); snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", udp_nic); #ifndef __APPLE__ #ifndef __APPLE__ /* FIXME To test if (setsockopt(socket_hd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr.ifr_name, strlen(ifr.ifr_name)) < 0) { if (setsockopt(socket_hd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr.ifr_name, strlen(ifr.ifr_name)) < 0) { fprintf(stderr, "Failed to bind to interface:%s.\n", strerror(errno)); fprintf(stderr, "Failed to bind to interface:%s.\n", strerror(errno)); close(socket_hd); close(socket_hd); goto error; goto error; } } printf("Bound to device %s.\n", ifr.ifr_name); printf("Bound to device %s.\n", ifr.ifr_name); */ #endif #endif /* Configure the udp_port and ip we want to receive from */ /* Configure the udp_port and ip we want to receive from */ if (udp_protocol != NULL) { if (udp_protocol != NULL) { Loading Loading
src/its_bridge_server.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -148,12 +148,14 @@ int main(const int32_t p_argc, char* const p_argv[]) { ifr.ifr_addr.sa_family = AF_INET; ifr.ifr_addr.sa_family = AF_INET; snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", udp_nic); snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", udp_nic); #ifndef __APPLE__ #ifndef __APPLE__ /* FIXME To test if (setsockopt(socket_hd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr.ifr_name, strlen(ifr.ifr_name)) < 0) { if (setsockopt(socket_hd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr.ifr_name, strlen(ifr.ifr_name)) < 0) { fprintf(stderr, "Failed to bind to interface:%s.\n", strerror(errno)); fprintf(stderr, "Failed to bind to interface:%s.\n", strerror(errno)); close(socket_hd); close(socket_hd); goto error; goto error; } } printf("Bound to device %s.\n", ifr.ifr_name); printf("Bound to device %s.\n", ifr.ifr_name); */ #endif #endif /* Configure the udp_port and ip we want to receive from */ /* Configure the udp_port and ip we want to receive from */ if (udp_protocol != NULL) { if (udp_protocol != NULL) { Loading