1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-24 19:21:35 +01:00

Added Timestamp conversion to std::chrono::microseconds. BaseSniffer is now movable.

This commit is contained in:
Matias Fontanini
2012-11-23 20:30:16 -03:00
parent b74a353c17
commit 75a4bbfed6
8 changed files with 120 additions and 4 deletions

View File

@@ -44,7 +44,7 @@
#include "endianness.h"
#include "network_interface.h"
#include "packet_sender.h"
#include "cxxstd.h"
using namespace std;
@@ -115,7 +115,11 @@ bool Utils::resolve_hwaddr(const NetworkInterface &iface, IPv4Address ip,
IPv4Address my_ip;
NetworkInterface::Info info(iface.addresses());
EthernetII packet = ARP::make_arp_request(iface, ip, info.ip_addr, info.hw_addr);
std::auto_ptr<PDU> response(sender.send_recv(packet));
#if TINS_IS_CXX11
std::unique_ptr<PDU> response(sender.send_recv(packet));
#else
std::auto_ptr<PDU> response(sender.send_recv(packet));
#endif
if(response.get()) {
ARP *arp_resp = response->find_pdu<ARP>();
if(arp_resp)