[lkml]   [2006]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: SO_REUSEPORT and multicasting
--- Alan Cox <> wrote:
> Linux follows the standards draft. SO_REUSEPORT is
> a fairly obscure BSDism.

Standards are good. I like standards. I was not
aware that SO_REUSEPORT was that obscure. My
programming instructor made it sound like every OS
supports it. I guess he was wrong. Is there a Linux
equivalent to SO_REUSEPORT?

> > Yes. My code works great on HP-UX but does
> > nothing on Linux.
> That doesn't actually prove very much. Its very easy
> to write incorrect
> code that only works on one system, especially when
> endian-ness gets
> involved with network code.

I have written other unicast programs on Linux and
sftp'd them to HP-UX, compiled, and they ran great.
The only change I have to make between Linux and HP-UX
is in the Makefile. I have change the following line:
INCS= -I. -include /usr/include/errno.h #to use fedora

I comment out the -include on the HP-UX and everything
is great.

This multicast application was based on its TCP
brother. The only difference is removing TCP and
installing multicast support.

> In particular if writing portable code you must
> remember to join the
> group. You must also remember that the various
> htons/htonl macros need
> to be correctly used or your code will break on
> little-endian systems.

All of those macros are used in the multicast.c file I
was given.

> The default IP_MULTICAST_LOOP value is probably also
> worth overriding if
> you are being fairly paranoid.

The wrapper I used has a function to set the TTL and
the loop values. I set the TTL to 3 and the loop to


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-06-14 19:52    [W:0.036 / U:9.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site