|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /*
26: *
27: * ORIGINS: 82
28: *
29: * APPLE CONFIDENTIAL
30: * (C) COPYRIGHT Apple Computer, Inc. 1992-1996
31: * All Rights Reserved
32: *
33: */
34:
35: #define NPAPSERVERS 10 /* the number of active PAP servers/node */
36: #define NPAPSESSIONS 40 /* the number of active PAP sockets/node */
37:
38: #define AT_PAP_HDR_SIZE (DDP_X_HDR_SIZE + ATP_HDR_SIZE)
39:
40: #define ATP_DDP_HDR(c) ((at_ddp_t *)(c))
41:
42: #define PAP_SOCKERR "Unable to open PAP socket"
43: #define P_NOEXIST "Printer not found"
44: #define P_UNREACH "Unable to establish PAP session"
45:
46: struct pap_state {
47: unsigned char pap_inuse; /* true if this one is allocated */
48: unsigned char pap_tickle; /* true if we are tickling the other
49: end */
50: unsigned char pap_request; /* bitmap from a received request */
51: unsigned char pap_eof; /* true if we have received an EOF */
52: unsigned char pap_eof_sent; /* true if we have sent an EOF */
53: unsigned char pap_sent; /* true if we have sent anything (and
54: therefore may have to send an eof
55: on close) */
56: unsigned char pap_error; /* error message from read request */
57: unsigned char pap_timer; /* a timeout is pending */
58: unsigned char pap_closing; /* the link is closing and/or closed */
59: unsigned char pap_request_count; /* number of outstanding requests */
60: unsigned char pap_req_timer; /* the request timer is running */
61: unsigned char pap_ending; /* we are waiting for atp to flush */
62: unsigned char pap_read_ignore; /* we are in 'read with ignore' mode */
63:
64: at_socket pap_req_socket;
65: at_socket pap_to_socket;
66: at_node pap_to_node;
67: at_net pap_to_net;
68: int pap_flow;
69:
70: unsigned short pap_send_count; /* the sequence number to send on the
71: next send data request */
72: unsigned short pap_rcv_count; /* the sequence number expected to
73: receive on the next request */
74: unsigned short pap_tid; /* ATP transaction ID for responses */
75: unsigned char pap_connID; /* our connection ID */
76:
77: int pap_ignore_id; /* the transaction ID for read ignore */
78: int pap_tickle_id; /* the transaction ID for tickles */
79: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.