Re: [Haskell-cafe] Re: Low-level networking [Haskell not ready for Foo]
On Sat, Jan 10, 2009 at 5:20 AM, Andrew Coppin wrote: > Dominic Steinitz wrote: >> >> John Goerzen complete.org> writes: >> Any idea how I get Haskell to send ICMP ECHO packets? (And, obviously, receive the replies.) >>> >>> SocketType claims to support Raw, which I think is the conventional >>> means for doing this. Whether all the infrastructure for that is there, >>> I don't know. I have never worked with raw sockets though, so I may be >>> leading you down a dark mugger-laden alley here >> >> Here's an example of a Haskell version of ping, now sadly bit-rotted. >> >> Dominic. >> >> http://haskell.org/networktools/src/ping/test.hs >> > > I have a worrying feeling this might be too Unix-specific to work on > Windows. But I guess it's a start... > If you want to "ping" on windows, you need to use IcmpCreateFile, IcmpSendEcho, IcmpCloseFile for IPv4 or for IPv6, use the Icmp6CreateFile, Icmp6SendEcho2, and Icmp6ParseReplies which are part of iphlpapi, should be fairly trivial to use the loadLibrary and getProcAddress functions from System.Win32.DLL module to access these. -Jeff ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Low-level networking [Haskell not ready for Foo]
Dominic Steinitz wrote: John Goerzen complete.org> writes: Any idea how I get Haskell to send ICMP ECHO packets? (And, obviously, receive the replies.) SocketType claims to support Raw, which I think is the conventional means for doing this. Whether all the infrastructure for that is there, I don't know. I have never worked with raw sockets though, so I may be leading you down a dark mugger-laden alley here Here's an example of a Haskell version of ping, now sadly bit-rotted. Dominic. http://haskell.org/networktools/src/ping/test.hs I have a worrying feeling this might be too Unix-specific to work on Windows. But I guess it's a start... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Low-level networking [Haskell not ready for Foo]
John Goerzen complete.org> writes: > > Any idea how I get Haskell to send ICMP ECHO packets? (And, obviously, > > receive the replies.) > > SocketType claims to support Raw, which I think is the conventional > means for doing this. Whether all the infrastructure for that is there, > I don't know. I have never worked with raw sockets though, so I may be > leading you down a dark mugger-laden alley here Here's an example of a Haskell version of ping, now sadly bit-rotted. Dominic. http://haskell.org/networktools/src/ping/test.hs http://haskell.org/networktools/src/ping/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe