> Hi all,
> Hi all
> I am developing some multicast app on redhat 7.3
> In this app, i created a socket for ipv6 and did bind() the socket to some
> multicast address. But it does not work. I don't know why. I just used
> precompiled ipv6.o module and didn't recompile kernel. I will appreciate any
> comments.
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com
1. multicast socket bind() address in use
I'm having a problem binding to a socket on a multicast addess. I'm
interested
only in reading the multicast address.
Here's what I'm doing:
1. I create a UDP socket
2. I use setsockopt options to set IP_MULTICAST_IF, IP_ADD_MEMBERSHIP,
and SO_REUSEADDR
3. I bind the socket to the multicast address and port number that I'm
interested in
I'm actually doing this twice, because I am interested in two ports -
they
happen to be 1024 and 1026 (immediately following the last reserved port
-
I don't know if this is significant)
I have two linux boxes, both running RH6.0. On one box, I can bind fine
to port 1026 and get the data from the multicast channel, but when it
tries
to bind to 1024 it returns "address already in use." On the other linux
box,
I get the same behavior, except reversed - port 1024 binds ok, but port
1026 says address already in use. I've found that it doesn't matter what
the address is in the sockaddr_in structure that is passed to bind() -
it
could be INADDR_ANY or the particular multicast address that I'm
interested
in, or any other IP address, it still doesn't bind. If I change the port
number
it will bind, but that doesn't do me any good, because the data that I'm
interested in is on ports 1024 and 1026.
Does anyone know how I can force a socket to bind to a particular
address,
regardless of whether something else is bound to it? (When I run netstat
from
the command line, it doesn't appear that anything is using the port
isn't binding)
SO_REUSEADDR doesn't seem to be enough. Does anyone else understand
this any better than I do?
TIA,
Steve
--
-------------------------------------------------------
Research Engineer
Multimedia Communications Research Laboratory
Motorola Labs
-------------------------------------------------------
2. SLIP sl3: transmit timed out, bad line quality(CRASH)
3. Multicast using socket bound to IP looback address
4. Get EzPPP if you're having pppd troubles...!!!
5. binding to a multicast address with multiple listeners
6. How to PICK the CTRL-u argument from the file or some other method, with EXAMPLE
7. HTTPd: could not bind to port 80 bind: Address already in use
9. Binding a single IP Address to two different MAC addresses
10. binding IP Address to MAC Address (newbie)
11. ERROR: can't bind local address: Address already in use ???
12. Multicast bind