diff options
author | Jon Atack <jon@atack.com> | 2021-10-06 22:26:18 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-12-07 13:13:18 +0100 |
commit | f0c9e68080432c1ab11b14e571b8dfb7cfe727f8 (patch) | |
tree | d38e4f34d36866bb682fce2926eddf61f7975ca5 /src/netbase.h | |
parent | 084c81c8b6ef4c185cb0554b530fd940fbc631e5 (diff) |
p2p, refactor: tidy up LookupSubNet()
- consistent param naming between function declaration and definition
- brackets, param naming and localvar naming per current standards
in doc/developer-notes.md
- update/improve doxygen documentation in the declaration
- improve comments and other localvar names
- constness
- named args
Diffstat (limited to 'src/netbase.h')
-rw-r--r-- | src/netbase.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/netbase.h b/src/netbase.h index 6a87c338a0..a730626a50 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -169,13 +169,14 @@ CService LookupNumeric(const std::string& name, uint16_t portDefault = 0, DNSLoo * Parse and resolve a specified subnet string into the appropriate internal * representation. * - * @param strSubnet A string representation of a subnet of the form `network - * address [ "/", ( CIDR-style suffix | netmask ) ]`(e.g. - * `2001:db8::/32`, `192.0.2.0/255.255.255.0`, or `8.8.8.8`). - * - * @returns Whether the operation succeeded or not. + * @param[in] subnet_str A string representation of a subnet of the form + * `network address [ "/", ( CIDR-style suffix | netmask ) ]` + * e.g. "2001:db8::/32", "192.0.2.0/255.255.255.0" or "8.8.8.8". + * @param[out] subnet_out Internal subnet representation, if parsable/resolvable + * from `subnet_str`. + * @returns whether the operation succeeded or not. */ -bool LookupSubNet(const std::string& strSubnet, CSubNet& subnet, DNSLookupFn dns_lookup_function = g_dns_lookup); +bool LookupSubNet(const std::string& subnet_str, CSubNet& subnet_out, DNSLookupFn dns_lookup_function = g_dns_lookup); /** * Create a TCP socket in the given address family. |