Browse Source

Added the ability with kill -HUP to let the supernode display registered peers

Improvd supernode help
master
Luca Deri 6 years ago
parent
commit
dffdb6c6f5
  1. 6
      n2n.c
  2. 3
      packages/etc/n2n/supernode.conf
  3. 687
      sn.c

6
n2n.c

@ -265,10 +265,8 @@ void print_n2n_version() {
struct peer_info * find_peer_by_mac(struct peer_info * list, const n2n_mac_t mac) struct peer_info * find_peer_by_mac(struct peer_info * list, const n2n_mac_t mac)
{ {
/* TODO - replace a list with a hashtable */ /* TODO - replace a list with a hashtable */
while(list != NULL) while(list != NULL) {
{ if(0 == memcmp(mac, list->mac_addr, 6)) {
if(0 == memcmp(mac, list->mac_addr, 6))
{
return list; return list;
} }
list = list->next; list = list->next;

3
packages/etc/n2n/supernode.conf

@ -9,3 +9,6 @@
# #
# -l=7777 # -l=7777
# #
# Specify in supernodes.list the list of allowed communities
#
# -c=supernodes.list

687
sn.c

File diff suppressed because it is too large
Loading…
Cancel
Save