Fix confusion about about service types (from FreeBSD). Now dns resolution
works.
This commit is contained in:
parent
acce9b3b1b
commit
6524452816
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user