-std::ostream& operator<<(std::ostream& os, const IPHeader& iph)
-{
- return os
- << "version=" << iph.version
- << " total_len=" << iph.total_len
- << " id=" << iph.id
- << " DF=" << bool(iph.df)
- << " MF=" << bool(iph.mf)
- << " offset=" << unsigned(iph.offset)
- << " TTL=" << unsigned(iph.ttl)
- << " proto=" << unsigned(iph.proto)
- << " checksum=" << iph.checksum
- << " src=" << IPAddr(iph.src)
- << " dst=" << IPAddr(iph.dst);
-}