Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man4 Document alternative calling convention for I...
details: https://anonhg.NetBSD.org/src/rev/1f44054c2570
branches: trunk
changeset: 586271:1f44054c2570
user: dyoung <dyoung%NetBSD.org@localhost>
date: Mon Dec 12 07:20:38 2005 +0000
description:
Document alternative calling convention for IP_MULTICAST_IF.
diffstat:
share/man/man4/ip.4 | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 65e2984f273f -r 1f44054c2570 share/man/man4/ip.4
--- a/share/man/man4/ip.4 Mon Dec 12 04:51:55 2005 +0000
+++ b/share/man/man4/ip.4 Mon Dec 12 07:20:38 2005 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ip.4,v 1.16 2003/09/07 16:22:28 wiz Exp $
+.\" $NetBSD: ip.4,v 1.17 2005/12/12 07:20:38 dyoung Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -205,7 +205,18 @@
and
.Dv SIOCGIFFLAGS
ioctls.
-Normal applications should not need to use this option.
+An application may also specify an alternative to the default network interface
+by index:
+.Bd -literal
+struct uint32_t idx = htonl(ifindex);
+setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, \*[Am]idx, sizeof(idx));
+.Ed
+.Pp
+where "ifindex" is an interface index as returned by
+.Xr if_nametoindex 4 .
+.Pp
+Normal applications should not need to use
+.Dv IP_MULTICAST_IF .
.Pp
If a multicast datagram is sent to a group to which the sending host itself
belongs (on the outgoing interface), a copy of the datagram is, by default,
Home |
Main Index |
Thread Index |
Old Index