randomize00
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
0 deletions
-
include/n2n_typedefs.h
-
src/edge_utils.c
|
|
@ -516,6 +516,9 @@ typedef struct n2n_edge_callbacks { |
|
|
|
|
|
|
|
/* Called periodically in the main loop. */ |
|
|
|
void (*main_loop_period)(n2n_edge_t *eee, time_t now); |
|
|
|
|
|
|
|
/* Called when a new socket to supernode is created. */ |
|
|
|
void (*sock_opened)(n2n_edge_t *eee); |
|
|
|
} n2n_edge_callbacks_t; |
|
|
|
|
|
|
|
typedef struct n2n_tuntap_priv_config { |
|
|
|
|
|
@ -219,6 +219,9 @@ int supernode_connect(n2n_edge_t *eee) { |
|
|
|
return -1; |
|
|
|
} |
|
|
|
|
|
|
|
if(eee->cb.sock_opened) |
|
|
|
eee->cb.sock_opened(eee); |
|
|
|
|
|
|
|
struct sockaddr_in sock; |
|
|
|
sock.sin_family = AF_INET; |
|
|
|
sock.sin_port = htons(eee->curr_sn->sock.port); |
|
|
|