summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>1999-07-24 13:02:09 +0000
committersheldonh <sheldonh@FreeBSD.org>1999-07-24 13:02:09 +0000
commitb5476660e91e3e554d07a496e5a45b33d40c3577 (patch)
tree1d93ba5d44fa517539307480339390b24904d60e /usr.sbin/inetd
parent6a2357f795976ce206bf0022b03126b6c9c626cb (diff)
downloadFreeBSD-src-b5476660e91e3e554d07a496e5a45b33d40c3577.zip
FreeBSD-src-b5476660e91e3e554d07a496e5a45b33d40c3577.tar.gz
Use comments to group functions by service more clearly. I've used the
excuse of providing the RFC numbers for the associated services.
Diffstat (limited to 'usr.sbin/inetd')
-rw-r--r--usr.sbin/inetd/builtins.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/usr.sbin/inetd/builtins.c b/usr.sbin/inetd/builtins.c
index 73eb879..3c52aa2 100644
--- a/usr.sbin/inetd/builtins.c
+++ b/usr.sbin/inetd/builtins.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: builtins.c,v 1.7 1999/07/23 15:49:14 green Exp $
+ * $Id: builtins.c,v 1.8 1999/07/24 12:35:50 sheldonh Exp $
*
*/
@@ -88,6 +88,11 @@ struct biltin biltins[] = {
{ NULL }
};
+/*
+ * RFC864 Character Generator Protocol. Generates character data without
+ * any regard for input.
+ */
+
void
initring()
{
@@ -171,6 +176,11 @@ chargen_stream(s, sep) /* Character generator */
exit(0);
}
+/*
+ * RFC867 Daytime Protocol. Sends the current date and time as an ascii
+ * character string without any regard for input.
+ */
+
/* ARGSUSED */
void
daytime_dg(s, sep) /* Return human-readable time of day */
@@ -212,6 +222,11 @@ daytime_stream(s, sep) /* Return human-readable time of day */
(void) write(s, buffer, strlen(buffer));
}
+/*
+ * RFC863 Discard Protocol. Any data received is thrown away and no response
+ * is sent.
+ */
+
/* ARGSUSED */
void
discard_dg(s, sep) /* Discard service -- ignore data */
@@ -242,6 +257,11 @@ discard_stream(s, sep) /* Discard service -- ignore data */
exit(0);
}
+/*
+ * RFC862 Echo Protocol. Any data received is sent back to the sender as
+ * received.
+ */
+
/* ARGSUSED */
void
echo_dg(s, sep) /* Echo service -- echo data back */
@@ -280,6 +300,12 @@ echo_stream(s, sep) /* Echo service -- echo data back */
exit(0);
}
+/*
+ * RFC1413 Identification Protocol. Given a TCP port number pair, return a
+ * character string which identifies the owner of that connection on the
+ * server's system. Extended to allow for ~/.fakeid support.
+ */
+
/* ARGSUSED */
void
iderror(lport, fport, s, er)
@@ -436,6 +462,7 @@ printit:
}
/*
+ * RFC738 Time Server.
* Return a machine readable date and time, in the form of the
* number of seconds since midnight, Jan 1, 1900. Since gettimeofday
* returns the number of seconds since midnight, Jan 1, 1970,
@@ -494,6 +521,9 @@ machtime_stream(s, sep)
}
/*
+ * RFC1078 TCP Port Service Multiplexer (TCPMUX). Service connections to
+ * services based on the service name sent.
+ *
* Based on TCPMUX.C by Mark K. Lottor November 1988
* sri-nic::ps:<mkl>tcpmux.c
*/
@@ -578,4 +608,3 @@ tcpmux(s)
strwrite(s, "-Service not available\r\n");
return (NULL);
}
-
OpenPOWER on IntegriCloud