aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2023-02-07 13:30:37 +0100
committerVasil Dimov <vd@FreeBSD.org>2023-10-05 15:10:34 +0200
commit6e308651c441cbf8763c67cc099c538c333c2872 (patch)
tree7d4ddc4737c3a19fcb560fc33fe9bfbea56b7f35 /src/net.h
parentc42ded3d9bda8b273780a4a81490bbf1b9e9c261 (diff)
net: move IsReachable() code to netbase and encapsulate it
`vfLimited`, `IsReachable()`, `SetReachable()` need not be in the `net` module. Move them to `netbase` because they will be needed in `LookupSubNet()` to possibly flip the result to CJDNS (if that network is reachable). In the process, encapsulate them in a class. `NET_UNROUTABLE` and `NET_INTERNAL` are no longer ignored when adding or removing reachable networks. This was unnecessary.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/net.h b/src/net.h
index e8e31f72e4..9a517ac332 100644
--- a/src/net.h
+++ b/src/net.h
@@ -160,16 +160,6 @@ enum
/** Returns a local address that we should advertise to this peer. */
std::optional<CService> GetLocalAddrForPeer(CNode& node);
-/**
- * Mark a network as reachable or unreachable (no automatic connects to it)
- * @note Networks are reachable by default
- */
-void SetReachable(enum Network net, bool reachable);
-/** @returns true if the network is reachable, false otherwise */
-bool IsReachable(enum Network net);
-/** @returns true if the address is in a reachable network, false otherwise */
-bool IsReachable(const CNetAddr& addr);
-
bool AddLocal(const CService& addr, int nScore = LOCAL_NONE);
bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE);
void RemoveLocal(const CService& addr);