ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/clntrpc.h
Revision: 2.2
Committed: Sat Feb 22 02:07:21 2003 UTC (21 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 2.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# Content
1 /* clntrpc.h Distribution 1.0 88/9/19 Scry */
2
3 /* The Scry system is copyright (C) 1988, Regents of the
4 University of California. Anyone may reproduce ``Scry'',
5 the software in this distribution, in whole or in part, pro-
6 vided that:
7
8 (1) Any copy or redistribution of Scry must show the
9 Regents of the University of California, through its
10 Lawrence Berkeley Laboratory, as the source, and must
11 include this notice;
12
13 (2) Any use of this software must reference this distribu-
14 tion, state that the software copyright is held by the
15 Regents of the University of California, and that the
16 software is used by their permission.
17
18 It is acknowledged that the U.S. Government has rights
19 in Scry under Contract DE-AC03-765F00098 between the U.S.
20 Department of Energy and the University of California.
21
22 Scry is provided as a professional academic contribu-
23 tion for joint exchange. Thus it is experimental, is pro-
24 vided ``as is'', with no warranties of any kind whatsoever,
25 no support, promise of updates, or printed documentation.
26 The Regents of the University of California shall have no
27 liability with respect to the infringement of copyrights by
28 Scry, or any part thereof. */
29
30
31 #include <netdb.h>
32 #ifdef CRAY
33 #include <rpc/types.h>
34 #include "in.h" /* YUCK */
35 #include <sys/socket.h>
36 #include <rpc/xdr.h>
37 #include <rpc/auth.h>
38 #include <rpc/clnt.h>
39 #include <rpc/rpc_msg.h>
40 #include <rpc/auth_unix.h>
41 #include <rpc/svc.h>
42 #include <rpc/svc_auth.h>
43 #else
44 #include <rpc/rpc.h>
45 #include <sys/socket.h>
46 #endif
47 #include <sys/time.h>
48
49 #define SUNFRONT /* Sun is client */
50
51 #define PCPROGRAM 300000
52 #define PCPORT 2000
53 #define TESTVERS 1 /* version */
54
55 /* remote procedure numbers */
56
57 #define AUTHPROC 1 /* authorization procedure */
58 #define INITPROC 2 /* initialize VTR or videodisk */
59 #define RECORDPROC 3 /* record frame */
60 #define CLOSEPROC 4 /* relinquish control */
61 #define NOCOMPRESS 5 /* send uncompressed image data */
62 #define COLORSEND 6 /* send and display colormap-compressed scan lines */
63 #define SENDUDP 7 /* send BTC and colormap-compressed scan lines */
64 #define DISPLAY 8 /* display BTC and colormap-compressed scan lines */
65 #define MAPPROC 9 /* send color map */
66
67 /* give up after certain amount of time */
68 extern struct timeval s_total_timeout ;
69 /* client handle */
70 extern CLIENT *s_client ;
71
72 #define UDP 0 /* UDP protocol */
73 #define TCP 1 /* TCP protocol */
74
75 extern short s_protocol ; /* which protocol */
76
77 #define PREVIEW 0 /* preview mode */
78
79 extern int s_curr_frame ; /* current frame number */
80 extern int s_copy_num ; /* number of frames to record image on */
81 extern int s_record ; /* preview or record */
82 extern bool_t s_optflag ; /* video workstation has optical disk */
83 extern bool_t s_lempel_ziv ; /* use Lempel-Ziv compression or not */
84
85 struct netuser /* user description structure */
86 {
87 int nu_uid ; /* effective user id */
88 unsigned int nu_glen ; /* number of groups user in */
89 int *nu_gids ; /* groups user is in */
90 } ;
91
92 struct record
93 {
94 int in_at ; /* start recording image at */
95 int out_at ; /* finish recording image at */
96 } ;
97
98 struct recinfo
99 {
100 bool_t optflag ;
101 int start_frame ;
102 int total ;
103 } ;
104
105 #define NONE 0 /* no compression */
106 #define BTC 1 /* BTC compression */
107 #define COLORMAP 2 /* color map compression */
108 #define LEMPEL_ZIV 4 /* Lempel-Ziv compression */
109 #define FRAME_FRAME 8 /* frame-to-frame differencing */
110
111 extern short s_compression ; /* type of compression */
112
113 struct mapstore
114 {
115 short mapnum ; /* number of entries in color map */
116 unsigned short map[256] ; /* entries in color map */
117 } ;
118
119
120 struct scan_packet
121 {
122 bool_t first ; /* first frame - no frame-frame differencing */
123 int record ; /* preview or record */
124 short compression ; /* type of compression */
125 int lempel_ziv ; /* Lempel-Ziv used or not */
126 short linenum ; /* scan line number (0 to 399) */
127 int index ; /* used by server as index into piece of
128 incoming buffer */
129 int total1, total2 ; /* server uses in building up compressed
130 frame buffer from incoming pieces */
131 /* number of bytes in compressed frame (Lempel-Ziv only) */
132 int total_lz ;
133 int in_at, out_at ; /* starting, ending numbers to
134 record image on */
135 short mapnum ; /* number of entries in color map */
136 unsigned short map[256] ; /* color map */
137 short num_bytes[100] ; /* number of bytes in each group of
138 4 compressed scan lines */
139 unsigned char pack[76800] ; /* compressed frame buffer or piece thereof */
140 /* 2 scan lines stored here when compression
141 not used */
142 } ;