IPAddress.h 508 B

123456789101112131415161718192021
  1. #ifndef __IPADDRESS_H
  2. #define __IPADDRESS_H
  3. #include <forward_list>
  4. class IPAddress
  5. {
  6. public:
  7. char *IP;
  8. int Length;
  9. IPAddress(const char *ip,int length);
  10. IPAddress();
  11. ~IPAddress();
  12. void Clear();
  13. static bool IsIP(const char *ip); // Is this an IP address? You can't trust the database because it might have been hacked.
  14. IPAddress& operator=(IPAddress& other); // Moves IP from other to this.
  15. IPAddress& operator=(const char *ip);
  16. static int Compare(IPAddress *first,IPAddress *second);
  17. };
  18. #endif