/** * Log the packet. * * @param packet packet to log */ @Override protected void doLogPacket(RawPacket packet, InetSocketAddress target) { if (socket == null || packet == null || target == null) return; // Do not log the packet if it has been processed (and already // logged) by the ice4j stack. if (socket instanceof MultiplexingDatagramSocket) return; PacketLoggingService pktLogging = getPacketLoggingService(); if (pktLogging != null) { pktLogging.logPacket( PacketLoggingService.ProtocolName.RTP, socket.getLocalAddress().getAddress(), socket.getLocalPort(), target.getAddress().getAddress(), target.getPort(), PacketLoggingService.TransportName.UDP, true, packet.getBuffer(), packet.getOffset(), packet.getLength()); } }