SCCS-vsn: libexec/telnetd/telnetd.c 5.44
SCCS-vsn: libexec/telnetd/defs.h 5.7
SCCS-vsn: libexec/telnetd/Makefile 5.9
-# @(#)Makefile 5.8 (Berkeley) %G%
+# @(#)Makefile 5.9 (Berkeley) %G%
SRCS= get_date.c gettytab.c global.c slc.c state.c sys_term.c telnetd.c \
termstat.c utility.c
DPADD= ${LIBUTIL} ${LIBTERM}
SRCS= get_date.c gettytab.c global.c slc.c state.c sys_term.c telnetd.c \
termstat.c utility.c
DPADD= ${LIBUTIL} ${LIBTERM}
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)defs.h 5.6 (Berkeley) %G%
+ * @(#)defs.h 5.7 (Berkeley) %G%
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)telnetd.c 5.43 (Berkeley) %G%";
+static char sccsid[] = "@(#)telnetd.c 5.44 (Berkeley) %G%";
#endif /* not lint */
#include "telnetd.h"
#endif /* not lint */
#include "telnetd.h"
int debug = 0;
char *progname;
int debug = 0;
char *progname;
-#if defined(IP_TOS) && defined(NEED_GETTOS)
-struct tosent {
- char *t_name; /* name */
- char **t_aliases; /* alias list */
- char *t_proto; /* protocol */
- int t_tos; /* Type Of Service bits */
-};
-
-struct tosent *
-gettosbyname(name, proto)
-char *name, *proto;
-{
- static struct tosent te;
- static char *aliasp = 0;
-
- te.t_name = name;
- te.t_aliases = &aliasp;
- te.t_proto = proto;
- te.t_tos = 020; /* Low Delay bit */
- return(&te);
-}
-#endif
-
main(argc, argv)
char *argv[];
{
struct sockaddr_in from;
int on = 1, fromlen;
#ifdef IP_TOS
main(argc, argv)
char *argv[];
{
struct sockaddr_in from;
int on = 1, fromlen;
#ifdef IP_TOS
#endif /* IP_TOS */
pfrontp = pbackp = ptyobuf;
#endif /* IP_TOS */
pfrontp = pbackp = ptyobuf;
- if ((tp = gettosbyname("telnet", "tcp")) &&
- (setsockopt(0, IPPROTO_IP, IP_TOS, &tp->t_tos, sizeof(int)) < 0))
+#ifdef CRAY
+ if (tp = gettosbyname("telnet", "tcp"))
+ tos = tp->t_tos;
+ else
+#endif /* CRAY */
+ tos = IPTOS_LOWDELAY;
+ if (setsockopt(0, IPPROTO_IP, IP_TOS, &tos, sizeof(int)) < 0)
syslog(LOG_WARNING, "setsockopt (IP_TOS): %m");
#endif /* IP_TOS */
net = 0;
syslog(LOG_WARNING, "setsockopt (IP_TOS): %m");
#endif /* IP_TOS */
net = 0;