summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd/builtins.c
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-06-21 11:24:21 +0000
committerjmallett <jmallett@FreeBSD.org>2002-06-21 11:24:21 +0000
commitd7a02c161c69f776423fcdf4997cf87827a27761 (patch)
tree8161e28f04c90be9ff29b963cfdf96aa85d0c95b /usr.sbin/inetd/builtins.c
parent1bb36586265ee32c6ab1b68133d3a8a235aa2dcb (diff)
downloadFreeBSD-src-d7a02c161c69f776423fcdf4997cf87827a27761.zip
FreeBSD-src-d7a02c161c69f776423fcdf4997cf87827a27761.tar.gz
Kill bad whitespace and do some style cleanups as a result of the protoize.
Diffstat (limited to 'usr.sbin/inetd/builtins.c')
-rw-r--r--usr.sbin/inetd/builtins.c50
1 files changed, 20 insertions, 30 deletions
diff --git a/usr.sbin/inetd/builtins.c b/usr.sbin/inetd/builtins.c
index 9cc73b0..8b991be 100644
--- a/usr.sbin/inetd/builtins.c
+++ b/usr.sbin/inetd/builtins.c
@@ -117,11 +117,10 @@ initring(void)
*endring++ = i;
}
+/* Character generator */
/* ARGSUSED */
void
-chargen_dg(int s, struct servtab *sep) /* Character generator */
-
-
+chargen_dg(int s, struct servtab *sep)
{
struct sockaddr_storage ss;
static char *rs;
@@ -155,11 +154,10 @@ chargen_dg(int s, struct servtab *sep) /* Character generator */
(void) sendto(s, text, sizeof(text), 0, (struct sockaddr *)&ss, size);
}
+/* Character generator */
/* ARGSUSED */
void
-chargen_stream(int s, struct servtab *sep) /* Character generator */
-
-
+chargen_stream(int s, struct servtab *sep)
{
int len;
char *rs, text[LINESIZ+2];
@@ -193,11 +191,10 @@ chargen_stream(int s, struct servtab *sep) /* Character generator */
* character string without any regard for input.
*/
+/* Return human-readable time of day */
/* ARGSUSED */
void
-daytime_dg(int s, struct servtab *sep) /* Return human-readable time of day */
-
-
+daytime_dg(int s, struct servtab *sep)
{
char buffer[256];
time_t now;
@@ -219,11 +216,10 @@ daytime_dg(int s, struct servtab *sep) /* Return human-readable time of day */
(struct sockaddr *)&ss, size);
}
+/* Return human-readable time of day */
/* ARGSUSED */
void
-daytime_stream(int s, struct servtab *sep) /* Return human-readable time of day */
-
-
+daytime_stream(int s, struct servtab *sep __unused)
{
char buffer[256];
time_t now;
@@ -239,22 +235,20 @@ daytime_stream(int s, struct servtab *sep) /* Return human-readable time of day
* is sent.
*/
+/* Discard service -- ignore data */
/* ARGSUSED */
void
-discard_dg(int s, struct servtab *sep) /* Discard service -- ignore data */
-
-
+discard_dg(int s, struct servtab *sep)
{
char buffer[BUFSIZE];
(void) read(s, buffer, sizeof(buffer));
}
+/* Discard service -- ignore data */
/* ARGSUSED */
void
-discard_stream(int s, struct servtab *sep) /* Discard service -- ignore data */
-
-
+discard_stream(int s, struct servtab *sep)
{
int ret;
char buffer[BUFSIZE];
@@ -274,11 +268,10 @@ discard_stream(int s, struct servtab *sep) /* Discard service -- ignore data */
* received.
*/
+/* Echo service -- echo data back */
/* ARGSUSED */
void
-echo_dg(int s, struct servtab *sep) /* Echo service -- echo data back */
-
-
+echo_dg(int s, struct servtab *sep)
{
char buffer[65536]; /* Should be sizeof(max datagram). */
int i;
@@ -296,11 +289,10 @@ echo_dg(int s, struct servtab *sep) /* Echo service -- echo data back */
(void) sendto(s, buffer, i, 0, (struct sockaddr *)&ss, size);
}
+/* Echo service -- echo data back */
/* ARGSUSED */
void
-echo_stream(int s, struct servtab *sep) /* Echo service -- echo data back */
-
-
+echo_stream(int s, struct servtab *sep)
{
char buffer[BUFSIZE];
int i;
@@ -325,11 +317,10 @@ echo_stream(int s, struct servtab *sep) /* Echo service -- echo data back */
#define ID_HIDDEN "HIDDEN-USER" /* Hiden at user's request. */
#define ID_UNKNOWN "UNKNOWN-ERROR" /* Everything else. */
+/* Generic ident_stream error-sending func */
/* ARGSUSED */
void
-iderror(int lport, int fport, int s, const char *er) /* Generic ident_stream error-sending func */
-
-
+iderror(int lport, int fport, int s, const char *er)
{
char *p;
@@ -344,11 +335,10 @@ iderror(int lport, int fport, int s, const char *er) /* Generic ident_stream err
exit(0);
}
+/* Ident service (AKA "auth") */
/* ARGSUSED */
void
-ident_stream(int s, struct servtab *sep) /* Ident service (AKA "auth") */
-
-
+ident_stream(int s, struct servtab *sep)
{
struct utsname un;
struct stat sb;
OpenPOWER on IntegriCloud