This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BSD Style ping for Cygwin


Majid Ansari wrote:
> 
> I am looking for a ping with a
> feature to specify source address on windows ... please let me know if any
> other tool doing that on windows.

In the Winsock Programmer's FAQ, there is source code for doing a ping,
which will let you set the source address.  However, the code doesn't
actually _set_ the address when doing a normal ping, which implies that
the network stack sets this field for you before sending the packet
out.  It may be that it would rewrite that field if you did set it to
something that doesn't match a local interface.

Download the code and try it.  If it works, you can go grab Linux's or
one of the BSD's ping programs and modify it so it can be part of
Cygwin.

	http://tangentsoft.net/wskfaq/examples/rawping.html
-- 
= Winsock Programmer's FAQ: http://tangentsoft.net/wskfaq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]