Fix compilation error with IPSEC.
[dragonfly.git] / share / man / man4 / man4.i386 / cx.4
CommitLineData
984263bc
MD
1.\"
2.\" $FreeBSD: src/share/man/man4/man4.i386/cx.4,v 1.7.2.6 2001/08/17 13:08:45 ru Exp $
6e285212 3.\" $DragonFly: src/share/man/man4/man4.i386/cx.4,v 1.2 2003/06/17 04:36:59 dillon Exp $
984263bc
MD
4.\"
5.Dd December 12, 1994
6.Dt CX 4 i386
7.Os
8.Sh NAME
9.Nm cx
10.Nd asynchronous/synchronous Cronyx-Sigma adapter driver
11.Sh SYNOPSIS
12.Cd "device cx0 at isa? port 0x240 irq 15 drq 7"
13.Cd "device cx1 at isa? port 0x260 irq 12 drq 6"
14.Cd pseudo-device sppp
15.Pp
16The base i/o port address should be set by jumpers on the board.
17The DMA i/o channel and interrupt request numbers are configured
18by software at adapter initialization. Legal values are:
19.Pp
20.Bl -tag -compact -width Port
21.It Port
220x240, 0x260, 0x280, 0x300, 0x320, 0x380
23.It IRQ
243, 5, 7, 10, 11, 12, 15
25.It DMA
265, 6, 7
27.El
28.Sh DESCRIPTION
29The Cronyx-Sigma driver supports the adapters of models 100,
30400, 500, 401, 404, 410, 440, 703, 801, 810, 840. Different models have
31different set of channels:
32.Pp
33.Bl -tag -compact -width Cronyx-Sigma-999
34.It Model
35Channels
36.It Cronyx-Sigma-100
370
38.It Cronyx-Sigma-400
394, 5, 6, 7
40.It Cronyx-Sigma-500
410, 4, 5, 6, 7
42.It Cronyx-Sigma-401
430, 1, 2, 3
44.It Cronyx-Sigma-404
450, 1, 2, 3
46.It Cronyx-Sigma-410
470, 1, 2, 3
48.It Cronyx-Sigma-440
490, 1, 2, 3
50.It Cronyx-Sigma-703
510, 1, 2, 4, 5, 6, 7
52.It Cronyx-Sigma-801
530, 1, 2, 3, 4, 5, 6, 7
54.It Cronyx-Sigma-810
550, 1, 2, 3, 4, 5, 6, 7
56.It Cronyx-Sigma-840
570, 1, 2, 3, 4, 5, 6, 7
58.El
59.Pp
60A pair of two adapters can be united together by the special
61short inter-board cable. Two united adapters use the same
62IRQ and DMA channels and from the point of driver works
63as the single 16-channel multiplexer. One of the united
64boards is ``master'' and the other is ``slave''.
65.Pp
66The channels of the slave united board are numbered by the driver
67beginning with 8, for example, the united adapter of the model 100/500
68has channels 0, 8, 12, 13, 14, 15.
69.Pp
70The channels which have the RS-232 interface can be used
71both in synchronous and asynchronous modes (software selectable
72by cxconfig utility) and hence are called ``universal'' channels.
73.Pp
74The special device files,
75.Pa /dev/* ,
76for the adapter Cronyx-Sigma
77are created by th
78.Xr MAKEDEV 8
79An example:
80.Bd -literal
81cd /dev
82sh MAKEDEV cronyx ttyx0 ttyx1 ttyy0
83.Ed
84.Sh "Asynchronous driver"
85The asynchronous channel device files have the names:
86.Pa /dev/ttyx#
87- for adapter cx0,
88.Pa /dev/ttyy#
89- for adapter cx1,
90.Pa /dev/ttyz#
91- for cx2.
92Here # is the channel number in hexadecimal form, 0-9-a-f.
93.Pp
94The driver fulfills the following standard ioctl requests (see
95.Xr ioctl 2 ) :
96.Pp
97.Bl -tag -width TIOCXXXXX -compact
98.It Dv TIOCSBRK
99Start sending BREAK.
100.It Dv TIOCCBRK
101Stop sending BREAK.
102.It Dv TIOCSDTR
103Set DTR signal (DTR := 1). The DTR signal is always set
104on the first
105.Xr open 2
106and could be changed by
107.Dv TIOCCDTR ,
108.Dv TIOCSDTR ,
109.Dv TIOCMSET ,
110.Dv TIOCMBIS ,
111.Dv TIOCMBIC
112ioctl calls.
113.It TIOCCDTR
114Clear DTR signal (DTR := 0).
115.It TIOCMSET
116Set the given values of DTR and RTS signals (<DTR:RTS> := data).
117The signals DTR and RTS are controlled by
118.Dv TIOCM_DTR
119and
120.Dv TIOCM_RTS
121bits of the data argument of the ioctl system call.
122.It TIOCMBIS
123Set DTR and RTS signals (<DTR:RTS> |= data).
124The signals DTR and RTS are controlled by
125.Dv TIOCM_DTR
126and
127.Dv TIOCM_RTS
128bits of the data argument of the ioctl system call.
129.It TIOCMBIC
130Clear DTR and RTS signals (<DTR:RTS> &= ~data).
131The signals DTR and RTS are controlled by
132.Dv TIOCM_DTR
133and
134.Dv TIOCM_RTS
135bits of the data argument of the ioctl system call.
136.It TIOCMGET
137Determine the state of the modem signals of the line.
138After the call the data argument contains the following bits:
139.Pp
140.Bl -tag -width TIOCM_XXX -compact
141.It TIOCM_LE
142always set (Line Enabled)
143.It TIOCM_DSR
144Data Set Ready signal received
145.It TIOCM_CTS
146Clear To Send signal received
147.It TIOCM_CD
148Data Carrier Detect signal received
149.It TIOCM_DTR
150Data Terminal Ready signal transmitted
151.It TIOCM_RTS
152Request To Send signal transmitted
153.El
154.El
155.Sh "Synchronous driver"
156The synchronous channels and universal channels, turned to the synchronous
157mode by the
158.Xr cxconfig 8
159utility, are accessible as network
160interfaces named ``cx#'' where # is the channel number, 0..47.
161All standard network interface parameters could be set by
162.Xr ifconfig 8
163utility.
164The
165.Xr cxconfig 8
166command is used to change some extended channel
167options, and also for setting the high-level software protocol
168(e.g. PpP or Cisco HDLC).
169.Pp
170The universal channels could be used both in asynchronous and synchronous modes.
171By default the asynchronous mode is set.
172The mode could be changed by
173.Xr cxconfig 8
174utility.
175The mode is blocked while the channel is busy (an asynchronous channel
176in open state or the network interface is up).
177.Sh "Synchronous Point-to-Point protocol"
178The Cronyx-Sigma driver uses the built-in implementation of the synchronous
179Point-to-Point protocol (sppp). It includes the support for such
180protocols as PpP/HDLC and Cisco/HDLC, and also the automatic
181connection loss test (via keepalive packets).
182The sppp protocol set is implemented as an independent module
183and could be used by other drivers of synchronous serial channels.
184The version of the driver for BSD/386 (BSDI) operating system
185also supports the usage of the general set of synchronous
186protocols, implemented inside the OS.
187The external protocol set could be selected by ``cxconfig ext'' command
188(see
189.Xr cxconfig 8 ) .
190.Sh "Channel Options Management"
191The
192.Xr cxconfig 8
193utility is used for setting the channels options.
194The channel options are generally set at the start of the operating
195system (for example, from the file
196.Pa /etc/rc ) .
197Note, that not all options have a sense for every particular
198case, and an attempt to set some of them can hang up the channel or
199the whole adapter.
200.Pp
201The actual channel options control functions are implemented via
202the ioctl-s on the special device file /dev/cronyx.
203There are the following ioctl-s available:
204.Pp
205.Bl -tag -width CXIOCXXXXXXX -compact
206.It CXIOCGETMODE
207Get the channel option values.
208.It CXIOCSETMODE
209Set the channel option values.
210.El
211.Pp
212The data argument of the ioctl call has an address of the options structure:
213.Bd -literal
214typedef struct {
215 unsigned char board; /* adapter number, 0..2 */
216 unsigned char channel; /* channel number, 0..15 */
217 unsigned char type; /* channel type (read only) */
218 unsigned char iftype; /* chan0 interface */
219 unsigned long rxbaud; /* receiver speed */
220 unsigned long txbaud; /* transmitter speed */
221 cx_chan_mode_t mode; /* channel mode */
222 cx_chan_opt_t opt; /* common channel options */
223 cx_opt_async_t aopt; /* async mode options */
224 cx_opt_hdlc_t hopt; /* hdlc mode options */
225 cx_opt_bisync_t bopt; /* bisync mode options */
226 cx_opt_x21_t xopt; /* x.21 mode options */
227 cx_soft_opt_t sopt; /* software options and state flags */
228} cx_options_t; /* user settable options */
229.Ed
230.Pp
231.Bl -tag -width rxbaudxxx
232.It Fa board
233The adapter number, 0..2.
234.It Fa channel
235The channel number, 0..15.
236.It Fa type
237The type of the channel (read-only argument).
238.It Fa iftype
239The interface type of the zero (and also the eight) channel: 0 - RS-232,
2401 - RS-449/V.35.
241.It Fa rxbaud
242The receiver data baud rate.
243.It Fa txbaud
244The transmitter data baud rate.
245.It Fa mode
246The channel mode: asynchronous/HDLC/Bisync/X.21.
247.It Fa opt
248The general channel options.
249.It Fa aopt
250The asynchronous mode options.
251.It Fa hopt
252The HDLC mode options.
253.It Fa bopt
254The Bisync mode options.
255.It Fa xopt
256The X.21 mode options.
257.It Fa sopt
258The software protocol options.
259.El
260.Sh FILES
261.Bl -tag -width /dev/cxXXXX -compact
262.It Pa /dev/cx??
263Asynchronous channels.
264.It Pa /dev/cronyx
265The special device file for the channel options management.
266.El
267.Pp
268The sources for the driver reside in:
269.Pp
270.Bl -tag -width /dev/cxXXXX -compact
271.It Pa /sys/i386/isa/cronyx.c
272.It Pa /sys/i386/isa/cx.c
273.It Pa /sys/i386/isa/if_cx.c
274.It Pa /sys/i386/isa/cronyx.h
275.It Pa /sys/i386/isa/cxreg.h
276.It Pa /sys/net/if_spppsubr.c
277.It Pa /sys/net/if_sppp.h
278.El
279.Sh SEE ALSO
280.Xr cxconfig 8 ,
281.Xr ifconfig 8