Here's some C source code which should point to the right functions:
https://www.geeksforgeeks.org/ping-in-c/

I think you can just use `#f` for the library -- all the functions
should be from libc.

Sam

On Thu, Apr 2, 2020 at 1:00 PM David Storrs <[email protected]> wrote:
>
> On Thu, Apr 2, 2020 at 12:37 PM George Neuner <[email protected]> wrote:
> >
> >
> > On 4/2/2020 11:13 AM, David Storrs wrote:
> > > The Reference lists TCP and UDP but nothing else.  I'd like to be able
> > > to implement ICMP, since there doesn't seem to be such a thing at the
> > > moment, and I'm trying to figure out how to do that.
> > >
> > > In an ideal world I'd have something like ip-in and ip-out ports as
> > > the complement to tcp-in and tcp-out ports and then I could simply
> > > hand the ip-out port some bytes that constitute an ICMP or etc packet
> > > and away it goes.  Failing that, if I can get a raw socket then I
> > > could do the IP stuff on top of it; with that in hand it would be
> > > (more) straightforward to implement other protocols.
> > >
> > > Is there a way to do this in Racket?
> >
> > Windows historically placed a lot of limitations on the use of raw sockets.
> > https://docs.microsoft.com/en-us/windows/win32/winsock/tcp-ip-raw-sockets-2
> >
> > There doesn't seem to be any updated information on Win10, so you might
> > conclude that it has the same limitations as Win7.
>
> Doesn't surprise me.  Fortunately, I don't need it for Windows, at
> least right now.
>
> > Re: ICMP, I think it should be possible to implement at least some of
> > the functions (not sure about all of them) ... but it will have to be
> > done via FFI.
>
> Cool thanks.  Do you happen to know what library I should be FFI'ing
> into, ideally for macOS?  Trying to find information on using ICMP
> programmatically tends to result in things like:  return
> subprocess("ping hostname")
>
> >
> > George
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to [email protected].
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/bc77f87f-378c-6d5c-3875-3270cb25134b%40comcast.net.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAE8gKodjbeVWqdJRKKYEvYspg%3DDtDTk4GbWQeqHCk4kQ%2BPahZA%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BYVnzqyyJCWRphJK%3DkCWHtDJ2kMpr4_0PZmro_zbSb%2BNQ%40mail.gmail.com.

Reply via email to