Fix standard C++ 11 issues
This commit is contained in:
parent
6a18c72b0c
commit
533868b21e
@ -43,7 +43,7 @@ void printUsage(char*);
|
|||||||
static void daemonize();
|
static void daemonize();
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
char* fileName = "route.conf";
|
char* fileName = (char*)"route.conf";
|
||||||
int op;
|
int op;
|
||||||
|
|
||||||
if (getuid()) {
|
if (getuid()) {
|
||||||
|
@ -55,6 +55,7 @@ class FakeroutePacket {
|
|||||||
public:
|
public:
|
||||||
FakeroutePacket(u_int16_t receivedSourcePort, u_int16_t receivedDestinationPort,
|
FakeroutePacket(u_int16_t receivedSourcePort, u_int16_t receivedDestinationPort,
|
||||||
char* spoofedSourceAddress, char* spoofedDestinationAddress);
|
char* spoofedSourceAddress, char* spoofedDestinationAddress);
|
||||||
|
virtual ~FakeroutePacket();
|
||||||
virtual void sendOn(int fd);
|
virtual void sendOn(int fd);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void TracerouteListener::listen(class TracerouteEvents &tracerouteEvents) {
|
|||||||
|
|
||||||
for (i=0;i<FD_COUNT;i++) {
|
for (i=0;i<FD_COUNT;i++) {
|
||||||
if ((fds[i].revents & POLLIN == POLLIN) ||
|
if ((fds[i].revents & POLLIN == POLLIN) ||
|
||||||
(fds[i].revents & POLLPRI == POLLPRI)) {
|
(fds[i].revents & POLLPRI == POLLPRI)) {
|
||||||
activeFds[index++] = fds[i].fd;
|
activeFds[index++] = fds[i].fd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,10 +44,10 @@
|
|||||||
*/
|
*/
|
||||||
unsigned short in_cksum(unsigned short *addr,int len)
|
unsigned short in_cksum(unsigned short *addr,int len)
|
||||||
{
|
{
|
||||||
register int sum = 0;
|
int sum = 0;
|
||||||
u_short answer = 0;
|
u_short answer = 0;
|
||||||
register u_short *w = addr;
|
u_short *w = addr;
|
||||||
register int nleft = len;
|
int nleft = len;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Our algorithm is simple, using a 32 bit accumulator (sum), we add
|
* Our algorithm is simple, using a 32 bit accumulator (sum), we add
|
||||||
|
Loading…
Reference in New Issue
Block a user