mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Refactor IPAddr v4 initialization from string. (fixes #775)
Revived code from old dotted_to_addr function to parse the dotted address string directly instead of canonicalizing and passing to inet_pton.
This commit is contained in:
parent
d887eb3178
commit
c84394d07f
2 changed files with 11 additions and 44 deletions
|
@ -261,14 +261,6 @@ public:
|
|||
|
||||
unsigned int MemoryAllocation() const { return padded_sizeof(*this); }
|
||||
|
||||
/**
|
||||
* Returns a canonicalized IPv4 dotted-decimal string such that
|
||||
* leading zeroes of each decimal part are removed.
|
||||
*
|
||||
* @param s String containing an IPv4 address in dotted-decimal notation.
|
||||
*/
|
||||
static std::string CanonIPv4(const std::string& s);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Initializes an address instance from a string representation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue