mirror of
https://github.com/ntop/n2n.git
synced 2024-04-21 16:31:34 +00:00
added list of currently managed communities to supernode's management port output
This commit is contained in:
@@ -378,6 +378,16 @@ static int process_mgmt(n2n_sn_t * sss,
|
||||
"last reg %lu sec ago\n",
|
||||
(long unsigned int) (now - sss->stats.last_reg_super));
|
||||
|
||||
ressize += snprintf(resbuf+ressize, N2N_SN_PKTBUF_SIZE-ressize,
|
||||
"cur_cmnts");
|
||||
HASH_ITER(hh, sss->communities, community, tmp) {
|
||||
ressize += snprintf(resbuf+ressize, N2N_SN_PKTBUF_SIZE-ressize,
|
||||
" [%s]",
|
||||
community->community);
|
||||
}
|
||||
ressize += snprintf(resbuf+ressize, N2N_SN_PKTBUF_SIZE-ressize,
|
||||
"\n");
|
||||
|
||||
|
||||
r = sendto(sss->mgmt_sock, resbuf, ressize, 0/*flags*/,
|
||||
(struct sockaddr *)sender_sock, sizeof(struct sockaddr_in));
|
||||
|
||||
Reference in New Issue
Block a user