-/* $OpenBSD: inetd.c,v 1.153 2016/03/16 20:16:39 mestre Exp $ */
+/* $OpenBSD: inetd.c,v 1.154 2016/08/25 05:23:19 tedu Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
*/
#define BUFSIZE 4096
-/* ARGSUSED */
void
echo_stream(int s, struct servtab *sep)
{
exit(0);
}
-/* ARGSUSED */
void
echo_dg(int s, struct servtab *sep)
{
(void) sendto(s, buffer, i, 0, (struct sockaddr *)&ss, size);
}
-/* ARGSUSED */
void
discard_stream(int s, struct servtab *sep)
{
exit(0);
}
-/* ARGSUSED */
void
discard_dg(int s, struct servtab *sep)
{
*endring++ = i;
}
-/* ARGSUSED */
void
chargen_stream(int s, struct servtab *sep)
{
exit(0);
}
-/* ARGSUSED */
void
chargen_dg(int s, struct servtab *sep)
{
return (htonl((u_int32_t)tv.tv_sec + 2208988800UL));
}
-/* ARGSUSED */
void
machtime_stream(int s, struct servtab *sep)
{
(void) write(s, &result, sizeof(result));
}
-/* ARGSUSED */
void
machtime_dg(int s, struct servtab *sep)
{
}
/* Return human-readable time of day */
-/* ARGSUSED */
void
daytime_stream(int s, struct servtab *sep)
{
}
/* Return human-readable time of day */
-/* ARGSUSED */
void
daytime_dg(int s, struct servtab *sep)
{