From 6524452816f06e2cb97c16df5985d7e8fb2098fa Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 3 Oct 1998 22:03:07 +0000 Subject: [PATCH] Fix confusion about about service types (from FreeBSD). Now dns resolution works. --- sys/compat/svr4/svr4_stream.c | 12 ++++++++---- sys/compat/svr4/svr4_stropts.h | 9 ++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index 1cef52592b52..0b1c4eead19f 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_stream.c,v 1.28 1998/09/04 19:54:40 christos Exp $ */ +/* $NetBSD: svr4_stream.c,v 1.29 1998/10/03 22:03:07 christos Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -396,23 +396,27 @@ getparm(fp, pa) switch (so->so_type) { case SOCK_DGRAM: - pa->type = SVR4_SOCK_DGRAM; + pa->type = SVR4_T_CLTS; pa->protocol = IPPROTO_UDP; + DPRINTF(("getparm(dgram)\n")); return; case SOCK_STREAM: - pa->type = SVR4_SOCK_STREAM; + pa->type = SVR4_T_COTS; /* What about T_COTS_ORD? XXX */ pa->protocol = IPPROTO_IP; + DPRINTF(("getparm(stream)\n")); return; case SOCK_RAW: - pa->type = SVR4_SOCK_RAW; + pa->type = SVR4_T_CLTS; pa->protocol = IPPROTO_RAW; + DPRINTF(("getparm(raw)\n")); return; default: pa->type = 0; pa->protocol = 0; + DPRINTF(("getparm(type %d?)\n", so->so_type)); return; } } diff --git a/sys/compat/svr4/svr4_stropts.h b/sys/compat/svr4/svr4_stropts.h index 250b4397d4e4..40783afb0129 100644 --- a/sys/compat/svr4/svr4_stropts.h +++ b/sys/compat/svr4/svr4_stropts.h @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_stropts.h,v 1.11 1998/09/04 19:54:40 christos Exp $ */ +/* $NetBSD: svr4_stropts.h,v 1.12 1998/10/03 22:03:07 christos Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -89,6 +89,13 @@ struct svr4_strbuf { #define SVR4__I_BIND_RSVD (SVR4_STR|242) #define SVR4__I_RELE_RSVD (SVR4_STR|243) +/* + * Service type definitions + */ +#define SVR4_T_COTS 1 /* Connection-orieted */ +#define SVR4_T_COTS_ORD 2 /* Local connection-oriented */ +#define SVR4_T_CLTS 3 /* Connectionless */ + /* Struct passed for SVR4_I_STR */ struct svr4_strioctl { u_long cmd;