#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  x25 x25/man x25/man/intro.ms x25/man/x25-auth.5
#   x25/man/x25-socket.3 x25/man/x25-x29.7 x25/man/x25.7
#   x25/man/x25d.8 x25/man/x25trace.1 x25/system x25/system/sun
#   x25/system/sun/README x25/system/next x25/system/next/README
#   x25/system/next/README.wn.uue x25/examples
#   x25/examples/config.1.ex x25/examples/config.ddn-frame-level
#   x25/examples/config.ddn-packet-level
#   x25/examples/config.vc-balance x25/examples/ddncall.c
# Wrapped by karl@remora on Fri Jul 26 15:06:29 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test ! -d 'x25' ; then
    echo shar: Creating directory \"'x25'\"
    mkdir 'x25'
fi
if test ! -d 'x25/man' ; then
    echo shar: Creating directory \"'x25/man'\"
    mkdir 'x25/man'
fi
if test -f 'x25/man/intro.ms' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/man/intro.ms'\"
else
echo shar: Extracting \"'x25/man/intro.ms'\" \(18070 characters\)
sed "s/^X//" >'x25/man/intro.ms' <<'END_OF_FILE'
X.\" @(#)intro.ms	1.1
X.de D1
X.if t .sp .5
X.if n .sp 1
X.RS
X.nf
X..
X.de D2
X.fi
X.RE
X.if t .sp .5
X.if n .sp 1
X..
X.ds CO (c)
X.if \w'\\(co'>0 .ds CO \\(co
X.\"
X.\"	N3 (good name, eh?) needs to be defined twice, else it doesn't
X.\"	work.  I don't know why.
X.\"
X.ds N3 \\uTM\\d
X.ds N3 \\uTM\\d
X.if t .ds N3 \\u\\s-2TM\\s+2\\d
X.LP
X\0
X.sp 2i
X.ND
X.ds CH
X.CD
X.LG
X.ps 20
XMorning Star X.25
X.NL
X
XDaemon Version 1.0
X
X.ps 20
X
XUser Guide
X
X.NL
XRevision 1.5
XJuly 16, 1991
X.DE
X.bp
X.LP
X\0
X.sp 2i
X.CD
X.SM
XCopyright \*(CO 1989, 1991 Morning Star Technologies, Inc.
XAll rights reserved
X
XPublished by
XMorning Star Technologies, Inc.
X1760 Zollinger Road
XColumbus, Ohio  43221
XUSA
X+1 614 451 1883
X
X
X
X
X
XRSYS\*(N3 X.25 Software distributed under license from Gcom, Inc.
X.NL
X.DE
X.bp
X.nr % 1
X.ds CF - % -
X.CD
X.B
XMorning Star X.25
XUser Guide
X.R
X.DE
X.LP
X.NH 1
XIntroduction to X.25
X.LP
XX.25 was first proposed by the CCITT in 1979 as a general purpose packet
Xswitch data format for use between data processing equipment.
XThe proposal has been modified and updated over the years,
Xand has steadily gained support.
XIt is rapidly becoming the protocol of choice for efficient wide-area data
Xcommunications, many large networks having been built around it.
XTelenet, Tymnet and Accunet are well known examples in the United States,
Xand most European governments have established their own,
Xsuch as the German Post Office network and the French Datapac network.
X.LP
XMorning Star X.25 provides an easy and flexible means of
Xtransferring data between the host UNIX\**
X.FS
XUNIX is a registered trademark of AT&T Bell Laboratories.
X.FE
Xsystem and an X.25 network.
XUsers of the UNIX system have complete access to X.25 networks for
Xwide-area data exchange, or simply for system-to-system
Xfile transfer in a two node ``network.''
XUsing the integral X.3/X.28 PAD and X.29 user interfaces,
Xremote login and interactive terminal sessions across large networks are
Xpossible.  
XThe UNIX host's native TCP/IP implementation can use X.25 virtual
Xcircuits as described in RFC-877 to create a wide-area internetwork,
Xproviding access to remote hosts using the same TCP/IP protocols and
Xfamilar commands as on the local area network.
X.NH 1
XUsing this Manual
X.LP
XThe portions of this manual following this introductory User Guide
Xhave been organized in the style of the standard Berkeley UNIX manual
Xpages.  User commands are described in Section 1.  Section 3 describes
Xthe SunLink\**-compatible
X.FS
XSunLink is a registered trademark of Sun Microsystems Inc.
X.FE
Xsocket library.  Section 5 describes the format
Xof the configuration files.  Miscellaneous interfaces are described in
XSection 7.  The X.25 daemon itself is described in Section 8.
X.NH 1
XRelated Manuals
X.LP
XHardware installation, when necessary, is covered in the \fISnapLink
XHardware Installation Guide\fP\^.  Not all Morning Star X.25
Xinstallations require additional hardware, so if you are using a
Xserial-port-only product, you won't have any sort of hardware
Xinstallation guide.
X.LP
XSee \fIx25-socket\fP(3) for detailed information on using the
XSunLink-compatible socket interface.
XSee
X\fIx25-config\fP\^(5) for detailed information on configuring the X.25
Xdaemon.
X.NH 1
XSample Configuration
X.LP
XWe'll go through the steps
Xnecessary to configure a small but illustrative installation.
XOur system,
X\fIrobin\fP\^,
Xis connected to a Tymnet-supplied 9600 baud synchronous
Xmodem and to an adjacent machine,
X\fIsparrow\fP\^,
Xvia a synchronous modem eliminator.
XWe want to support
X1) logins from remote machines on the network and from
X\fIsparrow\fP\^,
X2) connecting to other machines using the internal
X.I PAD\^
X(packet assembler/disassembler) interface,
X3) UUCP to and from
X\fIsparrow\fP\^
Xand machines on Tymnet, and
X4) TCP/IP networking.
XMost of the installation and configuration process can be accomplished
Xas a normal user, without need to become \fBroot\fP.
X
X.B 
XUnpacking the distribution
X.R
X.LP
XYou received the software distribution as a \fItar\fP(1) archive,
Xeither compressed and delivered electronically or delivered on a tape
Xor floppy disk.  Create a working directory and unpack your
Xdistribution:
X.D1
X% ls mstx25*
Xmstx25.tar.Z
X% mkdir /usr/local/src/x25
X% cp mstx25.tar.Z /usr/local/src/x25
X% cd /usr/local/src
X% zcat x25/mstx25.tar.Z | tar xvf -
X\fI...lots of output...\fR
X%
X.D2
X
X.B
XConfiguring the installation
X.R
X.LP
XBecome root and run the installation shell script:
X.D1
X% cd x25
X% su
XPassword: \fI(enter your \fBroot\fI password here)\fP
X# ./Install
X\fI...lots of output...\fR
X#
X.D2
X.LP
XThe \fBInstall\fP script will move the daemon, library, header
Xfiles, and manual pages into the appropriate directories.  It will
Xmove the object modules and/or device drivers into place for building
Xyour new kernel, and will ask you to edit your kernel configuration files as
Xneeded.  It will create HDLC and IP tunnel driver interfaces (e.g.
X\fB/dev/hdlc0\fP and \fB/dev/tun0\fP) if possible.  It will also put the
Xcleanup script into an accessible place (usually
X\fB/etc/x25.uninstall\fP) so that the X.25 software can be easily
Xremoved from the system and a non-X.25 kernel built if desired.
X
X.B
XBuilding and installing a kernel
X.R
X.LP
XThe contents of the file /usr/local/src/x25/README will describe how
Xto configure and build a new kernel, move it into place, and reboot
Xyour system to ensure that it runs correctly.  If your system supports
Xdynamically loadable device drivers, you may need only to reboot for them
Xto become available.
X
X.B
XMaking X.25 start during a normal boot
X.R
X.LP
XWhenever \fIrobin\fP is booted, the X.25 software needs to be started.
XWe add the following lines to the appropriate spot in our machine's
Xboot-time shell script (\fB/etc/rc.local\fP on our example machine):
X.D1
Xif [ -x /usr/etc/x25d -a -r /etc/x25.config -a -r /etc/x25.auth \\
X     -a -d /usr/adm -a -w /usr/adm/x25.log -a -w /usr/adm/x25.trace ]
Xthen
X    /usr/etc/x25d -f /etc/x25.config -a /etc/x25.auth -l /usr/adm/x25.log -t /usr/adm/x25.trace ; \\
X    (echo -n ' x25d') > /dev/console
Xfi
X.D2
X
X.B
XCreating the X.25 configuration file
X.R
X.LP
XNow we can start building our configuration file.  See
X\fIx25-config\fP\^(5) for a description of all the configuration
Xoptions, and see the Examples/ subdirectory for some simple example
Xconfigurations.
X.D1
X# cd /etc
X# cat > x25.config
X; X.25 configuration parameters
X
X; Line number aliases
X(define Tymnet 0)
X(define Sparrow 1)
X
X^D
X# chmod 644 x25.config
X#
X.D2
XNext, we add commands to configure the
X.I PAD\^
Xand
X.I X.29
Xinterfaces we require.
XThe daemon can manage a large number of interfaces,
Xbut we'll limit ourselves to five of each to simplify the example.
XWe'll also define a TCP port on which the daemon should expect
Xconnections from socket library clients.
X.D1
X# cat >> x25.config
X; PAD devices are used to call other machines
X(create-group PAD-group (type PAD) (pty-names "/dev/mcux[0-4]"))
X
X; X.29 devices allow logins from other machines
X(create-group Login-group (type X.29) (max-ptys 5))
X
X(define tcp-port 87)\**
X.FS
XThe request for this application's assigned port number is pending
Xwith the DDN Network Information Center.  In the interim, we recommend
Xusing port number 87, described in RFC1060 as "any private terminal
Xlink".
X.FE
X^D
X#
X.D2
XNow that we have attached ``semantic content'' to our devices, move
X(or link, if you wish) them to more meaningful names.  Since the
Xdaemon works through the UNIX system's virtual terminal driver, we'll
Xallocate a few pty devices for \fIPAD\fP and \fIX.29\fP use.  It's
Xbest to pick pty names from the end of the list that \fIinetd\fP would
Xassign to incoming \fItelnet\fP sessions.  First, make sure that the
Xnames we want are not currently in use, then get the pty slave-sides
Xand master-sides for our own use:
X.D1
X# cd /dev
X# ls mcux* cux*
Xmcux* not found
Xcux* not found
X#
X# mv ttyqb cux0
X# mv ttyqc cux1
X# mv ttyqd cux2
X# mv ttyqe cux3
X# mv ttyqf cux4
X#
X# mv ptyqb mcux0
X# mv ptyqc mcux1
X# mv ptyqd mcux2
X# mv ptyqe mcux3
X# mv ptyqf mcux4
X#
X.D2
XMake sure that
X.I uucico\^
Xand friends can get at the ``ACU'' devices:
X.D1
X# chown uucp cux0 cux1 cux2 cux3 cux4
X#
X.D2
XNext, we define the routing functions that are evaluated whenever
Xa call is sent or received (again, see \fIx25-config\fP\^(5)):
X.D1
X# cd /etc
X# cat >> x25.config
X; All inbound calls get attached to logins,
X;          but collect calls are rejected.
X.ta \w'(define\ 'u \w'(define\ (or\ 'u \w'(define\ (or\ (and\ 'u
X(define in-route-table
X	(or (and (is-line Tymnet)
X			(facility "01?1")
X			(clear 25 65))
X			; Reject collect calls
X			; 25 = "Reverse charging acceptance
X			;       not subscribed"
X			; 65 = "Facility/registration code
X			;       not allowed"
X		(route-to Login-group)))
X
X; All outbound non-Tymnet calls get routed to Sparrow.
X.ta \w'(define\ 'u \w'(define\ (or\ 'u \w'(define\ (or\ (and\ 'u
X(define out-route-table
X	(or (and (called-address "3106*")
X			(route-to Tymnet))
X		; 3106 is Tymnet's DNIC
X		(route-to Sparrow)))
X
X^D
X#
X.D2
XIt is also possible to provide access to
X.I sparrow\^
Xfrom Tymnet and vice versa.
XThe following alternative routing function sends inbound calls from Tymnet
Xwith subaddress
X(the last two digits of the called address) 
X99
Xto
X\fIsparrow\fP\^,
Xand send all of
X.I sparrow's\^
Xnon-Tymnet addressed calls to
X\fIrobin\fP\^:
X.D1
X.ta \w'(define\ 'u \w'(define\ (or\ 'u \w'(define\ (or\ (and\ 'u \w'(define\ (or\ (and\ (or\ 'u \w'(define\ (or\ (and\ (or\ (and\ 'u
X(define in-route-table
X	(or (and (is-line Tymnet)
X			(or (and (facility "01?1")
X					(clear 25 65))
X				(and (called-address "*99")
X					(route-to Sparrow))
X				(route-to Login-group)))
X		(and (is-line Sparrow)
X			(or (and (called-address "3106*")
X					(route-to Tymnet))
X				(route-to Login-group)))))
X.D2
XThe last X.25 items to configure are the communications lines themselves.
XWe are a DTE on Tymnet, a 1980 X.25 network; we have 16 two-way
Xvirtual circuits; and our assigned X.121 address is 3106555121.
XSee \fIx25-config\fP\^(5) for a description of the \fIaddress\fP\^
Xsub-command of \fIactivate-line\fP\^.
X\fIDte\fP\^ is the default and therefore
Xcould be left out, but I include it below anyway for clarity:
X.D1
X# cat >> x25.config
X.ta \w'(activate-line\ 'u
X; Tymnet connection
X(activate-line Tymnet
X	(dte)
X	(address "3106555121")
X	(standard-year 1980)
X	(vc-ranges nil nil (1 16) nil))
X
X^D
X#
X.D2
X.I Sparrow\^
Xhas been configured as a DTE, so we must be the DCE end of that circuit.
XAlso,
X.I sparrow\^
Xis configured for 1984 X.25 conformance (the default),
Xso we must be as well.
XThe rest of the configuration parameters must also match what the other side
Xof the link is using:
X.D1
X# cat >> x25.config
X.ta \w'(activate-line\ 'u
X; Sparrow
X(activate-line Sparrow
X	(dce)
X	(vc-ranges nil nil (1 32) nil))
X^D
X#
X.D2
XTo establish a TCP/IP network between the two machines, it is nessary
Xto configure the X.25 link as an IP interface.  If robin has been
Xassigned the IP address [137.175.4.4] and the network is using
Xsubnetting, the following should tell the X.25 daemon that the line is
Xto be used for IP traffic:
X.D1
X# cat >> /etc/x25.config
X(define ddn-mtu-size 576)
X(define ddn-address 137.175.4.4)
X(define ddn-netmask 255.255.255.0)
X(define ddn-address-table ((137.175.4.2  "3106555121")))
X
X(create-group DDN-Group (type DDN) (two-way-svcs 10))
X^D
X#
X.D2
XSince the RFC877 encapsulation flag for IP traffic in call-user data
Xis 0xCC, we must also modify our in-route-table to look like
X.D1
X.ta \w'(define\ 'u \w'(define\ (or\ 'u \w'(define\ (or\ (and\ 'u \w'(define\ (or\ (and\ (or\ 'u \w'(define\ (or\ (and\ (or\ (and\ 'u
X(define in-route-table
X	(or (and (is-line Tymnet)
X			(or (and (facility "01?1")
X					(clear 25 65))
X				(and (called-address "*99")
X					(route-to Sparrow))
X				(and (call-user-data "CC*")
X					(route-to DDN-Group))
X				(route-to Login-group)))
X		(and (is-line Sparrow)
X			(or (and (called-address "3106*")
X					(route-to Tymnet))
X				(and (call-user-data "CC*")
X					(route-to DDN-Group))
X				(route-to Login-group)))))
X.D2
X
X.B
XEstablishing the SunLink-compatible socket service
X.R
X.LP
XFor testing, use the environment variables X25SERVER and X25SERVERPORT
Xto instruct the client code where to find the socket service.\**
X.FS
XThe request for this application's assigned port number is pending
Xwith the DDN Network Information Center.  In the interim, we recommend
Xusing port number 87, described in RFC1060 as "any private terminal
Xlink".
X.FE
X.D1
X# setenv X25SERVER localhost
X# setenv X25SERVERPORT 87
X#
X.D2
XFor the long term, you need to tell your system where to find the
Xsocket service.  Create an alias called \fBx25-server\fP in your hosts
Xtable, name service database, or YP/NIS or NetInfo hosts map.  This
Xalias should be equivalent to the machine on which the daemon will
Xrun.  Also, create an entry in your \fIservices\fP(5) database for the
X"x25" service on TCP port 87:
X.D1
X# cat >> /etc/services
Xx25             87/tcp
X^D
X#
X.D2
X
X.B
XSetting up an initial authorization file
X.R
X.LP
XFor testing, set up an authorization file that will allow socket
Xaccess only to clients running on this host.  Later, consult
X\fIx25-auth\fP(5) for details of a more complete security setup.
X.D1
X# cat > /etc/x25.auth
X127.0.0.1
X^D
X#
X.D2
X
X.B
XTesting the installation
X.R
X.LP
XOur X.25 configuration is now complete, so we can go ahead and start
Xit up for testing:
X.D1
X# /usr/etc/x25d -f /etc/x25.config -a /etc/x25.auth -l /usr/adm/x25.log
X#
X.D2
XAnd make sure it got started:
X.D1
X# cat /usr/adm/x25.log
X01/07/91-17:17:38 X.25 [1/4/91-15:36:20] started, pid 687
X01/07/91-17:17:38 Copyright (c) 1988, 1990 Morning Star Technologies, Inc.
X01/07/91-17:17:38 All rights reserved
X01/07/91-17:17:38 1 line available
X01/07/91-17:17:38 Setting ddn-mtu-size to 576
X01/07/91-17:17:38 Setting ddn-address to 137.175.4.4
X01/07/91-17:17:38 Setting ddn-netmask to 255.255.255.0
X01/07/91-17:17:39 PAD started on /dev/cux0, fd 2
X01/07/91-17:17:39 PAD started on /dev/cux1, fd 4
X01/07/91-17:17:39 PAD started on /dev/cux2, fd 5
X01/07/91-17:17:39 PAD started on /dev/cux3, fd 6
X01/07/91-17:17:39 PAD started on /dev/cux4, fd 7
X01/07/91-17:17:39 Line 0 activated on HDLC serial port /dev/hdlc0 (ttya)
X01/07/91-17:17:39 Line 1 activated on HDLC serial port /dev/hdlc1 (ttyb)
X01/07/91-17:17:39 Clear-to-send is up on line 0
X01/07/91-17:17:39 Clear-to-send is up on line 1
X01/07/91-17:17:41 Frame level 0 is connected
X01/07/91-17:17:42 Frame level 1 is connected
X01/07/91-17:17:45 Packet level 0 is connected
X01/07/91-17:17:46 Packet level 1 is connected
X#
X.D2
XIf you are using the Morning Star \fISnapLink\fP\^ SCSI-based
Xinterface, then the line activation log entries will look like
X.D1
X01/07/91-17:17:39 Line 0 activated on SnapLink /dev/rsd1a port 0
X01/07/91-17:17:39 Line 1 activated on SnapLink /dev/rsd1a port 1
X.D2
Xinstead.
X
XX.25 is installed, configured, running and connected on both
Xof our links.
XYou should be able
Xto login to
X.I robin\^
Xfrom a remote machine via a \fIPAD\fP session.
XYou should also be able to \fItelnet\fP, \fIftp\fP, etc. between the two.
X
X.B
XConfiguring UUCP
X.R
X.LP
XIf you want to want to use UUCP (both \fIuucp\fP/\fIuucico\fP and
X\fIcu\fP(1)/\fItip\fP(1), over your X.25 connections, it must be
Xconfigured as described here.
X.I Robin
Xhas the HDB (HoneyDanBer, also known as BNU, Basic Networking Utilities)
Xversion of UUCP, but we will also show how to configure the older
Xstyle of UUCP.
XChange directory to
X.B /usr/lib/uucp
Xand add the following script to the
X.B Dialers
Xfile:
X.D1
XX25    =x    *  prof\\suucp\\r\\dc\\s\\T  \\r  \\c
X.D2
XAdd these lines to the
X.B Devices
Xfile:
X.D1
X.ta .75i 1.5i 2.25i 3i
XDirect	cux0	-	9600	direct
XDirect	cux1	-	9600	direct
XDirect	cux2	-	9600	direct
XDirect	cux3	-	9600	direct
XDirect	cux4	-	9600	direct
XX25	cux0	-	9600	X25
XX25	cux1	-	9600	X25
XX25	cux2	-	9600	X25
XX25	cux3	-	9600	X25
XX25	cux4	-	9600	X25
X.D2
XLast, add entries to the
X.B Systems
Xfile for
X\fIsparrow\fP\^,
Xas well as for
X\fIpigeon\fP\^,
Xwhich is connected to Tymnet:
X.D1
Xsparrow  Any  X25  9600  0  in:  Urobin  word:  2eet
Xpigeon  Any  X25  9600  3106123456  in:  Urobin  word:  2itter
X.D2
XNow UUCP should work to
X.I sparrow\^
Xand
X\fIpigeon\fP\^.
XConfigure the
X.B Permissions
Xfile according to local security procedures.
X.LP
X.I Cu\^
Xshould also work:
X.D1
Xrobin 11% cu -l cux0
XMorning Star PAD v1.0:  Device 0
X
X*stat
X
X.ta \w'FREE:\ \ Device\ 0\ 'u
XFREE:  Device 0 / Line 0 / X.25 Line Up / FRM Up / PKT Up
X	/ Line 1 / X.25 Line Up / FRM Up / PKT Up
X
X*c 0
X
XOutgoing call to:   0
X*
XCALL CONNECTED
X
Xsparrow login: karl
XPassword:
X
XTerminal set to ansi.
X
X ..  are the STEWED PRUNES still in the HAIR DRYER?
X
Xsparrow 1% exit
XMon Jan 7 15:31:23 EDT 1991
X
XCLR Cause: DTE ORIGINATED (0x00), Diagnostic: 0x00
X*
XLost Carrier
XDisconnected
Xrobin 12%
X.D2
XOlder UUCP systems don't allow for user-written dialing scripts;
Xdialers were hard-coded into
X\fIuucico\fP\^.
XDialing commands on these systems must be put directly into
X\fBL.sys\fP,
Xthe older equivalent of
X\fBSystems\fP:
X.D1
Xsparrow Any DIR 9600 cux0 * prof\\suucp \\r c\\s0 in: Urobin word: 2eet
Xpigeon Any DIR 9600 cux0 * prof\\suucp \\r c\\s3106123456 in: Urobin word: 2itter
X.D2
XThe \fBL-devices\fP file should then be configured as if the PAD
X``ACU'' devices were directly-connected lines.
X.NH 1
XUsing the X.25 socket library
X.LP
XIf you have an application that uses SunLink X.25 sockets, it can be
Xconverted to using Morning Star's emulation library simply by
Xrelinking it with \fB-lx25\fP.  For example, if your program source is
Xin file \fBfoo.c\fP, compile it with the command 
X.D1
X% cc -o foo foo.c -lx25
X.D2
XIf your application is in several source modules, they can be linked
Xtogether like
X.D1
X% cc -c foo.c
X% cc -c bar.c
X% cc -o foo foo.o bar.o -lx25
X.D2
XIf your application was provided as object modules without
Xcorresponding source, it can be converted to use the Morning Star X.25
Xsocket library by saying
X.D1
X% cc -o foo foo.o bar.o -lx25
X.D2
XIn this way, an application, which was previously available only on
Xthe single workstation that hosted the X.25 interface, can be used
Xacross the entire network.
X
X.\" Local Variables:
X.\" mode: electric-nroff
X.\" compile-command: "groff -ms -TX75 intro.ms"
X.\" End:
END_OF_FILE
if test 18070 -ne `wc -c <'x25/man/intro.ms'`; then
    echo shar: \"'x25/man/intro.ms'\" unpacked with wrong size!
fi
# end of 'x25/man/intro.ms'
fi
if test -f 'x25/man/x25-auth.5' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/man/x25-auth.5'\"
else
echo shar: Extracting \"'x25/man/x25-auth.5'\" \(4005 characters\)
sed "s/^X//" >'x25/man/x25-auth.5' <<'END_OF_FILE'
X.\" @(#)x25-auth.5	1.1
X.TH X25-AUTH 5 "1 February 1991" "Morning Star X.25"
X.SH NAME
Xx25-auth \- X.25 authorization file format
X.SH DESCRIPTION
X
XThe Morning Star X.25 daemon offers the system manager extreme
Xflexibility in designing a network configuration.  With it, any user
Xon any IP-connected workstation may make full use of the X.25
Xconnection in networked applications.
X
XThe daemon's \fB-a\fP option is used to designate an authorization
Xfile containing patterns that, when matched against a client host
Xname, domain name or internet address, can allow or disallow X.25
Xpacket service.  This can be useful when X.25 service should not be
Xprovided to every IP-connected host; for example, a company attached
Xto the Internet that wants X.25 service to be available to its own
Xusers, and maybe even to a limited set of outside users, but not to
Xthe entire world.  The company can use this facility to ensure that
Xits X.25 costs are incurred only by its own users; it is also a useful
Xaid in managing security considerations.
X.SH OPTIONS
X.TP "\w'\-a \^authorization-file\ \ \ \ 'u"
X.B \-a\^  \fRauthorization-file\fP
XFile describing constraints on and priviliges of users of the SunLink
Xcompatibility facilities provided by the daemon.  The default in the
Xabsence of an authorization file is the appliation of no constraints.
XThe default in the presence of an empty (all white space or comments)
Xor zero-length authorization file is to reject all connection
Xrequests.  
X.ig fu
XThe authorization file created during the software installation
Xprocess enables X.25 access to and from only those hosts attached to
Xthe local IP network.
X??????  how local?  gleep netmask from le0?  class A/B/C/D/E ?????????
X.fu
X.SH IDENTITY VERIFICATION
X.PP
XBefore the authorization file is consulted, the client's identity is
Xverified by
X.RS
X.PP
Xusing gethostbyaddr() to get the client's host/domain name and
Xany aliases,
X.PP
Xusing gethostbyname() to look up the resulting hostname, and
X.PP
Xverifying that the client's address exists in the resulting nameserver
Xrecord.
X.RE
X.PP
XAny connection failing these tests is rejected.  The only way to
Xdisable this test is to not supply an authorization file, which is
Xmost strenuously discouraged.
X
X.SH FORMAT
X
XPatterns are one to a line; blank lines are ignored.
X
XComments begin with a '#', a space, or a tab, and extend to the end of
Xthe line.  Upper/lower case distinctions are ignored.
XEach pattern can
Xoptionally begin or end (but not both) with a '*' character, which
Xmatches any string (even an empty string).
X
XPatterns can also optionally begin with a '!'  character, which
Xindicates that a match means to reject, rather than accept, the
Xconnection.
X
XThe client's fully qualified domain name (such as
Xvax27.eng.bigcorp.com), any aliases discovered by a gethostbyaddr(),
Xand the numeric address (such as 123.45.67.89) are all compared
Xagainst each pattern in the list.
X
XWhen the first match is found, the search is complete.  If the
Xmatching pattern began with a '!' then the connection is rejected,
Xotherwise it is accepted.  The rest of the authorization file is
Xignored until the next connection request.
X
XIf no matches are found, the connection is rejected.  If it is desired
Xthat connections be instead accepted by default, put a line containing
Xthe single character '*' at the end of the file.
X
X.SH EXAMPLE
X.RS
X.nf
X#
X#	Morning Star X.25 SunLink-X.25-emulation client authorization file
X#
X# block Joe in the Sales department
X!isuzu.sales.bigcorp.com
X# block the manufacturing subnet
X!123.45.68.*
X# allow all other users in our company
X*.bigcorp.com
X# block everyone else
X
X.fi
X.RE
X.SH RECOMMENDATIONS
X.SH SEE ALSO
Xx25(7), x25trace(1), x25-ddn(7), x25-pad(7), x25-x29(7),
XRFC877.
X.SH CREDITS
XSunLink is a registered trademark of Sun Microsystems Inc.
X.SH COPYRIGHT INFORMATION
XCopyright \(co 1989, 1990, 1991 Morning Star Technologies Inc.; all
Xrights reserved.
X
X.\" Local Variables:
X.\" mode: electric-nroff
X.\" compile-command: "groff -man -TX75 x25-auth.5"
X.\" End:
END_OF_FILE
if test 4005 -ne `wc -c <'x25/man/x25-auth.5'`; then
    echo shar: \"'x25/man/x25-auth.5'\" unpacked with wrong size!
fi
# end of 'x25/man/x25-auth.5'
fi
if test -f 'x25/man/x25-socket.3' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/man/x25-socket.3'\"
else
echo shar: Extracting \"'x25/man/x25-socket.3'\" \(33523 characters\)
sed "s/^X//" >'x25/man/x25-socket.3' <<'END_OF_FILE'
X.\" @(#)x25-socket.3	1.1
X.TH X25-SOCKET 3 "1 February 1991" "Morning Star X.25"
X.SH NAME
Xx25-socket, socket, connect, bind, listen, accept, getsockname, getpeername, recv, send, read, write, close, ioctl, perror \- SunLink emulation socket interface for Morning Star X.25
X.SH SYNOPSIS
X.nf
X.B int socket(domain, type, protocol)
X.B int domain, type, protocol;
X.LP
X.B int connect(s, addr, addrlen)
X.B int s;
X.B CONN_DB *addr;
X.B int addrlen;
X.LP
X.B int bind(s, addr, addrlen)
X.B int s;
X.B CONN_DB *addr;
X.B int addrlen;
X.LP
X.B int listen(s, backlog)
X.B int s, backlog;
X.LP
X.B int accept(s, addr, addrlenp)
X.B int s;
X.B CONN_DB *addr;
X.B int *addrlenp;
X.LP
X.B int getsockname(s, addr, addrlenp)
X.B int s;
X.B CONN_DB *addr;
X.B int *addrlenp;
X.LP
X.B int getpeername(s, addr, addrlenp)
X.B int s;
X.B CONN_DB *addr;
X.B int *addrlenp;
X.LP
X.B int recv(s, buf, count, flags)
X.B int s;
X.B char *buf;
X.B int count, flags;
X.LP
X.B int send(s, buf, count, flags)
X.B int s;
X.B char *buf;
X.B int count, flags;
X.LP
X.B read(s, buf, count)
X.B int s;
X.B char *buf;
X.B int count;
X.LP
X.B write(s, buf, count)
X.B int s;
X.B char *buf;
X.B int count;
X.LP
X.B close(s)
X.B int s;
X.LP
X.B int ioctl(s, command, arg)
X.B int s, command;
X.B caddr_t arg;
X.LP
X.B perror(message)
X.B char *message;
X.fi
X.ft P
X.SH DESCRIPTION
XThe Morning Star socket emulation interface is designed to be source
Xcode compatible with Sun Microsystems' SunLink X.25 packet interface.
XThis is accomplished by 1) header files that contain data structures
Xand defined constants compatible with SunLink X.25, plus macros that
Xredefine several common system calls, replacing them with internal
Xemulation routines; 2) a subroutine library containing those internal
Xemulation routines; and 3) a TCP port on the X.25 daemon providing
Xcommunication between the main X.25 process and the emulation
Xsoftware.
X.LP
XTo build a program using the socket interface, first #include one or
Xmore of the following files:
X.LP
X.nf
X.ft B
X# include <sundev/syncstat.h>
X# include <netx25/x25_ctl.h>
X# include <netx25/x25_ioctl.h>
X# include <netx25/x25_pk.h>
X.fi
X.LP
XEach of these #includes
X.B <netx25/x25_emul.h>
Xwhich contains definitions for constants and data structures used by
Xthe X.25 socket interface as well as redefinitions of several system
Xcalls (for example,
X.I socket\^
Xis renamed to
X.IR __x25_socket\^ )
Xso that their functions can be emulated by library routines in the
X.I \-lx25\^
Xfunction library.
X.LP
XThe functions emulated are:
X.LP
X.nf
X.ft B
Xint socket(domain, type, protocol)
Xint domain, type, protocol;
X.fi
X.RS
X.LP
XIf
X.I domain\^
Xis
X.B AF_X25
Xand
X.I type\^
Xis
X.B SOCK_STREAM
Xand
X.I protocol\^
Xis
X.BR 0 ,
Xa connection will be established to
X.BR x25d ,
Xthe X.25 daemon, and the returned descriptor will reference an X.25
Xsocket.  Otherwise, the arguments will be passed to the normal system
X.I socket\^
Xcall.
X.LP
XA TCP connection will be established to the X.25 daemon using an
X.B AF_INET
Xdomain socket of type
X.BR SOCK_STREAM ,
Xprotocol
X.BR 0 .
XThe address called is
X.BR x25-server ,
Xor
X.IR getenv\^ ("X25SERVER")
Xif it exists in the environment, and the port number is
X.B x25
Xor
X.IR getenv\^ ("X25SERVERPORT"),
Xif it exists.  If the system
X.I socket\^
Xcall fails, the emulated
X.I socket\^
Xcall will fail, with
X.I errno\^
Xcontaining the system error number.
X.LP
XIn addition to any system errors possible for this type of
Xconnection, the following errors can occur:
X.LP
X.TP "\w'[EFASTDATA]\ \ 'u"
X[ENOMEM]
XMemory could not be allocated for internal data structures.
X.TP
X[ENXIO]
XThe
X.I connect\^
Xto the X.25 daemon failed.
X.TP
X[EIO]
XThe X.25 daemon is acting strangely.
X.RE
X.LP	    
XThe descriptions of the system calls below refer to their behavior
Xwhen passed an X.25 socket descriptor.  Their behavior will remain
Xunchanged for any other type of socket.  The single exception to this
Xis that the first of any of these calls (including
X.IR socket\^ )
Xtries to do some one-time initialization, and can return
X.B -1
X.RI ( errno\^
X=
X.BR ENOMEM )
Xif unable to allocate space for internal data structures.
X.LP
XIn all cases, the possible error conditions listed are in addition to
Xthose generated by the operating system.
X.LP
X.nf
X.ft B
X.ta \w'\ \ \ \ u_char\ host[(MAXHOSTADR\ +\ 1)\ /\ 2];\ \ 'u
Xtypedef struct conn_db_s
X    {
X    u_char hostlen;	/* Address length in BCD digits */
X    u_char host[(MAXHOSTADR + 1) / 2];	/* DTE address (packed BCD) */
X    u_char datalen;	/* Length of CUD in bytes */
X    u_char data[MAXDATA];	/* Call User Data */
X    } CONN_DB;
X.LP
X.ft B
Xint connect(s, addr, addrlen)
Xint s;
XCONN_DB *addr;
Xint addrlen;
X.fi
X.RS
X.LP
XPlace an outgoing X.25 call to the X.121 address specified by
X.I addr -> host\^
Xand
X\fIaddr -> hostlen\fP\^.
XInclude
X.I addr -> datalen\^
Xbytes of data from
X.I addr -> data\^
Xin the call-user-data field of the call request packet.
X.LP
XThe ANY_LINK bit may be set in the
X.I addr -> hostlen\^
Xfield, but it has no effect; all routing of outgoing calls is
Xcontrolled by the X.25 daemon.
X.LP
XTo include more than MAXDATA bytes in the call-user-data
Xfield, precede the
X.I connect\^
Xcall with one or more calls to the X25_WR_USER_DATA
X.IR ioctl\^ .
XThe
X.I addr -> data\^
Xbytes are included first, followed by any X25_WR_USER_DATA bytes.
X.LP
XTo force the D-bit to be set in the call request, precede the
X.I connect\^
Xcall with an X25_SEND_TYPE
X.I ioctl\^
Xwith the (1<<D_BIT) mask set.
X.LP
XTo include include non-default facilities in the call request,
Xprecede the
X.I connect\^
Xcall with an X25_WR_FACILITY
X.IR ioctl\^ .
X.LP
XIf an error occurs,
X.B -1
Xis returned and
X.I errno\^
Xcontains one of the following:
X.TP "\w'[EFASTDATA]\ \ 'u"
X[ENOMEM]
XThe call request packet being built was too large to send.
X.TP
X[EIO]
XAn indecipherable message was received from the X.25 daemon.
X.TP
X[EFASTDATA]
XA fast-select clear request packet was
Xreceived.  Use the X25_RD_USER_DATA
X.I ioctl\^
Xcommand to retrieve the clear-user-data.  This
Xcan only happen if the X25_WR_FACILITY
X.I ioctl\^
Xwas previously called with the
Xfast_select_type field set to either
XFAST_ACPT_CLR or FAST_CLR_ONLY.
X.TP
X[ENOTCONN]
XA normal clear request packet was received.
XUse the X25_RD_CAUSE_DIAG
X.I ioctl\^
Xcommand to retrieve the clearing cause and diagnostic
Xbytes contained in the clear request packet.
X.RE
X.LP
X.nf
X.ft B
Xint bind(s, addr, addrlen)
Xint s;
XCONN_DB *addr;
Xint addrlen;
X.fi
X.RS
X.LP
XPrepare for a
X.I listen\^
Xcall by defining the X.121 addresses and protocol ID fields that we
Xare looking for in an incoming call request packet.
X.LP
XThe
X.I addr -> host\^
Xfield contains X.121 address digits (if any) for matching against an
Xincoming call.  The
X.I addr -> hostlen\^
Xfield contains the number of digits in
X\fIaddr -> host\fP\^,
Xplus the optional ANY_LINK and ANY_SUBADDRESS bits.  Note: Setting
X.I addr -> hostlen\^
Xto zero with neither ANY_LINK nor ANY_SUBADDRESS set is the
Xsame as supplying a zero address length with both ANY_LINK and
XANY_SUBADDRESS set.
X.LP
XThe
X.I addr -> data\^
Xfield may contain bytes to be matched against the call-user-data field
Xof an incoming call, potentially modified by mask bytes defined with
Xthe X25_WR_MASK_DATA
X.I ioctl\^
Xcommand.  The
X.I addr -> datalen\^
Xfield contains the number of bytes contained in
X\fIaddr -> data\fP\^,
Xplus the optional EXACT_MATCH bit.  The description of the
X.I listen\^
Xcall below explains how all these parameters are used to select an
Xincoming call.
X.LP
XIf an error occurs,
X.B -1
Xis returned and
X.I errno\^
Xcontains one of the following:
X.TP "\w'[EFASTDATA]\ \ 'u"
X[EINVAL]
XThe addr or addrlen argument didn't make sense.
X.RE
X.LP
X.nf
X.ft B
Xint listen(s, backlog)
Xint s, backlog;
X.fi
X.RS
X.LP
XRequest that incoming X.25 calls be screened and queued for future
X.I accept\^
Xcalls if they match a set of criteria.  Use
X.I bind\^
Xand the X25_WR_MASK_DATA, X25_SET_LINK and X25_WR_FACILITY
X.I ioctl\^
Xcommands to define selection criteria.
X.LP
XThe following algorithm is used to decide whether a given
Xincoming call should be delivered to a waiting
X.IR listen\^ .
X.LP
X.RS
X.HP
Xif (the X25_SET_LINK
X.I ioctl\^
Xcommand has been called but
Xthe call was not received on the specified line)
X.RS
Xno match
X.RE
X.HP
Xif (the received X.121 called-address is shorter than
Xthe
X.I addr -> host\^
Xdigit string passed to
X.IR bind\^ )
X.RS
Xno match
X.RE
X.HP
Xif (the
X.I bind\^
XANY_LINK bit is set and the received
Xcalled-address field does not end with the
X.I bind\^
Xaddr -> host digit string)
X.RS
Xno match
X.RE
X.HP
Xif (the
X.I bind\^
XANY_SUBADDRESS bit is set and the received
Xcalled-address field does not begin with the
X.I addr -> host\^
Xdigit string passed to
X.IR bind\^ )
X.RS
Xno match
X.RE
X.HP
Xif (the received call request contains the Reverse
XCharging facility but the X25_WR_FACILITY
X.I ioctl\^
Xcommand was not issued with the reverse_charge field
Xset to a non-zero value)
X.RS
Xno match
X.RE
X.HP
Xif (the received call request contains the Fast Select facility,
Xeither With Restriction on Response or With No Restriction on
XResponse, and if Fast Select has not been requested (i.e.
XX25_WR_FACILITY has not been done, or it was done with
Xfast_select_type = FAST_OFF))
X.RS
Xno match
X.RE
X.HP
Xif (X25_WR_FACILITY has been performed with fast_select_type =
XFAST_CLR_ONLY and the received call request does not contain the Fast
XSelect facility With Restriction on Response)
X.RS
Xno match
X.RE
X.HP
Xif
X.RI ( bind\^
Xhas been called with the EXACT_MATCH bit set in
X.I addr -> datalen\^
Xbut the received call request is not exactly
X.I addr -> datalen\^
Xbytes long)
X.RS
Xno match
X.RE
X.HP
Xif (\fIaddr -> datalen\fP\^
Xis greater than the length of the call-user-data field of the received
Xcall request)
X.RS
Xno match
X.RE
X.HP
Xif (any of the first
X.I addr -> datalen\^
Xbytes of the call-user-data field (masked with any X25_WR_MASK_DATA
Xbytes) differ from their
X.I addr -> data[]\^
Xcounterparts)
X.RS
Xno match
X.RE
X.HP
Xmatch
X.RE
X.LP
XIf an error occurs,
X.B -1
Xis returned; otherwise
X.B 0
Xis returned.
X.RE
X.LP
X.nf
X.ft B
Xint accept(s, addr, addrlenp)
Xint s;
XCONN_DB *addr;
Xint *addrlenp;
X.fi
X.RS
X.LP
XWait for an incoming call to be selected as a result of an earlier
X.I listen\^
Xcall.  The CONN_DB structure will be filled in with the
Xcalling-address and call-user-data fields of the received call
Xrequest.  A call accept packet will be sent unless the
XX25_CALL_ACPT_APPROVAL
X.I ioctl\^
Xcommand has been called with a non-zero value, or unless the received
Xcall is a fast select call.  If the incoming call is cleared before we
Xcan accept it,
X.B -1
Xwill be returned and
X.I errno\^
Xwill be set to
X.BR EIO .
XIf the received clear request contained clear-user-data,
X.I errno\^
Xwill instead be set to
X.B EFASTDATA
Xand the resulting facilities and clear-user-data can be retrieved with
Xthe X25_RD_FACILITIES and X25_RD_USER_DATA
X.I ioctl\^
Xcommands.
X.LP
XIf a call has been successfully received, a new socket descriptor is
Xreturned connected to the new X.25 virtual circuit.  If neither the
XX25_CALL_ACPT_APPROVAL
X.I ioctl\^
Xhas been issued, nor the call contained a fast select facility field
X(with or without restriction on response), the call accept packet will
Xhave already been sent.  Otherwise, use the X25_SEND_CALL_ACPT
X.I ioctl\^
Xcommand to accept the call, or simply
X.I close\^
Xthe descriptor to clear it.
X.LP
XIf an error occurs,
X.B -1
Xis returned and
X.I errno\^
Xis set to one of the following:
X.TP "\w'[EFASTDATA]\ \ 'u"
X[EIO]
XThe incoming call was cleared before we could receive it, or an
Xindecipherable message was received from the X.25 daemon.
X.ig fu
X.TP
X[EIEIO]
XThe incoming call was found to be originating down on the farm.
X.fu
X.TP
X[EFASTDATA]
XThe incoming call was cleared before we could receive it,
Xand the clear packet contained a non-empty clear-user-data field.  The
Xdata can be retrieved with the X25_RD_USER_DATA
X.I ioctl\^
Xcommand on s (the original, listening socket).
X.RE
X.LP
X.nf
X.ft B
Xint getsockname(s, addr, addrlenp)
Xint s;
XCONN_DB *addr;
Xint *addrlenp;
X.fi
X.RS
X.LP
XFetch the X.121 address of the local end of the virtual circuit
Xassociated with the specified X.25 socket.  The
X.I addr -> host\^
Xfield will be filled in with the X.121 address digits, and the
X.I addr -> hostlen\^
Xfield will contain the number of digits and the value of the (unused)
XSUBADR_ONLY bit.  The
X.I addr -> datalen\^
Xfield is set to zero.
X.LP
XIf successful,
X.B 0
Xis returned; else
X.B -1
Xis returned and
X.I errno\^
Xis set to one of the following:
X.TP "\w'[EFASTDATA]\ \ 'u"
X[EINVAL]
XThe CONN_DB structure specified by
X.I addr\^
Xand
X.I *addrlenp\^
Xdidn't look valid.
X.RE
X.LP
X.nf
X.ft B
Xint getpeername(s, addr, addrlenp)
Xint s;
XCONN_DB *addr;
Xint *addrlenp;
X.fi
X.RS
X.LP
XFetch the X.121 address of the remote end of the virtual circuit
Xassociated with the specified X.25 socket.  The
X.I addr -> host\^
Xfield will be filled in with the X.121 address digits, and the
X.I addr -> hostlen\^
Xfield will contain the number of digits and the value of the ANY_LINK
Xbit.  The
X.I addr -> datalen\^
Xfield is set to zero.
X.LP
XIf successful, zero is returned; else
X.B -1
Xis returned and
X.I errno\^
Xis set to one of the following:
X.TP "\w'[EFASTDATA]\ \ 'u"
X[EINVAL]
XThe CONN_DB structure specified by
X.I addr\^
Xand
X.I *addrlenp\^
Xdidn't look valid.
X.ig fu
X.TP
X[EIGENVAL]
XThe interrupt Eigenvector contained an invalid tensor.
X.fu
X.RE
X.LP
X.nf
X.ft B
Xint recv(s, buf, count, flags)
Xint s;
Xchar *buf;
Xint count, flags;
X.fi
X.RS
X.LP
XRead data from the specified X.25 socket.  If
X.I flags\^
Xis zero, normal in-band data is read; if
X.I flags\^
Xis MSG_OOB, out-of-band data (interrupt request packet data) is read.
X.LP
X.I Recv\^
Xwill normally block until a complete packet sequence (see
X.IR send\^ ,
Xbelow) has arrived.  If the packet sequence is larger than the
Xsupplied buffer, the remainder is silently discarded.  See the
XX25_HEADER and X25_RECORD_SIZE
X.I ioctl\^
Xcommands below for alternative receive modes that be used to avoid
Xdata loss.  Use the X25_WR_SBHIWAT
X.I ioctl\^
Xcommand to avoid deadlock when complete packet sequences are larger
Xthan the client-to-daemon flow-control window size.
X.RE
X.LP
X.nf
X.ft B
Xint send(s, buf, count, flags)
Xint s;
Xchar *buf;
Xint count, flags;
X.fi
X.RS
X.LP
XWrite data to the specified X.25 socket.  If
X.I flags\^
Xis zero, normal in-band data is sent; if
X.I flags\^
Xis MSG_OOB, the out-of-band data is sent in the data field of an
Xinterrupt request packet.  The amount of out-of-band data given in a
Xsingle
X.I send\^
Xshould not exceed 1 byte for X.25 networks conforming to the 1980 or
Xearlier X.25 specifications, or 32 bytes for 1984 or later networks.
X.LP
XThe data in
X.I buf\^
Xwill normally be sent as a complete packet sequence.  A complete
Xpacket sequence is a sequence of data packets, all of which have the M
Xbit set except for the last, and all of which must be the maximum
Xnegotiated size except for the last one.
X.LP
XTo send data packets with arbitrary combinations of the Q, D and M
Xbits set, use the X25_SEND_TYPE
X.I ioctl\^
Xcommand.
X.RE
X.LP
X.nf
X.ft B
Xread(s, buf, count)
Xint s;
Xchar *buf;
Xint count;
X.fi
X.RS
X.LP
XRead in-band data from the specified X.25 socket.  Calling
X.I read(s, buf, count)\^
Xis identical to calling
X.I recv(s, buf, count, 0).
X.RE
X.LP
X.nf
X.ft B
Xwrite(s, buf, count)
Xint s;
Xchar *buf;
Xint count;
X.fi
X.RS
X.LP	
XWrite in-band data to the specified X.25 socket.  Calling
X.I write(s, buf, count)\^
Xis identical to calling
X\fIsend(s, buf, count, 0)\fR\^.
X.RE
X.LP
X.nf
X.ft B
Xclose(s)
Xint s;
X.fi
X.RS
X.LP
XDiscontinue use of the specified socket and clear any X.25 virtual
Xcircuit associated with it.  The X25_WR_USER_DATA
X.I ioctl\^
Xcommand may be issued before closing to specify data to be included in
Xthe clear-user-data field of the clear request packet.
X.RE
X.LP
X.nf
X.ft B
Xint ioctl(s, command, arg)
Xint s, command;
Xcaddr_t arg;
X.fi
X.RS
X.LP
XPerform a special operation on the given X.25 socket.  The type of
X.I arg\^
Xdepends on the value of command.  Consult the following table for a
Xdescription of each X.25
X.I ioctl\^
Xcommand
Xand argument type.
X.LP
X.ta \w'X25_CALL_ACPT_APPROVAL\ \ \ \ 'u
X.ft I
XCommand	Argument Type
X.LP
X.ft B
XX25_VERSION	int *arg;
X.RS
X.LP
XFetch the version number of the X.25 socket implementation.  The value
Xreturned for the current version is \fB42\fP.
X.RE
X.LP
X.ft B
XSIOCSPGRP	int *arg;
X.RS
X.LP
XIf a signal handler routine is associated with the SIGURG signal, the
XSIOCSPGRP command should be used to associate the specified socket
Xwith a process group ID.
X.I Arg\^
Xshould point to an integer containing the process group number of the
Xprocess to receive SIGURG signals.
X.RE
X.LP
X.ft B
XX25_GET_LINK	int *arg;
X.RS
X.LP
XFetch the number of the X.25 link carrying the virtual circuit
Xassociated with the specified X.25 socket.
X.RE
X.LP
X.ft B
XX25_SET_LINK	int *arg;
X.RS
X.LP
XRequire that any incoming calls delivered to a following
X.I accept\^
Xcall arrive on the specified X.25 link number.
X.LP
XThis command has no effect on the routing of outgoing calls; all
Xoutbound routing of outgoing calls is controlled by the X.25 daemon.
X.RE
X.LP
X.ft B
XX25_RD_LCGN	int *arg;
X.RS
X.LP
XFetch the LCN (Logical Channel Number) and LCGN (Logical Channel Group
XNumber) of the virtual circuit associated with this socket.  The LCN
Xoccupies the lowest eight bits of the integer pointed to by
X.I arg\^
X(mask 0xFF), and the LCGN occupies the four bits above that (mask
X0xF00).
X.RE
X.LP
X.ft B
XX25_SEND_TYPE	int *arg;
X.RS
X.LP
XSpecify the values of the Q, D and M bits for data packets sent with
X.I send\^
Xor
X.IR write\^ .
XThe integer pointed to by
X.I arg\^
Xmust contain a combination of
X(1<<M_BIT), (1<<D_BIT) and (1<<Q_BIT).
X.LP
XThe M (More) bit indicates that the current packet is not the last in
Xa complete packet sequence.  Once set, all subsequent
X.I send\^
Xcalls contribute data to a single packet sequence until another
XX25_SEND_TYPE turns it off and allows another
X.I send\^
Xto supply the final packet in the sequence.  Since X.25 requires that
Xall M-bit packets must be the maximum negotiated size,
X.I send\^
Xwill not send an M-bit data packet until it accumulates enough data to
Xentirely fill one.
X.LP
XThe M bit will stay set until turned off, but the Q and D bits are
Xautomatically reset after sending the last packet in a complete packet
Xsequence.
X.LP
XNote: Changing the values of the Q and D bits within a complete packet
Xsequence is a violation of X.25 and will elicit a clear or reset
Xrequest from the X.25 daemon.
X.LP
XX25_SEND_TYPE can also be used to set the D bit in the call request
Xpacket sent by
X.IR connect\^ .
X.RE
X.LP
X.ft B
XX25_HEADER	int *arg;
X.RS
X.LP
XIf the integer pointed to by
X.I arg\^
Xis non-zero, header mode is enabled.  If
X.I arg\^
Xpoints at a zero, header mode is disabled.
X.LP
XWhen header mode is enabled, each call to
X.I recv\^
Xor
X.I read\^
Xwill have a one-byte header preceding the data.  The header contains a
Xcombination of (1<<M_BIT), (1<<D_BIT) and (1<<Q_BIT), indicating the
Xvalues of those bits in the received data packet.
X.LP
XThis command may be issued at any time.
X.RE
X.LP
X.ft B
XX25_RECORD_SIZE		int *arg;
X.RS
X.LP
XThe
X.I recv\^
Xand
X.I read\^
Xcalls normally return a complete packet sequence (see
X.IR send\^ ,
Xabove).  If the buffer passed to
X.I recv\^
Xis not large enough to accommodate the entire packet sequence, the
Xoverflow data is silently discarded.  To avoid this behavior, and to
Xreduce the potential buffering requirements, it is possible to limit
Xthe amount of data delivered to a single
X.I recv\^
Xor
X.IR read\^ .
X.LP
XThe integer pointed to by
X.I arg\^
Xshould be the maximum number of data packets to be read by a
X.I recv\^
Xor
X.I read\^
Xcall.  The supplied receive buffer should then be at least as large as
Xthis number times the negotiated packet size to keep from losing data.
X.LP
XNote, however, that a single
X.I recv\^
Xor
X.I read\^
Xwill only return data from a single packet sequence, even though it
Xcan take several
X.I recv\^
Xor
X.I read\^
Xcalls to read the entire sequence.  This means that shorter packet
Xsequences will be returned in a single read less than the maximum
Xsize, and the last
X.I recv\^
Xin a packet sequence will usually also not fill the buffer.
X.LP
XThe setting of record size has no effect when header mode is enabled.
X.RE
X.LP
X.ft B
XX25_OOB_TYPE		int *arg;
X.RS
X.LP
XDetermine whether out-of-band data has been received.  The integer
Xpointed to by
X.I arg\^
Xwill be set to either zero, if no out-of-band messages have been
Xreceived; INT_DATA, if an interrupt request has been received; or
XVC_RESET, if a reset request has been received.
X.RE
X.LP
X.ft B
XX25_GET_NLINKS		int *arg;
X.RS
X.LP
XFetch the number of X.25 links configured by the daemon.
X.RE
X.LP
X.ft B
XX25_CALL_ACPT_APPROVAL	int *arg;
X.RS
X.LP
XSet (if
X.I arg\^
Xpoints to a non-zero value) or reset (if
X.I arg\^
Xpoints to a zero) call approval mode, which is initially reset.  When
X.I accept\^
Xreceives an incoming call, a call accept packet is automatically sent
Xunless in call approval mode (or unless an X25_SET_FACILITIES
X.I ioctl\^
Xhas set fast_select_type to FAST_ACPT_CLEAR or FAST_CLR_ONLY).  Use
Xthe X25_SEND_CALL_ACPT
X.I ioctl\^
Xto send the call accept, or use
X.I close\^
Xto clear the call.
X.RE
X.LP
X.ft B
XX25_SEND_CALL_ACPT	void *arg;
X.RS
X.LP
XSend a call accept packet in response either to a call request
Xreceived in call approval mode or to a fast select call request
Xreceived after having issued an X25_SET_FACILITIES
X.I ioctl\^
Xwith fast_select_type = FAST_ACPT_CLEAR.  The X25_WR_USER_DATA
X.I ioctl\^
Xcommand may be used to specify the call-user-data to be included in
Xthe fast select call accept.
X.RE
X.LP
X.nf
X.ft B
X.ta \w'\ \ \ \ u_char\ host[(MAXHOSTADR\ + \ 1)\ /\ 2];\ \ 'u
Xtypedef struct conn_adr_s
X    {
X    u_char hostlen;	/* Addr length in BCD digits */
X    u_char host[(MAXHOSTADR + 1) / 2];	/* Address (packet BCD) */
X    } CONN_ADR;
X.fi
X.LP
X.ft B
XX25_RD_LOCAL_ADR	CONN_ADR *arg;
X.RS
X.LP
XFetch the X.121 address of the local end of the virtual circuit
Xassociated with the specified X.25 socket.  The
X.I host\^
Xfield will be filled in with the X.121 address digits, and the
X.I hostlen\^
Xfield will contain the number of digits and the value of the (unused)
XSUBADR_ONLY bit.  See also
X.IR getsockname\^ .
X.RE
X.LP
X.ft B
XX25_RD_REMOTE_ADR	CONN_ADR *arg;
X.RS
X.LP
XFetch the X.121 address of the remote end of the virtual circuit
Xassociated with the specified X.25 socket.  The
X.I addr -> host\^
Xfield will be filled in with the X.121 address digits, and the
X.I addr -> hostlen\^
Xfield will contain the number of digits and the value of the ANY_LINK
Xbit.  See also
X.IR  getpeername\^ .
X.RE
X.LP
X.ft B
XX25_WR_LOCAL_ADR	CONN_ADR *arg;
X.RS
X.LP
XSpecify the calling-address field of a call request packet to be
Xgenerated by a later call to
X.IR connect\^ .
XThe SUBADR_ONLY bit may be set in the
X.I hostlen\^
Xfield, but is ignored.  If the specified address is two bytes long,
Xhowever, the X.25 daemon will assume it to be a subaddress and will
Xinsert the DNIC and NTN of the X.25 link selected by the routing
Xalgorithm onto the front of the subaddress.
X.RE
X.LP
X.ft B
XX25_RD_HOSTADR		CONN_ADR *arg;
X.RS
X.LP
XFetch the configured X.121 address (DNIC plus NTN) of the X.25 link
Xspecified by an earlier call to the X25_SET_LINK
X.I ioctl\^
Xcommand, or the zero link if X25_SET_LINK has not been called.
X.RE
X.LP
X.nf
X.ft B
Xtypedef struct mask_data_db_s
X    {
X    u_char masklen;
X    u_char mask[MAXMASK];
X    } MASK_DATA_DB;
X.fi
X.LP
X.ft B
XX25_WR_MASK_DATA	MASK_DATA_DB *arg;
X.RS
X.LP
XSpecify up to MAXMASK bytes of
X.I mask\^
Xbytes to be used in screening the
Xcall-user-data fields of incoming calls with
X.I listen\^
Xand
X.IR accept\^ .
XEach byte of the call-user-data field of an incoming call is logically
XANDed with the corresponding
X.I mask[]\^
Xbyte before being compared with the
X.I data[]\^
Xbytes supplied to
X.IR bind\^ .
XSee the above description of
X.I listen\^
Xand
X.IR bind\^ .
X.RE
X.LP
X.nf
X.ft B
Xtypedef struct so_hiwat_db_s
X    {
X    short sendhiwat;
X    short recvhiwat;
X    } SO_HIWAT_DB;
X.fi
X.LP
X.ft B
XX25_RD_SBHIWAT	SO_HIWAT_DB *arg;
X.RS
X.LP
XFetch the current values of the send and receive flow control high
Xwater marks.  These values define the maximum amount of unacknowledged
Xdata that is allowed between the X.25 daemon and the user process
X(analogous to the TCP window size).  The
X.I sendhiwat\^
Xfield contains the window size in the user-to-daemon direction, and
X.I recvhiwat\^
Xcontains the window size in the daemon-to-user direction.
X.RE
X.LP
X.ft B
XX25_WR_SBHIWAT	SO_HIWAT_DB *arg;
X.RS
X.LP
XSet the send and receive flow control high water marks (see
XX25_RD_SBHIWAT, above).  The default value for each direction is 2048
Xbytes.
X.RE
X.LP
X.nf
X.ft B
X.ta \w'#\ define\ WAIT_CONFIRMATION\ \ 'u \w'#\ define\ WAIT_CONFIRMATION\ \ 2\ \ 'u
Xtypedef struct x25_cause_diag_s
X    {
X    u_char flags;
X# define RECV_DIAG	0	/* 0<<0: no cause/diag */
X		/* 1<<0: recv cause/diag */
X# define DIAG_TYPE	1	/* 0<<1: reset cause/diag */
X		/* 1<<1: clear cause/diag */
X# define WAIT_CONFIRMATION	2	/* 0<<2: no wait after */
X		/*       X25_WR_DIAG_CODE */
X		/* 1<<2: wait after */
X		/*       X25_WR_DIAG_CODE */
X    u_char datalen;
X    u_char data[64];
X    } X25_CAUSE_DIAG;
X.fi
X.LP
X.ft B
XX25_RD_CAUSE_DIAG	X25_CAUSE_DIAG *arg;
X.RS
X.LP
XFetch up to 64 bytes from the data field (the entire packet data
Xfield, not just the clear-user-data field) of a received clear request
Xor reset request packet.  The
X.I datalen\^
Xfield will be set to the number of bytes actually copied.  The
XRECV_DIAG bit will be set in flags if two or more bytes (the cause and
Xdiagnostic) are copied to
X.IR data[]\^ ,
Xand the DIAG_TYPE bit will be set if the packet was a clear request
Xinstead of a reset request.
X.RE
X.LP
X.ft B
XX25_WR_CAUSE_DIAG	X25_CAUSE_DIAG *arg;
X.RS
X.LP
XIf the DIAG_TYPE bit is on in
X.IR flags\^ ,
Xa clear request packet will be sent, otherwise a reset request will be
Xsent.  Up to 64 bytes of data field may be specified in
X.I data\^
Xand
X.IR datalen\^ ,
Xincluding the clearing or resetting cause
X.RI ( data\^ [0])
Xand diagnostic
X.RI ( data\^ [1]).
XIf the WAIT_CONFIRMATION bit is set, this call will block until the
Xcorresponding clear confirm or reset confirm packet is received.
X.LP
XNote that sending a malformatted message, or one that conflicts with
Xthe X.25 daemon's configuration, will not return an error but may
Xelicit a reset or clear request in response.
X.RE
X.LP
X.nf
X.ft B
X.ta \w'#\ define\ FAST_CLR_ONLY\ \ 1\ \ 'u
Xtypedef struct facility_db_s
X    {
X    u_char reverse_charge;	/* 0 = don't request or allow reverse */
X	/*     charging */
X	/* 1 = request or allow reverse */
X	/*     charging */
X    u_short recvpktsize;	/* 0 = default receive pkt size */
X	/* Other sizes: 16, 32, 64, 128, */
X	/* 256, 512, 1024, 2048 or 4096 */
X    u_short sendpktsize;	/* Same values as for recvpktsize */
X    u_char recvwndsize;	/* 0 = default receive window size */
X	/* Other values: 1-7 or 1-127 */
X    u_char sendwndsize;	/* Same values as for recvwndsize */
X    u_char recvthruput;	/* 0 = default receive throughput */
X	/* class.  Other values are: */
X	/* 3 = 75   7 = 1200 11 = 19200 */
X	/* 4 = 150  8 = 2400 12 = 48000 */
X	/* 5 = 300  9 = 4800 */
X	/* 6 = 600 10 = 9600 */
X    u_char sendthruput;	/* Same values as for recvthruput */
X    u_char cug_req;	/* 0 = no CUG; 1 = CUG in cug_index */
X    u_char cug_index;	/* Only valid when cug_req == 1 */
X	/* Values from 0x00 to 0x99 (BCD) */
X    u_char fast_select_type;	/* Fast select options */
X.ta \w'#\ define\ FAST_CLR_ONLY\ \ 'u \w'#\ define\ FAST_CLR_ONLY\ \ 1\ \ 'u
X# define FAST_OFF	0	/* No fast select sent or accepted*/
X# define FAST_CLR_ONLY	1	/* Clear fast select calls */
X# define FAST_ACPT_CLR	2	/* Clear or accept fast select calls */
X.ta \w'#\ define\ FAST_CLR_ONLY\ \ 1\ \ 'u
X
X    u_char rpoa_req;	/* 0 = no RPOA transit request */
X	/* 1 = use RPOA transit req in rpoa */
X    u_short rpoa;	/* Only valid when rpoa_req == 1 */
X	/* Values from 0x0000 to 0x9999 (BCD) */
X    u_char stdservice;	/* 0: DDN Basic Service; 1: DDN Standard Service */
X    u_char osiservice;	/* Must be 0 */
X    u_char precedence_req;	/* If != 0, use DDN Call Precedence */
X    u_char precedence;	/* DDN Call Precedence; ignored */
X	/* if precedence_req == 0 */
X    } FACILITY_DB;
X.fi
X.LP
X.ft B
XX25_RD_FACILITY	FACILITY_DB *arg;
X.RS
X.LP
XRead the current facility settings associated with a virtual circuit.
XAfter call setup, the negotiated facility values are returned.
X.RE
X.LP
X.ft B
XX25_WR_FACILITY	FACILITY_DB *arg;
X.RS
X.LP
XSet facilities to be used with inbound or outbound calls.  Setting a
Xfield to zero means that the default values should be used.
X.LP
XFor outbound calls, facilities set before calling
X.I connect\^
Xwill be included in the outgoing call request packet.  When waiting
Xfor incoming calls with
X.I listen\^
Xand
X.IR accept\^ ,
Xthe
X.I reverse_charge\^
Xand
X.I fast_select_type\^
Xfields are used when screening incoming calls, and the
X.IR recvpktsize\^ ,
X.IR sendpktsize\^ ,
X.IR recvwndsize\^ ,
X.IR sendwndsize\^ ,
X.I recvthruput\^
Xand
X.I sendthruput\^
Xfields are used to negotiate the flow control parameters sent in the
Xcall accept.
X.LP
XIf
X.I fast_select_type\^
Xis set to FAST_ACPT_CLR or FAST_CLR_ONLY before
X.IR listen\^ / accept\^ ,
Xthen when the call packet arrives and
X.I accept\^
Xreturns, the
X.I fast_select_type\^
Xfield will be set to match the value of the fast select facility field
Xcontained in the incoming call request.  The X25_WR_USER_DATA
X.I ioctl\^
Xmay then be used to specify the call-user-data field to be sent in the
Xresponding call accept packet (sent with the X25_SEND_CALL_ACPT
X.IR ioctl\^ )
Xor clear request packet (sent with
X.IR close\^ ).
X.PP
XIf the
X.I stdservice\^
Xfield is set to a non-zero value, the facility field of an outgoing
Xcall request sent by
X.I connect\^
Xwill contain a facility marker (two octets of zero), followed by the
Xtwo-octet DDN Standard Service facility (0x0401).
X.PP
XIf the \fIprecedence_req\fP field is set to a non-zero value, the
Xfacility field of an outgoing call request sent by \fIconnect\fP will
Xcontain a facility marker (two octets of zero), followed by the
Xtwo-octet DDN Call Precedence facility (0x080\fBX\fP where the call's
Xrequested precedence increases as \fBX\fP goes from 0 to 3), as defined in the
X\fIprecedence\fP field.  If \fIprecedence_req\fP is set to zero, the
Xcall will be established at the caller's default precedence.
X.PP
XIf both \fIstdservice\fP and \fIprecedence_req\fP are specified, only
Xone facility marker will be sent, followed by the Standard Service
Xfacility, followed immediately by the Call Precedence facility.
X.RE
X.LP
X.nf
X.ft B
Xtypedef struct user_data_db_s
X    {
X    u_char datalen;
X    u_char data[MAX_USER_DATA];
X    } USER_DATA_DB;
X.fi
X.LP
X.ft B
XX25_RD_USER_DATA	USER_DATA_DB *arg;
X.RS
X.LP
XRetrieve call-user-data or clear-user-data from a received call
Xrequest, call confirm or clear request packet.  Multiple calls will
Xreturn up to MAX_USER_DATA bytes each until the entire amount has been
Xextracted.  The
X.I datalen\^
Xfield will be set to zero if there is none left.
X.LP
XWhen using
X.IR accept\^ ,
Xthe first MAXDATA bytes will be returned in the
X.I accept\^
XCONN_DB structure.  The remaining data must be retrieved with
XX25_RD_USER_DATA.
X.RE
X.LP
X.ft B
XX25_WR_USER_DATA	USER_DATA_DB *arg;
X.RS
X.LP
XSupply data to be included either in the call-user-data
Xfield of a call request packet generated by
X.IR accept\^ ,
Xor in the clear-user-data of a clear request generated by a call to
X.IR close\^ .
XMultiple calls may be used to build fields larger than MAX_USER_DATA.
X.RE
X.LP
X.nf
X.ft B
X.ta \w'\ \ \ \ u_char\ host[(MAXHOSTADR\ +\ 1)\ /\ 2];\ \ 'u
Xtypedef struct link_adr_s
X    {
X    int linkid;	/* Physical link/line number */
X    u_char hostlen;	/* Addr length in BCD digits */
X    u_char host[(MAXHOSTADR + 1) / 2];	/* Local address in BCD */
X    } LINK_ADR;
X.fi
X.LP
X.ft B
XX25_RD_LINKADR	LINK_ADR *arg;
X.RS
X.LP
XFetch the configured X.121 address (DNIC plus NTN) for the link number
Xspecified in the
X.I linkid\^
Xfield.
XThe address will be returned in the
X.I host\^
Xfield packed two digits per byte, and the number of digits copied
Xwill be returned in the
X.I hostlen\^
Xfield.
X.RE
X.RE
X.LP
X.ft B
Xperror(message)
Xchar *message;
X.RS
X.LP
XPrint the supplied message to stderr, followed by a colon, a
Xspace, the text of the error message associated with the
Xglobal integer
X.IR errno\^ ,
Xand followed by a newline.  The only difference between the emulated
X.I perror\^
Xand the normal
X.I perror\^
Xis that the emulated version knows about the
X.B EFASTDATA
X.I errno\^
Xvalue.
X.RE
X.SH BUGS
XThe ANY_LINK bit in connect()'s addr.hostlen field is ignored. All
Xcall routing is done by the out-route-table symbol defined in the
XX.25 server's config file.
X.PP
XWhen an emulated socket is put into non-blocking mode, select() can
Xindicate that the socket is ready to be read from and yet have the
Xsubsequent read() fail with errno set to EWOULDBLOCK.  User code must
Xignore read errors with errno set to EWOULDBLOCK when using
Xnon-blocking mode.
X.PP
XSun's product only works as a DTE.  This version also can work as a
XDCE, but will deal improperly with packet and window size negotiation
Xif all the following conditions are met:
X.RS
X.LP
X1) An outgoing call is routed to a DCE-configured link,
X.LP
X2) The packet and/or window sizes in the initial call request packet
Xare not symmetrical (e.g. receive packet size of 128, send packet size
Xof 1024), and
X.LP
X3) There are multiple physical links configured, at least one of which
Xis a DTE.
X.RE
X.SH SEE ALSO
Xx25(7), x25-auth(5), x25-ddn(7), x25d(8).
X.SH CREDITS
XSunLink is a registered trademark of Sun Microsystems Inc.
X.SH COPYRIGHT INFORMATION
XCopyright \(co 1989, 1990, 1991 Morning Star Technologies Inc.; all
Xrights reserved.
X
X.\" Local Variables:
X.\" mode: electric-nroff
X.\" compile-command: "groff -man -TX75 x25-socket.3"
X.\" End:
END_OF_FILE
if test 33523 -ne `wc -c <'x25/man/x25-socket.3'`; then
    echo shar: \"'x25/man/x25-socket.3'\" unpacked with wrong size!
fi
# end of 'x25/man/x25-socket.3'
fi
if test -f 'x25/man/x25-x29.7' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/man/x25-x29.7'\"
else
echo shar: Extracting \"'x25/man/x25-x29.7'\" \(1400 characters\)
sed "s/^X//" >'x25/man/x25-x29.7' <<'END_OF_FILE'
X.\" @(#)x25-x29.7	1.1
X.TH X25-X29 7 "30 January 1991" "Morning Star X.25"
X.SH NAME
Xx25-x29 \- remote login interface to Morning Star X.25
X.SH DESCRIPTION
XThis section describes the X.29 interface of Morning Star X.25.
X.PP
XMorning Star X.25 is a daemon process used in
XUNIX\*R systems.
XIt supports several configurable user interface options, one of which
Xis a CCITT X.3/X.29 compliant remote login interface.
XSee
X.IR x25\^ (7)
Xfor general information and references to other X.25 user interfaces.
X.PP
XThe X.29 interface is used to accept incoming calls from remote network PADs.
XThe remote PAD places a call which is terminated in an X.29 session.
XThis interface offers the ability to connect those X.29 sessions to a
Xvirtual terminal interface on the host UNIX system.  No special
Xconfiguration of the UNIX host system 
Xis required, since those virtual terminals are generally
Xalready in place for any system on which \fBx25d\fP runs.  See
X.IR x25-config\^ (5)
Xfor information about \fIcreate-group\fP and \fIin-route-table\fP.
X.SH SEE ALSO
Xx25d(8), x25(7), x25-config(7), x25-pad(7), pty(4).
X.br
X\fICCITT Data Communication Networks Interfaces, Recommendation X.3\fP
Xand
X.I X.29.
X.SH COPYRIGHT INFORMATION
XCopyright \(co 1989, 1990, 1991 Morning Star Technologies Inc.; all
Xrights reserved.
X
X.\" Local Variables:
X.\" mode: electric-nroff
X.\" compile-command: "groff -man -TX75 x25-x29.7"
X.\" End:
END_OF_FILE
if test 1400 -ne `wc -c <'x25/man/x25-x29.7'`; then
    echo shar: \"'x25/man/x25-x29.7'\" unpacked with wrong size!
fi
# end of 'x25/man/x25-x29.7'
fi
if test -f 'x25/man/x25.7' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/man/x25.7'\"
else
echo shar: Extracting \"'x25/man/x25.7'\" \(2317 characters\)
sed "s/^X//" >'x25/man/x25.7' <<'END_OF_FILE'
X.\" @(#)x25.7	1.1
X.TH X25 7 "30 January 1991" "Morning Star X.25"
X.SH NAME
Xx25 \- general information about Morning Star Technologies X.25
X.SH DESCRIPTION
XMorning Star X.25 is a daemon process used in
XUNIX\*R systems.
XIt supports several configurable user interfaces,
Xincluding a PAD (Packet Assembler/Disassembler) interface,
Xan X.29 interface for logins from remote PADs,
Xa SunLink\*R compatible socket interface,
Xan RFC-877/DDN compliant interface for transport of IP (Internet Protocol) packets,
Xand a means of acquiring configuration and performance information
Xfrom the running system.
X.PP
XThe RFC-877/DDN, SunLink, and X.29
Xinterfaces are accessed invisibly and transparently by
Xthe UNIX system's IP implementation, but the PAD interface is
Xattached by configuration commands to ``general purpose'' tty devices.
XSee
X.IR x25-pad\^ (7),
X.IR x25-x29\^ (7),
X.IR x25-ddn\^ (7),
Xand
X.IR x25-config\^ (7)
Xfor detailed descriptions of each of these interfaces.
X.PP
XSystem informational and error messages can be read from the
X.I log\^
Xfile after the daemon has been started, if it is so configured.
XPacket trace information can be read from the
X.I trace\^
Xfile after the daemon has been started, if it is so configured.  The
X.IR x25trace\^ (1)
Xprogram can be used to convert the trace data into human-readable form.
X.PP
XConfiguration commands may be written in the configuration file, in
Xorder to set up communications lines, call routing information, or
Xgeneral system parameters such as verbosity levels or
Xglobal buffer sizes.  The current values of configured parameters may
Xbe extracted by including the \fIprint-config\fP command in the
Xconfiguration file, instructing the daemon to re-read it, and then
Xexamining the log file.  The \fIline-stat\fP and \fIddn-stat\fP commands,
Xwhen the daemon reads them in the configuration file, cause status
Xinformation to be written to the log file.
X.SH NOTE
XThis product contains RSYS(tm) X.25 software distributed under license
Xfrom Gcom, Inc.
X.SH SEE ALSO
Xx25d(8), x25-config(5), x25-pad(7), x25-x29(7), x25-ddn(7),
Xx25trace(1), x25-socket(3), x25-auth(5).
X.SH COPYRIGHT INFORMATION
XCopyright \(co 1989, 1990, 1991 Morning Star Technologies Inc.; all
Xrights reserved.
X
X.\" Local Variables:
X.\" mode: electric-nroff
X.\" compile-command: "groff -man -TX75 x25.7"
X.\" End:
END_OF_FILE
if test 2317 -ne `wc -c <'x25/man/x25.7'`; then
    echo shar: \"'x25/man/x25.7'\" unpacked with wrong size!
fi
# end of 'x25/man/x25.7'
fi
if test -f 'x25/man/x25d.8' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/man/x25d.8'\"
else
echo shar: Extracting \"'x25/man/x25d.8'\" \(3599 characters\)
sed "s/^X//" >'x25/man/x25d.8' <<'END_OF_FILE'
X.\" @(#)x25d.8	1.1
X.TH X25D 8 "30 January 1991" "Morning Star X.25"
X.SH NAME
Xx25d \- X.25 protocol daemon
X.SH SYNOPSIS
X.B x25d
X[\^\fB\-f\fR \^config-file\^] [\^\fB\-l\fR \^log-file\^]
X[\^\fB\-a\fR \^authorization-file\^] [\^\fB\-t\fR \^trace-file\^]
X[\^\fB\-d\fR\^]
X.SH DESCRIPTION
X.I X25d\^
Xis a daemon process used in UNIX\*R systems to manage a connection to
Xa network using the X.25 protocol.  It communicates with an X.25
Xnetwork via either the UNIX host's serial ports, or via a Morning Star
XSnapLink\*R interface.  It communicates with software on the UNIX host
Xvia a SunLink-compatible socket interface (see
X.IR x25-socket\^ (3)),
Xvia an RFC877-compliant interface from the kernel's own TCP/IP
Ximplementation (see
X.IR x25-ddn\^ (7)),
Xor via an X.3/X.28 PAD or X.29 virtual terminal interface (see
X.IR x25-pad\^ (7)
Xor
X.IR x25-x29\^ (7)).
X.SH OPTIONS
X.TP "\w'\-a \^authorization-file\ \ \ \ 'u"
X.B \-f\^  \fRconfig-file\fP
XThe configuration file for this invocation of the daemon.  The default
Xis
X.BI x25.config
Xin the present working directory.  See
X.IR x25-config\^ (7).
X.TP
X.B \-l\^  \fRlog-file\fP
XFile to which all logging output is to be directed.  The default is
X.BI x25.log
Xin the present working directory.
X.B \-l -\^
Xmeans to direct logging information to the controlling terminal.
X.TP
X.B \-a\^  \fRauthorization-file\fP
XFile describing constraints on and priviliges of users of the SunLink
Xcompatibility facilities provided by the daemon.  Default is no
Xconstraints.  See
X.IR x25-auth\^ (5).
X.TP
X.B \-t\^  \fRtrace-file\fP
XFile to which packet trace information is to be directed.  Default is
X.BI x25.trace
Xin the present working directory, though by default no packet tracing
Xis enabled until a SIGQUIT is received.  See
X.IR x25trace\^ (1).
X.TP
X.B \-d\^
XDon't detach from the controlling terminal to run as a daemon.
X.SH SIGNALS
XUpon reception of the following signals,
X.B x25d
Xtakes the indicated actions:
X.TP "\w'SIGTERM\ \ \ \ \ 'u"
X.B SIGHUP
XRe-reads the configuration file, reconfiguring itself internally in
Xaccordance with any changes it finds there.
X.TP
X.B SIGQUIT
XToggles line tracing.  If tracing was enabled, it is disabled.  If no
Xtracing was occuring, it is begun as of the time of reception of the signal.
X.TP
X.B SIGUSR1
XIncreases logging verbosity.  More detailed information is written
Xto the log file.
X.TP
X.B SIGUSR2
XDecreases logging verbosity.  Less detailed information is written
Xto the log file.
X.TP
X.B SIGTERM
XCauses the daemon to exit.
X.TP
X.B SIGINT
XCauses the daemon to exit.
X.SH EXAMPLE
XTo run as a daemon talking to an X.25 network attached to the host's
Xfirst native serial port (as specified in \fIdevice-name-string\fP), 
Xdesignating appropriate configuration and log files:
X.PP
X.RS
X.B x25d -l /usr/adm/x25.log -f /etc/x25.config
X.RE
XTo remain attached and direct logging information to this terminal:
X.PP
X.RS
X.B x25d -d -l - -f /etc/x25.config
X.RE
X.SH RECOMMENDATIONS
XOn a Sun, we recommend that the configuration file be maintained in
X\fB/etc/x25.config\fP, the authorization file in \fB/etc/x25.auth\fP,
Xthe log file in \fB/usr/adm/x25.log\fP, and the trace file directed to
X\fB/usr/adm/x25.trace\fP.  The daemon might best reside in
X\fB/usr/etc/x25d\fP.
X.SH SEE ALSO
Xx25(7), x25-auth(5), x25trace(1), x25-ddn(7), x25-pad(7), x25-x29(7),
XRFC877, x25-socket(3).
X.SH CREDITS
XSunLink is a registered trademark of Sun Microsystems Inc.
X.SH COPYRIGHT INFORMATION
XCopyright \(co 1989, 1990, 1991 Morning Star Technologies Inc.; all
Xrights reserved.
X
X.\" Local Variables:
X.\" mode: electric-nroff
X.\" compile-command: "groff -man -TX75 x25d.8"
X.\" End:
END_OF_FILE
if test 3599 -ne `wc -c <'x25/man/x25d.8'`; then
    echo shar: \"'x25/man/x25d.8'\" unpacked with wrong size!
fi
# end of 'x25/man/x25d.8'
fi
if test -f 'x25/man/x25trace.1' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/man/x25trace.1'\"
else
echo shar: Extracting \"'x25/man/x25trace.1'\" \(4554 characters\)
sed "s/^X//" >'x25/man/x25trace.1' <<'END_OF_FILE'
X.\" @(#)x25trace.1	1.1
X.TH X25TRACE 1 "30 January 1991" "Morning Star X.25"
X.SH NAME
Xx25trace \- format X.25 line protocol tracing information
X.SH SYNOPSIS
X.B x25trace
X[\^\fB\-l\fR\^line\^] [\^\fB\-t\fR\^type\^] [\^\fB\-o\fR\^type\^] [\^\fB\-f\fR\^] [\^files\^]
X.SH DESCRIPTION
X.I X25trace\^
Xreads binary X.25 communication line trace data from the specified files
X(or the standard input if none are provided) and prints a formatted
Xdescription of it to the standard output.  The options are used to
Xselect which portions of the data should be printed; the default is to
Xprint all data.
X.PP
XTrace data is obtained from the Morning Star X.25 trace file, by default
X.IR x25.trace\^ 
Xin the present working directory of the daemon.  The raw trace data is
X.B much
Xsmaller than the processed output of
X.I x25trace\^.
X.PP
XThe line tracing facility is useful for diagnosing X.25 protocol problems at
Xinstallations where special line monitoring equipment may not be available.
XThe activation of this feature causes additional processing overhead on the
Xhost computer, and trace files can
Xconsume large amounts of disk space in a short period of time if high line
Xspeeds are used and much data traffic occurs.  It is recommended that line
Xtracing not be used when not needed.
X.PP
X.I X25trace\^
Xis generally useful only with a knowledge of the format and use of
Xthe X.25 protocol, and is used primarily under the direction of the Morning
XStar support personnel for solving communication problems.
X.SH OPTIONS
X.TP "\w'\-t\^frame_type\ \ \ \ 'u"
X.BI \-l\^ line
XPrint trace information from one of the controller's communication
Xlines.
XDefault is all lines and
X.B \-l
Xmay be given multiple times to select any subset of the lines on the controller.
X.TP
X.BI \-t\^ frame_type
XOnly print transmitted or received frames of the specified type.  Default is
X.B \-t all\fR.
XThe
X.B \-t
Xoption may be specified several times or used in conjunction with the
X.B \-o
Xoption to select any set of frame types to print.
X.TP
X.BI \-o\^ frame_type
XOmit frames of the specified type.  Note that options are
Xparsed left to right so that later
X.B \-t
Xoptions may undo the effect of a
X.BR \-o .
X.TP
X.BI \-f\^
XWatch forever, or until receiving a SIGINT or SIGQUIT from the
Xcontrolling terminal.
X.PP
XThe following frame types may be specified with the
X.B \-t
Xor
X.B \-o
Xoptions:
X.TP "\w'i_diagnostic\ \ \ \ 'u"
X.B all
XPrint all frames (U-frames or S-frames) and packets (I-frames) of all types.
X.TP
X.B err
XEquivalent to
X.B
X\-t u_frmr \-t u_bad \-t s_rnr \-t s_rej \-t s_bad \-t i_rnr \-t i_rej
X.B
X\-t i_restart \-t i_diagnostic \-t i_bad\fR.
X.TP
X.B i_bad
XPrint unrecognized I-frames.
X.TP
X.B i_call
XPrint call request, incoming call, call accepted and call connected
Xpackets.
X.TP
X.B i_clear
XPrint clear request, clear indication and clear confirmation packets.
X.TP
X.B i_data
XPrint all modulus-8 or modulus-128 data packets.
X.TP
X.B i_diagnostic
XPrint diagnostic packets.
X.TP
X.B i_frame
XPrint all I-frames.
X.TP
X.B i_interrupt
XPrint interrupt and interrupt confirmation packets.
X.TP
X.B i_nondata
XEquivalent to
X.B
X\-t i_rr \-t i_rnr \-t i_rej \-t i_call \-t i_clear \-t i_interrupt \-t
X.B
Xi_reset \-t i_restart \-t i_diagnostic.
X.TP
X.B i_rej
XPrint
X.I REJ\^
Xpackets.
X.TP
X.B i_reset
XPrint reset request, reset indication and  reset confirmation packets.
X.TP
X.B i_restart
XPrint restart request, restart indication and restart
Xconfirmation packets.
X.TP
X.B i_rnr
XPrint
X.I RNR\^
X(receive not ready) packets.
X.TP
X.B i_rr
XPrint
X.B
X.I RR
X(receive ready) packets.
X.TP
X.B s_bad
XPrint unrecognized S-frames (supervisory).
X.TP
X.B s_frame
XPrint all S-frames (supervisory).
X.TP
X.B s_rej
XPrint
X.I REJ
X(reject) frames.
X.TP
X.B s_rnr
XPrint
X.I RNR
X(receive not ready) frames.
X.TP
X.B s_rr
XPrint
X.I RR
X(receive ready) frames.
X.TP
X.B u_bad
XPrint unrecognized U-frames (unnumbered).
X.TP
X.B u_disc
XPrint
X.I DISC
X(disconnect) frames.
X.TP
X.B u_dm
XPrint
X.I DM
X(disconnected mode) frames.
X.TP
X.B u_frame
XPrint all U-frames.
X.TP
X.B u_frmr
XPrint
X.I FRMR
X(frame reject) frames.
X.TP
X.B u_sabm
XPrint
X.I SABM
X(set asynchronous balanced mode) frames.
X.TP
X.B u_ua
XPrint
X.I UA
X(unnumbered acknowledgment) frames.
X.SH EXAMPLE
XTo print all I-frames or error-type frames transmitted or received on line 1
Xexcept for RR packets:
X.PP
X.RS
X.B x25trace -l1 -t i_frame -t err -o i_rr /dev/x25.0/trace
X.RE
X.SH SEE ALSO
Xx25(7).
X.SH COPYRIGHT INFORMATION
XCopyright \(co 1989, 1990, 1991 Morning Star Technologies Inc.; all
Xrights reserved.
X
X.\" Local Variables:
X.\" mode: electric-nroff
X.\" compile-command: "groff -man -TX75 x25trace.1"
X.\" End:
END_OF_FILE
if test 4554 -ne `wc -c <'x25/man/x25trace.1'`; then
    echo shar: \"'x25/man/x25trace.1'\" unpacked with wrong size!
fi
# end of 'x25/man/x25trace.1'
fi
if test ! -d 'x25/system' ; then
    echo shar: Creating directory \"'x25/system'\"
    mkdir 'x25/system'
fi
if test ! -d 'x25/system/sun' ; then
    echo shar: Creating directory \"'x25/system/sun'\"
    mkdir 'x25/system/sun'
fi
if test -f 'x25/system/sun/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/system/sun/README'\"
else
echo shar: Extracting \"'x25/system/sun/README'\" \(5145 characters\)
sed "s/^X//" >'x25/system/sun/README' <<'END_OF_FILE'
X
X			Morning Star Technologies
X			X.25 Installation for the
X		    Sun SparcStation Running SunOS 4.*
X
X
XTo install Morning Star X.25, do the following:
X
X- Run the Install shell script.  This will create directories, install
X  files and make devices as necessary.  It will also create
X  /etc/x25.uninstall, which will remove the installed files.
X
X- Insert the following lines into /sys/conf.common/files.cmn:
X
X    os/tun.c			optional tun
X    os/tun_conf.c		optional tun
X
X- If you will be using a SnapLink SCSI-attached interface, you need
X  not install the HDLC driver.  If you do need to install the HDLC
X  driver, then also add the following lines to
X  /sys/conf.common/files.cmn:
X
X    os/hdlc.c			optional hdlc device-driver
X    os/hdlc_sub.s		optional hdlc device-driver
X    os/hdlc_conf.c		optional hdlc device-driver
X
X- Edit /sys/sun/conf.c and add the following lines before the
X  declaration of cdevsw[]:
X
X    # include "tun.h"
X    # if NTUN > 0
X    extern int tunopen(), tunclose(), tunread(), tunwrite(), tunioctl(),
X	  tunselect();
X    # else
X    # define tunopen      nodev
X    # define tunclose     nodev
X    # define tunread      nodev
X    # define tunwrite     nodev
X    # define tunioctl     nodev
X    # define tunselect    nodev
X    # endif
X
X- If you are also installing the HDLC driver, also add these lines
X  before the declaration of cdevsw[]:
X
X    # include "hdlc.h"
X    # if NHDLC > 0
X    extern int hdlcopen(), hdlcclose(), hdlcread(), hdlcwrite(),
X	  hdlcioctl(), hdlcselect();
X    # else
X    # define hdlcopen      nodev
X    # define hdlcclose     nodev
X    # define hdlcread      nodev
X    # define hdlcwrite     nodev
X    # define hdlcioctl     nodev
X    # define hdlcselect    nodev
X    # endif
X
X- Still editing /sys/machine/common/conf.c, add the following lines to
X  the end of the initialization of cdevsw[] (also, make sure that the
X  preceding entry has a comman following its closing brace):
X
X    {
X        tunopen,     tunclose,    tunread,     tunwrite,    /*72*/
X        tunioctl,    nodev,       tunselect,   0,
X        0,
X    },
X
X- And, if you are installing the HDLC driver, also add these lines:
X
X    {
X        hdlcopen,    hdlcclose,   hdlcread,    hdlcwrite,    /*73*/
X        hdlcioctl,   nodev,       hdlcselect,  0,
X        0,
X    },
X
X- Modify the "/*72*/" and "/*73*/" comments as appropriate to ensure
X  that they indicate the correct indices into the cdevsw[] table.  Use
X  these number (the major device numbers of the respective drivers) to
X  create the /dev device entries:
X
X    # /etc/mknod /dev/tun0 c 72 0
X    # chown root /dev/tun0 
X    # chmod 600 /dev/tun0
X
X- and,
X
X    # /etc/mknod /dev/hdlc0 c 73 0
X    # chown root /dev/hdlc0 
X    # chmod 600 /dev/hdlc0
X    # /etc/mknod /dev/hdlc1 c 73 1
X    # chown root /dev/hdlc1 
X    # chmod 600 /dev/hdlc1
X
X- Add the following line to the end of your kernel configuration file
X  in the /sys/sun4c/conf directory (assumed to be MST in the following
X  paragraphs):
X
X    pseudo-device   tun           # Morning Star IP tunnel driver
X
X- If you are installing the HDLC driver, add this line just before the
X  "device-driver zs" line:
X
X    device-driver   hdlc          # Morning Star HDLC zs driver
X
X- Build a new kernel:
X
X    # cd /sys/sun4c/conf
X    # rm -rf ../MST
X    # mkdir ../MST
X    # /etc/config MST
X    # cd ../MST
X    # make
X    (lots of output)
X
X- Save the old kernel, then move the new kernel to /vmunix.
X
X    # mv /vmunix /vmunix.previous
X    # mv vmunix /
X
X- Reboot the system.
X
X    # /etc/reboot
X
X- If there are any problems with the new kernel, you can reboot using
X  the previous version of vmunix saved above.
X
XTo install a SnapLink, do the following:
X
X- To set the SCSI address of the SnapLink, power the SnapLink off,
X  open its case, and set the SCSI address by changing the three SCSI
X  address jumpers on the main circuit board (JP13, JP12 and JP11; see
X  the table below).  If the SnapLink is not at the end of the SCSI
X  bus, remove the two SCSI termination resistor R-packs from their
X  sockets on the main SnapLink circuit board (U1 and U2).  Close the
X  SnapLink case and plug in the power connector.
X
X     SCSI     JP13  JP12  JP11
X    Address
X       0       Out   Out   Out
X       1       Out   Out   In
X       2       Out   In    Out
X       3       Out   In    In
X       4       In    Out   Out
X       5       In    Out   In
X       6       In    In    Out
X       7       In    In    In
X
X- Install the SnapLink on the SCSI bus.
X
X- Boot the system; the kernel will print a message when it detects the
X  presence of the SnapLink.
X
XTo complete the installation, do the following:
X
X- Read the x25(4), x25-auth(5), x25-config(5), x25-ddn(4), x25-pad(4),
X  x25-socket(3), x25-x29(4), x25d(8) and x25trace(1) manual pages.
X  The introduction to the manual is contained in the file intro.ms in
X  the current directory and can be formatted with nroff or troff using
X  the -ms formatting macros.
X
X- Create an X.25 configuration file (/etc/x25.config).
X
X- Create an X.25 socket user authorization file (/etc/x25.auth).
X
X- Test your configuration by running x25d manually.
X
X- Add commands to /etc/rc.local to start X.25 at boot time.
END_OF_FILE
if test 5145 -ne `wc -c <'x25/system/sun/README'`; then
    echo shar: \"'x25/system/sun/README'\" unpacked with wrong size!
fi
# end of 'x25/system/sun/README'
fi
if test ! -d 'x25/system/next' ; then
    echo shar: Creating directory \"'x25/system/next'\"
    mkdir 'x25/system/next'
fi
if test -f 'x25/system/next/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/system/next/README'\"
else
echo shar: Extracting \"'x25/system/next/README'\" \(2228 characters\)
sed "s/^X//" >'x25/system/next/README' <<'END_OF_FILE'
X
X			Morning Star X.25
X
XYou have installed Morning Star X.25, a software communications
Xpackage for public or private packet switched networks conforming
Xto the CCITT X.25 interface specification.  This software can
Xoperate either over a Morning Star Technologies SnapLink high-speed
XSCSI communications interface or over the DIN-8 serial ports on a
XNeXT 68040 workstation.
X
XRun the x25.install shell to complete the software installation
Xprocess.
X
XTo install a SnapLink, do the following:
X
X- To set the SCSI address of the SnapLink, power the SnapLink off,
X  open its case, and set the SCSI address by changing the three SCSI
X  address jumpers on the main circuit board (JP13, JP12 and JP11; see
X  the table below).  If the SnapLink is not at the end of the SCSI
X  bus, remove the two SCSI termination resistor R-packs from their
X  sockets on the main SnapLink circuit board (U1 and U2).  Close the
X  SnapLink case and plug in the power connector.
X
X     SCSI     JP13  JP12  JP11
X    Address
X       0       Out   Out   Out
X       1       Out   Out   In
X       2       Out   In    Out
X       3       Out   In    In
X       4       In    Out   Out
X       5       In    Out   In
X       6       In    In    Out
X       7       In    In    In
X
X- Add a line to /etc/fstab like this (change sd1a to sdXa, where X is the
X  SCSI address of the SnapLink):
X
X    /dev/sd1a / ignore rw,noquota,noauto 0 1
X
X- Install the SnapLink on the SCSI bus.
X
X- Boot the system; the kernel will print a message when it detects the
X  presence of the SnapLink.
X
XRead the x25trace(1), x25-socket(3), x25-auth(5), x25-config(5),
Xx25-ddn(7), x25-pad(7), x25-x29(7), x25(7) and x25d(8) manual pages.
X
XCreate an X.25 configuration file (put it in /etc/x25.config) and an
XX.25 socket users authorization file (put it in /etc/x25.auth), and try
Xstarting the X.25 daemon by hand.  When you are convinced that it works
Xcorrectly, add commands to /etc/rc.local to start the daemon
Xautomatically at boot time (triple check your work -- /etc/rc.local is
Xa bad place to make a mistake), and reboot to verify it.
X
XIf you have any problems with this software, send electronic mail to
Xsupport@MorningStar.Com, or call +1-800-558-7827 or +1-614-451-1883 and
Xask for support.
END_OF_FILE
if test 2228 -ne `wc -c <'x25/system/next/README'`; then
    echo shar: \"'x25/system/next/README'\" unpacked with wrong size!
fi
# end of 'x25/system/next/README'
fi
if test -f 'x25/system/next/README.wn.uue' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/system/next/README.wn.uue'\"
else
echo shar: Extracting \"'x25/system/next/README.wn.uue'\" \(16784 characters\)
sed "s/^X//" >'x25/system/next/README.wn.uue' <<'END_OF_FILE'
Xbegin 644 README.wn
XM  $        $ "N-!  KIP0 ')0$ !R6!  "+P $A[P !(?   2'Q  $A_0 
XM!(?P            !         D     _P#_____  (     0P*; F0   "'
XM #L            Y    A_\               $! F0   !( $@  0 8 Q@"
XM9      "V@(O &0 !   !  IJ0 ( :8!-@ F!  IJ0 P <P!7@ 8 '<  !Q3
XM     /\         *[L  "N[   KNP  @(                          
XM                                               $ "E)!  I8P0 
XM')0$ !R6!  "+P $A[P !(?   2'Q  $A_0 !(?P            !       
XM  G_    _P#___\   (     0P*; F0      #D            Y     /\ 
XM              $! F0   !( $@  0 8 Q@"9      "V@(O &0 !   !  G
XM,P ) "(!V0 /!  G,P V #$!,@ . '<  !H/                *7<  "EW
XM   I=P  @(                                                  
XM                        ! T-#0T ! T-#0T !@ (       !#0 &!  "
XM%  .  P$  (  #@$  (& #@   !X  ,   !( $@      MH"+P     #& )D
XM 5L%* /\  (   !( $@      Q@"9  !    9     $  0$!     2</  $ 
XM 0                 " !D!D       0                           
XM         NC\ %H""@!: @X!L 8P]_\ %20!]TAO=R!T;R!);G-T86QL(%@N
XM,C4-_ !L @H 6@ . ; &,/?_ !4, /<-,2X@($EN<V5R="!T:&4@9&ES=')I
XM8G5T:6]N(&9L;W!P>2!D:7-K(&QA8F5L;&5D(/\ %0P"]TUO<FYI;F<@4W1A
XM<B!8+C(U_P 5# #W+@T-,BX@(%5S:6YG('1H92#_ !4, O=&:6QE(%9I97=E
XM<O\ %0P ]RP@8VQI8VL@;VX@=&AE(&9L;W!P>2!D:7-K(&EC;VX@=&\@9&ES
XM<&QA>2!I=',@8V]N=&5N=',L('1H96X@9&]U8FQE+6-L:6-K(&]N(/\ %0P"
XM]W@R-2YP:V?_ !4, /<@=&\@<G5N('1H92#_ !4, O=);G-T86QL97+_ !4,
XM /<@<')O9W)A;2X-#3,N("!#;&EC:R!O;B!T:&4@_P 5# +W26YS=&%L;/\ 
XM%0P ]R!I8V]N+"!A;F0@=&AE(&9O;&QO=VEN9R#_ !4, O=);G-T86QL_P 5
XM# #W(&-O;F9I<FUA=&EO;B!B=71T;VXN#0TT+B @5VAE;B!T:&4@26YS=&%L
XM;&5R(&ES(&1O;F4L('5S92!T:&4@_P 5# +W1FEL92!6:65W97+_ !4, /<@
XM=&\@;W!E;B!T:&4@;F5W(&9O;&1E<B!I;B#_ !4, O<O3&]C86Q!<'!S+W@R
XM-?\ %0P ]RX-#34N("!$;W5B;&4M8VQI8VL@;VX@=&AE(/\ %0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YD
XM(&%S:R!F;W(@4W5P<&]R="X- =/_ !4D ??\ %H"$P!: @X!L 8P]PW_ !48
XM ?=787)N:6YG_P 5# #W#?P 6@(3 %H #@&P!C#W#?P 9 (3 %( #@&,!C#W
XM,2X@($1O(&YO="!A='1E;7!T('1O(&-R96%T92!0040O6"XR."!G<F]U<',@
XM=VAE;B!R=6YN:6YG($UA8V@@,BXP+"!A<R!A('!R;V)L96T@:6X@=&AE(/\ 
XM%0P"]W!T>?\ %0P ]R @9')I=F5R('=I;&P@8V%U<V4@=&AE('-Y<W1E;2!T
XM;R!C<F%S:"X-#3(N("!4:&4@_P 5# +W26YS=&%L;&5R_P 5# #W("!M87D@
XM:&%N9R!W:&5N('5S960@=&\@9&5L971E(/\ %0P"]W@R-2YP:V?_ !4, /<N
XM("!)9B!I="!H86YG<R!A9G1E<B!C:&5C:VEN9R!B=70@8F5F;W)E(&1E;&5T
XM:6YG+"!R96)O;W0@=&AE(&UA8VAI;F4@86YD('1R>2!A9V%I;BX@($ET('=I
XM;&P@_P 5# +W86QW87ES(/\ %0P ]R!H86YG('=H96X@=')Y:6YG('1O(&1E
XM;&5T92!T:&4@9F]L9&5R(/\ %0P"]W@R-2YP:V?_ !4, /<N#0 29  3R0#N
XM)  6ZP#N9  :G0"I  P$  (  #@$  (& #@    &  @    ! >'_ !4D ??\
XM %H"$P!: @X!L 8P]PW_ !48 ?=787)N:6YG_P 5# #W#?P 6@(3 %H #@&P
XM!C#W#?P 9 (3 %( #@&,!C#W,2X@($1O(&YO="!A='1E;7!T('1O(&-R96%T
XM92!0040O6"XR."!G<F]U<',@=VAE;B!R=6YN:6YG($UA8V@@,BXP+"!A<R!A
XM('!R;V)L96T@:6X@=&AE(/\ %0P"]W!T>?\ %0P ]R @9')I=F5R('=I;&P@
XM8V%U<V4@=&AE('-Y<W1E;2!T;R!C<F%S:"X-#3(N("!4:&4@_P 5# +W26YS
XM=&%L;&5R_P 5# #W("!M87D@:&%N9R!W:&5N('5S960@=&\@9&5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!G<F]U<',@=VAE;B!R=6YN:6YG($UA8V@@
XM,BXP+"!A<R!A('!R;V)L96T@:6X@=&AE(/\ %0P"]W!T>?\ %0P ]R @9')I
XM=F5R('=I;&P@8V%U<V4@=&AE('-Y<W1E;2!T;R!C<F%S:"X-#3(N("!4:&4@
XM_P 5# +W26YS=&%L;&5R_P 5# #W("!M87D@:&%N9R!W:&5N('5S960@=&\@
XM9&5L971E(/\ %0P"]W@R-2YP:V?_ !4, /<N("!)9B!I="!H86YG<R!A9G1E
XM<B!C:&5C:VEN9R!B=70@8F5F;W)E(&1E;&5T:6YG+"!R96)O;W0@=&AE(&UA
XM8VAI;F4@86YD('1R>2!A9V%I;BX@($ET('=I;&P@_P 5# +W86QW87ES(/\ 
XM%0P ]R!H86YG('=H96X@=')Y:6YG('1O(&1E;&5T92!T:&4@9F]L9&5R(/\ 
XM%0P"]W@R-2YP:V?_ !4, /<@=6YD97(@36%C:" R+C N#0 89  D$  <IP I
XM=P#2)  6ZP#N9  IJ0"@ !($  (  #@$  (& #AD "EW #H( __Q= /_\:8 
XM 7D*                                  0        #__&F    _   
XM /P  0   @ $ "/6!  C]@0 ')0$ !R6!  "+P $  4R(  %@*@#_^W8   '
XM^ /_]L0& ,I4  4R)  2\P$   ?X          \        +Z0    P "  (
XM    +( ! "P _P      !D*P  !#9    +'QQ          ;            
XM    __________\                    @    &P4!-B0#_^Z<        
XM "@    @           #_^\     *  %P'0 !)4H __NG /_[L0% 35^ __N
XMG          @           #_^\   7 =  %@2C___\!            !<!T
XM  25* 4!/(H#_^\         !_@    1            !<!T  6!* /_]P &
XM 2?4 __O                        !8$H __O               ! 0  
XM "@         $    !0   OP    #  " "     !      #_       &0DP 
XM $-B    L?$-         !L                         B 8!ADR^[_[M
XM    !P    "^[P/_\XX  ( X  2Y^     \ !1"(  6    $PO@% #A^  4 
XM   #     P8,D(     @____Y@8,D( #_^X@!@!@"@ %@3 #__!8 __OG   
XM  $    L0PX    %FR0#__%   6!, /_\(@ !8$X  6;) /_\$A  0  H   
XM      ! !@  F@        ! !@  F@        ! !@  C         !__P  
XM__________]__P  __________\         B 8!ADR^[_[M    !P    #_
XM____      /_\+0& 9O&  6!.  %@3@    #  6!.  $OYH    %  6!.   
XM       !____Y@      !9LD __Q0  $NV  !+^:    !4 !  "@        
XM   $OP     %!0  !0   "@_@    __Q4 8!AY  !9LD! 4IW  %G)  !9R0
XM      4"TZP&"^&.! 3/$P    $ !$B\ __Q" 4 QU@      __Q* 0#2T  
XM   X  5('  %.D     #    ,    !0 !$!\ __Q* 4 [+  !4&P __Q2  "
X*4R0#__%T    _$  
X 
Xend
END_OF_FILE
if test 16784 -ne `wc -c <'x25/system/next/README.wn.uue'`; then
    echo shar: \"'x25/system/next/README.wn.uue'\" unpacked with wrong size!
fi
# end of 'x25/system/next/README.wn.uue'
fi
if test ! -d 'x25/examples' ; then
    echo shar: Creating directory \"'x25/examples'\"
    mkdir 'x25/examples'
fi
if test -f 'x25/examples/config.1.ex' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/examples/config.1.ex'\"
else
echo shar: Extracting \"'x25/examples/config.1.ex'\" \(3057 characters\)
sed "s/^X//" >'x25/examples/config.1.ex' <<'END_OF_FILE'
X; @(#)config.1.ex	1.1
X
X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X;	Example from the introduction of the X.25 User Guide
X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X
X; X.25 configuration parameters
X
X; Line number aliases
X(define Tymnet 0)
X(define Sparrow 1)
X
X; PAD devices are used to call other machines
X(create-group PAD-group (type PAD) (pty-names "/dev/mcux[0-4]"))
X
X; X.29 devices allow logins from other machines
X(create-group Login-group (type X.29) (max-ptys 5))
X
X(define tcp-port 87)
X
X; All inbound calls get attached to logins,
X;          but collect calls are rejected.
X(define in-route-table
X	(or (and (is-line Tymnet)
X		 (facility "01?1")
X		 (clear 25 65))
X		 ; Reject collect calls
X		 ; 25 = "Reverse charging acceptance
X		 ;       not subscribed"
X		 ; 65 = "Facility/registration code
X		 ;       not allowed"
X	    (route-to Login-group)))
X
X; All outbound non-Tymnet calls get routed to Sparrow.
X(define out-route-table
X	(or (and (called-address "3106*")
X		 (route-to Tymnet))
X		 ; 3106 is Tymnet's DNIC
X	    (route-to Sparrow)))
X
X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X; Alternate in-route-table that sends inbound calls from Tymnet with
X; subaddress (the last two digits of the called address) 99 to sparrow,
X; and sends all of sparrow's non-Tymnet addressed calls to robin.
X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X;(define in-route-table
X;	(or (and (is-line Tymnet)
X;		 (or (and (facility "01?1")
X;			  (clear 25 65))
X;		     (and (called-address "*99")
X;			  (route-to Sparrow))
X;		     (route-to Login-group)))
X;	    (and (is-line Sparrow)
X;		 (or (and (called-address "3106*")
X;			  (route-to Tymnet))
X;		     (route-to Login-group)))))
X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X
X; Tymnet connection
X(activate-line Tymnet
X	       (dte)
X	       (address "3106555121")
X	       (standard-year 1980)
X	       (vc-ranges nil nil (1 16) nil))
X
X; Sparrow
X(activate-line Sparrow
X	       (dce)
X	       (vc-ranges nil nil (1 32) nil))
X
X; DDN parameters
X(define ddn-mtu-size 576)
X(define ddn-address 137.175.4.4)
X(define ddn-netmask 255.255.255.0)
X(define ddn-address-table ((137.175.4.2 "3106555121")))
X
X(create-group DDN-Group (type DDN) (two-way-svcs 10))
X
X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X; Alternate in-route-table including support for DDN calls
X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
X;(define in-route-table
X;	(or (and (is-line Tymnet)
X;		 (or (and (facility "01?1")
X;			  (clear 25 65))
X;		     (and (called-address "*99")
X;			  (route-to Sparrow))
X;		     (and (call-user-data "CC*")
X;			  (route-to DDN-Group))
X;		     (route-to Login-group)))
X;	    (and (is-line Sparrow)
X;		 (or (and (called-address "3106*")
X;			  (route-to Tymnet))
X;		     (and (call-user-data "CC*")
X;			  (route-to DDN-Group))
X;		     (route-to Login-group)))))
X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
END_OF_FILE
if test 3057 -ne `wc -c <'x25/examples/config.1.ex'`; then
    echo shar: \"'x25/examples/config.1.ex'\" unpacked with wrong size!
fi
# end of 'x25/examples/config.1.ex'
fi
if test -f 'x25/examples/config.ddn-frame-level' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/examples/config.ddn-frame-level'\"
else
echo shar: Extracting \"'x25/examples/config.ddn-frame-level'\" \(835 characters\)
sed "s/^X//" >'x25/examples/config.ddn-frame-level' <<'END_OF_FILE'
X;
X;	Morning Star X.25
X;
X;	Configuration parameters for DDN frame-level tests
X;
X
X;
X;	Note: At the menu titled
X;
X;		DDN PROTOCOL TESTS (LAPB) - INITIALIZATION TYPE MENU
X;
X;	choose INIT TYPE 5
X;
X;	Other parameters to select:
X;
X;		ENTER VALUE FOR TIMER [2-12S] T:2
X;		ENTER DUT'S N1 VALUE (...)Q:1080
X;
X(define verbosity 4)
X(define tracing t)
X
X(define packet-size 128)
X(define buffer-size (+ packet-size 50))			; Lots of slop
X
X(define out-route-table (route-to 0))
X
X(define in-route-table (clear 9 0))			; Out of order
X
X(activate-line 0
X	       (dte)
X	       (device "/dev/hdlc0")
X	       ;; (device "/dev/rsd1a" 0)	; SnapLink
X	       (address "990200")
X	       (no-rr-idling)
X	       (no-initial-restart)
X	       (t1-seconds 5)
X               (vc-ranges nil (1 15) nil (16 30))
X	       (max-frame-size (+ packet-size 2 3)))	; A tight fit
END_OF_FILE
if test 835 -ne `wc -c <'x25/examples/config.ddn-frame-level'`; then
    echo shar: \"'x25/examples/config.ddn-frame-level'\" unpacked with wrong size!
fi
# end of 'x25/examples/config.ddn-frame-level'
fi
if test -f 'x25/examples/config.ddn-packet-level' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/examples/config.ddn-packet-level'\"
else
echo shar: Extracting \"'x25/examples/config.ddn-packet-level'\" \(2588 characters\)
sed "s/^X//" >'x25/examples/config.ddn-packet-level' <<'END_OF_FILE'
X;
X;	Morning Star X.25
X;
X;	Configuration parameters for DDN packet-level tests
X;
X(define verbosity 4)
X(define tracing t)
X
X(define packet-size 512)
X(define buffer-size (+ packet-size 50))		; Lots of slop
X
X(define ddn-mtu-size 576)			; These three parameters
X(define ddn-address 137.175.42.42)		; are not available in the
X(define ddn-netmask 255.255.255.0)		; board-resident version
X
X(define ddn-address-table
X        ((137.175.42.1 "990200")		; What the book says
X         (137.175.42.1 "00000099020000")	; What the tester sends
X         (137.175.42.2 "990100")))
X
X(define out-route-table (route-to 0))
X
X(define in-route-table (route-to DDN-Group))
X
X(create-group DDN-Group (type DDN) (two-way-svcs 10))
X
X;
X;	When the packet tests ask for a call request packet, send a call
X;	either with ddncall.c (which can also set DDN Standard Service
X;	and DDN Call Precedence facilities) or with a PAD.
X;
X
X;
X;	Use ddncall.c to send calls
X;
X(create-group Socket-Group (type X.25) (two-way-svcs 1) (tcp-port 87))
X
X;
X;	Type "c 990100" to the PAD when requested by the tester to
X;	send a call request packet.
X;
X(create-group PAD-Group
X	      (type PAD)
X	      (pty-names "/dev/ptyr0"))
X
X(activate-line 0
X	       (dte)
X	       (device "/dev/hdlc0")		; Sun or NeXT serial port
X	       ;; (device "/dev/rsd1a" 0)	; SnapLink
X	       (address "000000990200")
X	       (standard-year 1980)
X	       (network-type 1)		; DDN
X	       (packet-options -S.9	; Don't send non-zero causes
X
X			       ; Add the following lines when running test
X			       ; 23A to keep from automatically including
X			       ; the window size, packet size and throughput
X			       ; class facilities:
X			       ;; -1.5	; No flow control parameter negotiation
X			       ;; -1.6	; No throughput class negotiation
X
X			       -1.7	; No packet retransmission
X			       -1.25	; No on-line facility registration (?)
X			       -1.26	; No D-bit modification
X			       -1.29	; No NUI
X			       -S.6	; No undefined facilities
X			       -S.12	; No 1988 L-bit
X			       -S.14	; Don't fix invalid facilities
X			       -S.16	; Don't fix CUD problems
X			       -S.17	; Don't fix address problems
X			       -S.32	; Don't insert charging facilities
X			       -S.34	; Don't insert charging facilities
X			       -S.35	; Don't insert charging facilities
X			       +S.36	; Allow bit-encoded facilities
X			       )
X	       (no-rr-idling)
X	       (no-initial-restart)
X	       (t1-seconds 5)
X	       (n2-counter 10)
X               (vc-ranges nil (1 15) nil (16 30))
X	       (max-packet-size packet-size)
X	       (max-frame-size (+ packet-size 2 3)))	; A tight fit
END_OF_FILE
if test 2588 -ne `wc -c <'x25/examples/config.ddn-packet-level'`; then
    echo shar: \"'x25/examples/config.ddn-packet-level'\" unpacked with wrong size!
fi
# end of 'x25/examples/config.ddn-packet-level'
fi
if test -f 'x25/examples/config.vc-balance' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/examples/config.vc-balance'\"
else
echo shar: Extracting \"'x25/examples/config.vc-balance'\" \(463 characters\)
sed "s/^X//" >'x25/examples/config.vc-balance' <<'END_OF_FILE'
X
X;
X;	Try to keep the same number of VCs on each of two lines.
X;
X;	"If the number of free outgoing VCs on line 0 is greater than
X;	 the number of free outgoing VCs on line 1, then send this
X;	 call to line 0 (or 1 if that fails); otherwise, send this
X;	 call to line 1 (or 0 if that fails).
X;
X(define out-route-table
X	(or (and (> (n-free-outgoing-vcs 0)
X		    (n-free-outgoing-vcs 1))
X		 (or (route-to 0)
X		     (route-to 1)))
X	    (route-to 1)
X	    (route-to 0)))END_OF_FILE
if test 463 -ne `wc -c <'x25/examples/config.vc-balance'`; then
    echo shar: \"'x25/examples/config.vc-balance'\" unpacked with wrong size!
fi
# end of 'x25/examples/config.vc-balance'
fi
if test -f 'x25/examples/ddncall.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'x25/examples/ddncall.c'\"
else
echo shar: Extracting \"'x25/examples/ddncall.c'\" \(2651 characters\)
sed "s/^X//" >'x25/examples/ddncall.c' <<'END_OF_FILE'
X/*
X *	Copyright (c) 1991 Morning Star Technologies
X *	All rights reserved
X *
X *	This software may not be duplicated or used in any way without
X *	express written permission from Morning Star Technologies.
X */
X
X
X/*
X *	ddncall
X *
X *	Send a call request to the Tekelec tester running the DDN packet
X *	level certification tests.  Say "ddncall stdservice" for module
X *	23A, sub-test 1, and say "ddncall precedence=0" for module 23A,
X *	sub-test 3.  Otherwise, just say "ddncall".
X *
X *	Note: When running test 23A, tell the tester that we are using
X *	12-octet addresses (assuming you use the supplied
X *	config.ddn-packet-level configuration file).
X */
X
X# include	<sys/types.h>
X# include	<sys/signal.h>
X# include	<sys/ioctl.h>
X# include	<sys/socket.h>
X# include	<sundev/syncstat.h>
X# include	<netx25/x25_pk.h>
X# include	<netx25/x25_ctl.h>
X# include	<netx25/x25_ioctl.h>
X# include	<stdio.h>
X
X# define MAX_PKT_SIZE	4096
X
X# define X121_ADDRESS	"000000990200"
X
Xsigurg()
X    {
X    signal(SIGURG, sigurg);
X    fprintf(stderr, "SIGURG\n");
X    fflush(stderr);
X    }
X
Xint pack(s, bcd)
Xchar *s;
Xunsigned char *bcd;
X    {
X    int len;
X
X    for (len = 0; *s; ++s, ++len)
X	if (*s < '0' || *s > '9')
X	    {
X	    fprintf(stderr, "Bad digit in BCD string\n");
X	    fflush(stderr);
X	    exit(1);
X	    }
X	else
X	    if (len & 1)
X		*bcd++ |= *s - '0';
X	    else
X		*bcd = (*s - '0') << 4;
X
X    return (len);
X    }
X
Xmain(argc, argv)
Xint argc;
Xchar **argv;
X    {
X    FACILITY_DB fac;
X    int s, pgrp, n;
X    CONN_DB remote;
X    char buffer[MAX_PKT_SIZE];
X
X    bzero(&fac, sizeof fac);
X
X    for (--argc, ++argv; argc > 0; --argc, ++argv)
X	if (strcmp(*argv, "stdservice") == 0)
X	    fac.stdservice = 1;
X	else
X	    if (strncmp(*argv, "precedence=", 11) == 0)
X		{
X		fac.precedence_req = 1;
X		fac.precedence = atoi(*argv + 11);
X		}
X
X    if ((s = socket(AF_X25, SOCK_STREAM, 0)) < 0)
X	{
X	perror("Can't create AF_X25 socket");
X	exit(1);
X	}
X
X    signal(SIGURG, sigurg);
X
X    pgrp = getpgrp(0);
X
X    if (ioctl(s, SIOCSPGRP, &pgrp) < 0)
X	{
X	perror("Can't set process group on X.25 socket");
X	exit(1);
X	}
X
X    if (ioctl(s, X25_WR_FACILITY, &fac) < 0)
X	{
X	perror("Can't set call facilities");
X	exit(0);
X	}
X
X    remote.hostlen = pack(X121_ADDRESS, remote.host);
X    remote.datalen = 0;
X    printf("Calling %s...\n", X121_ADDRESS);
X
X    if (connect(s, &remote, sizeof (remote)) < 0)
X	{
X	perror("Connect failed to remote X.25 host");
X	exit(1);
X	}
X
X    printf("Connected.\n");
X    fflush(stdout);
X
X    while ((n = read(s, buffer, MAX_PKT_SIZE)) > 0)
X	{
X	printf("Received a %d byte packet\n", n);
X	fflush(stdout);
X	}
X
X    if (n < 0)
X	{
X	perror("Read error");
X	exit(1);
X	}
X
X    exit(0);
X    }
END_OF_FILE
if test 2651 -ne `wc -c <'x25/examples/ddncall.c'`; then
    echo shar: \"'x25/examples/ddncall.c'\" unpacked with wrong size!
fi
# end of 'x25/examples/ddncall.c'
fi
echo shar: End of shell archive.
exit 0
