mirror of
https://github.com/esp8266/Arduino.git
synced 2025-09-11 05:52:31 +03:00
Migrate from astyle to clang-format (#8464)
This commit is contained in:
committed by
Max Prokhorov
parent
46190b61f1
commit
19b7a29720
@@ -22,7 +22,7 @@ public:
|
||||
NetdumpIP();
|
||||
|
||||
NetdumpIP(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet);
|
||||
NetdumpIP(const uint8_t *address, bool V4 = true);
|
||||
NetdumpIP(const uint8_t* address, bool V4 = true);
|
||||
NetdumpIP(const IPAddress& ip);
|
||||
NetdumpIP(const String& ip);
|
||||
|
||||
@@ -31,15 +31,20 @@ public:
|
||||
return rawip[index];
|
||||
}
|
||||
|
||||
bool fromString(const char *address);
|
||||
bool fromString(const char* address);
|
||||
|
||||
String toString();
|
||||
|
||||
private:
|
||||
enum class IPversion {UNSET, IPV4, IPV6};
|
||||
enum class IPversion
|
||||
{
|
||||
UNSET,
|
||||
IPV4,
|
||||
IPV6
|
||||
};
|
||||
IPversion ipv = IPversion::UNSET;
|
||||
|
||||
uint8_t rawip[16] = {0};
|
||||
uint8_t rawip[16] = { 0 };
|
||||
|
||||
void setV4()
|
||||
{
|
||||
@@ -70,14 +75,15 @@ private:
|
||||
return (ipv != IPversion::UNSET);
|
||||
};
|
||||
|
||||
bool compareRaw(IPversion v, const uint8_t* a, const uint8_t* b) const;
|
||||
bool compareRaw(IPversion v, const uint8_t* a, const uint8_t* b) const;
|
||||
bool compareIP(const IPAddress& ip) const;
|
||||
bool compareIP(const NetdumpIP& nip) const;
|
||||
|
||||
bool fromString4(const char *address);
|
||||
bool fromString6(const char *address);
|
||||
bool fromString4(const char* address);
|
||||
bool fromString6(const char* address);
|
||||
|
||||
size_t printTo(Print& p);
|
||||
|
||||
public:
|
||||
bool operator==(const IPAddress& addr) const
|
||||
{
|
||||
@@ -95,9 +101,8 @@ public:
|
||||
{
|
||||
return !compareIP(addr);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
} // namespace NetCapture
|
||||
} // namespace NetCapture
|
||||
|
||||
#endif /* LIBRARIES_ESPGOODIES_HR_SRC_NETDUMP_NETDUMPIP_H_ */
|
||||
|
Reference in New Issue
Block a user