/// ************************************************************************ /// Copyright (C) 2001, Patrick Charles and Jonas Lehmann * /// Distributed under the Mozilla Public License * /// http://www.mozilla.org/NPL/MPL-1.1.txt * /// ************************************************************************* /// namespace SharpPcap.Packets { /// IP protocol field encoding information. /// /// public struct UDPFields_Fields{ /// Length of a UDP port in bytes. public readonly static int UDP_PORT_LEN = 2; /// Length of the header length field in bytes. public readonly static int UDP_LEN_LEN = 2; /// Length of the checksum field in bytes. public readonly static int UDP_CSUM_LEN = 2; /// Position of the source port. public readonly static int UDP_SP_POS = 0; /// Position of the destination port. public readonly static int UDP_DP_POS; /// Position of the header length. public readonly static int UDP_LEN_POS; /// Position of the header checksum length. public readonly static int UDP_CSUM_POS; /// Length of a UDP header in bytes. public readonly static int UDP_HEADER_LEN; // == 8 static UDPFields_Fields() { UDP_DP_POS = UDPFields_Fields.UDP_PORT_LEN; UDP_LEN_POS = UDPFields_Fields.UDP_DP_POS + UDPFields_Fields.UDP_PORT_LEN; UDP_CSUM_POS = UDPFields_Fields.UDP_LEN_POS + UDPFields_Fields.UDP_LEN_LEN; UDP_HEADER_LEN = UDPFields_Fields.UDP_CSUM_POS + UDPFields_Fields.UDP_CSUM_LEN; } } public interface UDPFields { //UPGRADE_NOTE: Members of interface 'UDPFields' were extracted into structure 'UDPFields_Fields'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1045'" // field lengths // field positions // complete header length } }