-
Notifications
You must be signed in to change notification settings - Fork 0
IPHeaderUtil Class
Max edited this page Nov 23, 2020
·
2 revisions
File: Petersilie.ManagementTools.NetworkMonitor.IPHeaderUtil.cs
Namespace: Petersilie.ManagementTools.NetworkMonitor
Class for identifying and parsing a Internet Protocol header from a raw stream of bytes.
public static IPVersion GetVersion(byte[] packet)Description: Gets the specific Internet Protocol version from a raw data stream.
Parameter packet: A byte array containing the raw data stream of the header.
Returns: IPVersion enum that indicates which Internet Protocol header is contained in the raw data stream.
Example: IPVersion version = IPHeaderUtil.GetVersion(myByteArray);
public static IIPHeader Parse(byte[] packet)Description: Parses a raw stream of data into an IPv4 or IPv6 header.
Parameter packet: Raw IP packet.
Returns: IPv4Header, IPv6Header or null.
Example: IPv4Header ipv4Header = IPHeaderUtil.Parse(myByteArray);