/// ************************************************************************ /// 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 { /// ICMP protocol field encoding information. /// /// public struct ICMPFields_Fields{ /// Length of the ICMP message type code in bytes. public readonly static int ICMP_CODE_LEN = 1; /// Length of the ICMP subcode in bytes. public readonly static int ICMP_SUBC_LEN = 1; /// Length of the ICMP header checksum in bytes. public readonly static int ICMP_CSUM_LEN = 2; /// Position of the ICMP message type. public readonly static int ICMP_CODE_POS = 0; /// Position of the ICMP message subcode. public readonly static int ICMP_SUBC_POS; /// Position of the ICMP header checksum. public readonly static int ICMP_CSUM_POS; /// Length in bytes of an ICMP header. public readonly static int ICMP_HEADER_LEN; // == 4 static ICMPFields_Fields() { ICMP_SUBC_POS = ICMPFields_Fields.ICMP_CODE_POS + ICMPFields_Fields.ICMP_CODE_LEN; ICMP_CSUM_POS = ICMPFields_Fields.ICMP_SUBC_POS + ICMPFields_Fields.ICMP_CODE_LEN; ICMP_HEADER_LEN = ICMPFields_Fields.ICMP_CSUM_POS + ICMPFields_Fields.ICMP_CSUM_LEN; } } public interface ICMPFields { //UPGRADE_NOTE: Members of interface 'ICMPFields' were extracted into structure 'ICMPFields_Fields'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1045'" // field lengths // field positions // complete header length } }