From eb87d7939183b7cf35b0148296846b6aceb62689 Mon Sep 17 00:00:00 2001 From: leitner Date: Mon, 5 Feb 2001 19:35:33 +0000 Subject: [PATCH] more man pages, rename socket_mcttl6 to socket_mchopcount6 --- socket.h | 2 +- socket/socket_mchopcount6.3 | 18 ++++++++++++++++++ .../{socket_mcttl6.c => socket_mchopcount6.c} | 2 +- socket/socket_mcleave4.3 | 4 ++-- socket/socket_mcleave6.3 | 4 ++-- socket/socket_mcloop4.3 | 17 +++++++++++++++++ socket/socket_mcloop6.3 | 17 +++++++++++++++++ 7 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 socket/socket_mchopcount6.3 rename socket/{socket_mcttl6.c => socket_mchopcount6.c} (90%) create mode 100644 socket/socket_mcloop4.3 create mode 100644 socket/socket_mcloop6.3 diff --git a/socket.h b/socket.h index f82c16a..7c9c429 100644 --- a/socket.h +++ b/socket.h @@ -41,7 +41,7 @@ extern int socket_mcleave4(int s,const char *groupip); extern int socket_mcleave6(int s,const char *groupip); /* set multicast TTL/hop count for outgoing packets */ extern int socket_mcttl4(int s,char hops); -extern int socket_mcttl6(int s,char hops); +extern int socket_mchopcount6(int s,char hops); /* enable multicast loopback */ extern int socket_mcloop4(int s,char hops); extern int socket_mcloop6(int s,char hops); diff --git a/socket/socket_mchopcount6.3 b/socket/socket_mchopcount6.3 new file mode 100644 index 0000000..401a049 --- /dev/null +++ b/socket/socket_mchopcount6.3 @@ -0,0 +1,18 @@ +.TH socket_mchopcount6 3 +.SH NAME +socket_mchopcount6 \- set multicast hop count +.SH SYNTAX +.B #include + +int \fBsocket_mchopcount6\fP(int \fIs\fR,char \fITTL\fR); +.SH DESCRIPTION +socket_mchopcount6 sets the maximum hop count of outgoing multicast +packets on the socket \fIs\fR. Each router decrements the packet hop +count by one and discards the packet if it reaches zero. Setting the +maximum hop count to 1, for example, will limit the packet propagation +to the LAN. + +If something goes wrong, socket_mchopcount6 returns -1, setting errno +appropriately. +.SH "SEE ALSO" +socket_mcttl4(3), socket_mcjoin4(3), socket_mcleave4(3) diff --git a/socket/socket_mcttl6.c b/socket/socket_mchopcount6.c similarity index 90% rename from socket/socket_mcttl6.c rename to socket/socket_mchopcount6.c index 9c82272..a727108 100644 --- a/socket/socket_mcttl6.c +++ b/socket/socket_mchopcount6.c @@ -11,7 +11,7 @@ #undef LIBC_HAS_IP6 #endif -int socket_mcttl6(int s,char TTL) +int socket_mchopcount6(int s,char TTL) { #ifdef LIBC_HAS_IP6 return setsockopt(s,IPPROTO_IPV6,IPV6_MULTICAST_HOPS,&TTL,sizeof TTL); diff --git a/socket/socket_mcleave4.3 b/socket/socket_mcleave4.3 index 46ca9ed..4bb8b4c 100644 --- a/socket/socket_mcleave4.3 +++ b/socket/socket_mcleave4.3 @@ -4,9 +4,9 @@ socket_mcleave4 \- leave a multicast group .SH SYNTAX .B #include -int \fBsocket_mcleave4\fP(int \fIs\fR, const char \fIgroupip\fR[4], const char \fIinterface\fR[4]); +int \fBsocket_mcleave4\fP(int \fIs\fR, const char \fIgroupip\fR[4]); .SH DESCRIPTION -socket_mcleave4 leaves the IPv4 multicast group \fIgroupip\fR on \fIinterface\fR. +socket_mcleave4 leaves the IPv4 multicast group \fIgroupip\fR. If something goes wrong, socket_mcleave4 returns -1, setting errno appropriately. diff --git a/socket/socket_mcleave6.3 b/socket/socket_mcleave6.3 index 61902a8..afa5c03 100644 --- a/socket/socket_mcleave6.3 +++ b/socket/socket_mcleave6.3 @@ -4,9 +4,9 @@ socket_mcleave6 \- leave a multicast group .SH SYNTAX .B #include -int \fBsocket_mcleave6\fP(int \fIs\fR, const char \fIgroupip\fR[16], uint32 \fIinterface\fR); +int \fBsocket_mcleave6\fP(int \fIs\fR, const char \fIgroupip\fR[16]); .SH DESCRIPTION -socket_mcleave6 leaves the IPv6 multicast group \fIgroupip\fR on \fIinterface\fR. +socket_mcleave6 leaves the IPv6 multicast group \fIgroupip\fR. If something goes wrong, socket_mcleave6 returns -1, setting errno appropriately. diff --git a/socket/socket_mcloop4.3 b/socket/socket_mcloop4.3 new file mode 100644 index 0000000..40c03cc --- /dev/null +++ b/socket/socket_mcloop4.3 @@ -0,0 +1,17 @@ +.TH socket_mcloop4 3 +.SH NAME +socket_mcloop4 \- set multicast loopback +.SH SYNTAX +.B #include + +int \fBsocket_mcloop4\fP(int \fIs\fR,char \fIloop\fR); +.SH DESCRIPTION +socket_mcloop4 activates multicast loopback for the socket \fIs\fR if +\fIloop\fR is non-zero, and deactivates it otherwise. If loopback is +activated, packets sent on this socket will be received on the same +host. + +If something goes wrong, socket_mcloop4 returns -1, setting errno +appropriately. +.SH "SEE ALSO" +socket_mcloop6(3), socket_mcjoin4(3), socket_mcleave4(3) diff --git a/socket/socket_mcloop6.3 b/socket/socket_mcloop6.3 new file mode 100644 index 0000000..cdf5097 --- /dev/null +++ b/socket/socket_mcloop6.3 @@ -0,0 +1,17 @@ +.TH socket_mcloop6 3 +.SH NAME +socket_mcloop6 \- set multicast loopback +.SH SYNTAX +.B #include + +int \fBsocket_mcloop6\fP(int \fIs\fR,char \fIloop\fR); +.SH DESCRIPTION +socket_mcloop6 activates multicast loopback for the socket \fIs\fR if +\fIloop\fR is non-zero, and deactivates it otherwise. If loopback is +activated, packets sent on this socket will be received on the same +host. + +If something goes wrong, socket_mcloop6 returns -1, setting errno +appropriately. +.SH "SEE ALSO" +socket_mcloop4(3), socket_mcjoin6(3), socket_mcleave6(3)