Remove duplicate function

This commit is contained in:
dmiller 2026-07-17 21:56:26 +00:00
parent 4b28eed0f0
commit 2e183c5f93
2 changed files with 4 additions and 13 deletions

View file

@ -76,7 +76,7 @@
#include "output.h"
#include "stats.h"
#include "common_modified.h"
#include "utils_net.h"
/** Constructor */
@ -650,26 +650,18 @@ const char *NpingTarget::getNextHopIPStr(){
} /* End of getNextHopIPStr() */
const char *NpingTarget::getMACStr(u8 *mac){
static char buffer[256];
assert(mac!=NULL);
sprintf(buffer, "%02x:%02x:%02x:%02x:%02x:%02x", (u8)mac[0],(u8)mac[1],
(u8)mac[2], (u8)mac[4],(u8)mac[4],(u8)mac[5]);
return buffer;
}
const char *NpingTarget::getTargetMACStr(){
return getMACStr(this->MACaddress);
return MACtoa(this->MACaddress);
}
const char *NpingTarget::getSourceMACStr(){
return getMACStr(this->SrcMACaddress);
return MACtoa(this->SrcMACaddress);
}
const char *NpingTarget::getNextHopMACStr(){
return getMACStr(this->NextHopMACaddress);
return MACtoa(this->NextHopMACaddress);
}

View file

@ -201,7 +201,6 @@ class NpingTarget {
const char *getSourceIPStr();
const char *getSpoofedSourceIPStr();
const char *getNextHopIPStr();
const char *getMACStr(u8 *mac);
const char *getTargetMACStr();
const char *getSourceMACStr();
const char *getNextHopMACStr();