Advertisement
Ghostriax-Atrocity

MX.h

Apr 11th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #ifndef MX_INCLUDE_HEADER
  2. #define MX_INCLUDE_HEADER
  3.  
  4. struct MX_Information
  5. {
  6. std::string name;
  7. int prefernce;
  8.  
  9. // bool operator==(const std::string & str) { return Function == str; }
  10. bool operator<(const MX_Information& a) { return prefernce < a.prefernce; }
  11. };
  12.  
  13. bool GetOwnMXServers(std::vector<MX_Information>& results);
  14. bool GetMXServers(std::string server, std::vector<MX_Information>& results);
  15.  
  16. static bool MXLookup(const char* name, std::vector<MX_Information>& results);
  17. static bool PtrLookup(const char* name, char* result);
  18. static void GenerateReverseLookupIP(const char* ip, char* result);
  19. static char* Get2LevelDomain(char* domain);
  20.  
  21. #define NOT_A_IP 0xFFFFFFFF
  22. #define PTR_NAME_LENGTH 256
  23.  
  24. static bool SortMxRecords(MX_Information const& lhs, MX_Information const& rhs);
  25. #endif // MX_INCLUDE_HEADER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement