mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user