🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4948

ping.h

#4948
From: PaoloItaly
Date: Fri, 19 Nov 2004 11:41
58 lines
2223 bytes
//
// Ping.h
//

#pragma pack(1)

#define ICMP_ECHOREPLY 0
#define ICMP_ECHOREQ 8

// IP Header -- RFC 791
typedef struct tagIPHDR
{
 u_char  VIHL;   // Version and IHL
 u_char TOS;   // Type Of Service
 short TotLen;   // Total Length
 short ID;    // Identification
 short FlagOff;  // Flags and Fragment Offset
 u_char TTL;   // Time To Live
 u_char Protocol;  // Protocol
 u_short Checksum;  // Checksum
 struct in_addr iaSrc; // Internet Address - Source
 struct in_addr iaDst; // Internet Address - Destination
}IPHDR, *PIPHDR;


// ICMP Header - RFC 792
typedef struct tagICMPHDR
{
 u_char Type;   // Type
 u_char Code;   // Code
 u_short Checksum;  // Checksum
 u_short ID;    // Identification
 u_short Seq;   // Sequence
 char Data;   // Data
}ICMPHDR, *PICMPHDR;


#define REQ_DATASIZE 32  // Echo Request Data size

// ICMP Echo Request
typedef struct tagECHOREQUEST
{
 ICMPHDR icmpHdr;
 DWORD dwTime;
 char cData[REQ_DATASIZE];
}ECHOREQUEST, *PECHOREQUEST;


// ICMP Echo Reply
typedef struct tagECHOREPLY
{
 IPHDR ipHdr;
 ECHOREQUEST echoRequest;
 char    cFiller[256];
}ECHOREPLY, *PECHOREPLY;


#pragma pack()
Technical Details
Message-ID: <419ddc1b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.zanker.org!news.cambrium.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <cnfa3m$5vd$04$1@news.t-online.com> <cnkjuq$jdg$02$1@news.t-online.com> <419dd94f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b1ce8267f0044ee3
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "PaoloItaly" <paolot@FAKETHESPAMMERsirius-es.it>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <cnfa3m$5vd$04$1@news.t-online.com> <cnkjuq$jdg$02$1@news.t-online.com> <419dd94f@newsgroups.borland.com>
Subject: ping.h
Date: Fri, 19 Nov 2004 12:41:49 +0100
Lines: 61
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 85.32.246.173
Message-ID: <419ddc1b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1100864539 85.32.246.173 (19 Nov 2004 03:42:19 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.zanker.org!news.cambrium.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail