1 
 2 /* BEGIN INCLUDE ...............imp_read_write.incl.pl1 .................. */
 3 
 4 /* For imp dim. This file describes the structure of read and write link entries. */
 5 
 6 
 7 dcl 1 link_common aligned,                                  /* Following is common to both read and write links */
 8     2 event_ch fixed bin (71),                              /* Event channel over which wakeups are to be sent */
 9     2 process_id bit (36) aligned,                          /* Processid of the process */
10     2 bufferq aligned,                                      /* header for a chain of buffers */
11       3 first bit (18) unaligned,                           /* If non zero points to first buffer */
12       3 last bit (18) unaligned,                            /* If non zero, points to last buffer */
13     2 globalqthread aligned,                                /* globalqthread goes here. */
14       3 forward bit (18) unaligned,                         /* points to next entry */
15       3 backward bit (18) unaligned,                        /* points to previous entry */
16     2 globalqsn fixed bin (34),                             /* global queue sequence number */
17     2 group aligned,                                        /* miscellaneous bits stored here */
18       3 in_use bit (1) unaligned,                           /* If on, this entry is in use. */
19       3 link bit (8) unaligned,                             /* Link number */
20       3 link_type bit (1) unaligned,
21       3 byte_size bit (8) unaligned,                        /* Byte size of the connection */
22       3 index bit (18) unaligned,                           /* IMP DIM index */
23 
24       3 host bit (8) unaligned,                             /* Number of the foreign host */
25       3 imp bit (16) unaligned,                             /* Number of the foreign IMP */
26       3 flags unaligned,
27          4 host_state bit (1),                              /* If on, the host is down. */
28          4 imp_state bit (1),                               /* If on, the foreign IMP is down. */
29          4 group_id_undefined bit (1),                      /* If on, process_group_id is unknown */
30          4 single_message_mode bit (1),                     /* If on, only one message per read/write call */
31          4 control_link bit (1),                            /* If on, NCP control link. */
32          4 no_ncp bit (1),                                  /* If on, this link is not being used by NCP */
33          4 in_globalq bit (1),                              /* If on, link is in global queue. */
34          4 wakeup bit (1),                                  /* If on, user probably is blocked. */
35          4 flag_pad bit (4);
36 
37 dcl  read_link_p ptr;                                       /* Refer to read entry through this pointer. */
38 dcl 1 rl aligned based (read_link_p),                       /* Structure of read link entry */
39     2 common_data like link_common;
40 
41 dcl  write_link_p ptr;                                      /* Use this pointer to refer to write link entries */
42 dcl 1 wl aligned based (write_link_p),                      /* Structure of write link entry */
43     2 common_data like link_common,
44     2 group2 aligned,
45       3 wfiller10 bit (2) unaligned,
46       3 in_writeq bit (1) unaligned,                        /* If on link is in write queue */
47       3 wfiller11 bit (2) unaligned,
48       3 in_rfnmq bit (1) unaligned,                         /* If on link is in rfnm queue. */
49       3 wfiller12 bit (2) unaligned,
50       3 no_data_for_rfnm bit (1) unaligned,                 /* If on (only if in rfnm queue) no data corresponds to rfnm */
51       3 wfiller13 bit (2) unaligned,
52       3 block bit (1) unaligned,                            /* Link has been blocked by an order call */
53       3 wfiller14 bit (2) unaligned,
54       3 pgqlrr bit (1) unaligned,                           /* If on the link will be put in global queue
55                                                                when the last RFNM has arrived on this link. */
56       3 wfiller15 bit (2) unaligned,
57       3 imp_leader bit (1) unaligned,                       /* If on, the "for-imp" bit of each message is turned on */
58       3 wfiller16 bit (2) unaligned,
59       3 imp_leader_ascii bit (1) unaligned,                 /* If on the IMP messages are ascii instead of octal */
60       3 wfiller17 bit (2) unaligned,
61       3 in_buffer_spaceq bit (1) unaligned,
62       3 wfiller18 bit (2) unaligned,
63       3 in_large_buffer_spaceq bit (1) unaligned,
64       3 wfiller19 bit (6) unaligned,
65       3 write_attempts bit (3) unaligned,                   /* Number of times current message was transmitted */
66     2 writeqthread aligned,                                 /* If this entry is in write queue or
67                                                                RFNM queue then this thread is used. */
68       3 forward bit (18) unaligned,
69       3 backward bit (18) unaligned,
70     2 bsqthread aligned,                                    /* If this entry is in buffer space quueue
71                                                                the thread goes here. */
72       3 forward bit (18) unaligned,                         /* Points to next entry in the queue */
73       3 backward bit (18) unaligned,                        /* Points to previous entry in the queue */
74     2 cur_msg_bits fixed bin,                               /* Length of current message in bits */
75     2 message_allocation fixed bin,                         /* Allocation for this link */
76     2 bit_allocation fixed bin (34),
77     2 buffer_count fixed bin;                               /* Number of buffers in the bufferq */
78 
79 
80 
81 /* CONSTANTS */
82 
83 dcl (read_link_type init ("0"b),
84      write_link_type init ("1"b)) bit (1) internal static;
85 
86 
87 /* SOME SIMPLE AND USEFUL STRUCTUREs */
88 
89 dcl  link_thread bit (36) aligned based;
90 dcl  link_queue_header bit (36) aligned based;
91 dcl (empty_link_queue_header,
92      empty_link_thread) bit (36) aligned init ("0"b) internal static;
93 
94 /* END INCLUDE .......................imp_read.incl.pl1 ................... */