[Openmcl-devel] OSX and CCL sockets problems

Joshua Kordani jkordani at lsa2.com
Thu Dec 11 12:14:11 PST 2014


On 12/11/14 1:59 PM, Ralf Stoye wrote:
> Hi,
> i annotated your paste with a small basic example how to use udp from ccl
>
> http://paste.lisp.org/display/144639#3
>
> Ralf
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>

Thanks for your example!  I've found it to be very informative.  However, on osx, I again run into problem 1 when invoke the code example to distribute the code to all hosts.  The error again is below.

Socket is already connected (error #56) during sendto

I can fix this with the following annotation, but again that is not the behavior described by the ccl docs on what to expect from these calls.

http://paste.lisp.org/display/144639#4


With the process-run-function per your example, on osx, a socket is opened on the 127.0.0.1 interface for port 2380.  when I then use the annotation 4 code example, I see neither my own emission of the packet nor the emission from the device, I see both on wireshark.

I've learned a little more about what is going on with these devices.  When they receive a request for info, they broadcast the packet but to the destination port set to the port the original broadcast was sent from.  Do I read correctly that the :reuse-address option should let me bind two sockets on the same port?  I've been assuming yes, so now what I'm trying to do is bind to listen on a known port before I issue the discovery message.  I'll need to issue the discovery message from the same source port that I expect to receive the device response from.  It seems like reuse-address isn't letting me bind two sockets to the same local port, so there goes that.

So I'm trying something like this here http://pastebin.com/TBhMn7ZW (paste.lisp.org was down, sorry) but I'm getting the below error

network unreachable (error #51) during send-to

but I'm trying to send-to the broadcast address, how will that fail?

Joshua Kordani
LSA Autonomy



More information about the Openmcl-devel mailing list