From 97cabcf760b8343512b5646e60cc228b8dc1350a Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Fri, 6 Jul 2007 17:00:24 +0000 Subject: [lib] Add comments regarding setsockopt_multicast_ipv4 arguments. 2007-07-06 Andrew J. Schorr * sockopt.{c,h}: (setsockopt_multicast_ipv4) Add some comments about the arguments. --- lib/ChangeLog | 5 +++++ lib/sockopt.c | 5 +++-- lib/sockopt.h | 7 +++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 3a1d1f6b..2d8e5deb 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2007-07-06 Andrew J. Schorr + + * sockopt.{c,h}: (setsockopt_multicast_ipv4) Add some comments about + the arguments. + 2007-06-01 Andrew J. Schorr * zebra.h: On linux, we seem to need to include before diff --git a/lib/sockopt.c b/lib/sockopt.c index 6ddbded1..f5f1a7ed 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -176,9 +176,10 @@ getsockopt_ipv6_ifindex (struct msghdr *msgh) int setsockopt_multicast_ipv4(int sock, int optname, - struct in_addr if_addr, + struct in_addr if_addr /* required */, unsigned int mcast_addr, - unsigned int ifindex) + unsigned int ifindex /* optional: if non-zero, may be + used instead of if_addr */) { #ifdef HAVE_STRUCT_IP_MREQN_IMR_IFINDEX diff --git a/lib/sockopt.h b/lib/sockopt.h index d88bfa6d..65ba34f1 100644 --- a/lib/sockopt.h +++ b/lib/sockopt.h @@ -79,9 +79,12 @@ extern int setsockopt_ipv6_multicast_loop (int, int); ? SOPT_SIZE_CMSG_PKTINFO_IPV6()) extern int setsockopt_multicast_ipv4(int sock, int optname, - struct in_addr if_addr, + struct in_addr if_addr + /* required: interface to join on */, unsigned int mcast_addr, - unsigned int ifindex); + unsigned int ifindex + /* optional: if non-zero, may be used + instead of if_addr */); /* Ask for, and get, ifindex, by whatever method is supported. */ extern int setsockopt_ifindex (int, int, int); -- cgit v1.2.1