File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 16
16
#include < string>
17
17
#include < vector>
18
18
19
+ /* *
20
+ * A network type.
21
+ * @note An address may belong to more than one network, for example `10.0.0.1`
22
+ * belongs to both `NET_UNROUTABLE` and `NET_IPV4`.
23
+ * Keep these sequential starting from 0 and `NET_MAX` as the last entry.
24
+ * We have loops like `for (int i = 0; i < NET_MAX; i++)` that expect to iterate
25
+ * over all enum values and also `GetExtNetwork()` "extends" this enum by
26
+ * introducing standalone constants starting from `NET_MAX`.
27
+ */
19
28
enum Network
20
29
{
30
+ // / Addresses from these networks are not publicly routable on the global Internet.
21
31
NET_UNROUTABLE = 0 ,
32
+
33
+ // / IPv4
22
34
NET_IPV4,
35
+
36
+ // / IPv6
23
37
NET_IPV6,
38
+
39
+ // / TORv2
24
40
NET_ONION,
41
+
42
+ // / A set of dummy addresses that map a name to an IPv6 address. These
43
+ // / addresses belong to RFC4193's fc00::/7 subnet (unique-local addresses).
44
+ // / We use them to map a string or FQDN to an IPv6 address in CAddrMan to
45
+ // / keep track of which DNS seeds were used.
25
46
NET_INTERNAL,
26
47
48
+ // / Dummy value to indicate the number of NET_* constants.
27
49
NET_MAX,
28
50
};
29
51
You can’t perform that action at this time.
0 commit comments