forked from moshix/UnixNJE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunetnje.texinfo
2189 lines (1858 loc) · 81.9 KB
/
funetnje.texinfo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\input texinfo @c -*-texinfo-*- Use TeXinfo 2.100 or later
@comment %**start of header (This is for running Texinfo on a region.)
@setfilename funetnje.info
@settitle FUNETNJE 3.x manual
@setchapternewpage odd
@comment %**end of header (This is for running Texinfo on a region.)
@iftex
@afourpaper
@finalout
@end iftex
@c
@c Notes for writing the doc:
@c
@c - Support
@c - History
@c - Introduction to NJE-networking, esp. BITNET
@c - General talk about BITNET, and BITNET-II
@c - Installation
@c - Configuration
@c - link configuration et.al. (funetnje.cf)
@c - route databases
@c - file-exit.cf
@c - msg-exit.cf
@c - User programs
@c - qrdr
@c - receive
@c - sendfile/print/punch/submit
@c - send
@c - bitsend
@c - bitreceive
@c - ygone
@c - iucvtrap
@c - transfer
@c - System programs
@c - bmail
@c - mailify
@c - ucp
@c - namesfilter
@c - njeroutes
@c - netinit
@c - acctcat
@c - Interfacing system mailer and BITNET
@c - ZMailer
@c - smail 3.0
@c - sendmail
@c - Technical documentation
@c - Directory structure
@c - client -> emulator messaging
@c - iucvtrap <-> emulator messaging
@c - spool file format
@c - implemented NETDATA features
@c - emulator logics
@c - Literature
@c
@ifinfo
This file documents FUNETNJE version 3.x, which implements
BITNET-II -type BITNET node-to-node connectivity on UNIX systems.
Copyright @copyright{} 1994-1995 Finnish University and Research Network,
FUNET.
Copyright @copyright{} 1994-1995 IBiS Support/Matti Aarnio
Permission is granted to copy and use this material for non-commercial
use without prior agreenment.
@end ifinfo
@titlepage
@title FUNETNJE 3.x
@subtitle @titlefont{NJE-emulator for UNIX systems}
@subtitle **DRAFT**DRAFT**DRAFT**DRAFT**DRAFT**DRAFT**DRAFT**DRAFT**
@author Matti Aarnio
@author Finnish University and Research Network, FUNET
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1994-1995 Finnish University and Research Network,
FUNET.
Copyright @copyright{} 1994-1995 IBiS Support/Matti Aarnio
Permission is granted to copy and use this material for non-commercial
use without prior agreenment.
@end titlepage
@comment Info menus
@c ================================================================
@node Top, Support, (dir), (dir)
@comment node-name, next, previous, up
@menu
* Support:: Source of support for FUNETNJE
* History:: History of the FUNETNJE package
* Introduction:: Introduction to NJE-networking
* BITNET-II:: Structure of Second Generation BITNET on virtual links
* Installation:: Installation of FUNETNJE package
* Configuration:: Configuration of FUNETNJE package
* User programs:: Documentation on user programs for NJE use
* System programs:: Documentation on system programs for NJE use
* Interfacing mailer:: Interfacing sendmail/smail/ZMailer to BITNET
* Nuts and Bolts:: Technical documents about insides of things
* Literature:: Some of the documents used while developing this system
@end menu
@c detailed menu for reaching all details ?
@c ================================================================
@node Support, History, Top, Top
@chapter Support of the FUNETNJE package
Academic version of this software is available from:
@example
ftp://ftp.funet.fi/pub/unix/networking/bitnet/funetnje-@emph{datecode}.tar.gz
@end example
@emph{Academic version of this software comes AS-IS without
any guarantees of working for any particular purpose,
or that it is bug-free, or that it won't cause trouble,
loss of valuable data, etc. -- for short, you are
essentially on your own.}
Like all Academic software, there might come up a bugfix, or
improvement sometimes, but such effort being non-funded, and
without any schedules, there are no guarantees of anything.
User-community is welcomed to subscribe mailinglist:
@example
$ Mail mailserver@@nic.funet.fi
Subject: xxxx
subscribe funetnje Your Name
@end example
Then corresponding via address: @emph{funetnje@@nic.funet.fi}
@emph{Remember: LIST administrativia goes via mailserver!}
When registering this software to your @emph{BITNET}-node,
I request that you use name: @strong{FUNETNJE}
If you want to pay for hand-holding service/timely bugfixing,
special customizations, etc. please contact author:
@itemize
@item @emph{<mea@@nic.funet.fi>}
@end itemize
@c ================================================================
@node History, Introduction, Support, Top
@chapter History of the FUNETNJE package
@emph{``Credit where the credit is due to''}
Original version of this software is known as @emph{HUJI-NJE},
which is VAX-VMS software for implementing BITNET-II, and several
BISYNC modes of the NJE network.
It was made at the @emph{Hebrew University of Jerusalem} (HUJI),
by Mr. @emph{Yehavi Bourvine} over the years 1988-1993.
Sometime around 1990-1991 FUNET archive server was decided to be
connected to the EARN, and the best (= free in source form) technology
for it turned to be HUJI-NJE.
The original HUJI-NJE is monsterous monolithic program which has
built-in processing of incoming email, and translation of files
(in and out) in between ASCII and EBCDIC.
At first Matti Aarnio <mea@@nic.funet.fi> did minor porting
of the program to get it to work on a Sun4/330 server (such as
@emph{nic.funet.fi} was back then), which did surface several
problems in between VAX, and other architectures.
Latter the HUJI-people lost their interest on the system, and when
no radical improvements were on sight, begun the more serious porting
of the system to Sun4 machine.
Then on Summer-93 came a contact from Mr. Gerald Hanusch <K000165@@ALIJKU65>,
who wanted to improve the then-present version of FUNETNJE to be more
complete in respect of its emulation of the RSCS for replacing their
aging VM/XA CMS machine -- they had administrative systems on another
MVS machine, and communication to it was to be preserved, although the
VM/XA CMS machine was turned off.
Over the months the system improved, and it was considered that all the
necessary major parts of the NJE-emulator were functional on January-94.
Up until then the software developement was on ``fun to do'' basis,
and beside the actual job of the parties involved.
See previous chapter about @emph{Support} for more about the supported
version.
@c ================================================================
@node Introduction, BITNET-II, History, Top
@chapter Introduction to NJE-networking
Traditionally NJE-networking happens (did happen) in between two
IBM mainframes via BISYNC cable on 4800/9600 bps speed.
Used protocols do vary, but most widely used ones have multiple
interleaved streams etc. in them, and they keep a tab on line
condition by timeouting, if acknowledgements don't appear quick
enough.
The protocols also have a sort of CRCs in them for every ``packet''
they send over the wire.
Things that are possible with NJE-network are:
@table @strong
@item Unsolicited file transfer
Sending files to the recipients without
them being aware of files coming to them, nor in fact asking any
authorization prior sending it to them.
Especially this contradicts the way how the FTP works.
This happens in @emph{Store-and-Forward}-manner, that is, when
the file is sent over one link, responsibility for it is
transferred to the next node, and link-sender can delete it
from its own spool.
@item Remote Job Entry
Sending batch-jobs to remote machine for execution, especially to
MVS systems.
@item Nodal Messaging
Sending short (max 120 chars) lines of messages to recipients at
other nodes.
@end table
With these basic facilities it is possible to build extended services,
like:
@itemize @bullet
@item
Remote printing
@item
Email
@item
File transfer
@item
Remote Job Execution (Batch processing)
@item
Interactive discussion one line at the time via NMR-messages
@item
Interactive control of servers accepting NMR-messages
@end itemize
This networking mechanism allows to have simple phone-line quality
links to be used to transport huge amounts of data over long distances.
It may be somewhat slow at the times, but it works@dots{}
An entry-level BITNET connectivity requires capability to communicate
via synchronous BISYNC interface, although these days BITNET-II technology
has largely surplanted it. See on next chapter.
There exists even ASYNC NJE, although that is more like experimental
kludge for hackers, than serious production tool. (Not supported by
the FUNETNJE.)
Names in the BITNET are at most 8 characters long.
This applies both to the users, and the machines (@emph{nodes}).
Routing in the BITNET requires every machine to know every other, and
therefore there exists fairly large bureaucracy for keeping the linkage
information up to date.
Full routing updates are done in semi-monthly manner, which updates
can usually be incorporated into the system with minimal fuzz, or in
case of FUNETNJE, automatically.
There are email-gateways in between the BITNET, and the rest of the world.
Email is transported inside the BITNET with five methods:
@table @strong
@item defrt1
Target system has no mailer, all email must be sent to the users
directly. Normally a mail-file is sent in PUNCH-80 format.
@item bsmtp3
Target system has a mailer, which can receive Batch-SMTP-file
containing the email. Format of the file is PUNCH-80.
@item bsmtp3rfc
Like @strong{bsmtp3}, but addresses in RFC-822 format instead of
BITNET node style.
@item bsmtp3nd
Target system has a mailer, which can receive Batch-SMTP-file
containing the email. Format of the file can be PUNCH-80, or
NETDATA.
In case the email contains longer lines, than 80 characters, this is
recommended method, if receiver system can accept it.
@item bsmtp3ndrfc
Like @strong{bsmtp3nd}, but addresses in RFC-822 format instead of
BITNET node style.
@end table
For more information about these tags, see below about mailer configuration.
To familiarize him-/herself with NJE-networking, the reader should
also have access to the IBM manual
`@emph{Network Job Entry Formats and Protocols for System/370 Program
Products}', @strong{GG22-9373-02} or @strong{SC23-0070-01} (or later).
@c ================================================================
@node BITNET-II, Installation, Introduction, Top
@chapter Structure of Second Generation BITNET on virtual links
BITNET was a traditional wires+modems network, until the NSF-net began
to grow in late 1980's.
When it became evident, that having separate wires for BITNET, and for
other networking activities (TCP/IP, NSF-net) is asking to keep old
separate lines in existance with new high-speed Internet, multiple
solutions were sought after for replacing physical wires with virtual
ones.
In 1986-1989 Ira Fuchs, Peter Olenick et.al. (Princeton University)
developed so called BITNET-II protocol, with which it became possible
to replace dedicated physical wires with virtual TCP/IP connections
over the Internet.
The protocol, and its reference implementation are described on
@file{BRFC0002 TEXT} available at least from ftp.funet.fi:
@example
ftp://ftp.funet.fi/pub/doc/netinfo/CREN/brfc0002.text
@end example
via anonymous FTP.
Soon after, (in 1990), Lee Varian, Peter Olenick, and Michael Gettes
(all from Princeton University) made a BITNET restructuring proposal
in which they divided fine-grained threaded mesh of the former BITNET
into 9 regions.
From their @file{bit2plan.proposal}:
@quotation
@flushright
February 1, 1990
Revised September 21, 1990
@end flushright
@sp 1
@center Proposal to Restructure the Network Supporting BITNET
Historically the physical and logical networks supporting
BITNET have been structured on leased communications lines
connecting member sites. New sites connect to the network
based upon an existing BITNET member's willingness and
ability to support the request for connection. The cost of
the leased communications line, which is paid for by the new
BITNET site, is also a consideration in choosing which
existing BITNET sites are possible connection points. The
cost of the communications line may be different based on
factors of distance and tariff considerations. This method
of connecting new sites has worked quite well, but the lack
of a formal structure for the network is creating
limitations which impair the efficiency and growth of
BITNET. The lack of a structure increases the complexity of
routing table generation and hampers efforts to implement
network management tools. The ability to create BITNET
links by using the national and regional IP networks
increases the confusion over where BITNET connections should
be made.
The idea of reorganizing BITNET into a more formal structure
has been discussed for a number of years, but the costs of
the additional leased lines needed to implement such a plan
made the project economically infeasible. Now, BITNET has
the ability to use the national and regional IP networks; a
plan to restructure BITNET by using the IP networks appears
to be cost effective and implementable. This plan could
also be implemented using private communications facilities
and IP routers instead of using the national and regional
networks. The costs of an implementation using a private
IP network would need to be carefully considered.
@sp 1
@center Restructuring Proposal
The restructuring is based on the concept of
'regionalization', the separation of the network into
geographic areas or regions. Each region would have two
'core' sites. Each core site would have RSCS-over-IP
connections to every other core site. The core sites would
form a 'backbone'. The national and regional IP networks
are the physical facilities that would be used by the core
sites to form the BITNET backbone. By generating
appropriate BITNET routing tables, the number of nodes and
the amount of traffic handled by the core sites for a given
region can be statically balanced. Within a region, the
core sites could connect to a number of 'mid-level' sites,
again by use of RSCS-over-IP. This type of structure has
the ability to provide an alternate path into a region if a
core site were out of service. The member sites or 'end'
sites within a region could connect to the mid-level sites.
Traditional leased line connections may exist at any level
within the structure but these types of connections will
continue to have limitations. That is, if a host with
traditional leased lines is down, no other path may exist to
the sites supported by that leased line.
@sp 1
@dots{}
@sp 1
@center Benefits of the restructuring
The purpose of the regionalization is to impose a structure
on the logical network supporting BITNET. This structure
will reduce the burden on the current hub sites by
decreasing the number of files which must transit these
sites. Overall network service will be improved because the
number of 'hops' a file must take to reach its destination
will be reduced or be no greater than in the current BITNET
topology. The impact on BITNET when a key BITNET node or
Internet connectivity fails will be reduced because of the
increased number of connections between core sites. As the
intra-regional mid-level structure develops, the ability of
the core sites to dynamically reroute traffic around a
disabled core node will provide improved network access.
The three level (core, mid-level, end site) structure of the
region can be expanded to include additional levels and
paths as needed within the region, thereby providing for
dynamic rerouting within a region as well.
@end quotation
@c ================================================================
@node Installation, Configuration, BITNET-II, Top
@chapter Installation of FUNETNJE package
Installation of this package is fairly straight-forward by
editing proper parts from to be activated from the @file{Makefile},
and editing sample configuration files for your local machine.
This system has two hard-wired files, which can be overridden
by editing @file{site_consts.h}-file, or defined in @file{Makefile}:
@table @strong
@item /etc/funetnje.cf
Main configuration file telling where rest of the system resides
@item /etc/funetnje.pid
The "pid file" giving easy pointer to the running emulator program
@end table
Via @file{/etc/funetnje.cf}, and its extensions
(@file{msg-exit.cf}, @file{file-exit.cf})
it is possible to define outgoing, and incoming spool directories, et.al.
Only notable detail is that all those directories @strong{must}
reside on same disk partition, as files are moved from within
emulator spool to user spool with @emph{link(2)}-, and
@emph{unlink(2)}-system calls. (Or @emph{rename(2)}, if it exists.)
For inter-module access control this software uses
one UNIX group, which is used to @emph{set-gid} some programs,
and which is needed for system administrators so that they
can run the control program without a need to become super-users,
and also without a need to set-gid the control-panel (@file{ucp}).
Things to decide:
@itemize @bullet
@item
Name and number of the `bitnet' programs group
(into your @file{/etc/group}).
The @file{Makefile} has variable @var{NJEGRP} for it.
@item
Directories for your BITNET transmission spool, and user spool.
@emph{Important: those must be on same partition!}
Example configurations have them as:
@itemize
@item @emph{QUEUEDIR}
@file{/var/spool/bitnet}
@item @emph{USERSPOOL}
@file{/var/spool/bitspool}
@end itemize
@item
Location of various programs, @file{Makefile} has variables:
@var{MANDIR}, @var{LIBDIR}, @var{BINDIR}, and @var{ETCDIR}.
@end itemize
Choosing proper defines for the compile of the software, especially
your platform dependent pre-processor constants:
@table @strong
@item -D_POSIX_SOURCE
Use on true @code{POSIX.1} systems
@item -DHAS_PUTENV
If your system has SysV-like @code{putenv(3)} to set environment
variable. When this is not defined, a BSD-like @code{setenv(3)}
is assumed
@item -DHAS_LSTAT
Use when your system has @code{lstat(2)} in addition to the usual
@code{stat(2)}
@item -DUSE_SOCKOPT
Use when your system has a working @code{setsockopt(2)} for
@code{SO_RCVBUF}, and @code{SO_SNDBUF}.
Most systems do!
This is a performace option, which @strong{might} help on busy systems
@item -DNBCONNECT
The system can do a @code{connect(2)} on a socket, which has been
flagged as non-blocking. Without this connection to a system which
is unreachable would cause system to hang for synchronous timeout...
(Superceded with @strong{NBSTREAM})
@item -DNO_NBSTREAM
If for some reason you want to disable the non-blocking stream
code that uses following two defined, define this.
@item -DNBSTREAM
This compilation option allows for more complete non-blocking
operations, including actual @code{write(2)}s.
Defined in @file{consts.h}, unless @strong{-DNO_NBSTREAM} is
defined.
@item -DUSE_XMIT_QUEUE
Another flag which is necessary for successfull operation of
NBSTREAM-code.
(Without it the NBSTREAM-code causes bug_check()s..)
Defined in @file{consts.h}, unless @strong{-DNO_NBSTREAM} is
defined.
@item -DNO_GETTIMEOFDAY
System internal time retrieval for various delay/speed-analysis
uses uses (per default) BSD-derived(?) @code{gettimeofday(2)}-call,
but if your system does not have it, define this, and @code{time(2)}
will be used.
@item -DMAILERNAME="..."
To override the default @var{MAILERNAME} (= "MAILER")
in the @file{bmail.c} source.
For normal use the @code{bmail}'s ``-u''-option does the same
@item -DCONFIG_FILE=...
Override @file{consts.h} definition of system config file name
@item -DPID_FILE=...
Override @file{consts.h} definition of emulator process-id file name
@item -DBSD_SIGCHLDS
Uses @code{BSD}-style @code{SIGCLD/SIGCHLD} handling where an signal
trapper program is required to process the exited child information.
On @code{SysV}-systems it is safe (it seems) to just ignore
@code{SIGCLD} and that way to get rid of the zombied child.
@item @emph{Some compiler switches:}
@item -fno-builtin
A GNU-CC option telling it, that builtin accelerated operations
should not be used. (Alignment may cause problems on some cases!)
However we have a fairly high confidence that we have eliminated
every case, where inlining a @code{memcpy(3)} could cause problems.
Try without it!
(Possible problems manifest themselves as coredrops due to SIGBUS,
as some memory accesses may become unaligned..)
@item @emph{Some more esoteric tricks:}
@item -DDEBUG
If you really want to see what goes on... The amount of DEBUG-code
is decreasing all the time, and frankly we haven't compiled the code
with `-DDEBUG' for last 100 or so versions, we have just added
`logger()'-calls into it at places needing it, and adjusted
@var{LOGLEVEL} to get them into @var{LOGFILE}, and then commented
or removed those loggers out again.. (Or used debuggers to get into
the business..)
@item -DUSE_ZMAILER -I/usr/local/include
For @file{mailify.c} -- for tight integration with ZMailer MTA.
(Expects ZMailer's @file{libzmailer.a}, and @file{zmailer.h} to be
available. See ZMailer's @code{zmailer(3)} for further information)
@item -DUSE_OWN_PROTOS
If the "prototypes.h" -function prototypes for various things can
for your system, and your system does not have ANSI-headers of its
own, then use this
@end table
Several pre-tested compiler setups are also available in the @file{Makefile}.
@c ================================================================
@node Configuration, User programs, Installation, Top
@chapter Configuration of FUNETNJE package
@menu
* funetnje.cf:: Runtime main configuration file
* file-exit.cf:: Incoming files processing configuration file
* msg-exit.cf:: Incoming NMR's processing configuration file
* cmd-help.txt:: Text file that is sent as a responce to NMR 'HELP'
* routes:: BITNET node routing databases
@end menu
@c ----------------------------------------------------------------
@node funetnje.cf, file-exit.cf, , Configuration
@section Runtime main configuration-file: @file{funetnje.cf}
Here is a sample @file{/etc/funetnje.cf} -file:
@example
*
* Configuration file for FUNETNJE program
*
NAME FINFILES @i{Node primary name}
*ALIAS HAMSTER @i{Optional alias for this node}
*IPADDRESS nic.funet.fi @i{Node primary IP address}
IPADDRESS 128.214.6.100 @i{used on link signon msgs}
QUEUE /usr/spool/bitnet @i{Emulator spool directory}
CMDMAILBOX FIFO /usr/spool/bitnet/.cmdpipe @i{IPC Fifo -path}
#CMDMAILBOX SOCK /usr/spool/bitnet/.cmdpipe @i{IPC Socket -path}
#CMDMAILBOX UDP 128.214.6.100 175 @i{IPC IP-address + port number}
LOG /usr/adm/bitnet.log @i{Emulator log-file}
LLEVEL 1 @i{Logging level. Smaller==less}
RSCSACCT /usr/adm/bitnet.acct @i{Define for IBM RSCS-like account file}
* this table is a binary file.
TABLE /usr/local/lib/nje/finfiles.routes @i{NJE route database}
* @i{EBCDIC<->ASCII tables, (optional), see ebcdictbl(5)}
*EBCDICTBL /usr/local/lib/nje/ebcdictbl
INFORM MEA@@FINFILES @i{1+ users monitoring line}
INFORM ROOT@@FINFILES @i{ states}
FILEEXITS /usr/local/lib/nje/file-exit.cf @i{Defines FILE-EXITs}
MSGEXITS /usr/local/lib/nje/msg-exit.cf @i{Defines MSG-EXITs}
DEFFORM STANDARD @i{NJE 'FORM' default}
*DEFAULT-ROUTE FINHUTC @i{Optional default route. With this}
@i{the @var{TABLE}-file can be left empty}
@i{but it @strong{must} exist!}
* @i{Example link to a VAX/VMS system with UCX, and JNET}
LINE 0 FIGBOX @i{Key-line starting link definition}
TYPE UNIX_TCP @i{Only supported value is UNIX_TCP}
BUFSIZE 4096 @i{VMNET TTB size}
IPPORT 500 @i{Opposite end's VMNET's IP port}
* TCPNAME figbox.funet.fi @i{Opposite end's name - as a comment}
TCPNAME 128.214.6.7 @i{ .. or IP number ..}
MAX-STREAMS 7 @i{Number of parellel streams}
TCP-SIZE 8192 @i{How much to block before write}
TIMEOUT 3 @i{.. and how long to wait to flush partial block?}
* @i{Example link to a Linux-PC running FUNETNJE}
LINE 1 ALIJKU65
TYPE UNIX_TCP
BUFSIZE 1024
IPPORT 175 @i{The official VMNET port}
*TCPNAME alijku65.edvz.uni-linz.ac.at
TCPNAME 140.78.4.34
MAX-STREAMS 7
TCP-SIZE 3100 @i{Lower than usual - network problems}
TIMEOUT 3
* @i{Example link to an IBM VM/SP RSCSv3 system with VMNET}
LINE 2 FINHUTC
TYPE UNIX_TCP
BUFSIZE 1024
IPPORT 175
*TCPNAME finhutc.hut.fi
TCPNAME 130.233.224.4
MAX-STREAMS 7
TCP-SIZE 8192
TIMEOUT 3
* @i{Example link to a Convex C3480 running FUNETNJE}
LINE 3 FINFAN
TYPE UNIX_TCP
BUFSIZE 8192
IPPORT 175
TCPNAME convex.csc.fi
MAX-STREAMS 7
TCP-SIZE 8192
TIMEOUT 3
@end example
@c ----------------------------------------------------------------
@node file-exit.cf, msg-exit.cf, funetnje.cf, Configuration
@section Incoming files processing configuration file: @file{file-exit.cf}
This is @emph{wide} format configuration file (like they all), and
can be used to define what is done with various incoming files.
Comment lines are those that start with ``#'' or ``;'' on column 1.
The ``*'' is a wild-card needed on patterns.
Over-wide lines are wrapped @emph{in this document} with @code{\}-characters
at the end of previous line, and at the begin of next line.
Such wrapping is not allowed in the real configuration file!
@example
# FILE-EXIT.CF -- Configure file handling on FUNETNJE
#
# Rule for spool disposition path, defines also system default
# user spool directory for those who don't have specially set
# something else.
# Possibilities: ~/bitspool -- real user's only! (~/ == users home)
# /usr/path/path/ -- append 'touser' as subdir,
# it is spool dir.
# Valid for Exits and real users.
# /usr/path/path -- explicite directory.
# /dev/null -- explicite file (special case).
# When directory isn't present, it is built from upmost present
# level down to users bottommost level hmm...
# Question about ownership of directory/files...
# Real users: real protections, programs start with setuid() user.
# Exit users: POSTMAST (exits start as root anyway.)
# Exited reals: real protections, programs start with setuid()
# user.
Spool-Dir: /usr/spool/bitspool/
Postmast-Dir: /usr/spool/bitspool/POSTMAST
# Now list of things to match and then what to do
# To do keywords: DISCARD to /dev/null.
# KEEP just so. Into default or given spool.
# NOTIFY send an NJE message to someone.
# RUN starts arbitary program with arbitary
# arguments telling about file location
# and its properties.
# If fails, well..
# Defining SpoolDir which shall not be attached ToUser must not be done
# with trailing "/", (and vice versa)
# /usr/spool/bitnet/SYSIN-JOB
# Exit table begin keyword:
Exit-Table:
# Args:
# touser8 tonode8 fname8 ftype8 pun? class fruser8 frnode8 dist8 \
\ SpoolDir action ExtraArguments
#
# Several special handlings (tests/illustriations)
#
#MEA FINFILES * * * * HKS SEARN * \
\ default DISCARD
NOBODY FINFILES * * * * * * * \
\ default DISCARD
FOOBAT FINFILES * * * * * * * \
\ default RUN /usr/local/lib/nje/transfer \
\ MEA@@$TONODE $SPOOL
ECHO FINFILES * * * * * * * \
\ default RUN /usr/local/lib/nje/transfer \
\ NOBODY@@$FRNODE $SPOOL
#LPR FINFILES * * * * * * * \
\ default RUN /usr/local/lib/nje/rprint \
\ $SPOOL lpr $FRUSER $FRNODE $TOUSER $FID
#
# Define what we do with the SYSINs
#
* * * * SYSIN * * * * \
\ /usr/spool/bitnet/SYSIN-JOB/ RUN /usr/local/lib/nje/sysin $SPOOL
#
# Define a MAILER for our node!
# And also handle directly sent mail from nodes without mailers...
#
MAILER FINFILES * * PUN M * * * \
\ default RUN /usr/local/lib/nje/mailify $SPOOL
* * * MAIL PUN M * * * \
\ default RUN /usr/local/lib/nje/mailify $SPOOL
#
# NETINIT is pseudo id for automatically re-generating routing tables
# This is done with netinit.sh which must be configured by hand.
#
NETINIT FINFILES * * * * * * * \
\ default KEEP
#
# Finally a `catch them all' default handling case.
#
* * * * * * * * * \
\ default KEEP
@end example
@c ----------------------------------------------------------------
@node msg-exit.cf, cmd-help.txt, file-exit.cf, Configuration
@section Incoming NMR's processing configuration file: @file{msg-exit.cf}
This is @emph{wide} format configuration file (like they all), and
can be used to define what is done with various incoming NMR's.
Comment lines are those that start with ``#'' or ``;'' on column 1.
The ``*'' is a wild-card needed on patterns.
Over-wide lines are wrapped @emph{in this document} with @code{\}-characters
at the end of previous line, and at the begin of next line.
Such wrapping is not allowed in the real configuration file!
@example
#
# MSG-EXIT.CF for FUNETNJE
#
# Some first ideas about patterns, et.al.:
#
# Actions: CMD: BUILTIN, RUN
# MSG: BRCAST, DISCARD, RUN, (PIPE)
# Argument tokens for 'RUN': TOUSER, TONODE, FRUSER, FRNODE, TEXT, ARGS
# Arguments for 'BUILTIN': "HELP", "HARDCODED", "ERROR"/ERROR msg-string",
# "ALIAS remap-pattern"
# Patterns work as follows:
# TO*KEN -- match (only) any of input words: TO TOK TOKE TOKEN
# * -- match any token, (but not blank)
# ** -- match any number of tokens, including nothing.
# Remap-patterns work as follows:
# $nn -- substitute nn:th text token into this place
# ANYSTRING -- copy it verbatim
#
CmdHelpFile: /usr/local/lib/nje/cmd-help.txt
#$TOUSER $TONODE $FRUSER $FRNODE C pattern ACTION args
# Actually TOUSER is not tested on commands, it will be blank anyway..
. FINFILES * * C "HIL*FE" \
\ BUILTIN HELP English quick document is available via 'HELP' command.
. FINFILES * * C "SOS" \
\ BUILTIN HELP English quick document is available via 'HELP' command.
. FINFILES * * C "H*ELP" BUILTIN HELP
. FINFILES * * C "M * * * **" BUILTIN HARDCODED
. FINFILES * * C "MSG * * * **" BUILTIN HARDCODED
. FINFILES * * C "M*SG **" \
\ BUILTIN ERROR Too few arguments for the MSG
. FINFILES * * C "CMD * * **" BUILTIN HARDCODED
. FINFILES * * C "CMD **" \
\ BUILTIN ERROR Too few arguments for the CMD
. FINFILES * * C "Q*UERY SYS*TEM S" BUILTIN HARDCODED
. FINFILES * * C "Q*UERY SYS*TEM" BUILTIN HARDCODED
. FINFILES * * C "Q*UERY STAT*S" BUILTIN HARDCODED
. FINFILES * * C "Q*UERY *" BUILTIN HARDCODED
. FINFILES * * C "Q*UERY * Q*UEUE" BUILTIN HARDCODED
. FINFILES * * C "CPQ*UERY N*AMES" BUILTIN HARDCODED
. FINFILES * * C "CPQ*UERY U*SER *" BUILTIN HARDCODED
. FINFILES * * C "CPQ*UERY U*SER" BUILTIN HARDCODED
. FINFILES * * C "CPQ*UERY LOG" BUILTIN HARDCODED
. FINFILES * * C "CPQ*UERY CPU" BUILTIN HARDCODED
. FINFILES * * C "CPQ*UERY CP*LEVEL" BUILTIN HARDCODED
. FINFILES * * C "CPQ*UERY IND*ICATE" BUILTIN HARDCODED
. FINFILES * * C "CPQ*UERY T*IME" BUILTIN HARDCODED
. FINFILES * * C "CP*QUERY T*IME" BUILTIN ALIAS CPQ $2
. FINFILES * * C "EC*HO **" \
\ RUN /usr/local/bin/send -s $FRUSER@@$FRNODE *CMD was '$TEXT'
# The default
. FINFILES * * C "**" BUILTIN ERROR
#$TOUSER $TONODE $FRUSER $FRNODE M ACTION args
# "." == FRUSER is blank, that is from some 'SYSTEM'..
VMNET * * * M DISCARD
MAILER * * * M DISCARD
MAILSERV FINFILES . * M DISCARD
MAILSERV FINFILES * * M \
\ RUN /usr/local/lib/mailserver/nje-msg $FRUSER $FRNODE $TEXT
LISTSERV FINFILES . * M DISCARD
LISTSERV FINFILES * * M \
\ RUN /usr/local/bin/send -u MAILSERV $FRNODE@@$FRUSER \
\ *Sorry, we do not have LISTSERV, try MAILSERV
ECHO FINFILES . * M DISCARD
ECHO FINFILES * * M \
\ RUN /usr/local/bin/send -u echo $FRUSER@@$FRNODE *Got Message: '$TEXT'
FINGER FINFILES . * M DISCARD
FINGER FINFILES * * M \
\ RUN /usr/local/lib/nje/nje-finger $FRUSER $FRNODE $ARGS
# The default
* * * * M BRCAST
@end example
@c ----------------------------------------------------------------
@page
@node cmd-help.txt, routes, msg-exit.cf, Configuration
@section Node NJE command 'HELP' response file: @file{cmd-help.txt}
Node help text can be changed with the @file{cmd-help.txt}-file,
which paths is defined in the @file{msg-exit.cf}.
@example
@cartouche
Commands available for FUNETNJE emulator:
Help / HILfe / SOS - Three commands to ask for this info
Query SYStem - Show line status summary report, and activity
Query SYStem S - Same as "Q SYS", but with extra activity data
Query STATs - Show line statictics
Query Nodename - Show the route entry to that node
Query linkname A/F - Available via Query SYStem
Query linkname Q - Show 30 first files in queue on the link
CPQuery Names - List all users logged on
CPQuery User - Tell how many users are logged on
CPQuery User username - Look for a specific username
CPQuery LOG - Send the WELCOME message
CPQuery CPU, CPLEVEL, IND, T - Machine type and time
MSG node user text.. - A way to send a NMR to some node via msg relay.
CMD node text.. - A way to send a NMR to some node via cmd relay.
This system has also NMR responding servers at addresses:
ECHO@@FINFILES -- throws the NMRs back to you.
MAILSERV@@FINFILES -- ask for HELP
FINGER@@FINFILES -- Usage: tell finger@@finfiles address@@internet
@end cartouche
@end example
@c ----------------------------------------------------------------
@page
@node routes, , cmd-help.txt, Configuration
@section BITNET node routing databases: @file{nje.routes}
@emph{FUNETNJE} uses @emph{IBM RSCSv1} compatible route
files. Used data-elements are @var{SITE}, and @var{LINE}
definitions (second, and third tokens).
The routing file (for example @file{finfiles.routes}) is
generated with @file{njeroutes} -command:
@example
@cartouche
# njeroutes finfiles.header finfiles.netinit finfiles.routes
@end cartouche
@end example
@example
@r{ Local override file:} @file{finfiles.header}
@cartouche
*
* Header of FUNETNJE/HUyNJE package routing table
*
* Generic format:
* SITE LINE FORMAT
*
ROUTE FINFILES LOCAL ASCII
ROUTE HAMSTER LOCAL ASCII
ROUTE FINFTP LOCAL ASCII
ROUTE FINUTU FINUTU EBCDIC
ROUTE ALIJKU65 ALIJKU65 EBCDIC
ROUTE ALIJKU64 ALIJKU65 EBCDIC
ROUTE FINHUTC FINHUTC EBCDIC
@end cartouche
@end example
@page
@example
@r{ Node route file:} @file{finfiles.netinit}
@cartouche
*
* GR version 91-11-19, date=94-02-04, time=00:01:34
*
* Table generation parameters: GENROUTE FINFILES NAME=FINFILES.NETI
* : NIT.A
*
* Routing table information for
* node: FINFILES nodenum: 0963
*
*
* The routing table neither contains neighbours nor the local node.
* List of neighbours:
*
* node: FIGBOX nodenum: 3025
* FINHUTC 1044
*
* * The position of the network name and country *
* * assumes that the RSCS ROUTE command does not *
* * have more than two parameters. *
ROUTE VERS9402 FINHUTC EARN NL
ROUTE FINABO FIGBOX EARN FI
ROUTE FINHUT FINHUTC EARN FI
ROUTE FINHUTA FINHUTC EARN FI
ROUTE FINJYU FIGBOX EARN FI
ROUTE FINKUO FIGBOX EARN FI
ROUTE FINNPHI FIGBOX EARN FI
ROUTE FINOU FIGBOX EARN FI
ROUTE FINUH FIGBOX EARN FI
ROUTE FINUHA FIGBOX EARN FI
@dots{}
@end cartouche
@end example
@c ================================================================
@node User programs, System programs, Configuration, Top
@chapter Documentation of user programs for NJE use
A set of program for user to handle the files, and
communication with the BITNET.
@menu
* qrdr:: Query user's reader
* receive:: Receive files from spool
* sendfile:: File sending with sendfile/print/punch/submit
* send:: Interactive messages/commands sender
* bitsend:: Send file in multiple parts with `table of contents'
* bitreceive:: Receive `bitsent' files
* ygone:: Register to the running Emulator to be `gone'
* iucvtrap:: Trap, and pipe out incoming NMR-messages from the Emulator
* transfer:: Resend files from user's spool
@end menu
@c ----------------------------------------------------------------
@node qrdr, receive, , User programs
@section Query user's reader: @file{qrdr}
@c - qrdr
Shows a listing of user's BITNET spool -- the `reader'.
@example
@cartouche
QRDR: Spool dir: `/usr/spool/bitspool/MEA/'
From: To: FName: FExt: Type Form: SpoolID
NETSERV@@FINHUT MEA@@FINFILES NETSERV NOTE PUN A QUFINHUT 0001
NETSERV@@FINHUT MEA@@FINFILES NETSERV NOTE PUN A QUFINHUT 0002
NETSERV@@FINHUT MEA@@FINFILES NETSERV NOTE PUN A QUFINHUT 0003
@dots{}
@end cartouche
@end example
Synopsis: