]>
git.saurik.com Git - apple/xnu.git/blob - bsd/netat/adsp_Options.c
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
31 * From v01.06 04/19/90 mbs
32 * Modified, April 9, 1997 by Tuyen Nguyen for MacOSX.
35 #include <sys/errno.h>
36 #include <sys/types.h>
37 #include <sys/param.h>
38 #include <machine/spl.h>
39 #include <sys/systm.h>
40 #include <sys/kernel.h>
42 #include <sys/filedesc.h>
43 #include <sys/fcntl.h>
45 #include <sys/socket.h>
47 #include <netat/sysglue.h>
48 #include <netat/appletalk.h>
49 #include <netat/at_pcb.h>
50 #include <netat/debug.h>
51 #include <netat/adsp.h>
52 #include <netat/adsp_internal.h>
58 * --> ccbRefNum refnum of connection end
59 * --> sendBlocking send blocking threshold
60 * --> sendTimer send timer interval
61 * --> rtmtTimer retransmit timer interval
62 * --> badSeqMax retransmit advice send threshold
63 * --> useCheckSum generate DDP checksum on internet packets
69 * errRefNum bad connection refnum
71 int adspOptions(sp
, pb
) /* (DSPPBPtr pb) */
76 pb
->ioResult
= errRefNum
;
80 if (pb
->u
.optionParams
.sendBlocking
)
81 sp
->sendBlocking
= pb
->u
.optionParams
.sendBlocking
;
83 if (pb
->u
.optionParams
.sendTimer
)
84 sp
->sendInterval
= pb
->u
.optionParams
.sendTimer
;
86 /* No longer allowed to set retransmit timer as of ADSP 1.5 */
87 /* Use it to specify a command blocking request specific to MacOS
89 if (pb
->u
.optionParams
.rtmtTimer
)
90 sp
->delay
= pb
->u
.optionParams
.rtmtTimer
;
91 KERNEL_DEBUG(DBG_ADSP_MISC
, 0, sp
, sp
->delay
, pb
, pb
->u
.optionParams
.rtmtTimer
);
93 if (pb
->u
.optionParams
.badSeqMax
)
94 sp
->badSeqMax
= pb
->u
.optionParams
.badSeqMax
;
96 sp
->useCheckSum
= pb
->u
.optionParams
.useCheckSum
;
97 if (pb
->u
.optionParams
.newPID
)
98 sp
->pid
= pb
->u
.optionParams
.newPID
;
100 adspioc_ack(0, (gbuf_t
*)pb
->ioc
, pb
->gref
);