Messages in this thread | | | Subject | Re: [PATCH 2/5] AF_UNIX: enable/disable multicast with getsockopt/setsockopt | From | Eric Dumazet <> | Date | Fri, 24 Sep 2010 19:46:28 +0200 |
| |
Le vendredi 24 septembre 2010 à 18:25 +0100, Alban Crequy a écrit : > Multicast can be enabled or disabled after a socket is allocated but this > cannot be changed once the socket is bound or connected. > > Userspace applications can enable multicast on an Unix stream socket: > sockfd = socket(AF_UNIX, SOCK_STREAM, 0); > #define UNIX_MULTICAST 1 > val = 1; > len = sizeof(val); > ret = setsockopt(sockfd, 0, UNIX_MULTICAST, &val, len); > > Signed-off-by: Alban Crequy <alban.crequy@collabora.co.uk>
> + if (val != 0) { > + u->multicast = 1; > + } else { > + u->multicast = 0; > + }
u->multicast = !!val;
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |