1
0

nmap.h 448 B

123456789101112131415161718192021
  1. #ifndef HV_NMAP_H_
  2. #define HV_NMAP_H_
  3. #include <map>
  4. #include "hexport.h"
  5. #include "hsocket.h"
  6. // addr => 0:down 1:up
  7. typedef std::map<uint32_t, int> Nmap;
  8. // ip = segment + host
  9. // segment16: 192.168.x.x
  10. // segment24: 192.168.1.x
  11. // @return up_cnt
  12. HV_EXPORT int nmap_discover(Nmap* nmap);
  13. HV_EXPORT int segment_discover(const char* segment16, Nmap* nmap);
  14. HV_EXPORT int host_discover(const char* segment24, Nmap* nmap);
  15. #endif // HV_NMAP_H_