
Hello, I'm trying to get the IP-header information from an IP-message sent using boost. I can get the message itself by using: void Receiver::wait_for_packet() { socket.async_receive_from(boost::asio::buffer(receive_buffer), remote_endpoint, boost::bind( &Receiver::handle_packet, this, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } void Receiver::handle_packet(const boost::system::error_code& error, int bytes_transferred) { if (error) { //throw boost::system::system_error(error); } std::string message; for (int i = 0; i < bytes_transferred; i++) { message += receive_buffer[i]; } std::string payload(message); Packet packet; packet.set_payload(payload); listener->new_packet_received(packet); wait_for_packet(); } Where "message" is the body of the sent stuff. But how do I get to the IP-header things? I've been looking in doc/html/boost_asio/example/serialization/connection.hpp, but do not really get what to do. BR, /Mats Carlsson