Table of Contents

Class PacketLogger

Namespace
VpnHood.Core.Tunneling.Utils
Assembly
VpnHood.Core.Tunneling.dll

Provides the logging of packets, by their protocol, where the log takes trace lines.

public static class PacketLogger
Inheritance
PacketLogger
Inherited Members

Methods

LogPacket(IpPacket, string, LogLevel, Exception?, EventId?)

Logs a packet with a message, under its protocol's event ID; it does nothing unless the log takes trace lines.

public static void LogPacket(IpPacket ipPacket, string message, LogLevel logLevel = LogLevel.Trace, Exception? exception = null, EventId? eventId = null)

Parameters

ipPacket IpPacket

The packet.

message string

The message.

logLevel LogLevel

The line's level. The default is Trace.

exception Exception

The error to log with it, or null.

eventId EventId?

The event ID, or null for the packet's protocol's, or the packet's own for a fragment or another protocol. A line with a NetFilterException takes the filter's event ID whatever this says.