1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Get rid of "using namespace std".

This entails using names like std::vector and std::list rather than bare
vector and list, which was already the prevailing style. The immediate
cause of this is a header file on Solaris 10 that uses a "struct map"
that conflicts with std::map.

In file included from struct_ip.h:40:0,
                 from tcpip.cc:108:
/usr/include/net/if.h:99:9: error: template argument required for 'struct map'
This commit is contained in:
david
2012-03-19 16:48:27 +00:00
parent a85a47d816
commit 9698ccabaf
3 changed files with 23 additions and 26 deletions

View File

@@ -98,11 +98,9 @@
#define __FPENGINE_H__ 1
#include "nsock.h"
#include <list>
#include <vector>
#include "nmap.h"
#include "libnetutil/npacket.h"
using namespace std;
/* Mention some classes here so we don't have to place the declarations in
* the right order (otherwise the compiler complains). */
@@ -176,7 +174,7 @@ class FPNetworkControl {
bool first_pcap_scheduled; /* True if we scheduled the first pcap read event. */
bool nsock_init; /* True if the nsock pool has been initialized. */
int rawsd; /* Raw socket. */
vector<FPHost *> callers; /* List of users of this instance (used for callbacks).*/
std::vector<FPHost *> callers; /* List of users of this instance (used for callbacks).*/
int probes_sent; /* Number of unique probes sent (not retransmissions). */
int responses_recv; /* Number of probe responses received. */
int probes_timedout; /* Number of probes that timeout after all retransms. */
@@ -228,8 +226,8 @@ class FPEngine {
FPEngine();
~FPEngine();
void reset();
virtual int os_scan(vector<Target *> &Targets) = 0;
const char *bpf_filter(vector<Target *> &Targets);
virtual int os_scan(std::vector<Target *> &Targets) = 0;
const char *bpf_filter(std::vector<Target *> &Targets);
};
@@ -242,13 +240,13 @@ class FPEngine {
class FPEngine6 : public FPEngine {
private:
vector<FPHost6 *> fphosts; /* Information about each target to fingerprint */
std::vector<FPHost6 *> fphosts; /* Information about each target to fingerprint */
public:
FPEngine6();
~FPEngine6();
void reset();
int os_scan(vector<Target *> &Targets);
int os_scan(std::vector<Target *> &Targets);
};