File: globals.c

package info (click to toggle)
nas 1.9.4-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,124 kB
  • ctags: 27,566
  • sloc: ansic: 52,109; makefile: 31,375; sh: 8,077; perl: 1,104; yacc: 249; cpp: 216; lex: 68
file content (143 lines) | stat: -rw-r--r-- 3,606 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/* $NCDId: @(#)globals.c,v 1.2 1994/05/02 17:42:25 greg Exp $ */
/*
 * $XConsortium: globals.c,v 1.13 91/07/12 15:54:41 gildea Exp $
 *
 * Copyright 1989 Massachusetts Institute of Technology
 *
 */

/*
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission.  M.I.T. makes no representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.
*/

/*
 *
 *                                 Global data
 *
 * This file should contain only those objects which must be predefined.
 */
#include <audio/Alibint.h>


#ifdef STREAMSCONN


/* The following are how the Austream connections are used:              */
/*      1)      Local connections over pseudo-tty ports.                */
/*      2)      SVR4 local connections using named streams or SVR3.2    */
/*              local connections using streams.                        */
/*      3)      SVR4 stream pipe code. This code is proprietary and     */
/*              the actual code is not included in the MIT distribution.*/
/*      4)      remote connections using tcp                            */
/*      5)      remote connections using StarLan                        */

/*
 * descriptor block for streams connections
 */
#include <stdio.h>
#include "Astreams.h"

char _AusTypeOfStream[100] = { 0 };

#ifdef SVR4
extern int _AusSetupSpStream();
extern int _AusSetupNamedStream();
#endif 
extern int _AusSetupLocalStream();
extern int _AusConnectLocalClient();
extern int _AusCallLocalServer();
extern int _AusReadLocalStream();
extern int _AusErrorCall();
extern int _AusWriteLocalStream();
extern int _AusCloseLocalStream(); 
extern int _AusSetupTliStream();
extern int _AusConnectTliClient();
extern int _AusCallTliServer(); 
extern int _AusReadTliStream(); 
extern int _AusWriteTliStream();
extern int _AusCloseTliStream();


Austream _AusStream[] = {

    { 
	/* local connections using pseudo-ttys */

	_AusSetupLocalStream,
	_AusConnectLocalClient,
	_AusCallLocalServer,
	_AusReadLocalStream,
	_AusErrorCall,
	write,
	close,
	NULL
    },
    { 
#ifdef SVR4
	/* local connections using named streams */

        _AusSetupNamedStream,
#else
	/* local connections using streams */
        _AusSetupLocalStream,
#endif
        _AusConnectLocalClient,
        _AusCallLocalServer,
        _AusReadLocalStream,
        _AusErrorCall,
        write,
        close,
        NULL
    },
    /* Enhanced Application Compatibility Support */
    {
#ifdef SVR4
	/* SVR4 stream pipe code */
	_AusSetupSpStream,
#else
	_AusSetupLocalStream,
#endif
	_AusConnectLocalClient,
	_AusCallLocalServer,
	_AusReadLocalStream,
	_AusErrorCall,
	write,
	close,
	NULL
    },
    /* End Enhanced Application Compatibility Support */

    {
	/* remote connections using tcp */
        _AusSetupTliStream,
        _AusConnectTliClient,
        _AusCallTliServer,
        _AusReadLocalStream,
        _AusErrorCall,
	write,
	close,
	NULL
    },
    {
	/* remote connections using StarLan */
        _AusSetupTliStream,
        _AusConnectTliClient,
        _AusCallTliServer,
        _AusReadLocalStream,
        _AusErrorCall,
        write,
        close,
        NULL
    }
};


#endif /* STREAMSCONN */