X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FDefaultBundle%2FIpV4Packet.cc;h=b88987bc828189ac2b08a4033a5bbd48cdb11ed0;hb=81ffa1c459b96dd44472bcef37e1e373934ee138;hp=aa5018c9cf967e3ca6d64e68a06208692065519a;hpb=1f3b4447179d0cd771037d02b9a5671eeaaaec8d;p=senf.git diff --git a/Packets/DefaultBundle/IpV4Packet.cc b/Packets/DefaultBundle/IpV4Packet.cc index aa5018c..b88987b 100644 --- a/Packets/DefaultBundle/IpV4Packet.cc +++ b/Packets/DefaultBundle/IpV4Packet.cc @@ -45,12 +45,6 @@ namespace { prefix_ void senf::IpV4PacketType::dump(packet p, std::ostream & os) { - struct in_addr in; - in.s_addr = htonl(p->source()); - char buffer[128]; - std::string src (inet_ntop(AF_INET,&in,buffer,128)); - in.s_addr = htonl(p->destination()); - std::string dst (inet_ntop(AF_INET,&in,buffer,128)); os << "Internet protocol Version 4:\n" << " version : " << p->version() << "\n" << " IHL : " << p->ihl() << "\n" @@ -63,8 +57,8 @@ prefix_ void senf::IpV4PacketType::dump(packet p, std::ostream & os) << " TTL : " << unsigned(p->ttl()) << "\n" << " protocol : " << unsigned(p->protocol()) << "\n" << " CRC : " << std::hex << p->crc() << std::dec << "\n" - << " source : " << src << "\n" - << " destination : " << dst << "\n"; + << " source : " << p->source() << "\n" + << " destination : " << p->destination() << "\n"; } ///////////////////////////////cc.e////////////////////////////////////////