Measure owned endpoint mapping and inbound reachability separately
This commit is contained in:
1 parent
b54307a0df
commit
ff69552a61
51 files changed
+2620
-2483
No files matched your search
@@ -19,6 +19,7 @@ extern "C" {
|
||||
#include <stddef.h>
|
||||
#include "../lib/ll_queue.h"
|
||||
#include "secure_channel.h"
|
||||
#include "address_profile.h"
|
||||
|
||||
struct TOPO_GROUP;
|
||||
struct TOPO_GROUPS;
|
||||
@@ -27,6 +28,7 @@ struct ETCP_LINK;
|
||||
struct NODE_CONN_DIRECT;
|
||||
struct ETCP_CONN;
|
||||
struct UTUN_INSTANCE;
|
||||
struct reality_client_config;
|
||||
|
||||
#define TOPO_ADDR_INTERFACE 0
|
||||
#define TOPO_ADDR_NAT 1
|
||||
@@ -41,6 +43,7 @@ struct UTUN_INSTANCE;
|
||||
#define ADDR_TYPE_NAT_EIM 2
|
||||
#define ADDR_TYPE_NAT_STRICT 3
|
||||
#define ADDR_TYPE_NAT 4 /* за NAT, тип неизвестен */
|
||||
#define ADDR_TYPE_CONTACT 5 /* адрес не изменён, вход требует предварительного контакта */
|
||||
|
||||
#define PROBE_STATUS_NONE 0
|
||||
#define PROBE_STATUS_IN_PROGRESS 1
|
||||
@@ -101,9 +104,15 @@ struct TOPO_CONNECTIVITY {
|
||||
|
||||
#define PING_TTL_TB (86400ULL * 10000ULL)
|
||||
|
||||
struct TOPOMSG_SOCKMETA4 { uint8_t id, config_type, nat_type; } __attribute__((packed));
|
||||
struct TOPOMSG_SOCKMETA4 {
|
||||
uint8_t id, config_type, mapping, inbound;
|
||||
uint8_t evidence_id[8], checked_at[8];
|
||||
} __attribute__((packed));
|
||||
struct TOPOMSG_ADDR4 { uint8_t addr[4]; uint16_t port; uint8_t type, socket_id, protocol; } __attribute__((packed));
|
||||
struct TOPOMSG_SOCKMETA6 { uint8_t id, config_type, nat_type; } __attribute__((packed));
|
||||
struct TOPOMSG_SOCKMETA6 {
|
||||
uint8_t id, config_type, mapping, inbound;
|
||||
uint8_t evidence_id[8], checked_at[8];
|
||||
} __attribute__((packed));
|
||||
struct TOPOMSG_ADDR6 { uint8_t addr[16]; uint16_t port; uint8_t type, socket_id, protocol; } __attribute__((packed));
|
||||
struct TOPOMSG_SUBNET4 { uint8_t addr[4]; uint8_t prefix_length; } __attribute__((packed));
|
||||
struct TOPOMSG_SUBNET6 { uint8_t addr[16]; uint8_t prefix_length; } __attribute__((packed));
|
||||
@@ -134,9 +143,9 @@ struct TOPOMSG_NODE {
|
||||
|
||||
#define TOPOMSG_NODE_HDR_SIZE sizeof(struct TOPOMSG_NODE)
|
||||
|
||||
struct TOPO_SOCKMETA4 { struct TOPO_SOCKMETA4* next; uint8_t id, config_type, nat_type; };
|
||||
struct TOPO_SOCKMETA4 { struct TOPO_SOCKMETA4* next; uint8_t id, config_type; struct address_profile address_profile; };
|
||||
struct TOPO_ADDR4 { struct TOPO_ADDR4* next; uint8_t addr[4]; uint16_t port; uint8_t type, socket_id, protocol; };
|
||||
struct TOPO_SOCKMETA6 { struct TOPO_SOCKMETA6* next; uint8_t id, config_type, nat_type; };
|
||||
struct TOPO_SOCKMETA6 { struct TOPO_SOCKMETA6* next; uint8_t id, config_type; struct address_profile address_profile; };
|
||||
struct TOPO_ADDR6 { struct TOPO_ADDR6* next; uint8_t addr[16]; uint16_t port; uint8_t type, socket_id, protocol; };
|
||||
struct TOPO_SUBNET4 { struct TOPO_SUBNET4* next; uint8_t addr[4]; uint8_t prefix_length; };
|
||||
struct TOPO_SUBNET6 { struct TOPO_SUBNET6* next; uint8_t addr[16]; uint8_t prefix_length; };
|
||||
@@ -269,7 +278,7 @@ void topo_node_ping_update_rtt(struct TOPO_GROUPS* groups, uint64_t node_id, uin
|
||||
uint16_t topo_get_chain_rtt(struct TOPO_GROUP_NODE* nq);
|
||||
|
||||
/* Лимиты буфера подписываемых данных и полного сетевого NODEINFO. */
|
||||
#define TOPO_SIG_MSG_MAX_SIZE 2048
|
||||
#define TOPO_SIG_MSG_MAX_SIZE 8192
|
||||
#define TOPO_NODE_WIRE_MAX_SIZE 16384
|
||||
/* Канонические байты подписи: node_id, ver, timestamp, X25519-ключ, имя,
|
||||
* тип/активность и полные списки сокетов/адресов/Reality. Длина или -1. */
|
||||
|
||||
Reference in new issue
Block a user