prepared auth scheme answer (#597)

This commit is contained in:
Logan oos Even 2021-01-22 21:45:51 +05:45 committed by GitHub
parent dd9491aa9c
commit 2e204adf1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,21 +267,19 @@ typedef enum n2n_pc {
#define IPV4_SIZE 4 #define IPV4_SIZE 4
#define IPV6_SIZE 16 #define IPV6_SIZE 16
#define N2N_AUTH_TOKEN_SIZE 32 /* bytes */ #define N2N_AUTH_TOKEN_SIZE 32 /* bytes */
#define N2N_EUNKNOWN -1 #define N2N_EUNKNOWN -1
#define N2N_ENOTIMPL -2 #define N2N_ENOTIMPL -2
#define N2N_EINVAL -3 #define N2N_EINVAL -3
#define N2N_ENOSPACE -4 #define N2N_ENOSPACE -4
typedef struct n2n_ip_subnet { typedef struct n2n_ip_subnet {
uint32_t net_addr; /* Host order IP address. */ uint32_t net_addr; /* Host order IP address. */
uint8_t net_bitlen; /* Subnet prefix. */ uint8_t net_bitlen; /* Subnet prefix. */
} n2n_ip_subnet_t; } n2n_ip_subnet_t;
typedef struct n2n_sock { typedef struct n2n_sock {
uint8_t family; /* AF_INET or AF_INET6; or 0 if invalid */ uint8_t family; /* AF_INET or AF_INET6; or 0 if invalid */
uint16_t port; /* host order */ uint16_t port; /* host order */
@ -361,6 +359,7 @@ typedef struct n2n_REGISTER_SUPER_ACK {
n2n_ip_subnet_t dev_addr; /**< Assign an IP address to the tuntap adapter of edge. */ n2n_ip_subnet_t dev_addr; /**< Assign an IP address to the tuntap adapter of edge. */
uint16_t lifetime; /**< How long the registration will live */ uint16_t lifetime; /**< How long the registration will live */
n2n_sock_t sock; /**< Sending sockets associated with edgeMac */ n2n_sock_t sock; /**< Sending sockets associated with edgeMac */
n2n_auth_t auth; /**< Authentication scheme and tokens */
/** The packet format provides additional supernode definitions here. /** The packet format provides additional supernode definitions here.
* uint8_t count, then for each count there is one * uint8_t count, then for each count there is one