I compiled uftp on OS X 10.9.5 because I'm not allowed to install gcc on the target systems. Target systems are 10.8.5. When I run uftpd on a target system, I get:
$ ./uftpd -d -I en0 -x 52015/01/11 20:12:17.517648: UFTP version 4.6 Copyright (C)2001-2014 Dennis A. Bush
2015/01/11 20:12:34.868112: tos / traffic class byte=002015/01/11 20:12:34.870525: [F2E8C048:0]: Received request from C0A81922 at 192.168.25.34 (192.168.25.34)2015/01/11 20:12:34.870536: [F2E8C048:0]: Using private multicast address 230.5.5.63
2015/01/11 20:12:34.870542: [F2E8C048:0]: grtt=0.532216
2015/01/11 20:12:34.870551: [F2E8C048:0]: send time: 1421028754.868018
2015/01/11 20:12:34.870557: [F2E8C048:0]: receive time: 1421028754.868127
2015/01/11 20:12:34.870573: [F2E8C048:0]: Error joining multicast group: Invalid argument
2015/01/11 20:12:36.369363: tos / traffic class byte=002015/01/11 20:12:36.370545: [F2E8C048:0]: Received request from C0A81922 at 192.168.25.34 (192.168.25.34)2015/01/11 20:12:36.370555: [F2E8C048:0]: Using private multicast address 230.5.5.63
2015/01/11 20:12:36.370561: [F2E8C048:0]: grtt=0.532216
2015/01/11 20:12:36.370569: [F2E8C048:0]: send time: 1421028756.369128
2015/01/11 20:12:36.370574: [F2E8C048:0]: receive time: 1421028756.369378
2015/01/11 20:12:36.370584: [F2E8C048:0]: Error joining multicast group: Invalid argument
I've tried adding a multicast route (route add -net 224.0.0.0/5 192.168....) but that did not help. I will try running on 10.9.5 to see if it works there but won't have access until tomorrow. In the mean time, does anyone have any suggestions?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just tried it from 10.9.5 and 10.10.1 with the same results as before:
$ ./uftpd -d
2015/01/12 10:17:02.552700: UFTP version 4.6 Copyright (C)2001-2014 Dennis A. Bush
2015/01/12 10:17:24.003351: [376E914A:0]: Received request from 8BA9CA23 at <redacted IP addr> (redacted)2015/01/12 10:17:24.003367: [376E914A:0]: Using private multicast address 230.5.5.180
2015/01/12 10:17:24.003386: [376E914A:0]: Error joining multicast group: Invalid argument
The end result is the same whether I specify NO_ENCRYPTION or not, but the compile is cleaner without encryption support and I don't need encryption for my particular use.
Last edit: Kyle Rhorer 2015-01-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's puzzling that you're able to register on the public multicast address but not the private multicast address. I don't have a Mac handy so I can't try this out myself.
Try using different private addresses (-P option on the server) to see if that makes a difference. Also, insert some extra logging right before the call to setsockopt (uftp_common.c:1764) to print the contents of the mreq struct to verify nothing's wrong there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems that the setsockopt() call that's failing is the one at line 1633. I couldn't find the struct definition of group_req to properly print the whole structure. Here is the code starting at line 1630:
Hello,
I compiled uftp on OS X 10.9.5 because I'm not allowed to install gcc on the target systems. Target systems are 10.8.5. When I run uftpd on a target system, I get:
I've tried adding a multicast route (route add -net 224.0.0.0/5 192.168....) but that did not help. I will try running on 10.9.5 to see if it works there but won't have access until tomorrow. In the mean time, does anyone have any suggestions?
Thanks!
Just tried it from 10.9.5 and 10.10.1 with the same results as before:
Here is some additional information:
The end result is the same whether I specify NO_ENCRYPTION or not, but the compile is cleaner without encryption support and I don't need encryption for my particular use.
Last edit: Kyle Rhorer 2015-01-12
It's puzzling that you're able to register on the public multicast address but not the private multicast address. I don't have a Mac handy so I can't try this out myself.
Try using different private addresses (-P option on the server) to see if that makes a difference. Also, insert some extra logging right before the call to setsockopt (uftp_common.c:1764) to print the contents of the mreq struct to verify nothing's wrong there.
It seems that the setsockopt() call that's failing is the one at line 1633. I couldn't find the struct definition of group_req to properly print the whole structure. Here is the code starting at line 1630:
and here is the output:
This is interface 5 (I'm on a different box than before):
Last edit: Kyle Rhorer 2015-01-14
It looks like the MCAST_JOIN_GROUP option doesn't work properly on OSX.
On line 1602 of uftp_common.c is this:
Change it to this:
and this will switch to using IP_ADD_MEMBERSHIP / IP_ADD_SOURCE_MEMBERSHIP to join multicast groups. I'll work on a more permanent fix for this.
Thank you! It is now able to transfer files on the same host via multicast. I will test transfers with multiple machines in the next day or so.