Package org.jitsi.service.packetlogging
Interface PacketLoggingService
-
public interface PacketLoggingServiceA Packet Logging Service to log packets that were send/received by protocols or any other network related services in various formats. Its for debugging purposes.- Author:
- Damian Minkov
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPacketLoggingService.ProtocolNameThese are the services that this packet logging service cab handle.static classPacketLoggingService.TransportNameThe transport names.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PacketLoggingConfigurationgetConfiguration()Returns the current Packet Logging Configuration.booleanisLoggingEnabled()Determines whether packet logging is globally enabled for this service.booleanisLoggingEnabled(PacketLoggingService.ProtocolName protocol)Determines whether packet logging for a specific protocol is enabled for this service.voidlogPacket(PacketLoggingService.ProtocolName protocol, byte[] sourceAddress, int sourcePort, byte[] destinationAddress, int destinationPort, PacketLoggingService.TransportName transport, boolean sender, byte[] packetContent)Log a packet with all the required information.voidlogPacket(PacketLoggingService.ProtocolName protocol, byte[] sourceAddress, int sourcePort, byte[] destinationAddress, int destinationPort, PacketLoggingService.TransportName transport, boolean sender, byte[] packetContent, int packetOffset, int packetLength)Log a packet with all the required information.
-
-
-
Method Detail
-
isLoggingEnabled
boolean isLoggingEnabled()
Determines whether packet logging is globally enabled for this service.- Returns:
trueif packet logging is globally enabled for this service; otherwise,false
-
isLoggingEnabled
boolean isLoggingEnabled(PacketLoggingService.ProtocolName protocol)
Determines whether packet logging for a specific protocol is enabled for this service.- Parameters:
protocol- the packet logging protocol to check- Returns:
trueif packet logging forprotocolis enabled for this service; otherwise,false
-
logPacket
void logPacket(PacketLoggingService.ProtocolName protocol, byte[] sourceAddress, int sourcePort, byte[] destinationAddress, int destinationPort, PacketLoggingService.TransportName transport, boolean sender, byte[] packetContent)
Log a packet with all the required information.- Parameters:
protocol- the source protocol that logs this packet.sourceAddress- the source address of the packet.sourcePort- the source port of the packet.destinationAddress- the destination address.destinationPort- the destination port.transport- the transport this packet uses.sender- are we the sender of the packet or not.packetContent- the packet content.
-
logPacket
void logPacket(PacketLoggingService.ProtocolName protocol, byte[] sourceAddress, int sourcePort, byte[] destinationAddress, int destinationPort, PacketLoggingService.TransportName transport, boolean sender, byte[] packetContent, int packetOffset, int packetLength)
Log a packet with all the required information.- Parameters:
protocol- the source protocol that logs this packet.sourceAddress- the source address of the packet.sourcePort- the source port of the packet.destinationAddress- the destination address.destinationPort- the destination port.transport- the transport this packet uses.sender- are we the sender of the packet or not.packetContent- the packet content.packetOffset- the packet content offset.packetLength- the packet content length.
-
getConfiguration
PacketLoggingConfiguration getConfiguration()
Returns the current Packet Logging Configuration.- Returns:
- the Packet Logging Configuration.
-
-