Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="reply"></param>
 internal PingReply(ICMP_ECHO_REPLY reply)
 {
     Address = new IPAddress(reply.Address);
     Status = (IPStatus)reply.Status;
     Options = new PingOptions(reply);
     if (Status == IPStatus.Success)
     {
         RoundTripTime = reply.RoundTripTime;
         Buffer = new byte[reply.DataSize];
         Marshal.Copy(reply.Data, Buffer, 0, reply.DataSize);
     }
     else
     {
         Buffer = new byte[0];
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="reply"></param>
 internal PingReply(ICMP_ECHO_REPLY reply)
 {
     Address = new IPAddress(reply.Address);
     Status  = (IPStatus)reply.Status;
     Options = new PingOptions(reply);
     if (Status == IPStatus.Success)
     {
         RoundTripTime = reply.RoundTripTime;
         Buffer        = new byte[reply.DataSize];
         Marshal.Copy(reply.Data, Buffer, 0, reply.DataSize);
     }
     else
     {
         Buffer = new byte[0];
     }
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="reply"></param>
 internal PingOptions(ICMP_ECHO_REPLY reply)
 {
     Ttl          = reply.Ttl;
     DontFragment = (reply.Flags & 2) > 0;
 }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="reply"></param>
 internal PingOptions(ICMP_ECHO_REPLY reply)
 {
     Ttl = reply.Ttl;
     DontFragment = (reply.Flags & 2) > 0;
 }