Thread View: borland.public.cppbuilder.internet.socket
13 messages
13 total messages
Started by Asger Joergensen
Sun, 22 Jun 2008 08:47
How can I Trace the Route to an IP Addres from within my program
Author: Asger Joergensen
Date: Sun, 22 Jun 2008 08:47
Date: Sun, 22 Jun 2008 08:47
9 lines
1178 bytes
1178 bytes
Hi there How can I Trace the Route to an IP Addres from within my program ? I am just playing and trying to learn, so a component with source or an example would be just perfect. Thanks in advance Asger
Re: How can I Trace the Route to an IP Addres from within my program
Author: Dennis Cote
Date: Mon, 23 Jun 2008 14:12
Date: Mon, 23 Jun 2008 14:12
14 lines
1395 bytes
1395 bytes
Asger Joergensen wrote: > > How can I Trace the Route to an IP Addres from within my program ? > > I am just playing and trying to learn, so a component with source > or an example would be just perfect. > There is source for several versions of traceroute, the unix command to trace a route, and other good information at http://www.traceroute.org/#source%20code HTH Dennis Cote
Re: How can I Trace the Route to an IP Addres from within my program
Author: Asger Joergensen
Date: Tue, 24 Jun 2008 16:07
Date: Tue, 24 Jun 2008 16:07
21 lines
1495 bytes
1495 bytes
Hi Dennis Dennis Cote says: > Asger Joergensen wrote: > > > > How can I Trace the Route to an IP Addres from within my program ? > > > > I am just playing and trying to learn, so a component with source > > or an example would be just perfect. > > > > There is source for several versions of traceroute, the unix command to > trace a route, and other good information at > http://www.traceroute.org/#source%20code Thanks, but everything seem to be for unix? Do You know of anything for windows ? Thanks in advance Asger
Re: How can I Trace the Route to an IP Addres from within my program
Author: Bob Gonder
Date: Tue, 24 Jun 2008 20:11
Date: Tue, 24 Jun 2008 20:11
19 lines
1749 bytes
1749 bytes
Asger Joergensen wrote: >> > How can I Trace the Route to an IP Addres from within my program ? >> There is source for several versions of traceroute, the unix command to >> trace a route, and other good information at >> http://www.traceroute.org/#source%20code > >Thanks, but everything seem to be for unix? >Do You know of anything for windows ? Look at the first link in Extras...RFC 1393. Then look back in this group to last week: Date: Thu, 19 Jun 2008 00:49:44 -0500 From: DreamChaser Newsgroups: borland.public.cppbuilder.internet.socket Subject: IP_OPT_RR and IcmpSendEcho() anybody how how? Message-ID: <4859f37d@newsgroups.borland.com>
Re: How can I Trace the Route to an IP Addres from within my program
Author: DreamChaser
Date: Wed, 25 Jun 2008 05:51
Date: Wed, 25 Jun 2008 05:51
91 lines
4240 bytes
4240 bytes
Bob Gonder wrote:
>
> Look at the first link in Extras...RFC 1393.
> Then look back in this group to last week:
>
> Date: Thu, 19 Jun 2008 00:49:44 -0500
> From: DreamChaser
> Newsgroups: borland.public.cppbuilder.internet.socket
> Subject: IP_OPT_RR and IcmpSendEcho() anybody how how?
> Message-ID: <4859f37d@newsgroups.borland.com>
>
Thanks for the shout out Bob, but I haven't gotten IP_OPT_RR to work
yet. Using the pseudo code that Gambit provided I am still getting an
Options Bad error from IcmpSendEcho().
#pragma pack(push,1)
typedef struct {
BYTE cbType;
BYTE cbSize;
BYTE pointer;
IPAddr addresses[62];
} RecordRouteOption, *PRecordRouteOption;
#pragma pack(pop)
HANDLE icmp = IcmpCreateFile();
IPAddr addr;
char *SendData = "Hello";
//This is www.google.com
ipaddr.S_un.S_addr = inet_addr("74.125.47.147");
BYTE options[sizeof(RecordRouteOption)+1] = {0};
PRecordRouteOption option = (PRecordRouteOption) options;
option->type = IP_OPT_RR;
option->length = sizeof(RecordRouteOption);
option->pointer = 4;
(++option)->type = IP_OPT_EOL;
IP_OPTION_INFORMATION info = {0};
info.Ttl = 256;
//info.Tos = ...;
//info.Flags = ...;
info.OptionsSize = sizeof(options);
info.OptionsData = options;
DWORD ReplySize = sizeof(ICMP_ECHO_REPLY) + strlen(SendData);
ICMP_ECHO_REPLY *reply = (ICMP_ECHO_REPLY*) malloc(ReplySize);
...
if( IcmpSendEcho(icmp, addr, SendData, strlen(SendData), &info,
reply, ReplySize, 1000) > 0 ) {
struct in_addr ReplyAddr;
ReplyAddr.S_un.S_addr = reply.Address;
switch (reply.Status) {
case IP_SUCCESS:
S.sprintf("%s Reply from %s: bytes=%d, time=%3dms, TTL=%3d",
Now().FormatString(TIME_FORMAT),
inet_ntoa(ReplyAddr),
reply.DataSize,
reply.RoundTripTime,
reply.Options.Ttl
);
nMaxTime = (reply.RoundTripTime > nMaxTime) ?
reply.RoundTripTime : nMaxTime;
idx = 0xFF;
break;
case IP_TTL_EXPIRED_TRANSIT:
hst = gethostbyaddr((char *) &ReplyAddr, 4, AF_INET);
S.sprintf("\t[Hop:%3d] %15s: Time=%3dms, TOS=%3d, %s",
idx,
inet_ntoa(ReplyAddr),
reply.RoundTripTime,
reply.Options.Tos,
(hst) ? hst->h_name : ""
);
break;
default:
S.sprintf("%s %s %s",
Now().FormatString(TIME_FORMAT),
inet_ntoa(ReplyAddr),
ErrorStrings[reply.Status - IP_STATUS_BASE]
);
idx = 0xFF;
} //EndIf (reply.Status != IP_SUCCESS)
Memo1->Lines->Add(S);
}
...
free(reply);
IcmpCloseHandle(icmp);
Re: How can I Trace the Route to an IP Addres from within my program
Author: Bob Gonder
Date: Wed, 25 Jun 2008 18:37
Date: Wed, 25 Jun 2008 18:37
38 lines
2461 bytes
2461 bytes
DreamChaser wrote:
>Thanks for the shout out Bob, but I haven't gotten IP_OPT_RR to work
>yet. Using the pseudo code that Gambit provided I am still getting an
>Options Bad error from IcmpSendEcho().
>if( IcmpSendEcho(icmp, addr, SendData, strlen(SendData), &info, reply, ReplySize, 1000) > 0 )
1) You don't check if icmp is valid.
2) You pass unitialized addr.
3) You overflow info.Ttl.
4) It might be objecting to the additional IP_OPT_EOL option
following the IP_OPT_RR option.
In addition,
5) ReplyBuffer and ReplySize are too small.
See what else ReplyBuffer needs to hold:
http://msdn.microsoft.com/en-us/library/aa366050(VS.85).aspx
Reply.Data is a pointer past the end of the used array
of ICMP_ECHO_REPLY. It is your memory, not the systems.
I think ReplyBuffer should be (at minimum)
sizeof(ICMP_ECHO_REPLY)+sizeof(options)+sizeof(SendData)+8;
>1 HANDLE icmp = IcmpCreateFile();
> IPAddr addr;
> char *SendData = "Hello";
>
>2 ipaddr.S_un.S_addr = inet_addr("74.125.47.147");
>
> BYTE options[sizeof(RecordRouteOption)+1] = {0};
>
> PRecordRouteOption option = (PRecordRouteOption) options;
>
>4 (++option)->type = IP_OPT_EOL;
>
> IP_OPTION_INFORMATION info = {0};
>3 info.Ttl = 256;
>
Re: How can I Trace the Route to an IP Addres from within my program
Author: Remy Lebeau (TeamB)
Date: Wed, 25 Jun 2008 20:10
Date: Wed, 25 Jun 2008 20:10
10 lines
1206 bytes
1206 bytes
"Asger Joergensen" <junk@Asger-P.dk> wrote in message news:MPG.22c8301ab312798c989a97@newsgroups.borland.com... > How can I Trace the Route to an IP Addres from within my program ? Indy 10 has a TIdTraceRoute component. Gambit
Re: How can I Trace the Route to an IP Addres from within my program
Author: Remy Lebeau (TeamB)
Date: Wed, 25 Jun 2008 20:17
Date: Wed, 25 Jun 2008 20:17
24 lines
1751 bytes
1751 bytes
"DreamChaser" <NO-Spam@No-Span.net> wrote in message
news:4861dce2$1@newsgroups.borland.com...
> Using the pseudo code that Gambit provided I am still
> getting an Options Bad error from IcmpSendEcho().
What EXACTLY is IcmpSendEcho() returning? What EXACTLY is GetLastError()
returning?
> //This is www.google.com
> ipaddr.S_un.S_addr = inet_addr("74.125.47.147");
You can use gethostbyname() for that:
struct hostent *host = gethostbyname("www.google.com");
if( host )
{
ipaddr.S_un.S_addr = ((struc in_addr*)(host->h_addr))->s_addr;
...
}
Gambit
Re: How can I Trace the Route to an IP Addres from within my program
Author: DreamChaser
Date: Fri, 27 Jun 2008 06:12
Date: Fri, 27 Jun 2008 06:12
130 lines
5098 bytes
5098 bytes
I went back and recopied/rewrote the pseudo-code and the replies below
are from the code provided at the end.
Remy Lebeau (TeamB) wrote:
> "DreamChaser" <NO-Spam@No-Span.net> wrote in message
> news:4861dce2$1@newsgroups.borland.com...
>
> What EXACTLY is IcmpSendEcho() returning? What EXACTLY is GetLastError()
> returning?
IcmpSendEcho() returns 0
GetLastError() returns 19 = "Access Denied."
reply->Status returns 11017 = "Option too large."
>
>> //This is www.google.com
>> ipaddr.S_un.S_addr = inet_addr("74.125.47.147");
>
> You can use gethostbyname() for that:
I've had trouble with using this, but I put the minimum code to produce
the error. Do I need to initialize WinSock?
>
> struct hostent *host = gethostbyname("www.google.com");
> if( host )
> {
> ipaddr.S_un.S_addr = ((struc in_addr*)(host->h_addr))->s_addr;
> ...
> }
>
>
> Gambit
>
>
//---------------------------------------------------------------------------
// An array of error message strings.
String ErrorStrings[] = {
"Error Base",
"Buffer too small.",
"Destination net unreachable.",
"Destination host unreachable.",
"Destination protocol unreachable.",
"Destination port unreachable.",
"Out of resources.",
"Bad option.",
"Hardware error.",
"Packet too large.",
"Request timed out.",
"Bad request.",
"Bad route.",
"TTL expired in transit.",
"TTL expired REASSEM.",
"Param problem.",
"Source quench.",
"Option too large.",
"Bad destination.",
"Address deleted.",
"Spec MNU change.",
"MTU change.",
"Unload"
};
#pragma pack(1)
typedef struct {
BYTE cbType;
BYTE cbSize;
BYTE pointer;
IPAddr addresses[62];
} RecordRouteOption, *PRecordRouteOption;
#pragma pack()
//---------------------------------------------------------------------------
iPingTimeout = 2000; //ms
IPAddr addr;
addr = inet_addr("74.125.47.147");
// Setup the option_information structure
HANDLE icmp = IcmpCreateFile();
char *SendData = "Hello";
BYTE options[sizeof(RecordRouteOption)+1] = {0};
PRecordRouteOption option = (PRecordRouteOption) options;
option->cbType = IP_OPT_RR;
option->cbSize = sizeof(RecordRouteOption);
option->pointer = 4;
(++option)->cbSize = IP_OPT_EOL;
IP_OPTION_INFORMATION info = {0};
info.Ttl = 255;
info.OptionsSize = sizeof(options);
info.OptionsData = options;
DWORD ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(options) +
sizeof(SendData) + 8;
ICMP_ECHO_REPLY *reply = (ICMP_ECHO_REPLY*) malloc(ReplySize);
DWORD dwRetVal = IcmpSendEcho(icmp, addr, SendData,
strlen(SendData),
&info, reply, ReplySize,
iPingTimeout);
if (dwRetVal > 0){
struct in_addr ReplyAddr;
ReplyAddr.S_un.S_addr = reply->Address;
S.sprintf("%s Reply from %s: bytes=%d, time=%3dms TTL=%3d",
Now().FormatString(TIME_FORMAT),
inet_ntoa(ReplyAddr),
reply->DataSize,
reply->RoundTripTime,
reply->Options.Ttl
);
Memo1->Lines->Add(S);
} else {
//Error
LPVOID lpMsgBuf;
Memo1->Lines->Add(ErrorStrings[reply->Status - IP_STATUS_BASE]);
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0,
NULL
);
Memo1->Lines->Add((LPTSTR)lpMsgBuf);
// Free the buffer.
LocalFree( lpMsgBuf );
}
free(reply);
IcmpCloseHandle(icmp);
Re: How can I Trace the Route to an IP Addres from within my program
Author: Bob Gonder
Date: Fri, 27 Jun 2008 22:09
Date: Fri, 27 Jun 2008 22:09
216 lines
6118 bytes
6118 bytes
DreamChaser wrote:
>I went back and recopied/rewrote the pseudo-code and the replies below
>are from the code provided at the end.
I'm not sure what I changed, but this C console version works.
I don't seem to have icmpapi.h, so I added my own...
One thing I noticed is you delay calling GetLastError,
perhaps until too late. (Results after the code)
#include <winsock2.h>
#include <iphlpapi.h>
//#include <icmpapi.h>
#include <stdio.h>
//----#include <icmpapi.h>----//
#define __in
#define __inout
HANDLE WINAPI IcmpCreateFile(void);
BOOL WINAPI IcmpCloseHandle(
__in HANDLE IcmpHandle
);
DWORD WINAPI IcmpSendEcho(
__in HANDLE IcmpHandle,
__in IPAddr DestinationAddress,
__in LPVOID RequestData,
__in WORD RequestSize,
__in PIP_OPTION_INFORMATION RequestOptions,
__inout LPVOID ReplyBuffer,
__in DWORD ReplySize,
__in DWORD Timeout
);
//---end #include <icmpapi.h>----//
//---------------------------------------------------------------------------
// An array of error message strings.
char* ErrorStrings[] = {
"Error Base",
"Buffer too small.",
"Destination net unreachable.",
"Destination host unreachable.",
"Destination protocol unreachable.",
"Destination port unreachable.",
"Out of resources.",
"Bad option.",
"Hardware error.",
"Packet too large.",
"Request timed out.",
"Bad request.",
"Bad route.",
"TTL expired in transit.",
"TTL expired REASSEM.",
"Param problem.",
"Source quench.",
"Option too large.",
"Bad destination.",
"Address deleted.",
"Spec MNU change.",
"MTU change.",
"Unload"
};
#pragma pack(1)
typedef struct {
BYTE cbType;
BYTE cbSize;
BYTE pointer;
struct in_addr addresses[62];
} RecordRouteOption, *PRecordRouteOption;
#pragma pack()
void OutputHex( PIP_OPTION_INFORMATION info)
{
PRecordRouteOption op = info->OptionsData;
printf( "InfoAddress:%X\r\n\n", info );
printf( "TimeToLive:%i\r\n"
"TypeOfService:%i\r\n"
"Flags:%X\r\n"
"OptionsSize:%i\r\n"
"OptionsData:%X\r\n",
info->Ttl,info->Tos,info->Flags,info->OptionsSize,info->OptionsData);
if( op )
{
printf( "Type:%i\r\n"
"Size:%i\r\n"
"Pointer:%i\r\n",
op->cbType,op->cbSize,op->pointer);
do{
printf( "IP%i=%X\r\n",op->pointer/4,
op->addresses[(op->pointer/4)-1] );
}while( op->pointer -= 4 );
};
}
//---------------------------------------------------------------------------
int main(void)
{
int iPingTimeout = 2000; //ms
char* SendData = "Hello";
WSADATA wsaData;
int iResult;
HANDLE icmp;
DWORD dwRetVal;
RecordRouteOption option[2] = {0};
IP_OPTION_INFORMATION info = {0};
DWORD ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(option) +
sizeof(SendData) + 8;
ICMP_ECHO_REPLY* reply = (PICMP_ECHO_REPLY) malloc(ReplySize);
info.Ttl = 255;
info.OptionsSize = (UCHAR)sizeof(RecordRouteOption)+1;
info.OptionsData = (PUCHAR)&option[0];
option[0].cbType = IP_OPT_RR;
option[0].cbSize = sizeof(RecordRouteOption);
option[0].pointer = 4;
option[0].cbType = IP_OPT_EOL;
printf("\r\n");
icmp = IcmpCreateFile();
if( !icmp )
{ printf("IcmpCreateFile Failed.\r\n");
};
dwRetVal = IcmpSendEcho(icmp, inet_addr("74.125.47.147"),
SendData, strlen(SendData),
&info, reply, ReplySize, iPingTimeout);
if (dwRetVal > 0){
struct in_addr ReplyAddr;
ReplyAddr.S_un.S_addr = reply->Address;
printf("Reply from %s: bytes=%d, time=%3dms TTL=%3d\r\n",
inet_ntoa(ReplyAddr),
reply->DataSize,
reply->RoundTripTime,
reply->Options.Ttl
);
if( reply->DataSize && reply->Data )
{ printf("Data: %s\r\n", reply->Data );
};
OutputHex( &reply->Options);
} else {
DWORD error = GetLastError();
LPVOID lpMsgBuf;
printf(ErrorStrings[reply->Status - IP_STATUS_BASE]);
printf("\r\n");
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf, 0, NULL );
printf(lpMsgBuf);
printf("\r\n");
// Free the buffer.
LocalFree( lpMsgBuf );
}
printf("\r\n");
IcmpCloseHandle(icmp);
free(reply);
return 0;
}
- - - - - -
C:\RA7\RA7\EXE\TcpTest>icmp_rr
Reply from 74.125.47.147: bytes=5, time= 62ms TTL=242
Data: Hello
InfoAddress:902BB8
TimeToLive:242
TypeOfService:0
Flags:0
OptionsSize:0
OptionsData:902BC0
Type:72
Size:101
Pointer:108
IP27=0
IP26=0
IP25=0
IP24=0
IP23=0
IP22=0
IP21=0
IP20=0
IP19=0
IP18=0
IP17=0
IP16=0
IP15=0
IP14=0
IP13=0
IP12=0
IP11=0
IP10=0
IP9=0
IP8=0
IP7=0
IP6=0
IP5=0
IP4=0
IP3=0
IP2=0
IP1=6F6C
C:\RA7\RA7\EXE\TcpTest>
Since this is further than you've gotten,
I didn't try too hard to understand the returned OptionsData.
Re: How can I Trace the Route to an IP Addres from within my program
Author: DreamChaser
Date: Sat, 28 Jun 2008 05:09
Date: Sat, 28 Jun 2008 05:09
16 lines
1705 bytes
1705 bytes
Bob Gonder wrote:
>
> RecordRouteOption option[2] = {0};
<snip>
> option[0].cbType = IP_OPT_RR;
> option[0].cbSize = sizeof(RecordRouteOption);
> option[0].pointer = 4;
> option[0].cbType = IP_OPT_EOL;
>
Thanks Bob. I will try your code later, but I was wondering if this
should be:
option[1].cbType = IP_OPT_EOL;
Just looks wrong to me to be [0]. I'm just checking. Thanks again.
DC
Re: How can I Trace the Route to an IP Addres from within my program
Author: Bob Gonder
Date: Sat, 28 Jun 2008 23:44
Date: Sat, 28 Jun 2008 23:44
77 lines
3132 bytes
3132 bytes
DreamChaser wrote:
>Bob Gonder wrote:
>> option[0].cbType = IP_OPT_EOL;
>>
>should be:
> option[1].cbType = IP_OPT_EOL;
>
>Just looks wrong to me to be [0]. I'm just checking. Thanks again.
No wonder it "worked" but the output looked wrong.
UCHAR OptionSize = sizeof(RecordRouteOption);
RecordRouteOption option[2] = {0};
IP_OPTION_INFORMATION info = {0};
DWORD ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(option) +
sizeof(SendData) + 8;
ICMP_ECHO_REPLY* reply = (PICMP_ECHO_REPLY) malloc(ReplySize);
info.Ttl = 255;
info.OptionsSize = OptionSize + 1; // IP_OPT_RR + IP_OPT_EOL
info.OptionsData = (PUCHAR)&option[0];
memset(option,0,sizeof(option) );
option[0].cbType = IP_OPT_RR;
option[0].cbSize = OptionSize;
option[0].pointer = 4;
//option[1].cbType = IP_OPT_EOL;
info.OptionsData[ OptionSize ] = IP_OPT_EOL;
Option too large.
An invalid or inconsistent flowspec was found in the QOS structure.
That error is good down to...
UCHAR OptionSize = 3+(10*4);
Then at this, or lower....
UCHAR OptionSize = 3+(9*4);
Request timed out.
Error due to lack of resources.
Then at
UCHAR OptionSize = 3+(0*4); or 64*4 == same thing
Bad option.
There are no senders.
- - -
Changing the IP to a local machine, and OptionSize = 3+(8*4),
Reply from 192.168.0.3: bytes=5, time= 0ms TTL=128
Data: Hello
InfoAddress:902BBC
TimeToLive:128
TypeOfService:0
Flags:0
OptionsSize:36
OptionsData:902BC4
Type:7
Size:35
Pointer:8
IP2=0
IP1=300A8C0
Increasing OptionSize on this "working" version, gives
Option too large.
Changing the IP on this "working" version to non-existant local ip:
Request timed out.
Error due to lack of resources.
- - -
Conclusions:
1) Options maxes out at 9 IP_ADDR
2) It needs some way of getting to the requested IP.
3) Aborts on Vista.
Re: How can I Trace the Route to an IP Addres from within my program
Author: Bob Gonder
Date: Sun, 29 Jun 2008 20:21
Date: Sun, 29 Jun 2008 20:21
71 lines
2835 bytes
2835 bytes
Asger Joergensen wrote:
>Do You know of anything for windows ?
I just worked this up while playing with the ICMP_RR thread.
#include <winsock2.h>
#include <icmpapi.h>
#include <iphlpapi.h>
#pragma pack(1)
typedef struct {
BYTE cbType;
BYTE cbSize;
BYTE pointer;
struct in_addr address;
} RecordRouteOption, *PRecordRouteOption;
void _stdcall TraceRoute( struct in_addr addr )
{
char* SendData = "Hello";
UCHAR TTL = 0;
HANDLE icmp = IcmpCreateFile();
DWORD count;
DWORD ReplySize = sizeof(ICMP_ECHO_REPLY) +
sizeof(RecordRouteOption) +
sizeof("Hello") + 8;
ICMP_ECHO_REPLY* reply = (PICMP_ECHO_REPLY) malloc(ReplySize);
IP_OPTION_INFORMATION info;
struct in_addr LastAddr = {0};
if( (icmp != INVALID_HANDLE_VALUE) && (reply != NULL) )
{
printf("Start trace\r\n");
printf( "\tHops\tReply From\tRoundTrip\n" );
while( LastAddr.s_addr != addr.s_addr )
{
memset( &info, 0, sizeof(info) );
info.Ttl = TTL++;
count = IcmpSendEcho2( icmp, NULL,NULL,NULL,
addr.s_addr, SendData, sizeof("Hello"),
&info, reply, ReplySize, 1000 );
if( count )
{
LastAddr.s_addr = reply->Address;
printf("\t%3d:\t%s:\t%3dms %s\r\n",
info.Ttl,
inet_ntoa(LastAddr),
reply->RoundTripTime,
((reply->DataSize && reply->Data)? reply->Data:" ")
);
}else{
// DWORD error = GetLastError();
// Add error handling if desired
};
if( TTL == 0 )
{
//ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(SendData) + 8;
//Causes destination to be unable to reply (reply too small).
printf( "Unreachable within 255 hops, or Program Error\n");
break;
};
};// while addr
printf("End trace\r\n");
}else{
// report lack of memory or icmp resources
};// if icmp
free( reply );
IcmpCloseHandle(icmp);
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads