.ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM,
.ai_protocol = IPPROTO_TCP,
- .ai_flags = AI_PASSIVE,
+ .ai_flags = AI_PASSIVE | AI_NUMERICSERV,
};
int err = getaddrinfo(NULL, mesh->myport, &hint, &ai);
/*
Configure node_t mesh->self and set up the local sockets (listen only)
*/
-bool setup_myself(meshlink_handle_t *mesh) {
- /* Set some defaults */
-
- mesh->maxtimeout = 900;
-
- /* Done */
-
+static bool setup_myself(meshlink_handle_t *mesh) {
mesh->self->nexthop = mesh->self;
node_add(mesh, mesh->self);