Function dht_insert_node

Synopsis

#include <dht.h>

int dht_insert_node(const unsigned char *id, struct sockaddr *sa, int salen)

Description

No description yet.

Mentioned in

Source

Lines 2439-2451 in dht.c. Line 41 in dht.h.

int
dht_insert_node(const unsigned char *id, struct sockaddr *sa, int salen)
{
    struct node *n;

    if(sa->sa_family != AF_INET && sa->sa_family != AF_INET6) {
        errno = EAFNOSUPPORT;
        return -1;
    }

    n = new_node(id, sa, salen, 0);
    return !!n;
}





Add Discussion as Guest

Log in