зеркало из https://github.com/microsoft/CCF.git
Delete some unused files (#3510)
This commit is contained in:
Родитель
653b648fa1
Коммит
7c6a2b3bbe
46
src/ds/net.h
46
src/ds/net.h
|
@ -1,46 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the Apache 2.0 License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <arpa/inet.h> // For inet_addr()
|
||||
#define FMT_HEADER_ONLY
|
||||
#include <fmt/format.h>
|
||||
#include <optional>
|
||||
|
||||
namespace ds
|
||||
{
|
||||
static constexpr size_t ipv4_binary_size = 4;
|
||||
static constexpr size_t ipv6_binary_size = 16;
|
||||
|
||||
struct IPAddr
|
||||
{
|
||||
char buf[ipv6_binary_size]; // Large enough buffer to hold IPv6
|
||||
size_t size;
|
||||
};
|
||||
|
||||
inline std::optional<IPAddr> ip_to_binary(const char* hostname)
|
||||
{
|
||||
IPAddr ip_bin;
|
||||
ip_bin.size = ipv4_binary_size;
|
||||
if (inet_pton(AF_INET, hostname, ip_bin.buf) != 1)
|
||||
{
|
||||
ip_bin.size = ipv6_binary_size;
|
||||
if (inet_pton(AF_INET6, hostname, ip_bin.buf) != 1)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
}
|
||||
return ip_bin;
|
||||
}
|
||||
|
||||
inline bool is_valid_ip(const char* hostname)
|
||||
{
|
||||
return ip_to_binary(hostname).has_value();
|
||||
}
|
||||
|
||||
inline bool is_valid_ip(const std::string& hostname)
|
||||
{
|
||||
return is_valid_ip(hostname.c_str());
|
||||
}
|
||||
}
|
|
@ -7,7 +7,6 @@
|
|||
#include "ds/cli_helper.h"
|
||||
#include "ds/files.h"
|
||||
#include "ds/logger.h"
|
||||
#include "ds/net.h"
|
||||
#include "ds/non_blocking.h"
|
||||
#include "ds/oversized.h"
|
||||
#include "enclave.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "nodes.h"
|
||||
#include "proposals.h"
|
||||
#include "resharing.h"
|
||||
#include "scripts.h"
|
||||
#include "secrets.h"
|
||||
#include "service.h"
|
||||
#include "service_map.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "crypto/symmetric_key.h"
|
||||
#include "crypto/verifier.h"
|
||||
#include "ds/logger.h"
|
||||
#include "ds/net.h"
|
||||
#include "ds/state_machine.h"
|
||||
#include "enclave/reconfiguration_type.h"
|
||||
#include "enclave/rpc_sessions.h"
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the Apache 2.0 License.
|
||||
#pragma once
|
||||
|
||||
#include "script.h"
|
||||
|
||||
namespace ccf
|
||||
{
|
||||
using Scripts = ServiceMap<std::string, Script>;
|
||||
|
||||
struct GovScriptIds
|
||||
{
|
||||
//! script that applies an accepted "raw puts" proposal
|
||||
static auto constexpr RAW_PUTS = "raw_puts";
|
||||
//! script that sets the environment for a proposal script
|
||||
static auto constexpr ENV_PROPOSAL = "environment_proposal";
|
||||
//! script that decides if a proposal has been accepted
|
||||
static auto constexpr PASS = "pass";
|
||||
};
|
||||
|
||||
struct UserScriptIds
|
||||
{
|
||||
//! script that sets the environment for rpc handler scripts
|
||||
static auto constexpr ENV_HANDLER = "__environment";
|
||||
};
|
||||
}
|
Загрузка…
Ссылка в новой задаче