@@ -26,7 +26,11 @@ void ethernet_packet::setEtherType(u_short type){
string ethernet_packet::mac2string(u_char srcmac[]){
-
+ u_char mac[18] ;
+ sprintf((char *)mac, "%02X:%02X:%02X:%02X:%02X:%02X", srcmac[0],
+ srcmac[1],srcmac[2],srcmac[3], srcmac[4],srcmac[5]) ;
+ string macstr((char *) mac) ;
+ return macstr ;
}