syntax = "proto3";

message Heartbeat {
    enum Type {
        REQUEST = 0;
        RESPONSE = 1;
    }
    Type message_type = 1;

    bytes meshnet_id = 2;

    string node_fingerprint = 3;

    message Status {
        bytes node = 1;
        uint32 connection_state = 2;
    }
    repeated Status statuses = 4;

    enum NatType {
        UdpBlocked = 1;
        OpenInternet = 2;
        SymmetricUdpFirewall = 3;
        FullCone = 4;
        RestrictedCone = 5;
        PortRestrictedCone = 6;
        Symmetric = 7;
        Unknown = 8;
    }

    NatType nat_type = 5;
}
