Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003512OCamlOCaml generalpublic2005-03-04 21:112005-03-08 11:41
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003512: Adding SO_REUSEPORT to Unix lib
DescriptionFull_Name: Alon Kama
Version: 3.08-2
OS: OS X (darwin)
Submission from: 85-64-152-87.barak.net.il (85.64.152.87)


On 4.4BSD, In order to use IP Multicasting, the SO_REUSEPORT must be given as a
parameter to setsockopt. On other Unixes and Linux, SO_REUSEADDR is good
enough.

Ocaml 3.08 supports calling SO_REUSEADDR but not SO_REUSEPORT. I've manually
changed the code and added this option, and have verified that it works as
necessary. I'm requesting to add this option to the next release.

Thanks.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000246)
administrator (administrator)
2005-03-08 11:40

> On 4.4BSD, In order to use IP Multicasting, the SO_REUSEPORT must be
> given as a parameter to setsockopt. On other Unixes and Linux,
> SO_REUSEADDR is good enough. Ocaml 3.08 supports calling
> SO_REUSEADDR but not SO_REUSEPORT.

Well, SO_REUSEPORT is a BSD-ism that isn't present everywhere. It is
not in the Single Unix Specification, in particular, and that's the
spec we try to stick to in the OCaml Unix library.

Also, http://www.unixguide.net/network/socketfaq/4.11.shtml [^] quotes
Richard Stevens (someone I tend to listen to) as writing:

  But when binding a multicast address (its main use), SO_REUSEADDR is
  considered identical to SO_REUSEPORT (p. 731, "TCP/IP Illustrated,
  Volume 2"). So for portability of multicasting applications I always
  use SO_REUSEADDR.

So, there might be something non-standard in MacOS X about this.

Regards,

- Xavier Leroy

(0000247)
administrator (administrator)
2005-03-08 11:41

BSDism, not standard enough? XL, 2005-03-08
(0000248)
administrator (administrator)
2005-03-09 08:40

Hello Xavier, thanks for the response.

You're right that it is a BSDism, though I don't believe that Darwin
has any plans to change this. Thus, IP multicast with OCaml is broken
for that platform. I have seen that Ruby and Perl have added this
socket option, as have I for my source-compiled OCaml build. Can you
think of an alternative way to set this option without explicitly
including it in the socket option list?

Thanks,

-Alon.


On Mar 8, 2005, at 12:40, Xavier Leroy wrote:

>> On 4.4BSD, In order to use IP Multicasting, the SO_REUSEPORT must be
>> given as a parameter to setsockopt. On other Unixes and Linux,
>> SO_REUSEADDR is good enough. Ocaml 3.08 supports calling
>> SO_REUSEADDR but not SO_REUSEPORT.
>
> Well, SO_REUSEPORT is a BSD-ism that isn't present everywhere. It is
> not in the Single Unix Specification, in particular, and that's the
> spec we try to stick to in the OCaml Unix library.
>
> Also, http://www.unixguide.net/network/socketfaq/4.11.shtml [^] quotes
> Richard Stevens (someone I tend to listen to) as writing:
>
> But when binding a multicast address (its main use), SO_REUSEADDR is
> considered identical to SO_REUSEPORT (p. 731, "TCP/IP Illustrated,
> Volume 2"). So for portability of multicasting applications I always
> use SO_REUSEADDR.
>
> So, there might be something non-standard in MacOS X about this.
>
> Regards,
>
> - Xavier Leroy


- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker