├── BuildAndInstall.sh ├── README.Bridging ├── README.DECnet ├── README.md ├── Troubleshooting ├── dnprogs ├── COPYING.libraries ├── COPYING.programs ├── Documentation │ ├── dapfs.README │ ├── dnetd.README │ ├── dnroute.README │ ├── fal.README │ ├── librms.README │ ├── mail.README │ └── phone.README ├── FUTURE_PROJECTS ├── Makefile ├── Makefile.common ├── NEWS ├── README ├── README.too ├── TODO ├── WARRANTY ├── apps │ ├── Makefile │ ├── cterm.h │ ├── ctermd.8 │ ├── ctermd.c │ ├── decnet.conf │ ├── decnet.conf.5 │ ├── dnmount.8 │ ├── dnmount.c │ ├── dnping.1 │ ├── dnping.c │ ├── rmtermd.8 │ ├── rmtermd.c │ ├── setether.8 │ ├── setether.sh │ ├── sethost.1 │ ├── sethost.c │ ├── startnet.8 │ └── startnet.c ├── contrib │ └── ph3-der-loewe │ │ ├── COPYING │ │ ├── Makefile │ │ ├── dnetcat.c │ │ ├── dnetstat.c │ │ ├── dnnode.c │ │ └── man1 │ │ ├── dnetcat.1 │ │ ├── dnetstat.1 │ │ └── dnnode.1 ├── dapfs │ ├── BUGS │ ├── Makefile │ ├── dapfs.c │ ├── dapfs.com │ ├── dapfs.h │ ├── dapfs_dap.cc │ ├── dapfs_dap.h │ ├── filenames.c │ ├── filenames.h │ ├── kfifo.c │ ├── kfifo.h │ └── mount.dapfs.8 ├── debian │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── dnet-common.README │ ├── dnet-common.config │ ├── dnet-common.copyright │ ├── dnet-common.docs │ ├── dnet-common.init.d │ ├── dnet-common.install │ ├── dnet-common.postinst │ ├── dnet-common.postrm │ ├── dnet-common.preinst │ ├── dnet-common.templates │ ├── dnet-progs.copyright │ ├── dnet-progs.docs │ ├── dnet-progs.init.d │ ├── dnet-progs.install │ ├── dnet-progs.install.linux │ ├── dnet-progs.links │ ├── libdnet-dev.copyright │ ├── libdnet-dev.docs │ ├── libdnet-dev.install │ ├── libdnet-dev.links │ ├── libdnet.copyright │ ├── libdnet.install │ ├── libdnet.lintian-overrides │ ├── libdnet.postinst │ ├── po │ │ ├── POTFILES.in │ │ ├── cs.po │ │ ├── da.po │ │ ├── de.po │ │ ├── es.po │ │ ├── fr.po │ │ ├── it.po │ │ ├── ja.po │ │ ├── nl.po │ │ ├── pl.po │ │ ├── pt.po │ │ ├── pt_BR.po │ │ ├── ru.po │ │ ├── sk.po │ │ ├── sv.po │ │ ├── templates.pot │ │ └── vi.po │ ├── postinst │ ├── rules │ └── templates ├── dncopy │ ├── Makefile │ ├── dncopy.1 │ ├── dncopy.cc │ ├── dnetfile.cc │ ├── dnetfile.h │ ├── dnetfile_dap.cc │ ├── file.cc │ ├── file.h │ ├── unixfile.cc │ └── unixfile.h ├── dndel │ ├── Makefile │ ├── dndel.1 │ └── dndel.cc ├── dndir │ ├── Makefile │ ├── dndir.1 │ └── dndir.cc ├── dnetd │ ├── Makefile │ ├── dnetd.8 │ ├── dnetd.c │ ├── dnetd.conf │ ├── dnetd.conf.5 │ └── task_server.c ├── dnlogin │ ├── Makefile │ ├── README │ ├── cterm.c │ ├── dnlogin.1 │ ├── dnlogin.c │ ├── dnlogin.h │ ├── found.c │ ├── tty.c │ └── tty.h ├── dnroute │ ├── Makefile │ ├── TODO │ ├── csum.c │ ├── csum.h │ ├── dneigh.8 │ ├── dneigh.c │ ├── dnroute.8 │ ├── dnroute.conf.sample │ ├── dnroute.h │ ├── dnrtlink.c │ ├── dnrtlink.h │ ├── get_neigh.c │ ├── hash.c │ ├── hash.h │ ├── netlink │ │ ├── Makefile │ │ ├── include │ │ │ ├── SNAPSHOT.h │ │ │ ├── libnetlink.h │ │ │ ├── ll_map.h │ │ │ ├── rt_names.h │ │ │ ├── rtm_map.h │ │ │ └── utils.h │ │ ├── libnetlink.c │ │ └── ll_map.c │ ├── pidfile.c │ ├── routing_msg.c │ └── send_route.c ├── dnsubmit │ ├── Makefile │ ├── dnsubmit.1 │ └── dnsubmit.cc ├── dntask │ ├── Makefile │ ├── dntask.1 │ ├── dntask.c │ └── tasks │ │ ├── decterm.com │ │ ├── interactive.com │ │ └── show_system.com ├── dtr │ ├── Makefile │ ├── dtr.8 │ └── dtr.c ├── dts │ ├── Makefile │ ├── dts.1 │ └── dts.c ├── excludes-dist ├── fal-old │ ├── Makefile │ ├── create.cc │ ├── create.h │ ├── decnet.proxy.5 │ ├── directory.cc │ ├── directory.h │ ├── erase.cc │ ├── erase.h │ ├── fal.8 │ ├── fal.cc │ ├── open.cc │ ├── open.h │ ├── params.h │ ├── rename.cc │ ├── rename.h │ ├── server.cc │ ├── server.h │ ├── submit.cc │ ├── submit.h │ ├── task.cc │ └── task.h ├── fal │ ├── Makefile │ ├── dap.c │ ├── dap.h │ ├── debug.c │ ├── decnet.proxy │ ├── directory.c │ ├── fal.8 │ ├── fal.c │ ├── file.c │ └── main.c ├── include │ ├── Makefile │ ├── dn_endian.h │ ├── kernel │ │ └── netdnet │ │ │ └── dn.h │ └── netdnet │ │ ├── dn.h │ │ └── dnetdb.h ├── libdaemon │ ├── Makefile │ ├── dnet_daemon.3 │ ├── dnet_daemon.c │ ├── dnet_priv_check.c │ └── dnetlog.c ├── libdap │ ├── Makefile │ ├── connection.cc │ ├── connection.h │ ├── logging.cc │ ├── logging.h │ ├── protocol.cc │ ├── protocol.h │ ├── vaxcrc.cc │ └── vaxcrc.h ├── libdnet │ ├── Makefile │ ├── cuserid.c │ ├── dnet_addr.3 │ ├── dnet_addr.c │ ├── dnet_conn.3 │ ├── dnet_conn.c │ ├── dnet_eof.3 │ ├── dnet_eof.c │ ├── dnet_getnode.3 │ ├── dnet_getnode.c │ ├── dnet_htoa.3 │ ├── dnet_htoa.c │ ├── dnet_ntoa.3 │ ├── dnet_ntoa.c │ ├── dnet_ntop.c │ ├── dnet_pton.c │ ├── dnet_recv.c │ ├── getexecdev.c │ ├── getnodeadd.3 │ ├── getnodeadd.c │ ├── getnodebyaddr.3 │ ├── getnodebyaddr.c │ ├── getnodebyname.3 │ ├── getnodebyname.c │ ├── getnodename.c │ ├── getobjectbyX.c │ ├── libdnet.3 │ ├── setnodeent.3 │ ├── setnodeent.c │ └── setnodename.c ├── librms │ ├── Makefile │ ├── close.cc │ ├── example.c │ ├── fabdef.h │ ├── getreply.cc │ ├── open.cc │ ├── parse.cc │ ├── rabdef.h │ ├── readwrite.cc │ ├── rms.h │ ├── rmsp.h │ └── t_example.c ├── libvaxdata │ ├── Makefile │ ├── contents.txt │ ├── libvaxdata.pdf │ ├── linux │ │ ├── makefile.gcc │ │ ├── makefile.icc │ │ ├── makefile.linux │ │ ├── makefile.pathcc │ │ ├── makefile.pgcc │ │ ├── readme │ │ └── readme.txt │ ├── macos9 │ │ ├── make.macos9 │ │ ├── make.mrc │ │ ├── make.mwcc │ │ └── readme │ ├── macosx │ │ ├── makefile.darwin │ │ ├── makefile.gcc │ │ ├── makefile.icc │ │ ├── makefile.macosx │ │ ├── makefile.xlc │ │ ├── readme │ │ └── readme.txt │ ├── readme.txt │ ├── solaris │ │ ├── makefile.cc │ │ ├── makefile.gcc │ │ ├── makefile.solaris │ │ ├── readme │ │ └── readme.txt │ ├── src │ │ ├── convert_vax_data.c │ │ ├── convert_vax_data.h │ │ ├── endian.f │ │ ├── from_vax_d8.c │ │ ├── from_vax_d8_.c │ │ ├── from_vax_g8.c │ │ ├── from_vax_g8_.c │ │ ├── from_vax_h16.c │ │ ├── from_vax_h16_.c │ │ ├── from_vax_i2.c │ │ ├── from_vax_i2_.c │ │ ├── from_vax_i4.c │ │ ├── from_vax_i4_.c │ │ ├── from_vax_r4.c │ │ ├── from_vax_r4_.c │ │ ├── is_little_endian.c │ │ ├── is_little_endian_.c │ │ ├── test.c │ │ ├── to_vax_d8.c │ │ ├── to_vax_d8_.c │ │ ├── to_vax_g8.c │ │ ├── to_vax_g8_.c │ │ ├── to_vax_h16.c │ │ ├── to_vax_h16_.c │ │ ├── to_vax_i2.c │ │ ├── to_vax_i2_.c │ │ ├── to_vax_i4.c │ │ ├── to_vax_i4_.c │ │ ├── to_vax_r4.c │ │ └── to_vax_r4_.c │ ├── tru64 │ │ ├── makefile.cc │ │ ├── makefile.gcc │ │ ├── makefile.osf1 │ │ ├── readme │ │ └── readme.txt │ ├── version_history.txt │ ├── vms │ │ ├── make.com │ │ ├── readme │ │ └── readme.txt │ └── win32 │ │ ├── cwmake.bat │ │ ├── readme │ │ ├── readme.txt │ │ └── vcmake.bat ├── mail │ ├── Makefile │ ├── configfile.c │ ├── configfile.h │ ├── receive.c │ ├── receive.h │ ├── sendvmsmail.8 │ ├── sendvmsmail.c │ ├── uulib │ │ ├── Makefile │ │ ├── acconfig.h │ │ ├── config.h │ │ ├── fptools.c │ │ ├── fptools.h │ │ ├── uucheck.c │ │ ├── uudeview.h │ │ ├── uuencode.c │ │ ├── uuint.h │ │ ├── uulib.c │ │ ├── uunconc.c │ │ ├── uuscan.c │ │ ├── uustring.awk │ │ ├── uustring.c │ │ ├── uustring.h │ │ └── uuutil.c │ ├── vmsmail.conf.5 │ ├── vmsmaild.8 │ └── vmsmaild.c ├── manpages │ └── decnet.7 ├── multinet │ ├── Makefile │ ├── multinet.8 │ └── multinet.c ├── ncp │ ├── Makefile │ ├── area.c │ ├── area.h │ ├── circuit.c │ ├── circuit.h │ ├── copy.c │ ├── line.c │ ├── line.h │ ├── logging.c │ ├── logging.h │ ├── loop.c │ ├── module.c │ ├── module.h │ ├── ncp.1 │ ├── ncp.c │ ├── ncp.h │ ├── network.c │ ├── nice.c │ ├── nice.h │ ├── node.c │ ├── node.h │ ├── params.c │ ├── show.c │ ├── tables.c │ └── zero.c ├── nml │ ├── Makefile │ ├── dnetnml.8 │ ├── main.c │ ├── nice.c │ ├── nice.h │ └── nml.c ├── phone │ ├── Makefile │ ├── backend.c │ ├── backend.h │ ├── common.h │ ├── gtkphonesig.c │ ├── gtkphonesig.h │ ├── gtkphonesrc.c │ ├── gtkphonesrc.h │ ├── main.c │ ├── phone.1 │ ├── phone.h │ ├── phone_gtk.c │ ├── phone_gtk.h │ ├── phone_ncurses.c │ ├── phone_ncurses.h │ ├── phone_server.c │ ├── phone_server.h │ ├── phoned.8 │ ├── phoned.c │ ├── phoned.h │ └── pixmaps │ │ ├── answer.xpm │ │ ├── dial.xpm │ │ ├── directory.xpm │ │ ├── exit.xpm │ │ ├── facsimile.xpm │ │ ├── hangup.xpm │ │ ├── help.xpm │ │ ├── hold.xpm │ │ ├── phone.xpm │ │ └── reject.xpm ├── rpm.spec └── scripts │ ├── Makefile │ ├── check_kernel.sh │ ├── decnet.sh │ ├── decnetconf.8 │ ├── dnetChangeMAC │ ├── dnetLoadModule │ ├── dnetconf │ ├── dnetd │ ├── rc.decnet │ └── setup.sh └── kernel ├── Makefile ├── dnet.c ├── dnet.h ├── dnet_dev.c ├── dnet_dev.h ├── dnet_next.c ├── dnet_next.h ├── dnet_node.c ├── dnet_node.h ├── dnet_nsp.c ├── dnet_nsp.h ├── dnet_proto.h ├── dnet_route.c ├── dnet_route.h ├── dnet_sock.c ├── dnet_sock.h ├── dnet_sys.c ├── dnet_sys.h ├── dnet_timr.c ├── dnet_timr.h ├── dnet_trc.c ├── dnet_trc.h └── uapi └── dn.h /README.md: -------------------------------------------------------------------------------- 1 | # LinuxDECnet 2 | DECnet for Linux updated to run on latest Linux kernel (After DECnet code was removed from kernel 6.1) 3 | 4 | 5 | README.DECnet 6 | 7 | - Detailed instructions for downloading and installing DECnet on a Linux system. 8 | 9 | 10 | BuildAndInstall.sh 11 | 12 | - Shell script which automates most of the process of installing DECnet on a Linux system: 13 | 14 | 1. Create a working directory on the target system and make that the current directory 15 | 16 | 2. Copy BuildAndInstall.sh to this directory and make it executable 17 | 18 | 3. Execute the shell script, answer the questions and wait for a new kernel and DECnet utilities to be built 19 | (It may take a long time depending on the system configuration) 20 | 21 | 4. If BuildAndInstall.sh detects that your installation uses systemd it will create 3 service entries; 22 | one to change the MAC address of the Ethernet/Wireless LAN interface, the second to load the decnet modules and start it running 23 | and the third to start the phone daemon running. 24 | 25 | 6. If your installation does not use systemd, there are some mechansisms described in the RaspbianDECnet repository about how to get DECnet started (the module name has changed for this respository - "decnet3") 26 | -------------------------------------------------------------------------------- /Troubleshooting: -------------------------------------------------------------------------------- 1 | 1. Problem - Failed to load decnet3 module 2 | 3 | Error message in /var/log/messages: 4 | 5 | DECnet: DECnet address mismatch with xxx device 6 | 7 | where xxx is the ethernet/wireless device that DECnet is trying to use. 8 | 9 | The system was unable to change the MAC address of the xxx device. Examine 10 | the utility that you are using. If you make use of the systemd scripts 11 | generated by BuildAndInstall.sh, you may want to edit 12 | /etc/systemd/network/00-mac.link and replace the line: 13 | 14 | OriginalName=xxx 15 | 16 | with: 17 | 18 | MACAddress= 19 | 20 | where can be displayed by the command: 21 | 22 | /sbin/ethtool -P xxx 23 | 24 | -------------------------------------------------------------------------------- /dnprogs/Documentation/dnetd.README: -------------------------------------------------------------------------------- 1 | This program needs a kernel that supports the SDF_WILD flag. That means 2 | a 0.0.12 patch for kernels 2.2 or the latest 2.3 dev kernel. 3 | 4 | dnetd is the DECnet super-server, a sort of cross between inetd in Unix and 5 | NETACP on VMS. It listens for incoming connections and runs daemons to service 6 | them based on entries in the /etc/dnetd.conf file which is analogous to the 7 | DECnet object database on VMS. 8 | 9 | dnetd has two internal functions, one is mirror (this used to be the dnmirror 10 | daemon) and the other is capable of running arbitrary named tasks. 11 | 12 | dnetd is optional - the daemons supplied will still run standalone if you 13 | prefer and if you stop them and start dnetd it will automatically take over; 14 | you do not need to recompile. 15 | 16 | dnetd uses the SDF_WILD flag in the kernel - this means that is answers 17 | connections for any objects not already listening so you can set up any 18 | combination of always-running daemons and occasionally running daemons you 19 | like without changing the configuration file. If you kill a standalone daemon 20 | then dnetd will automatically take over you do not need to restart it or change 21 | its config file...much easier than inetd! 22 | 23 | See the man pages dnetd(1) and dnetd.conf(5) for more information. 24 | -------------------------------------------------------------------------------- /dnprogs/Documentation/dnroute.README: -------------------------------------------------------------------------------- 1 | This is dnroute - the DECnet routing daemon 2 | 3 | What it will do is to send out level 1 or 2 routing messages containing the 4 | local neighbour information for this node. If you enable routing 5 | for your kernel then this daemon will make it look as though it can 6 | route DECnet packets to other DECnet nodes. It will also, optionally, 7 | send level 2 routing messages showing which other areas can be seen. 8 | Additionally it sets up area routes to remote areas that are seen via these 9 | messages and adjusts those routes according to the relative cost of each route. 10 | 11 | Use the ip command to show the routes set up by the daemon and report any 12 | problems. 13 | 14 | ip -D route 15 | 16 | NOTES: 17 | echo "1" into /proc/sys/net/decnet/conf/eth/forwarding 18 | echo "1" into /proc/sys/net/decnet/conf/eth/priority (Must NOT be 0) 19 | -------------------------------------------------------------------------------- /dnprogs/Documentation/phone.README: -------------------------------------------------------------------------------- 1 | Not much to say about phone really - it behaves exactly like the favourite 2 | VMS utility of the same name - if it doesn't then I want to know about it. 3 | 4 | USING IT 5 | -------- 6 | The important thing to remember is that 'phoned' MUST be running for anyone 7 | on the local system to run phone...really. You cannot run phoned from 8 | dnetd. 9 | 10 | Use the Linux 'mesg' command to determine whether your terminal appears as 11 | "/nobroadcast" to VMS phone, see man mesg(1). Note that some distributions 12 | (my Debian 2.1 does this) set the terminal to 'mesg n' by default so the 13 | user appears unavailable to remote phone users. 14 | When you are running phone your terminal is regarded as available regardless 15 | of the mesg setting. 16 | 17 | 18 | BUILDING IT 19 | ----------- 20 | 21 | The X-Windows version requires GTK+ 1.2.x. Version 1.1 or 1.3+ will not do. 22 | 23 | If you find that the pixmaps for GTK phone are not being installed then 24 | check that your PATH as root includes the directory where gtk-config is held. 25 | This may happen if you build phone as a unprivileged user and install using 26 | sudo. If gtk-config is not in roots' PATH but in normal users' paths. 27 | TO fix this install like this: 28 | 29 | su root -c "PATH=$PATH; make install" 30 | 31 | Chrissie 32 | 33 | -------------------------------------------------------------------------------- /dnprogs/FUTURE_PROJECTS: -------------------------------------------------------------------------------- 1 | I give no guarantees that any of the things below will happen but it's my 2 | list of "ideas" of things to do. It's in rough order of when I think 3 | I might start them. 4 | 5 | If you have any more ideas or any preferences for the order in which things 6 | happen then mail me on chrissie_c@users.sourceforge.net. But no promises. 7 | 8 | - use dbm/gdbm for /etc/decnet.conf to speed lookups on sites with a large 9 | number of nodes. Possibly also include something like 10 | "NCP COPY KNOWN NODES FROM" so it's easy to maintain. 11 | 12 | - Transparent file access: a libc plugin (like zlibc) that provides VMS-like 13 | remote file access transparently. 14 | 15 | - Management tools: maybe ncp-type stuff (but, then again, ncp has such an 16 | appalling command-line I may invent a new one). Remote enabled if possible. 17 | 18 | -------------------------------------------------------------------------------- /dnprogs/README.too: -------------------------------------------------------------------------------- 1 | Version 2.66 with various small changes by Erik Olofsen. 2 | -------------------------------------------------------------------------------- /dnprogs/TODO: -------------------------------------------------------------------------------- 1 | BUGS 2 | ---- 3 | 4 | fal: 5 | Reports of problems with FAL on DECnet/E. Need to test with new 6 | RSX-friendly code. 7 | 8 | phone: 9 | Race condition in ANSWER where you can get the message "no-one is calling 10 | you now" when there is. Only happens with "phone answer" on the shell 11 | command line. Only happens rarely (to me!). 12 | 13 | initial command to phone ignores params. eg; 14 | phone dir a11rtr:: 15 | thinks you just typed "dir" cos it ignores argv[2] 16 | 17 | Don't think it works to non-VMS machines 18 | 19 | libdnet: 20 | Need a better function doing dnet_conn(), maybe we should provide one 21 | opening a listen socket, too. 22 | 23 | ph3-der-loewe's private list: 24 | Add ckport database. 25 | 26 | Remove/Merge debian/templates (into debian/dnet-common.templates). 27 | 28 | Make setting up of MAC address at runtime more easy. 29 | - ARP spoof to send new MAC addresses to other hosts on the network. 30 | - Maybe find a nice way to get stuff with DHCP working better. 31 | - Write old MAC address to logfile (at install time) so it can be reconstructed 32 | later. See DEB#635604 (some cards are broken). 33 | 34 | Upgrade libdnet-dev from extra to optional. 35 | 36 | Merge and update debian/*.copyright. 37 | -------------------------------------------------------------------------------- /dnprogs/WARRANTY: -------------------------------------------------------------------------------- 1 | NO WARRANTY 2 | 3 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 4 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 5 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 6 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 7 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 8 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 9 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 10 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 11 | REPAIR OR CORRECTION. 12 | 13 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 14 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 15 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 16 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 17 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 18 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 19 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 20 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 21 | POSSIBILITY OF SUCH DAMAGES. 22 | -------------------------------------------------------------------------------- /dnprogs/apps/cterm.h: -------------------------------------------------------------------------------- 1 | /* CTERM structures 2 | Author: Eduardo Marcelo Serrat 3 | */ 4 | 5 | #define CTRL_A 0x01 6 | #define CTRL_B 0x02 7 | #define CTRL_C 0x03 8 | #define CTRL_D 0x04 9 | #define CTRL_E 0x05 10 | #define CTRL_F 0x06 11 | #define CTRL_G 0x07 12 | #define CTRL_H 0x08 13 | #define BS 0x08 14 | #define CTRL_I 0x09 15 | #define CTRL_J 0x0A 16 | #define CTRL_K 0x0B 17 | #define CTRL_L 0x0C 18 | #define CTRL_M 0x0D 19 | #define CTRL_N 0x0E 20 | #define CTRL_O 0x0F 21 | #define CTRL_P 0x10 22 | #define CTRL_Q 0x11 23 | #define CTRL_R 0x12 24 | #define CTRL_S 0x13 25 | #define CTRL_T 0x14 26 | //efine CTRL_U 0x15 27 | #define CTRL_V 0x16 28 | #define CTRL_W 0x17 29 | #define CTRL_U 0x17 30 | #define CTRL_X 0x18 31 | #define CTRL_Y 0x19 32 | #define CTRL_Z 0x1A 33 | #define ESC 0x1B 34 | #define DEL 0x7F 35 | 36 | 37 | 38 | static char BELL=0x07; 39 | struct logical_terminal_characteristics 40 | { 41 | short mode_writing_allowed; 42 | int terminal_attributes; 43 | char terminal_type[6]; 44 | short output_flow_control; 45 | short output_page_stop; 46 | short flow_character_pass_through; 47 | short input_flow_control; 48 | short loss_notification; 49 | int line_width; 50 | int page_length; 51 | int stop_length; 52 | int cr_fill; 53 | int lf_fill; 54 | int wrap; 55 | int horizontal_tab; 56 | int vertical_tab; 57 | int form_feed; 58 | }; 59 | 60 | struct physical_terminal_characteristics 61 | { 62 | int input_speed; 63 | int output_speed; 64 | int character_size; 65 | short parity_enable; 66 | int parity_type; 67 | short modem_present; 68 | short auto_baud_detect; 69 | short management_guaranteed; 70 | char switch_char_1; 71 | char switch_char_2; 72 | short eigth_bit; 73 | short terminal_management_enabled; 74 | }; 75 | 76 | struct handler_maintained_characteristics 77 | { 78 | short ignore_input; 79 | short control_o_pass_through; 80 | short raise_input; 81 | short normal_echo; 82 | short input_escseq_recognition; 83 | short output_escseq_recognition; 84 | int input_count_state; 85 | short auto_prompt; 86 | short error_processing; 87 | }; 88 | 89 | -------------------------------------------------------------------------------- /dnprogs/apps/ctermd.8: -------------------------------------------------------------------------------- 1 | .TH CTERMD 8 "July 27 1998" "DECnet utilities" 2 | 3 | .SH NAME 4 | ctermd \- CTERM services for Linux 5 | 6 | .SH SYNOPSIS 7 | .B ctermd 8 | .br 9 | [options] 10 | .br 11 | Options: 12 | .br 13 | [\-dvVh] [\-l logtype] 14 | .SH DESCRIPTION 15 | .PP 16 | Allows remote users to connect as a terminal over DECnet. 17 | .br 18 | 19 | .br 20 | This application implements the CTERM protocol over DECnet for allowing a 21 | remote DECnet host emulating a DEC VT100 terminal to connect to Linux. 22 | .br 23 | 24 | .br 25 | Normally this daemon will be run from dnetd(8) rather than by hand. 26 | 27 | .SH OPTIONS 28 | .TP 29 | .I "\-l" 30 | Set logging options. The following are available: 31 | .br 32 | .B -lm 33 | Log to /dev/mono. (only useful if you have my mono monitor driver or mdacon 34 | and a second monitor) 35 | .br 36 | .B -le 37 | Log to stderr. Use this for debugging or testing combined with 38 | .B -d. 39 | .br 40 | .B -ls 41 | Log to syslog(3). This is the default if no options are given. 42 | .TP 43 | .I "\-d" 44 | Don't fork and run the background. Use this for debugging. 45 | .TP 46 | .I "\-v" 47 | Verbose. The more of these there are the more verbose ctermd will be. 48 | .TP 49 | .I \-h \-? 50 | Displays help for using the command. 51 | .TP 52 | .I \-V 53 | Show the version of ctermd. 54 | 55 | .SH EXAMPLES 56 | .br 57 | Starting the ctermd daemon/Connecting to linux from a VAX. 58 | .br 59 | 60 | .br 61 | .PP 62 | On Linux: 63 | 64 | # ctermd 65 | 66 | On the VAX: 67 | 68 | $ set host pclnx 69 | 70 | Ctermd Version 1.0.0 71 | DECnet for Linux 72 | 73 | login: 74 | 75 | .br 76 | 77 | .SH SEE ALSO 78 | .BR dntype "(1), " dndir "(1), " dndel "(1), " dntask "(1), " 79 | .BR dnetd "(8), " dnping "(1), " sethost "(1), " dnetd.conf (5) 80 | -------------------------------------------------------------------------------- /dnprogs/apps/decnet.conf: -------------------------------------------------------------------------------- 1 | # 2 | # DECnet hosts file 3 | # 4 | #Node Node Name Node Line Line 5 | #Type Address Tag Name Tag Device 6 | #----- ------- ----- ----- ----- ------ 7 | executor 1.2 name pclnx line eth0 8 | node 1.1 name mv3100 9 | node 1.5 name pc386 10 | 11 | -------------------------------------------------------------------------------- /dnprogs/apps/decnet.conf.5: -------------------------------------------------------------------------------- 1 | .TH DECNET.CONF 5 "24 July 1998" "DECnet for Linux" 2 | .SH NAME 3 | /etc/decnet.conf \- DECnet hosts file 4 | .SH DESCRIPTION 5 | .B /etc/decnet.conf 6 | is an ASCII file which contains the description of the executor node 7 | and other DECnet nodes you plan to communicate with. 8 | .PP 9 | There is one entry per line, and each line has the format: 10 | .sp 11 | .RS 12 | Type Address Name_tag Nodename Line_tag Device 13 | .RE 14 | .sp 15 | The field descriptions are: 16 | .sp 17 | .RS 18 | .TP 1.0in 19 | .I Type 20 | the type of node. The local node uses "executor". Remote nodes use "node" 21 | .TP 22 | .I Address 23 | the DECnet address. 24 | .TP 25 | .I Name_tag 26 | the constant string "name". 27 | .TP 28 | .I Line_tag 29 | the constant string "line". There must be only one line specified for the 30 | executor node. 31 | .TP 32 | .I Device 33 | the name of the Ethernet card for DECnet operations. (Usually "eth0"). 34 | .TP 35 | .SH EXAMPLE 36 | .nf 37 | .ft CW 38 | .in +3n 39 | #Node Node Name Node Line Line 40 | #Type Address Tag Name Tag Device 41 | #---- ------- ---- ---- ---- ---------- 42 | executor 1.2 name pclnx line eth0 43 | node 1.1 name mv3100 44 | node 1.5 name pc386 45 | .ft 46 | -------------------------------------------------------------------------------- /dnprogs/apps/dnmount.8: -------------------------------------------------------------------------------- 1 | .TH DNMOUNT 1 "Aug 28 1998" "DECnet utilities" 2 | 3 | .SH NAME 4 | dnmount \- Mounts DEC/VMS directories as Linux Filesystems 5 | 6 | .SH SYNOPSIS 7 | .B dnmount 8 | [options] VMS_DIRECTORY mount_point 9 | .br 10 | Options: 11 | .br 12 | [\-h] [\-u uid] [\-g gid] 13 | 14 | .br 15 | -h prints a help screen 16 | .br 17 | -u specifies UID for mounted filesystem. 18 | .br 19 | -g specifies GID for mounted filesystem. 20 | 21 | .SH DESCRIPTION 22 | .PP 23 | dnmount mounts VMS directories structures as Linux Filesystems. 24 | .br 25 | 26 | .br 27 | The VMS_DIRECTORY should be specified in the usual transparent DECnet format 28 | of node"username password"::[directory] or node. 29 | .br 30 | 31 | .SH EXAMPLES 32 | .br 33 | 34 | .br 35 | .PP 36 | dnmount -u serrat 'mv3100::sys$manager:' /vax 37 | 38 | .PP 39 | dnmount 'mv3100"serrat passwrd"::sys$login:' /vaxuser 40 | .br 41 | 42 | 43 | .PP 44 | dnmount 'mv3100"system passwrd"::dka0:[sys0]' /vax 45 | 46 | .br 47 | .SH HINTS 48 | .br 49 | Use umount to dismount a dapfs mounted with dnmount. 50 | 51 | .SH AUTHOR 52 | .br 53 | Eduardo Marcelo Serrat 54 | -------------------------------------------------------------------------------- /dnprogs/apps/setether.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Set the MAC address of any/all ethernet cards 4 | # for DECnet 5 | # 6 | # Parameters: 7 | # 8 | # $1 - DECnet address in the usual area.node format 9 | # $2 - List of ethernet card names to set or "all" 10 | # 11 | 12 | # Use the "ip" command if available 13 | if [ -x /sbin/ip ]; then 14 | IPCMD="/sbin/ip" 15 | fi 16 | 17 | calc_ether() 18 | { 19 | MACADDR="" 20 | 21 | ADDR=`echo $1 | sed -n 's/\([0-9]*\.[0-9]*\)/\1/p'` 22 | AREA=`echo $ADDR | sed -n 's/\([0-9]*\)\.\([0-9]*\)/\1/p'` 23 | NODE=`echo $ADDR | sed -n 's/\([0-9]*\)\.\([0-9]*\)/\2/p'` 24 | 25 | [ -z "$AREA" ] && AREA=0 26 | [ -z "$NODE" ] && NODE=0 27 | 28 | if [ "$NODE" -le 1023 -a "$NODE" -ge 1 -a "$AREA" -le 63 -a "$AREA" -ge 1 ] 29 | then 30 | NUM=$(($AREA*1024 + $NODE)) 31 | MACADDR="`printf \"AA:00:04:00:%02X:%02X\" $((NUM%256)) $((NUM/256))`" 32 | else 33 | exit 1 34 | fi 35 | return 0 36 | } 37 | 38 | if [ -z "$2" ] 39 | then 40 | echo "" 41 | echo "usage: $0 |all" 42 | echo "" 43 | echo " eg. $0 1.9 eth0 " 44 | echo " eg. $0 1.9 all" 45 | echo "" 46 | exit 1 47 | fi 48 | 49 | calc_ether $1 50 | if [ $? != 0 ] 51 | then 52 | exit 1 53 | fi 54 | 55 | CARDS=$2 56 | if [ "$CARDS" = "all" -o "$CARDS" = "ALL" ] 57 | then 58 | CARDS=`cat /proc/net/dev|grep eth|cut -f1 -d':'` 59 | fi 60 | 61 | set_default="" 62 | for i in $CARDS 63 | do 64 | if [ -n "$IPCMD" ] 65 | then 66 | $IPCMD link set $i address $MACADDR 67 | $IPCMD link set $i up 68 | else 69 | ifconfig $i hw ether $MACADDR allmulti up 70 | fi 71 | 72 | if [ -z "$set_default" -a -f /proc/sys/net/decnet/default_device ] 73 | then 74 | echo $i >/proc/sys/net/decnet/default_device 75 | set_default="DONE" 76 | fi 77 | done 78 | 79 | -------------------------------------------------------------------------------- /dnprogs/apps/sethost.1: -------------------------------------------------------------------------------- 1 | .TH SETHOST 1 "July 27 1998" "DECnet utilities" 2 | 3 | .SH NAME 4 | sethost \- Emulates a DEC VT100 terminal 5 | 6 | .SH SYNOPSIS 7 | .B sethost 8 | [options] nodename 9 | .br 10 | Options: 11 | .br 12 | [\-Vh] [\-e char] 13 | .br 14 | .SH DESCRIPTION 15 | .PP 16 | sethost emulates a DEC VT100 terminal. 17 | .br 18 | 19 | .br 20 | This application implements the CTERM protocol over DECnet for connecting to 21 | a remote DECnet host emulating a DEC VT100 terminal. 22 | .br 23 | dnlogin is a replacement for sethost with more compatibility features. 24 | 25 | 26 | .SH OPTIONS 27 | .TP 28 | .TP 29 | .I "\-e " 30 | Set the exit character. By default this is ^]. You can specify the exit character as a 31 | control character by preceding it with a circumflex eg (^A means control-A) or as 32 | a number in decimal (default), octal (starting with a zero), or hexadecimal (preceded 33 | by 0x or 0X). 34 | .TP 35 | .I \-h \-? 36 | Displays help for using the command. 37 | .TP 38 | .I \-V 39 | Show the version of the package that sethost was built with. 40 | 41 | .SH EXAMPLES 42 | .br 43 | Connect to remote VAX host named "mv3100". 44 | .br 45 | 46 | .br 47 | .PP 48 | sethost mv3100 49 | .br 50 | 51 | .SH HELPFUL HINTS 52 | The CTERM specifications available from Digital does not include how to setup 53 | VMS terminal characteristics, so the host cannot identify the capabilities of 54 | the session we are creating. The simplest workaround is to set the terminal 55 | capabilities manually upon login or including the following command in the 56 | .B login.com 57 | DCL procedure. 58 | 59 | .B $ SET TERM/DEC_CRT 60 | 61 | .SH SEE ALSO 62 | .BR dntype "(1), " dndir "(1), " dndel "(1), " dntask "(1), " dnping "(1)" 63 | -------------------------------------------------------------------------------- /dnprogs/contrib/ph3-der-loewe/Makefile: -------------------------------------------------------------------------------- 1 | include ../../Makefile.common 2 | export TOP=../.. 3 | 4 | PROG1=dnetcat 5 | PROG2=dnetstat 6 | PROG3=dnnode 7 | 8 | MANPAGES1=man1/dnetcat.1 man1/dnetstat.1 man1/dnnode.1 9 | 10 | PROG1OBJS=dnetcat.o 11 | PROG2OBJS=dnetstat.o 12 | PROG3OBJS=dnnode.o 13 | 14 | all: $(PROG1) $(PROG2) $(PROG3) 15 | 16 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON) 17 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) $(LIBDAEMON) 18 | 19 | $(PROG2): $(PROG2OBJS) $(DEPLIBDNET) $(UULIB) 20 | $(CC) $(CFLAGS) -o $@ $(PROG2OBJS) $(LIBDNET) 21 | 22 | $(PROG3): $(PROG3OBJS) $(DEPLIBDNET) 23 | $(CC) $(CFLAGS) -o $@ $(PROG3OBJS) $(LIBDNET) 24 | 25 | install: 26 | install -d $(prefix)/bin 27 | install -d $(manprefix)/man/man1 28 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/bin 29 | install -m 0755 $(STRIPBIN) $(PROG2) $(prefix)/bin 30 | install -m 0755 $(STRIPBIN) $(PROG3) $(prefix)/bin 31 | install -m 0644 $(MANPAGES1) $(manprefix)/man/man1 32 | 33 | dep depend: 34 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 35 | 36 | clean: 37 | rm -f $(PROG1) $(PROG2) $(PROG3) *.o *.bak .depend 38 | 39 | 40 | ifeq (.depend,$(wildcard .depend)) 41 | include .depend 42 | endif 43 | -------------------------------------------------------------------------------- /dnprogs/contrib/ph3-der-loewe/man1/dnetcat.1: -------------------------------------------------------------------------------- 1 | .TH "dnetcat" "1" "September 2008" "dntools" "User Commands" 2 | 3 | .SH NAME 4 | 5 | dnetcat \- opens a DECnet connection 6 | 7 | .SH SYNOPSIS 8 | 9 | dnetcat {\-h|\-\-help} 10 | 11 | dnetcat [\-v] [\-z] node[::|[::] ]object 12 | 13 | dnetcat [\-v] [\-f] \-l object 14 | 15 | .SH "DESCRIPTION" 16 | \fBdnetcat\fR is a \fBnetcat\fR(1) like tool that opens a DECnet connection and 17 | copies all data between the standard input/output to/from the socket. 18 | 19 | .SH OPTIONS 20 | .SS "\-v" 21 | Be verbose. Prints useful (debug) messages. 22 | .SS "\-z" 23 | Zero IO mode. In this mode a connection is dropped directly after it is opened. 24 | This can be used to scan if the remote side listens on the given address and object. 25 | .SS "\-l" 26 | Listen mode. In this mode \fBdnetcat\fR accepts connections on the given object. 27 | .SS "\-f" 28 | Fork on new connection. This let netcat accept multiple connections in listen mode. 29 | This is ignored if \fB\-l\fR is not given. 30 | .SS "\-\-help, \-h" 31 | Prints a small help. 32 | 33 | .SH EXAMPLES 34 | This program can be used as 'ProxyCommand' for \fBssh\fR(1). 35 | You may use it via command line like this: 36 | ssh \-o 'ProxyCommand dnetcat %h ssh' [...] mynode 37 | 38 | or you may use it in your \fB~/.ssh/config\fR like this: 39 | Host *:: 40 | ProxyCommand dnetcat %h ssh 41 | 42 | This will enable you to connect to any DECnet node by adding "::" at 43 | the end of the node name like this: 44 | ssh mynode:: 45 | 46 | For more information on \fBssh\fR(1) see it's manpage. 47 | 48 | .SH SEE ALSO 49 | \fBssh\fR(1), 50 | \fBnetcat\fB(1). 51 | 52 | .SH AUTHORS 53 | This program is written by Philipp "ph3-der-loewe" Schafft . 54 | -------------------------------------------------------------------------------- /dnprogs/contrib/ph3-der-loewe/man1/dnetstat.1: -------------------------------------------------------------------------------- 1 | .TH "dnetstat" "1" "September 2008" "dntools" "System Manager's Manual" 2 | 3 | .SH NAME 4 | 5 | dnetstat \- lists DECnet connections 6 | 7 | .SH SYNOPSIS 8 | 9 | dnetstat [\-n] [\-h|\-\-help] 10 | 11 | .SH "DESCRIPTION" 12 | \fBdnetstat\fR is a \fBnetstat\fR(8) like tool that displays current DECnet network connections. 13 | 14 | .SH OPTIONS 15 | .SS "\-n" 16 | Show nodenames and numbered objects in as numerical addresses and don't resolve names. 17 | .SS "\-\-help, \-h" 18 | Prints a small help. 19 | 20 | .SH SEE ALSO 21 | \fBnetstat\fB(8). 22 | 23 | .SH AUTHORS 24 | This program is written by Philipp "ph3-der-loewe" Schafft . 25 | -------------------------------------------------------------------------------- /dnprogs/contrib/ph3-der-loewe/man1/dnnode.1: -------------------------------------------------------------------------------- 1 | .TH "dnnode" "1" "July 2024" "dnprogs" "User Commands" 2 | 3 | .SH NAME 4 | 5 | dnnode \- DECnet node name lookup tool 6 | 7 | .SH SYNOPSIS 8 | 9 | dnnode {\-h|\-\-help} 10 | 11 | dnnode [\-v] [\-m] {nodename|nodeaddress} 12 | 13 | .SH "DESCRIPTION" 14 | \fBdnnode\fR is a tool that does name lookup of DECnet nodes. 15 | It can lookup the node address from node name and node name 16 | from node address. 17 | 18 | .SH OPTIONS 19 | .SS "\-v" 20 | Be verbose. Prints useful (debug) messages. 21 | .SS "\-\-help, \-h" 22 | Prints a small help. 23 | 24 | .SH SEE ALSO 25 | \fBhost\fR(1). 26 | 27 | .SH AUTHORS 28 | This program is written by Philipp "ph3-der-loewe" Schafft . 29 | -------------------------------------------------------------------------------- /dnprogs/dapfs/BUGS: -------------------------------------------------------------------------------- 1 | - getattr doesn't return the right size for reads, because of record 2 | mungeing. Not much we can do about that :( 3 | 4 | - Seeking doesn't work. VMS 7.3(VAX & Alpha) seems not to support Stream access over DAP 5 | -------------------------------------------------------------------------------- /dnprogs/dapfs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dapfs 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dapfs 6 | 7 | MANPAGES=mount.dapfs.8 8 | 9 | PROG1OBJS=dapfs.o dapfs_dap.o filenames.o kfifo.o 10 | 11 | all: $(PROG1) 12 | 13 | CFLAGS=-I../include -I ../librms -Wall $(DFLAGS) -fdollars-in-identifiers 14 | 15 | $(PROG1): $(PROG1OBJS) $(DEPLIBS) 16 | g++ -o$(PROG1) $(LDFLAGS) $(PROG1OBJS) $(LIBDAP) -L../librms -lrms $(LIBDNET) -lfuse -lpthread 17 | 18 | install: 19 | install -d $(rootprefix)/sbin 20 | install -d $(manprefix)/man/man8 21 | install -m 0755 $(STRIPBIN) $(PROG1) $(rootprefix)/sbin/mount.dapfs 22 | install -m 0644 $(MANPAGES) $(manprefix)/man/man8 23 | 24 | dep depend: 25 | $(CXX) $(CXXFLAGS) -MM *.cc >.depend 2>/dev/null 26 | 27 | clean: 28 | rm -f $(PROG1) *.o *.bak .depend 29 | 30 | 31 | ifeq (.depend,$(wildcard .depend)) 32 | include .depend 33 | endif 34 | 35 | -------------------------------------------------------------------------------- /dnprogs/dapfs/dapfs.h: -------------------------------------------------------------------------------- 1 | #define VMSNAME_LEN 2048 2 | #define PREFIXLEN 128 3 | #define BUFLEN 1024 4 | -------------------------------------------------------------------------------- /dnprogs/dapfs/dapfs_dap.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | int dapfs_readdir_dap(const char *path, void *buf, fuse_fill_dir_t filler, 5 | off_t offset, struct fuse_file_info *fi); 6 | 7 | int dapfs_getattr_dap(const char *path, struct stat *stbuf); 8 | 9 | int dap_delete_file(const char *path); 10 | int dap_rename_file(const char *from, const char *to); 11 | int get_object_info(char *command, char *reply); 12 | int dap_init(void); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | 19 | extern char prefix[]; 20 | extern int debuglevel; 21 | -------------------------------------------------------------------------------- /dnprogs/dapfs/filenames.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (c) 2005-2008 Christine Caulfield christine.caulfield@gmail.com 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ****************************************************************************** 14 | */ 15 | /* filenames.c */ 16 | void make_vms_filespec(const char *unixname, char *vmsname, int full); 17 | void make_unix_filespec(char *unixname, char *vmsname); 18 | void makeupper(char *s); 19 | -------------------------------------------------------------------------------- /dnprogs/debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /dnprogs/debian/copyright: -------------------------------------------------------------------------------- 1 | This is the Debian package of DECnet programs, libraries and utilities. 2 | It is mostly maintained by 3 | 4 | Christine Caulfield 5 | Philipp Shafft 6 | 7 | The upstream sources are at http://sourceforge.net/projects/linux-decnet/develop 8 | 9 | 10 | Programs in the package are released under the GNU General Public Licence: 11 | /usr/share/common-licenses/GPL 12 | 13 | Libraries in the package are released under the GNU Lesser General Publice Licence: 14 | /usr/share/common-licenses/LGPL 15 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-common.README: -------------------------------------------------------------------------------- 1 | The DECnet packages are native to Debian and the latest version should 2 | always be the one in the Debian "unstable" archive. 3 | 4 | The homepage for the project is at 5 | 6 | http://linux-decnet.sourceforge.net 7 | 8 | Configuration can be done by editing /etc/defaults/decnet, several environment 9 | variables can be set: 10 | 11 | DNET_INTERFACES: List if ethernet interfaces to enable for DECnet, This sets 12 | the MAC address of these interfaces to the DECnet address in /etc/decnet.conf. 13 | The first interface will be set as the default interface for DECnet 14 | communications. 15 | 16 | DNET_DAEMONS: List of daemons to start. dnetd a DECnet "super-server" that 17 | will start other daemons on deman. But you can put things like fal in here too. 18 | 19 | ROUTING: Enable routing at level 20 | PRIORITY: Router priority 21 | _FLAGS: flags to add when starting 22 | eg dnroute_FLAGS="-v" 23 | 24 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-common.config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | 7 | db_version 2.0 8 | db_capb backup 9 | 10 | db_title DECnet node configuration 11 | 12 | db_get dnet-common/nodename 13 | if [ "$RET" = '' ] 14 | then 15 | db_fset dnet-common/configure-action seen false 16 | fi 17 | 18 | # '|| true' so skiped messages do not be a problem 19 | db_input high dnet-common/configure-action || true 20 | db_go 21 | db_get dnet-common/configure-action 22 | 23 | if [ "$RET" != 'configure now' ] 24 | then 25 | echo "dnet-common: Skipping configure of DECnet" 26 | db_stop 27 | exit 0 28 | fi 29 | 30 | 31 | NAMEOK="false" 32 | while [ -n "$NAMEOK" ] 33 | do 34 | db_input high dnet-common/nodename || true 35 | db_go 36 | db_get dnet-common/nodename 37 | NAME=$RET 38 | if [ -z "`echo -n $NAME | sed -n 's/......//p'`" ] 39 | then 40 | NAMEOK="" 41 | else 42 | db_fset dnet-common/nodename seen false 43 | fi 44 | done 45 | 46 | 47 | ADDROK="false" 48 | while [ -n "$ADDROK" ] 49 | do 50 | db_input high dnet-common/nodeaddr || true 51 | db_go 52 | db_get dnet-common/nodeaddr 53 | ADDR=`echo $RET | sed -n 's/\([0-9]*\.[0-9]*\)/\1/p'` 54 | AREA=`echo $ADDR | sed -n 's/\([0-9]*\)\.\([0-9]*\)/\1/p'` 55 | NODE=`echo $ADDR | sed -n 's/\([0-9]*\)\.\([0-9]*\)/\2/p'` 56 | 57 | [ -z "$AREA" ] && AREA=0 58 | [ -z "$NODE" ] && NODE=0 59 | 60 | if [ "$NODE" -le 1023 -a "$NODE" -ge 1 -a "$AREA" -le 63 -a "$AREA" -ge 1 ] 61 | then 62 | ADDROK="" 63 | else 64 | db_fset dnet-common/nodeaddr seen false 65 | fi 66 | done 67 | 68 | # Display the dire warning about MAC addresses. 69 | db_input critical dnet-common/warning || true 70 | db_go 71 | 72 | db_stop 73 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-common.copyright: -------------------------------------------------------------------------------- 1 | Copyright: 2 | 3 | (C) 1996-2001 Eduardo Serrat 4 | (C) 1996-2008 Christine Caulfield 5 | 6 | You are free to distribute this software under the terms of the GNU General 7 | Public License. The full text of this license can be found in the file 8 | /usr/share/common-licenses/GPL 9 | 10 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-common.docs: -------------------------------------------------------------------------------- 1 | README 2 | TODO 3 | FUTURE_PROJECTS 4 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-common.install: -------------------------------------------------------------------------------- 1 | etc/default/decnet 2 | etc/modutils/decnet 3 | etc/dnetd.conf 4 | etc/decnet.proxy 5 | sbin/setether 6 | usr/sbin/decnetconf 7 | usr/share/doc/dnet-common/README 8 | usr/share/doc/dnet-common/README.Debian 9 | usr/share/doc/dnet-common/decnet.conf.sample 10 | usr/share/man/man8/decnetconf.8 11 | usr/share/man/man8/setether.8 12 | usr/share/man/man5/decnet.conf.5 13 | usr/share/man/man5/dnetd.conf.5 14 | usr/share/man/man5/decnet.proxy.5 15 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-common.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | 4 | set -e 5 | 6 | if [ "$1" != "configure" ] 7 | then 8 | exit 0 9 | fi 10 | 11 | . /usr/share/debconf/confmodule 12 | 13 | db_get dnet-common/configure-action 14 | configure_action=$RET 15 | 16 | # Get the node name and address 17 | db_get dnet-common/nodename 18 | name=$RET 19 | db_get dnet-common/nodeaddr 20 | addr=$RET 21 | 22 | db_stop 23 | 24 | # Update /etc/decnet.conf 25 | if [ "$configure_action" = 'configure now' ] 26 | then 27 | if [ ! -f /etc/decnet.conf ] 28 | then 29 | cp /usr/share/doc/dnet-common/decnet.conf.sample /etc/decnet.conf 30 | chmod 0644 /etc/decnet.conf 31 | fi 32 | 33 | TMPFILE="`tempfile`" 34 | 35 | cat /etc/decnet.conf | awk -v NAME=$name -vADDR=$addr ' 36 | { if ($1 == "executor") { printf("executor\t%s\t\tname\t\t%s\tline\teth0\n", ADDR, NAME) ;} else { print $0; } }' > $TMPFILE 37 | 38 | cp /etc/decnet.conf /etc/decnet.conf.old 39 | cp $TMPFILE /etc/decnet.conf 40 | if [ $? -ne 0 ] 41 | then 42 | cp /etc/decnet.conf.old /etc/decnet.conf 43 | fi 44 | 45 | rm -f $TMPFILE 46 | fi 47 | 48 | #DEBHELPER# 49 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-common.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for dnet-common 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' overwrit>r> 17 | # for details, see /usr/doc/packaging-manual/ 18 | 19 | if [ "$1" = "purge" ] 20 | then 21 | rm -f /etc/decnet.conf 22 | rm -f /etc/decnet.conf.old 23 | rm -f /etc/decnet.proxy 24 | rm -f /etc/dnetd.conf 25 | fi 26 | 27 | 28 | #DEBHELPER# 29 | 30 | 31 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-common.preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | 4 | set -e 5 | 6 | if [ "$2" != "2.56.1+nmu1" ] 7 | then 8 | exit 0 9 | fi 10 | 11 | . /usr/share/debconf/confmodule 12 | 13 | db_get dnet-common/configure-action 14 | configure_action=$RET 15 | 16 | # Get the node name and address 17 | db_get dnet-common/nodename 18 | name=$RET 19 | db_get dnet-common/nodeaddr 20 | addr=$RET 21 | 22 | db_stop 23 | 24 | # Update /etc/decnet.conf 25 | if [ "$configure_action" = 'configure later' -a "$name" = 'linux' -a "$addr" = '1.10' -a -f /etc/decnet.conf ] 26 | then 27 | echo 'dnet-common: Last version (2.56.1+nmu1) may broke your config files. I try to undo this now.' 28 | echo 'dnet-common: A backup of your nodedatabase can be found in /etc/decnet.conf.nmubackup' 29 | echo 'dnet-common: If there is any problem please include /etc/default/decnet in the bug report.' 30 | mv -v /etc/decnet.conf /etc/decnet.conf.nmubackup 31 | sed -i 's/^DNET_INTERFACES=""/DNET_INTERFACES="all"/' /etc/default/decnet 32 | 33 | fi 34 | 35 | #DEBHELPER# 36 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-progs.copyright: -------------------------------------------------------------------------------- 1 | Copyright: 2 | 3 | (C) 1996-2001 Eduardo Serrat 4 | (C) 1996-2008 Christine Caulfield 5 | 6 | You are free to distribute this software under the terms of the GNU General 7 | Public License. The full text of this license can be found in the file 8 | /usr/share/common-licenses/GPL 9 | 10 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-progs.docs: -------------------------------------------------------------------------------- 1 | Documentation/dnetd.README 2 | Documentation/fal.README 3 | Documentation/mail.README 4 | Documentation/phone.README 5 | 6 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-progs.install: -------------------------------------------------------------------------------- 1 | usr/sbin/fal 2 | usr/sbin/vmsmaild 3 | usr/sbin/sendvmsmail 4 | usr/sbin/dnetd 5 | sbin/mount.dapfs 6 | usr/bin/dndir 7 | usr/bin/dnsubmit 8 | usr/bin/dnprint 9 | usr/bin/dndel 10 | usr/bin/dncopy 11 | usr/bin/dntype 12 | usr/bin/dnlogin 13 | usr/bin/dntask 14 | usr/bin/dnetcat 15 | usr/bin/dnetstat 16 | usr/share/doc/dnet-progs/dnetd.README 17 | usr/share/doc/dnet-progs/mail.README 18 | usr/share/doc/dnet-progs/phone.README 19 | usr/share/doc/dnet-progs/fal.README 20 | usr/share/man/man8/sendvmsmail.8 21 | usr/share/man/man8/dnetd.8 22 | usr/share/man/man8/fal.8 23 | usr/share/man/man8/vmsmaild.8 24 | usr/share/man/man8/mount.dapfs.8 25 | usr/share/man/man5/vmsmail.conf.5 26 | usr/share/man/man1/dndel.1 27 | usr/share/man/man1/dncopy.1 28 | usr/share/man/man1/dndir.1 29 | usr/share/man/man1/dnlogin.1 30 | usr/share/man/man1/dntype.1 31 | usr/share/man/man1/dnprint.1 32 | usr/share/man/man1/dntask.1 33 | usr/share/man/man1/dnetcat.1 34 | usr/share/man/man1/dnetstat.1 35 | usr/share/man/man1/dnsubmit.1 36 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-progs.install.linux: -------------------------------------------------------------------------------- 1 | usr/sbin/fal 2 | usr/sbin/vmsmaild 3 | usr/sbin/sendvmsmail 4 | usr/sbin/dnetd 5 | sbin/mount.dapfs 6 | usr/bin/dndir 7 | usr/bin/dnsubmit 8 | usr/bin/dnprint 9 | usr/bin/dndel 10 | usr/bin/dncopy 11 | usr/bin/dntype 12 | usr/bin/dnlogin 13 | usr/bin/dntask 14 | usr/bin/dnetcat 15 | usr/bin/dnetstat 16 | usr/share/doc/dnet-progs/dnetd.README 17 | usr/share/doc/dnet-progs/mail.README 18 | usr/share/doc/dnet-progs/phone.README 19 | usr/share/doc/dnet-progs/fal.README 20 | usr/share/man/man8/sendvmsmail.8 21 | usr/share/man/man8/dnetd.8 22 | usr/share/man/man8/fal.8 23 | usr/share/man/man8/vmsmaild.8 24 | usr/share/man/man8/mount.dapfs.8 25 | usr/share/man/man5/vmsmail.conf.5 26 | usr/share/man/man1/dndel.1 27 | usr/share/man/man1/dncopy.1 28 | usr/share/man/man1/dndir.1 29 | usr/share/man/man1/dnlogin.1 30 | usr/share/man/man1/dntype.1 31 | usr/share/man/man1/dnprint.1 32 | usr/share/man/man1/dntask.1 33 | usr/share/man/man1/dnetcat.1 34 | usr/share/man/man1/dnetstat.1 35 | usr/share/man/man1/dnsubmit.1 36 | ### Those are linux-only as they are not yet ported. 37 | usr/sbin/ctermd 38 | usr/sbin/dnetnml 39 | usr/sbin/rmtermd 40 | usr/sbin/phoned 41 | usr/sbin/dnroute 42 | usr/sbin/dnetinfo 43 | usr/sbin/dneigh 44 | usr/sbin/multinet 45 | usr/sbin/dncopynodes 46 | usr/bin/sethost 47 | usr/bin/dnping 48 | usr/bin/phone 49 | usr/share/man/man8/phoned.8 50 | usr/share/man/man8/ctermd.8 51 | usr/share/man/man8/rmtermd.8 52 | usr/share/man/man8/dnetnml.8 53 | usr/share/man/man8/dnroute.8 54 | usr/share/man/man8/dnetinfo.8 55 | usr/share/man/man8/dneigh.8 56 | usr/share/man/man8/multinet.8 57 | usr/share/man/man8/dncopynodes.8 58 | usr/share/man/man1/sethost.1 59 | usr/share/man/man1/dnping.1 60 | usr/share/man/man1/phone.1 61 | -------------------------------------------------------------------------------- /dnprogs/debian/dnet-progs.links: -------------------------------------------------------------------------------- 1 | usr/share/man/man1/dnsubmit.1.gz usr/share/man/man1/dnprint.1.gz 2 | usr/share/man/man1/dncopy.1.gz usr/share/man/man1/dntype.1.gz 3 | -------------------------------------------------------------------------------- /dnprogs/debian/libdnet-dev.copyright: -------------------------------------------------------------------------------- 1 | Copyright: 2 | 3 | (C) 1996-2001 Eduardo Serrat 4 | (C) 1996-2003 Christine Caulfield 5 | (C) 1999 Steve Whitehouse 6 | 7 | You are free to distribute this software under the terms of the GNU Lesser 8 | Public License. The full text of this license can be found in the file 9 | /usr/share/common-licenses/LGPL 10 | 11 | -------------------------------------------------------------------------------- /dnprogs/debian/libdnet-dev.docs: -------------------------------------------------------------------------------- 1 | Documentation/librms.README 2 | 3 | -------------------------------------------------------------------------------- /dnprogs/debian/libdnet-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/netdnet/dn.h 2 | usr/include/netdnet/dnetdb.h 3 | usr/include/rms.h 4 | usr/include/fabdef.h 5 | usr/include/rabdef.h 6 | usr/include/convert_vax_data.h 7 | usr/lib/*/libdnet.a 8 | usr/lib/*/libdnet.so 9 | usr/lib/*/libdnet_daemon.a 10 | usr/lib/*/libdnet_daemon.so 11 | usr/lib/*/libdnet-dap.a 12 | usr/lib/*/libdnet-dap.so 13 | usr/lib/*/librms.a 14 | usr/lib/*/librms.so 15 | usr/lib/*/libvaxdata.a 16 | usr/share/doc/libdnet-dev/librms.README 17 | usr/share/doc/libdnet-dev/libvaxdata.pdf 18 | usr/share/man/man3/dnet_conn.3 19 | usr/share/man/man3/dnet_htoa.3 20 | usr/share/man/man3/dnet_ntoa.3 21 | usr/share/man/man3/setnodeent.3 22 | usr/share/man/man3/getnodeadd.3 23 | usr/share/man/man3/dnet_getnode.3 24 | usr/share/man/man3/dnet_addr.3 25 | usr/share/man/man3/libdnet.3 26 | usr/share/man/man3/dnet_eof.3 27 | usr/share/man/man3/dnet_daemon.3 28 | usr/share/man/man3/getnodebyaddr.3 29 | usr/share/man/man3/getnodebyname.3 30 | -------------------------------------------------------------------------------- /dnprogs/debian/libdnet-dev.links: -------------------------------------------------------------------------------- 1 | usr/share/man/man3/dnet_daemon.3.gz usr/share/man/man3/dnet_accept.3.gz 2 | usr/share/man/man3/dnet_daemon.3.gz usr/share/man/man3/dnet_reject.3.gz 3 | usr/share/man/man3/dnet_getnode.3.gz usr/share/man/man3/dnet_nextnode.3.gz 4 | usr/share/man/man3/dnet_getnode.3.gz usr/share/man/man3/dnet_endnode.3.gz 5 | -------------------------------------------------------------------------------- /dnprogs/debian/libdnet.copyright: -------------------------------------------------------------------------------- 1 | Copyright: 2 | 3 | (C) 1996-2001 Eduardo Serrat 4 | (C) 1996-2008 Christine Caulfield 5 | (C) 1999 Steve Whitehouse 6 | 7 | You are free to distribute this software under the terms of the GNU Lesser 8 | Public License. The full text of this license can be found in the file 9 | /usr/share/common-licenses/LGPL 10 | 11 | -------------------------------------------------------------------------------- /dnprogs/debian/libdnet.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libdnet.so.* 2 | usr/lib/*/libdnet_daemon.so.* 3 | usr/lib/*/libdnet-dap.so.* 4 | usr/lib/*/librms.so.* 5 | -------------------------------------------------------------------------------- /dnprogs/debian/libdnet.lintian-overrides: -------------------------------------------------------------------------------- 1 | # nam is a VMS given name for the object. We can not change it. 2 | libdnet: spelling-error-in-binary usr/lib/libdnet-dap.so.2.46.0 nam name 3 | # For some historical resons the package name doesn't match the soname. 4 | # This should be changed by the next soname change but before this we just 5 | # ignore this fact. 6 | libdnet: package-name-doesnt-match-sonames libdnet-dap2 libdnet2 libdnet-daemon2 librms2 7 | -------------------------------------------------------------------------------- /dnprogs/debian/libdnet.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | set -e 4 | 5 | if [ "$1" = "configure" ]; then ldconfig 6 | fi 7 | 8 | #DEBHELPER# 9 | -------------------------------------------------------------------------------- /dnprogs/debian/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | [type: gettext/rfc822deb] dnet-common.templates 2 | -------------------------------------------------------------------------------- /dnprogs/debian/po/de.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnForecast/LinuxDECnet/944560045e61dc8e88b2850ffa90ce443bcef0c7/dnprogs/debian/po/de.po -------------------------------------------------------------------------------- /dnprogs/debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | set -e 4 | 5 | if [ "$1" != "configure" ] 6 | then 7 | exit 0 8 | fi 9 | 10 | #DEBHELPER# 11 | -------------------------------------------------------------------------------- /dnprogs/debian/templates: -------------------------------------------------------------------------------- 1 | Template: dnprogs/nodename 2 | Type: string 3 | Default: linux 4 | Description: What is your DECnet node name? 5 | All nodes on a DECnet network have a node name. This is similar to 6 | the IP hostname but can only be a maximum of 6 characters long. 7 | . 8 | It is common that the DECnet name is the same as the IP name (if your 9 | machine has one). If you do not know the answer to this question please 10 | contact your system administrator. 11 | 12 | Template: dnprogs/nodeaddr 13 | Type: string 14 | Default: 1.10 15 | Description: What is your DECnet node address? 16 | All nodes on a DECnet network have a node address. This is two numbers 17 | seperated with a period (eg 3.45) where the first number denotes the 18 | area and the second is the node within that area. 19 | . 20 | Do not make up a number here, If you do not know your DECnet node address 21 | then ask your system administrator. 22 | -------------------------------------------------------------------------------- /dnprogs/dncopy/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dncopy 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dncopy 6 | PROG2=dntype 7 | 8 | MANPAGES=dncopy.1 9 | 10 | PROG1OBJS=dncopy.o file.o dnetfile.o unixfile.o dnetfile_dap.o 11 | 12 | all: $(PROG1) $(PROG2) 13 | 14 | $(PROG1): $(PROG1OBJS) $(DEPLIBS) 15 | $(CXX) $(LDFLAGS) -o $@ $(PROG1OBJS) $(LIBS) 16 | 17 | $(PROG2): $(PROG1) 18 | ln -sf $< $@ 19 | 20 | install: 21 | install -d $(prefix)/bin 22 | install -d $(manprefix)/man/man1 23 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/bin 24 | ln -sf $(PROG1) $(prefix)/bin/$(PROG2) 25 | install -m 0644 $(MANPAGES) $(manprefix)/man/man1 26 | ln -sf $(PROG1).1 $(manprefix)/man/man1/$(PROG2).1 27 | 28 | 29 | dep depend: 30 | $(CXX) $(CXXFLAGS) -MM *.cc >.depend 2>/dev/null 31 | 32 | clean: 33 | rm -f $(PROG2) $(PROG1) *.o *.bak .depend 34 | 35 | 36 | ifeq (.depend,$(wildcard .depend)) 37 | include .depend 38 | endif 39 | 40 | -------------------------------------------------------------------------------- /dnprogs/dncopy/file.cc: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (c) 1998-1999 Christine Caulfield christine.caulfield@googlemail.com 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ****************************************************************************** 14 | */ 15 | #include "file.h" 16 | 17 | file::file() 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /dnprogs/dncopy/unixfile.h: -------------------------------------------------------------------------------- 1 | 2 | class unixfile: public file 3 | { 4 | public: 5 | unixfile(const char *name); 6 | unixfile(); 7 | ~unixfile(); 8 | 9 | virtual int setup_link(unsigned int bufsize, int rfm, int rat, int xfer_mode, int flags, int timeout); 10 | 11 | virtual int open(const char *mode); 12 | virtual int open(const char *basename, const char *mode); 13 | virtual int close(); 14 | virtual int read(char *buf, int len); 15 | virtual int write(char *buf, int len); 16 | virtual int next(); 17 | virtual void perror(const char *); 18 | virtual char *get_basename(int keep_version); 19 | virtual char *get_printname(); 20 | virtual char *get_printname(char *filename); 21 | virtual const char *get_format_name(); 22 | virtual int get_umask(); 23 | virtual int set_umask(int mask); 24 | virtual bool eof(); 25 | virtual bool isdirectory(); 26 | virtual bool iswildcard(); 27 | virtual int max_buffersize(int biggest); 28 | 29 | protected: 30 | char filename[PATH_MAX]; 31 | char printname[PATH_MAX]; 32 | FILE *stream; 33 | int user_rfm; 34 | int user_rat; 35 | int transfer_mode; 36 | char *record_buffer; 37 | int record_ptr; 38 | int record_buflen; 39 | unsigned int block_size; 40 | 41 | static const int RECORD_BUFSIZE = 4096; 42 | }; 43 | 44 | -------------------------------------------------------------------------------- /dnprogs/dndel/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dndel 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dndel 6 | 7 | MANPAGES=dndel.1 8 | 9 | PROG1OBJS=dndel.o 10 | 11 | all: $(PROG1) 12 | 13 | $(PROG1): $(PROG1OBJS) $(DEPLIBS) 14 | $(CXX) $(CXXFLAGS) -o $@ $(PROG1OBJS) $(LIBS) 15 | 16 | install: 17 | install -d $(prefix)/bin 18 | install -d $(manprefix)/man/man1 19 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/bin 20 | install -m 0644 $(MANPAGES) $(manprefix)/man/man1 21 | 22 | dep depend: 23 | $(CXX) $(CXXFLAGS) -MM *.cc >.depend 2>/dev/null 24 | 25 | clean: 26 | rm -f $(PROG1) *.o *.bak .depend 27 | 28 | 29 | ifeq (.depend,$(wildcard .depend)) 30 | include .depend 31 | endif 32 | -------------------------------------------------------------------------------- /dnprogs/dndel/dndel.1: -------------------------------------------------------------------------------- 1 | .TH DNDEL 1 "October 2 1998" "DECnet utilities" 2 | 3 | .SH NAME 4 | dndel \- Delete a file on a VMS system 5 | .SH SYNOPSIS 6 | .B dndel 7 | [options] file-name 8 | .br 9 | Options: 10 | .br 11 | [\-ivVh] 12 | .SH DESCRIPTION 13 | .PP 14 | .B dndel 15 | deletes files held on VMS systems. The filename parameter may specify a single 16 | file or a wildcard (remember to use VMS wildcards). 17 | 18 | If you specify 19 | .B \-i 20 | or 21 | .B \-v 22 | then dndel will open two connections to the VMS machine (much as VMS itself 23 | does). Otherwise it will attempt to use a single connection. One side-effect 24 | of this is that the deletion process will fail at the first file that cannot 25 | be deleted. 26 | .SH OPTIONS 27 | .TP 28 | .I "\-i" 29 | Interactive. Prompt before deleting a file. 30 | .TP 31 | .I "\-v" 32 | Verbose. Print the names of files that have been deleted 33 | .TP 34 | .I "\-T connect timeout" 35 | Specifies the maximum amount of time the command will wait to establish a connection 36 | with the remote node. a 0 here will cause it to wait forever. The default is 60 seconds 37 | .TP 38 | .I \-h \-? 39 | Displays help for using the command. 40 | .TP 41 | .I \-V 42 | Show the version of the tools package that dndel comes from. 43 | 44 | .SH EXAMPLES 45 | 46 | dndel \-i 'myvax::oldfile;*' 47 | 48 | .br 49 | dndel 'tramp"christine pjc123"::interactive' 50 | .SH SEE ALSO 51 | .BR dntype "(1), " dndir "(1), " dncopy "(1), " dntask "(1) ," dnsubmit "(1), " dnprint "(1)" 52 | -------------------------------------------------------------------------------- /dnprogs/dndir/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dndir 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dndir 6 | 7 | MANPAGES=dndir.1 8 | 9 | PROG1OBJS=dndir.o 10 | 11 | all: $(PROG1) 12 | 13 | $(PROG1): $(PROG1OBJS) $(DEPLIBS) 14 | $(CXX) $(CXXFLAGS) -o $@ $(PROG1OBJS) $(LIBS) 15 | 16 | install: 17 | install -d $(prefix)/bin 18 | install -d $(manprefix)/man/man1 19 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/bin 20 | install -m 0644 $(MANPAGES) $(manprefix)/man/man1 21 | 22 | dep depend: 23 | $(CXX) $(CXXFLAGS) -MM *.cc >.depend 2>/dev/null 24 | 25 | clean: 26 | rm -f $(PROG1) *.o *.bak .depend 27 | 28 | 29 | ifeq (.depend,$(wildcard .depend)) 30 | include .depend 31 | endif 32 | 33 | -------------------------------------------------------------------------------- /dnprogs/dnetd/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for DECnet super server 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dnetd 6 | 7 | MANPAGES8=dnetd.8 8 | MANPAGES5=dnetd.conf.5 9 | 10 | PROG1OBJS=dnetd.o task_server.o 11 | 12 | all: $(PROG1) 13 | 14 | .c.o: 15 | $(CC) $(CFLAGS) $(BINARY_PREFIX) -c -o $@ $< 16 | 17 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON) 18 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDAEMON) $(LIBDNET) $(PTSLIBS) 19 | 20 | install: 21 | install -d $(prefix)/bin 22 | install -d $(manprefix)/man/man5 23 | install -d $(manprefix)/man/man8 24 | install -m 0750 $(STRIPBIN) $(PROG1) $(prefix)/sbin 25 | install -m 0644 $(MANPAGES5) $(manprefix)/man/man5 26 | install -m 0644 $(MANPAGES8) $(manprefix)/man/man8 27 | if [ ! -f $(sysconfprefix)/etc/dnetd.conf ]; then install -m 640 dnetd.conf $(sysconfprefix)/etc; fi 28 | if [ ! -f $(sysconfprefix)/etc/decnet.proxy ]; then install -m 640 ../fal/decnet.proxy $(sysconfprefix)/etc; fi 29 | 30 | location: 31 | $(info $(prefix)) 32 | 33 | dep depend: 34 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 35 | 36 | clean: 37 | rm -f $(PROG1) *.o *.bak .depend 38 | 39 | 40 | ifeq (.depend,$(wildcard .depend)) 41 | include .depend 42 | endif 43 | 44 | -------------------------------------------------------------------------------- /dnprogs/dnetd/dnetd.conf: -------------------------------------------------------------------------------- 1 | # /etc/dnetd.conf 2 | # 3 | # Define DECnet objects 4 | # 5 | # Fields 6 | # name: object name (or * for any named object, number must be 0) 7 | # number: object number (or 0 for a named object) 8 | # options: auth[,auto accept]: 9 | # auth: Whether to authenticate users: Y or N 10 | # auto accept: Should we accept incoming connections 11 | # This is needed for non-decnet daemons 12 | # (not calling dnet_accept) 13 | # user: If auth is N then use this user 14 | # daemon: program to run or 'internal' 15 | # 16 | # name number options user daemon 17 | # 18 | FAL 17 Y,N none fal 19 | MIRROR 25 N,N nobody internal 20 | MAIL 27 N,N vmsmail vmsmaild 21 | CTERM 42 N,N root ctermd 22 | DTERM 23 N,N root rmtermd 23 | NML 19 N,N nobody dnetnml 24 | DTR 63 N,N nobody dtr 25 | * * Y,R none internal 26 | 27 | -------------------------------------------------------------------------------- /dnprogs/dnlogin/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dnlogin 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dnlogin 6 | 7 | MANPAGES=dnlogin.1 8 | 9 | PROG1OBJS=dnlogin.o found.o cterm.o tty.o 10 | 11 | CFLAGS:=$(filter-out -fsigned-char,$(CFLAGS)) 12 | CFLAGS+=-funsigned-char -Wall 13 | 14 | CFLAGS+=-g 15 | #CFLAGS+=-O2 16 | 17 | all: $(PROG1) 18 | 19 | $(PROG1): $(PROG1OBJS) tty.h dnlogin.h $(DEPLIBDNET) 20 | $(CC) $(LDFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) 21 | 22 | install: 23 | install -d $(prefix)/bin 24 | install -d $(manprefix)/man/man1 25 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/bin 26 | install -m 0644 $(MANPAGES) $(manprefix)/man/man1 27 | 28 | dep depend: 29 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 30 | 31 | clean: 32 | rm -f $(PROG1) *.o *.bak .depend 33 | 34 | 35 | ifeq (.depend,$(wildcard .depend)) 36 | include .depend 37 | endif 38 | 39 | -------------------------------------------------------------------------------- /dnprogs/dnlogin/README: -------------------------------------------------------------------------------- 1 | This is a replacement for the rather unwieldy sethost program. It is pretty much 2 | in a usable state now (though only tested to VMS), any additions/fixes/bug 3 | reports are welcome. 4 | 5 | The principle is that found.c implements the foundation protocol in found.txt 6 | and cterm.c implements the cterm protocol on top of that, and the tty handling 7 | happens in tty.c. 8 | 9 | It should be easy to plug in other terminal protocols into here (eg dterm) 10 | if/when someone volunteers them. 11 | 12 | Chrissie 13 | -------------------------------------------------------------------------------- /dnprogs/dnlogin/dnlogin.1: -------------------------------------------------------------------------------- 1 | .TH DNLOGIN 1 "October 21 2005" "DECnet utilities" 2 | 3 | .SH NAME 4 | dnlogin \- Connect as a terminal to a DECnet system 5 | 6 | .SH SYNOPSIS 7 | .B dnlogin 8 | [options] nodename 9 | .br 10 | Options: 11 | .br 12 | [\-Vh] [\-d level] [\-e char] 13 | .br 14 | .SH DESCRIPTION 15 | .PP 16 | dnlogin connects to a remote DECnet system. 17 | .br 18 | 19 | .br 20 | This application implements the CTERM protocol over DECnet for connecting to 21 | a remote DECnet host. It expects to be run from a VT100-compatible terminal. 22 | .br 23 | dnlogin is a replacement for the old "sethost" program. 24 | 25 | 26 | .SH OPTIONS 27 | .TP 28 | .TP 29 | .I "\-e " 30 | Set the exit character. By default this is ^]. You can specify the exit character as a 31 | control character by preceding it with a circumflex eg (^A means control-A) or as 32 | a number in decimal (default), octal (starting with a zero), or hexadecimal (preceded 33 | by 0x or 0X). 34 | .TP 35 | .I "\-T connect timeout" 36 | Specifies the maximum amount of time the command will wait to establish a connection 37 | with the remote node. a 0 here will cause it to wait forever. The default is 60 seconds 38 | .TP 39 | .I \-h \-? 40 | Displays help for using the command. 41 | .TP 42 | .I \-V 43 | Show the version of the package that dnlogin was built with. 44 | 45 | .SH EXAMPLES 46 | .br 47 | Connect to remote VAX host named "mv3100". 48 | .br 49 | 50 | .br 51 | .PP 52 | dnlogin mv3100 53 | .br 54 | 55 | .SH HELPFUL HINTS 56 | The CTERM specifications available from Digital does not include how to setup 57 | VMS terminal characteristics, so the host cannot identify the capabilities of 58 | the session we are creating. The simplest workaround is to set the terminal 59 | capabilities manually upon login or including the following command in the 60 | .B login.com 61 | DCL procedure. 62 | 63 | .B $ SET TERM/DEC_CRT 64 | 65 | .SH SEE ALSO 66 | .BR dntype "(1), " dndir "(1), " dndel "(1), " dntask "(1), " dnping "(1)" 67 | -------------------------------------------------------------------------------- /dnprogs/dnlogin/tty.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (c) 2002 Christine Caulfield christine.caulfield@googlemail.com 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ****************************************************************************** 14 | */ 15 | 16 | /* Key definitions */ 17 | #define CTRL_A 0x01 18 | #define CTRL_B 0x02 19 | #define CTRL_C 0x03 20 | #define CTRL_D 0x04 21 | #define CTRL_E 0x05 22 | #define CTRL_F 0x06 23 | #define CTRL_G 0x07 24 | #define BELL 0x07 25 | #define CTRL_H 0x08 26 | #define BS 0x08 27 | #define CTRL_I 0x09 28 | #define CTRL_J 0x0A 29 | #define CTRL_K 0x0B 30 | #define CTRL_L 0x0C 31 | #define CTRL_M 0x0D 32 | #define CTRL_N 0x0E 33 | #define CTRL_O 0x0F 34 | #define CTRL_P 0x10 35 | #define CTRL_Q 0x11 36 | #define CTRL_R 0x12 37 | #define CTRL_S 0x13 38 | #define CTRL_T 0x14 39 | #define CTRL_U 0x15 40 | #define CTRL_V 0x16 41 | #define CTRL_W 0x17 42 | #define CTRL_X 0x18 43 | #define CTRL_Y 0x19 44 | #define CTRL_Z 0x1A 45 | #define ESC 0x1B 46 | #define DEL 0x7F 47 | 48 | -------------------------------------------------------------------------------- /dnprogs/dnroute/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.common 2 | 3 | DNROUTE=dnroute 4 | 5 | DNEIGH=dneigh 6 | 7 | #CFLAGS += -Inetlink/include $(SYSCONF_PREFIX) 8 | 9 | #all: $(DNROUTE) $(DNEIGH) 10 | all: $(DNEIGH) 11 | 12 | $(DNEIGH): dneigh.c 13 | $(CC) $(CFLAGS) -o $@ $^ $(LIBDNET) 14 | 15 | #$(DNROUTE): get_neigh.c send_route.c routing_msg.c csum.c hash.c pidfile.c netlink/libnetlink.a 16 | # $(CC) $(CFLAGS) -o $@ $^ -Lnetlink -lnetlink $(LIBDNET) 17 | 18 | #netlink/libnetlink.a: 19 | # $(MAKE) -C netlink 20 | 21 | install: 22 | install -d $(prefix)/sbin 23 | install -d $(manprefix)/man/man8 24 | # install -m 0755 $(STRIPBIN) dnroute $(prefix)/sbin 25 | install -m 0755 dneigh $(prefix)/sbin 26 | # ln -sf dneigh $(prefix)/sbin/dnetinfo 27 | # install -m 0644 dnroute.8 $(manprefix)/man/man8 28 | install -m 0644 dneigh.8 $(manprefix)/man/man8 29 | 30 | clean: 31 | rm -f $(DNROUTE) $(DNEIGH) *~ *.o netlink/*.o netlink/*.a 32 | -------------------------------------------------------------------------------- /dnprogs/dnroute/TODO: -------------------------------------------------------------------------------- 1 | - Check outgoing routing messages are still correct 2 | - Cope with the node having more than one address (needs libdnet support!) 3 | -------------------------------------------------------------------------------- /dnprogs/dnroute/csum.c: -------------------------------------------------------------------------------- 1 | /* 2 | * csum.c Checksum calculation for DECnet routing 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License 6 | * as published by the Free Software Foundation; either version 7 | * 2 of the License, or (at your option) any later version. 8 | * 9 | * Authors: Christine Caulfield 10 | * 11 | */ 12 | #include 13 | 14 | unsigned short route_csum(unsigned char *buf, int start, int end) 15 | { 16 | unsigned int sum = 1; /* Starting value for Phase IV */ 17 | int i; 18 | 19 | for (i=start; i>16) + (sum&0xFFFF); 24 | sum = (sum>>16) + (sum&0xFFFF); 25 | 26 | return (unsigned short)sum; 27 | } 28 | -------------------------------------------------------------------------------- /dnprogs/dnroute/csum.h: -------------------------------------------------------------------------------- 1 | extern unsigned short route_csum(unsigned char *buf, int start, int end); 2 | -------------------------------------------------------------------------------- /dnprogs/dnroute/dneigh.8: -------------------------------------------------------------------------------- 1 | .TH DNETINFO 8 "September 17 2023" "DECnet utilities" 2 | 3 | .SH NAME 4 | dneigh \- DECnet Neighborhood Information 5 | 6 | .SH SYNOPSIS 7 | .B dneigh [OPTIONS...] 8 | 9 | .SH DESCRIPTION 10 | .PP 11 | .B dneigh 12 | shows the local DECnet neighbour table in a arp like format. 13 | 14 | .SH OPTIONS 15 | .TP 16 | .I "\-n" 17 | Don't resolve node numbers into names. 18 | 19 | .TP 20 | .I "\-h \-\-help" 21 | Show a help text. 22 | 23 | .SH SEE ALSO 24 | .BR " ip "(8)" 25 | -------------------------------------------------------------------------------- /dnprogs/dnroute/dnroute.conf.sample: -------------------------------------------------------------------------------- 1 | # Example dnroute config file 2 | 3 | # Uncomment this to send level 2 routing messages. or run with -2 4 | # level 2 5 | 6 | # Uncomment this to prevent dnroute from automatically setting routes for area 3 7 | # manual 3 8 | 9 | # By default, all interfaces have a cost of 4, you can change that here. 10 | # eg. a multinet link might need a much higher cost than local ethernet. 11 | # eth0 6 12 | # tap0 10 13 | -------------------------------------------------------------------------------- /dnprogs/dnroute/dnroute.h: -------------------------------------------------------------------------------- 1 | 2 | struct routeinfo 3 | { 4 | struct routeinfo *next; /* List of routes to this node/area */ 5 | unsigned short cost; 6 | unsigned short hops; 7 | unsigned short router; 8 | unsigned char valid; 9 | unsigned char manual; 10 | unsigned char priority; 11 | }; 12 | -------------------------------------------------------------------------------- /dnprogs/dnroute/dnrtlink.h: -------------------------------------------------------------------------------- 1 | #ifndef __DNRTLINK_H__ 2 | #define __DNRTLINK_H__ 1 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | extern int dnrt_open(struct rtnl_handle *rth, unsigned subscriptions); 9 | extern int dnrt_wilddump_request(struct rtnl_handle *rth, int fam, int type); 10 | extern int dnrt_dump_request(struct rtnl_handle *rth, int type, void *req, int len); 11 | extern int dnrt_dump_filter(struct rtnl_handle *rth, 12 | int (*filter)(struct sockaddr_nl *, struct nlmsghdr *n, void *), 13 | void *arg1, 14 | int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 15 | void *arg2); 16 | extern int dnrt_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, 17 | unsigned groups, struct nlmsghdr *answer, 18 | int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 19 | void *jarg); 20 | extern int dnrt_send(struct rtnl_handle *rth, char *buf, int); 21 | 22 | extern int dnrt_listen(struct rtnl_handle *, int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 23 | void *jarg); 24 | extern int dnrt_from_file(FILE *, int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 25 | void *jarg); 26 | 27 | #endif /* __DNRTTLINK_H__ */ 28 | 29 | -------------------------------------------------------------------------------- /dnprogs/dnroute/hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. 3 | * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. 4 | * 5 | * This file is part of the device-mapper userspace tools. 6 | * 7 | * This copyrighted material is made available to anyone wishing to use, 8 | * modify, copy, or redistribute it subject to the terms and conditions 9 | * of the GNU General Public License v.2. 10 | * 11 | * You should have received a copy of the GNU General Public License 12 | * along with this program; if not, write to the Free Software Foundation, 13 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14 | */ 15 | 16 | #ifndef _LVM_HASH_H 17 | #define _LVM_HASH_H 18 | struct dm_hash_table; 19 | struct dm_hash_node; 20 | 21 | typedef void (*dm_hash_iterate_fn) (void *data); 22 | 23 | struct dm_hash_table *dm_hash_create(unsigned size_hint); 24 | void dm_hash_destroy(struct dm_hash_table *t); 25 | void dm_hash_wipe(struct dm_hash_table *t); 26 | 27 | void *dm_hash_lookup(struct dm_hash_table *t, const char *key); 28 | int dm_hash_insert(struct dm_hash_table *t, const char *key, void *data); 29 | void dm_hash_remove(struct dm_hash_table *t, const char *key); 30 | 31 | void *dm_hash_lookup_binary(struct dm_hash_table *t, const char *key, uint32_t len); 32 | int dm_hash_insert_binary(struct dm_hash_table *t, const char *key, uint32_t len, 33 | void *data); 34 | void dm_hash_remove_binary(struct dm_hash_table *t, const char *key, uint32_t len); 35 | 36 | unsigned dm_hash_get_num_entries(struct dm_hash_table *t); 37 | void dm_hash_iter(struct dm_hash_table *t, dm_hash_iterate_fn f); 38 | 39 | char *dm_hash_get_key(struct dm_hash_table *t, struct dm_hash_node *n); 40 | void *dm_hash_get_data(struct dm_hash_table *t, struct dm_hash_node *n); 41 | struct dm_hash_node *dm_hash_get_first(struct dm_hash_table *t); 42 | struct dm_hash_node *dm_hash_get_next(struct dm_hash_table *t, struct dm_hash_node *n); 43 | 44 | #define dm_hash_iterate(v, h) \ 45 | for (v = dm_hash_get_first(h); v; \ 46 | v = dm_hash_get_next(h, v)) 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /dnprogs/dnroute/netlink/Makefile: -------------------------------------------------------------------------------- 1 | include ../../Makefile.common 2 | 3 | NLOBJ=ll_map.o libnetlink.o 4 | 5 | CFLAGS+=-Iinclude 6 | 7 | all: libnetlink.a # libutil.a 8 | 9 | libnetlink.a: $(NLOBJ) 10 | ar rcs $@ $(NLOBJ) 11 | 12 | clean: 13 | rm -f $(NLOBJ) $(ADDLIB) libnetlink.a 14 | 15 | -------------------------------------------------------------------------------- /dnprogs/dnroute/netlink/include/SNAPSHOT.h: -------------------------------------------------------------------------------- 1 | static char SNAPSHOT[] = "010824"; 2 | -------------------------------------------------------------------------------- /dnprogs/dnroute/netlink/include/libnetlink.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIBNETLINK_H__ 2 | #define __LIBNETLINK_H__ 1 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | struct rtnl_handle 9 | { 10 | int fd; 11 | struct sockaddr_nl local; 12 | struct sockaddr_nl peer; 13 | __u32 seq; 14 | __u32 dump; 15 | }; 16 | 17 | extern int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions); 18 | extern void rtnl_close(struct rtnl_handle *rth); 19 | extern int rtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type); 20 | extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len); 21 | extern int rtnl_dump_filter(struct rtnl_handle *rth, 22 | int (*filter)(struct sockaddr_nl *, struct nlmsghdr *n, void *), 23 | void *arg1, 24 | int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 25 | void *arg2); 26 | extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, 27 | unsigned groups, struct nlmsghdr *answer, 28 | int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 29 | void *jarg); 30 | extern int rtnl_send(struct rtnl_handle *rth, char *buf, int); 31 | 32 | 33 | extern int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data); 34 | extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen); 35 | extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data); 36 | extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen); 37 | 38 | extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len); 39 | 40 | extern int rtnl_listen(struct rtnl_handle *, int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 41 | void *jarg); 42 | extern int rtnl_from_file(FILE *, int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 43 | void *jarg); 44 | 45 | #endif /* __LIBNETLINK_H__ */ 46 | 47 | -------------------------------------------------------------------------------- /dnprogs/dnroute/netlink/include/ll_map.h: -------------------------------------------------------------------------------- 1 | #ifndef __LL_MAP_H__ 2 | #define __LL_MAP_H__ 1 3 | 4 | extern int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); 5 | extern int ll_init_map(struct rtnl_handle *rth); 6 | extern int ll_name_to_index(char *name); 7 | extern const char *ll_index_to_name(int idx); 8 | extern const char *ll_idx_n2a(int idx, char *buf); 9 | extern int ll_index_to_type(int idx); 10 | extern unsigned ll_index_to_flags(int idx); 11 | 12 | #endif /* __LL_MAP_H__ */ 13 | -------------------------------------------------------------------------------- /dnprogs/dnroute/netlink/include/rt_names.h: -------------------------------------------------------------------------------- 1 | #ifndef RT_NAMES_H_ 2 | #define RT_NAMES_H_ 1 3 | 4 | const char* rtnl_rtprot_n2a(int id, char *buf, int len); 5 | const char* rtnl_rtscope_n2a(int id, char *buf, int len); 6 | const char* rtnl_rttable_n2a(int id, char *buf, int len); 7 | const char* rtnl_rtrealm_n2a(int id, char *buf, int len); 8 | const char* rtnl_dsfield_n2a(int id, char *buf, int len); 9 | int rtnl_rtprot_a2n(int *id, char *arg); 10 | int rtnl_rtscope_a2n(int *id, char *arg); 11 | int rtnl_rttable_a2n(int *id, char *arg); 12 | int rtnl_rtrealm_a2n(__u32 *id, char *arg); 13 | int rtnl_dsfield_a2n(__u32 *id, char *arg); 14 | 15 | const char *inet_proto_n2a(int proto, char *buf, int len); 16 | int inet_proto_a2n(char *buf); 17 | 18 | 19 | const char * ll_type_n2a(int type, char *buf, int len); 20 | 21 | const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int blen); 22 | int ll_addr_a2n(unsigned char *lladdr, int len, char *arg); 23 | 24 | const char * ll_proto_n2a(unsigned short id, char *buf, int len); 25 | int ll_proto_a2n(unsigned short *id, char *buf); 26 | 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /dnprogs/dnroute/netlink/include/rtm_map.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTM_MAP_H__ 2 | #define __RTM_MAP_H__ 1 3 | 4 | char *rtnl_rtntype_n2a(int id, char *buf, int len); 5 | int rtnl_rtntype_a2n(int *id, char *arg); 6 | 7 | int get_rt_realms(__u32 *realms, char *arg); 8 | 9 | 10 | #endif /* __RTM_MAP_H__ */ 11 | -------------------------------------------------------------------------------- /dnprogs/dnroute/pidfile.c: -------------------------------------------------------------------------------- 1 | #include /* for pid_t */ 2 | #include /* for open */ 3 | #include /* for kill() */ 4 | #include /* for ESHRC */ 5 | #include /* for f...() */ 6 | #include /* for memset() */ 7 | #include /* for atoi() */ 8 | #include /* for unlink() */ 9 | #include /* for fcntl() */ 10 | #include /* for syslog() */ 11 | 12 | int pidfile_create(const char *pidFile, pid_t pid) 13 | { 14 | char buf[20]; 15 | struct flock lock; 16 | int fd, value; 17 | 18 | if((fd = open(pidFile, O_WRONLY | O_CREAT, 19 | (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH))) < 0) { 20 | syslog(LOG_ERR, "Cannot open pidfile [%s], error was [%s]", 21 | pidFile, strerror(errno)); 22 | return 1; 23 | } 24 | lock.l_type = F_WRLCK; 25 | lock.l_start = 0; 26 | lock.l_whence = SEEK_SET; 27 | lock.l_len = 0; 28 | 29 | if (fcntl(fd, F_SETLK, &lock) < 0) { 30 | if (errno != EACCES && errno != EAGAIN) 31 | syslog(LOG_ERR, "Cannot lock pidfile [%s], error was [%s]", 32 | pidFile, strerror(errno)); 33 | else 34 | syslog(0, "process is already running"); 35 | goto fail; 36 | } 37 | if (ftruncate(fd, 0) < 0) { 38 | syslog(LOG_ERR, "Cannot truncate pidfile [%s], error was [%s]", 39 | pidFile, strerror(errno)); 40 | goto fail; 41 | } 42 | memset(buf, 0, sizeof(buf)); 43 | snprintf(buf, sizeof(buf)-1, "%u", pid); 44 | if (write(fd, buf, strlen(buf)) != strlen(buf)) { 45 | syslog(0, "Cannot write pid to pidfile [%s], error was [%s]", 46 | pidFile, strerror(errno)); 47 | goto fail; 48 | } 49 | if ((value = fcntl(fd, F_GETFD, 0)) < 0) { 50 | syslog(LOG_ERR, "Cannot get close-on-exec flag from pidfile [%s], " 51 | "error was [%s]", pidFile, strerror(errno)); 52 | goto fail; 53 | } 54 | value |= FD_CLOEXEC; 55 | if (fcntl(fd, F_SETFD, value) < 0) { 56 | syslog(LOG_ERR, "Cannot set close-on-exec flag from pidfile [%s], " 57 | "error was [%s]", pidFile, strerror(errno)); 58 | goto fail; 59 | } 60 | return 0; 61 | fail: 62 | close(fd); 63 | return 1; 64 | } 65 | -------------------------------------------------------------------------------- /dnprogs/dnsubmit/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dnsubmit 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dnsubmit 6 | PROG2=dnprint 7 | 8 | MANPAGES=dnsubmit.1 9 | 10 | PROG1OBJS=dnsubmit.o 11 | 12 | all: $(PROG1) $(PROG2) 13 | 14 | $(PROG1): $(PROG1OBJS) $(DEPLIBS) 15 | $(CXX) $(CXXFLAGS) -o $@ $(PROG1OBJS) $(LIBS) 16 | 17 | $(PROG2): $(PROG1) 18 | ln -sf $< $@ 19 | 20 | install: 21 | install -d $(prefix)/bin 22 | install -d $(manprefix)/man/man1 23 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/bin 24 | ln -sf $(PROG1) $(prefix)/bin/$(PROG2) 25 | install -m 0644 $(MANPAGES) $(manprefix)/man/man1 26 | ln -sf $(PROG1).1 $(manprefix)/man/man1/$(PROG2).1 27 | 28 | 29 | dep depend: 30 | $(CXX) $(CXXFLAGS) -MM *.cc >.depend 2>/dev/null 31 | 32 | clean: 33 | rm -f $(PROG2) $(PROG1) *.o *.bak .depend 34 | 35 | 36 | ifeq (.depend,$(wildcard .depend)) 37 | include .depend 38 | endif 39 | -------------------------------------------------------------------------------- /dnprogs/dnsubmit/dnsubmit.1: -------------------------------------------------------------------------------- 1 | .TH DNDEL 1 "October 2 1998" "DECnet utilities" 2 | 3 | .SH NAME 4 | dnsubmit \- Submit a batch job on a VMS system 5 | .br 6 | dnprint \- Print a file on a VMS system 7 | .SH SYNOPSIS 8 | .B dnsubmit 9 | [options] file-name 10 | .br 11 | .B dnprint 12 | [options] file-name 13 | .br 14 | Options: 15 | .br 16 | [\-vh] 17 | .SH DESCRIPTION 18 | .PP 19 | .B dnprint 20 | and 21 | .B dnsubmit 22 | send files to a VMS machine for printing or batch execution. 23 | These command behave similarly to the VMS PRINT/REMOTE and SUBMIT/REMOTE 24 | commands in that you get very little control of the queueing mechanism. 25 | .br 26 | dnprint always prints to the queue SYS$PRINT and dnsubmit always submits 27 | to SYS$BATCH. Of course you can always redirect these queues using 28 | logical names. 29 | .br 30 | See the man page for 31 | .B dncopy 32 | for a discussion of VMS file specifications. 33 | 34 | .SH OPTIONS 35 | .TP 36 | .I "\-T connect timeout" 37 | Specifies the maximum amount of time the command will wait to establish a connection 38 | with the remote node. a 0 here will cause it to wait forever. The default is 60 seconds 39 | .TP 40 | .I \-h \-? 41 | Displays help for using the command. 42 | .TP 43 | .I \-V 44 | Show the version of the tools package that the program comes from. 45 | 46 | .SH EXAMPLES 47 | 48 | dnsubmit 'myvax::myjob.com' 49 | 50 | .br 51 | dnprint 'tramp"christine pjc123"::file.lis' 52 | 53 | .SH SEE ALSO 54 | .BR dntype "(1), " dndir "(1), " dncopy "(1), " dntask "(1), " dndel "(1)" 55 | -------------------------------------------------------------------------------- /dnprogs/dntask/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dntask 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dntask 6 | 7 | MANPAGES=dntask.1 8 | 9 | PROG1OBJS=dntask.o 10 | 11 | all: $(PROG1) 12 | 13 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) 14 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) 15 | 16 | install: 17 | install -d $(prefix)/bin 18 | install -d $(manprefix)/man/man1 19 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/bin 20 | install -m 0644 $(MANPAGES) $(manprefix)/man/man1 21 | 22 | dep depend: 23 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 24 | 25 | clean: 26 | rm -f $(PROG1) *.o *.bak .depend 27 | 28 | 29 | ifeq (.depend,$(wildcard .depend)) 30 | include .depend 31 | endif 32 | 33 | -------------------------------------------------------------------------------- /dnprogs/dntask/tasks/decterm.com: -------------------------------------------------------------------------------- 1 | $! Example "DECNET" task for dntask 2 | $! 3 | $! Put this command procedure in your SYS$LOGIN directory and 4 | $! call it from Linux using the command 5 | $! dntask myhost::decterm 6 | $! 7 | $ if f$mode() .eqs. "NETWORK" then $ define/nolog sys$output sys$net 8 | $! 9 | $ remnode=f$element(0, ":", "''f$trnlnm("sys$rem_node")'") 10 | $ set display/create/node='remnode' 11 | $ create/term/detach 12 | $! 13 | $! NOTE: This write is essential to the DECnet protocol. 14 | $! 15 | $ write sys$output "DECterm started on ''remnode'" 16 | $ exit 17 | -------------------------------------------------------------------------------- /dnprogs/dntask/tasks/interactive.com: -------------------------------------------------------------------------------- 1 | $! Example "INTERACTIVE" task for dntask 2 | $! 3 | $! Put this command procedure in your SYS$LOGIN directory and 4 | $! call it from Linux using the command 5 | $! dntask -i myhost::interactive 6 | $! You can then type in DCL commands and the output will be send to 7 | $! standard output on the Linux machine. 8 | $! 9 | $! For a non-interactive task see SHOW_SYSTEM.COM 10 | $! 11 | $ open/read/write linux sys$net 12 | $ nextcmd: 13 | $! 14 | $ cmd="!" 15 | $ read /prompt="" /end=eof_end /error=error_end linux cmd 16 | $ if "''cmd'" .eqs. "exit" then $ goto endtask 17 | $ if "''cmd'" .eqs. "" then $ goto nextcmd 18 | $ define/nolog/user sys$output linux 19 | $ define/nolog/user sys$input linux 20 | $ cmd 21 | $ goto nextcmd 22 | $! 23 | $ error_end: 24 | $ eof_end: 25 | $ endtask: 26 | $ close/nolog linux 27 | $ exit 28 | -------------------------------------------------------------------------------- /dnprogs/dntask/tasks/show_system.com: -------------------------------------------------------------------------------- 1 | $! Example "SHOW SYSTEM" task for dntask 2 | $! 3 | $! Put this command procedure in your SYS$LOGIN directory and 4 | $! call it from Linux using the command 5 | $! dntask myhost::show_system 6 | $! 7 | $! For an interactive task see INTERACTIVE.COM 8 | $! 9 | $ if f$mode() .eqs. "NETWORK" then $ define/nolog sys$output sys$net 10 | $! 11 | $ show system 12 | $ exit 13 | -------------------------------------------------------------------------------- /dnprogs/dtr/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dtr 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dtr 6 | MANPAGES8=dtr.8 7 | PROG1OBJS=dtr.o 8 | 9 | all: $(PROG1) 10 | 11 | .c.0: 12 | $(CC) $(CFLAGS) $(SYSCONF_PREFIX) -c -o $@ $< 13 | 14 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON) 15 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) $(LIBDAEMON) 16 | 17 | install: 18 | install -d $(prefix)/sbin 19 | install -d $(manprefix)/man/man8 20 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/sbin 21 | install -m 0644 $(MANPAGES8) $(manprefix)/man/man8 22 | 23 | dep depend: 24 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 25 | 26 | clean: 27 | rm -f $(PROG1) *.o *.bak .depend 28 | 29 | ifeq (.depend,$(wildcard .depend)) 30 | include .depend 31 | endif 32 | -------------------------------------------------------------------------------- /dnprogs/dtr/dtr.8: -------------------------------------------------------------------------------- 1 | .TH DTR 8 "Jun 19 2020" "DECnet utilities" 2 | 3 | .SH NAME 4 | dtr \- DECnet Test Receiver 5 | .SH SYNOPSIS 6 | .B dtr 7 | [options] 8 | .br 9 | Options: 10 | .br 11 | [\-dVvh] 12 | .SH DESCRIPTION 13 | .PP 14 | .B dtr 15 | is a daemon that responds to requests from the DECnet Test Sender on remote 16 | systems. It is recommended that the daemon be run from dnetd by adding the 17 | following line to /etc/dnetd.conf: 18 | 19 | .br 20 | DTR 63 N,N nobody dtr 21 | .br 22 | 23 | .SH OPTIONS 24 | .TP 25 | .I "\-d" 26 | Don't fork and run the background. Use this for debugging. 27 | .TP 28 | .I "\-v" 29 | Verbose. The more of these there are the more verbose dtr will be. Don't use 30 | more than one for normal operation because it will seriously impair 31 | performance. 32 | .TP 33 | .I \-h \-? 34 | Displays help for using the command. 35 | .TP 36 | .I \-V 37 | Show the version of dtr. 38 | .SH SEE ALSO 39 | .BR dnetd "(8), " dnetd.conf "(5)" 40 | -------------------------------------------------------------------------------- /dnprogs/dts/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for dts 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dts 6 | MANPAGES1=dts.1 7 | PROG1OBJS=dts.o 8 | 9 | all: $(PROG1) 10 | 11 | .c.0: 12 | $(CC) $(CFLAGS) $(SYSCONF_PREFIX) -c -o $@ $< 13 | 14 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON) 15 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) $(LIBDAEMON) 16 | 17 | install: 18 | install -d $(prefix)/bin 19 | install -d $(manprefix)/man/man1 20 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/bin 21 | install -m 0644 $(MANPAGES1) $(manprefix)/man/man1 22 | 23 | dep depend: 24 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 25 | 26 | clean: 27 | rm -f $(PROG1) *.o *.bak .depend 28 | 29 | ifeq (.depend,$(wildcard .depend)) 30 | include .depend 31 | endif 32 | -------------------------------------------------------------------------------- /dnprogs/excludes-dist: -------------------------------------------------------------------------------- 1 | *core 2 | *.o 3 | *lib*/*.po 4 | *.a 5 | *.bak 6 | *~ 7 | *# 8 | *.#* 9 | *auto* 10 | */excludes-backup 11 | */TAGS 12 | *tgz 13 | */sedt.rem 14 | */debian-changelog 15 | */LOG* 16 | *lib*.so* 17 | *lib*.a 18 | */fal/fal 19 | */fal/*auto_types* 20 | */dndir/dndir 21 | */dnsubmit/dnsubmit 22 | */dnsubmit/dnprint 23 | */dndel/dndel 24 | */dntask/dntask 25 | */librms/example 26 | */librms/t_example 27 | */apps/sethost 28 | */apps/ctermd 29 | */apps/startnet 30 | */apps/dnping 31 | */apps/dnmount 32 | */apps/dncopynodes 33 | */dncopy/dncopy 34 | */dncopy/dntype 35 | */dnlogin/dnlogin 36 | */mail/vmsmaild 37 | */mail/sendvmsmail 38 | */phone/phone 39 | */phone/phoned 40 | */dnetd/dnetd 41 | */build 42 | */include/netdnet/dn.h 43 | */debian/tmp 44 | */debian/tmp/* 45 | */debian/files 46 | */debian/substvars 47 | */rpmbuild 48 | */rpmbuild/* 49 | *CVS 50 | *CVS/* 51 | */BUILD* 52 | */RPMS* 53 | *.cvsignore 54 | -------------------------------------------------------------------------------- /dnprogs/fal-old/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for FAL 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=fal 6 | 7 | MANPAGES=fal.8 decnet.proxy.5 8 | 9 | PROG1OBJS=fal.o server.o task.o directory.o open.o create.o erase.o rename.o \ 10 | submit.o 11 | 12 | all: $(PROG1) 13 | 14 | $(PROG1): $(PROG1OBJS) $(DEPLIBS) $(DEPLIBDAEMON) 15 | $(CXX) -o $@ $(CXXFLAGS) $(PROG1OBJS) $(LIBS) $(LIBDAEMON) $(LIBDNET) 16 | 17 | install: 18 | install -d $(prefix)/sbin 19 | install -d $(manprefix)/man/man8 20 | install -d $(manprefix)/man/man5 21 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/sbin 22 | install -m 0644 fal.8 $(manprefix)/man/man8 23 | install -m 0644 decnet.proxy.5 $(manprefix)/man/man5 24 | 25 | dep depend: 26 | $(CXX) $(CXXFLAGS) -MM *.cc >.depend 2>/dev/null 27 | 28 | clean: 29 | rm -f $(PROG1) *.o *.bak .depend 30 | 31 | 32 | ifeq (.depend,$(wildcard .depend)) 33 | include .depend 34 | endif 35 | -------------------------------------------------------------------------------- /dnprogs/fal-old/create.cc: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (c) 1998-2000 Christine Caulfield christine.caulfield@googlemail.com 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ****************************************************************************** 14 | */ 15 | // create.cc 16 | // Code for a CREATE task within a FAL server process. 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #include "logging.h" 38 | #include "connection.h" 39 | #include "protocol.h" 40 | #include "vaxcrc.h" 41 | #include "params.h" 42 | #include "task.h" 43 | #include "open.h" 44 | #include "server.h" 45 | #include "create.h" 46 | 47 | fal_create::fal_create(dap_connection &c, int v, fal_params &p, 48 | dap_attrib_message *attrib, 49 | dap_alloc_message *alloc, 50 | dap_protect_message *protect): 51 | fal_open(c,v,p, attrib, alloc, protect) 52 | { 53 | create = true; 54 | } 55 | 56 | fal_create::~fal_create() 57 | { 58 | } 59 | -------------------------------------------------------------------------------- /dnprogs/fal-old/create.h: -------------------------------------------------------------------------------- 1 | 2 | class fal_create: public fal_open 3 | { 4 | public: 5 | fal_create(dap_connection &c, int v, fal_params &p, 6 | dap_attrib_message *, 7 | dap_alloc_message *, 8 | dap_protect_message *); 9 | virtual ~fal_create(); 10 | 11 | private: 12 | 13 | }; 14 | 15 | 16 | -------------------------------------------------------------------------------- /dnprogs/fal-old/decnet.proxy.5: -------------------------------------------------------------------------------- 1 | .TH DECNET.CONF 5 "8 August 2002" "DECnet for Linux" 2 | .SH NAME 3 | /etc/decnet.proxy \- DECnet proxy file 4 | .SH DESCRIPTION 5 | .B /etc/decnet.proxy 6 | is an ASCII file which contains mappings of remote DECnet users to local 7 | users. It is used by 8 | .B fal(8) 9 | when no username and password have been 10 | explicitly given to determine whether a user is allowed to access files and 11 | also whose files they will get access to. 12 | .PP 13 | There is one entry per line, and each line has the following format: 14 | .sp 15 | .RS 16 | node::remoteuser localuser 17 | .RE 18 | .sp 19 | The field descriptions are: 20 | .sp 21 | .RS 22 | .TP 1.0in 23 | .I node 24 | The name or number of the remote node. If this is a name it must appear in 25 | .B decnet.conf(5) 26 | otherwise a DECnet node address should be used. This field is a regular expression: 27 | If you want to match a single nodename then you must use the anchors ^ and $ either side 28 | of the name. 29 | .TP 30 | .I remoteuser 31 | a regular expression that may match one or more remote user names. If you want 32 | to match a single user then you must use the anchors ^ and $ either side of 33 | the name. 34 | .TP 35 | .I localuser 36 | The name of a user on the local machine or a single asterisk (*) in which case 37 | the remote username will be substituted. 38 | .BR 39 | .PP 40 | Comments start with a hash mark and continue to the end of that line. They may 41 | be on a dedicated line or following an entry. 42 | 43 | .SH EXAMPLE 44 | .nf 45 | .ft CW 46 | .in +2n 47 | #/etc/decnet.proxy 48 | # proxy configuration for fal. 49 | # 50 | ^tramp$::^test$ christine # Explicitly convert 'test' on tramp to 'christine' 51 | ^zaphod$::.* none # Disable proxies from zaphod (assuming you don't 52 | # have a user called 'none') 53 | .*::.* decnet # Like a default DECnet account 54 | .*::.* * # Equivalent to VMS *::* * proxy (make this last 55 | # if you use it) 56 | .br 57 | .SH SEE ALSO 58 | .BR fal "(8), " decnet.conf "(5)" 59 | -------------------------------------------------------------------------------- /dnprogs/fal-old/directory.h: -------------------------------------------------------------------------------- 1 | 2 | class fal_directory: public fal_task 3 | { 4 | public: 5 | fal_directory(dap_connection &c, int v, fal_params &p); 6 | virtual ~fal_directory(); 7 | virtual bool process_message(dap_message *m); 8 | 9 | private: 10 | dap_name_message *name_msg; 11 | dap_protect_message *prot_msg; 12 | dap_date_message *date_msg; 13 | dap_ack_message *ack_msg; 14 | dap_attrib_message *attrib_msg; 15 | dap_alloc_message *alloc_msg; 16 | 17 | bool send_dir_entry(char *path, int); 18 | }; 19 | -------------------------------------------------------------------------------- /dnprogs/fal-old/erase.h: -------------------------------------------------------------------------------- 1 | 2 | class fal_erase: public fal_task 3 | { 4 | public: 5 | fal_erase(dap_connection &c, int v, fal_params &p); 6 | virtual ~fal_erase(); 7 | virtual bool process_message(dap_message *m); 8 | 9 | private: 10 | }; 11 | -------------------------------------------------------------------------------- /dnprogs/fal-old/open.h: -------------------------------------------------------------------------------- 1 | 2 | class fal_open: public fal_task 3 | { 4 | public: 5 | fal_open(dap_connection &c, int v, fal_params &p, 6 | dap_attrib_message *, 7 | dap_alloc_message *, 8 | dap_protect_message *); 9 | 10 | virtual ~fal_open(); 11 | virtual bool process_message(dap_message *m); 12 | 13 | protected: 14 | 15 | glob_t gl; 16 | unsigned int glob_entry; // file entry in the glob structure 17 | 18 | int display; 19 | FILE *stream; 20 | bool use_records; 21 | bool write_access; 22 | bool streaming; // no CONTROL message between records 23 | char *buf; 24 | bool create; 25 | unsigned int block_size; 26 | 27 | dap_attrib_message *attrib_msg; 28 | dap_alloc_message *alloc_msg; 29 | dap_protect_message *protect_msg; 30 | 31 | bool send_file(int, long); 32 | void print_file(); 33 | void delete_file(); 34 | void truncate_file(); 35 | bool put_record(dap_data_message *); 36 | void set_control_options(dap_control_message *); 37 | bool create_file(char *); 38 | void send_eof(); 39 | 40 | }; 41 | -------------------------------------------------------------------------------- /dnprogs/fal-old/params.h: -------------------------------------------------------------------------------- 1 | // This is really just a struct. 2 | // All the relevant command-line parameters are passed down 3 | // to the work classes using this class. 4 | class fal_params 5 | { 6 | public: 7 | int verbosity; 8 | enum {GUESS_TYPE, CHECK_EXT, NONE} auto_type; 9 | char auto_file[PATH_MAX]; 10 | char vroot[PATH_MAX]; 11 | int vroot_len; 12 | bool use_file; 13 | bool use_metafiles; 14 | bool use_adf; 15 | bool can_do_stmlf; 16 | int remote_os; 17 | 18 | const char *type_name() 19 | { 20 | switch(auto_type) 21 | { 22 | case GUESS_TYPE: 23 | return "guess"; 24 | case CHECK_EXT: 25 | return "ext"; 26 | case NONE: 27 | return "none"; 28 | default: 29 | return "ugh"; 30 | } 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /dnprogs/fal-old/rename.h: -------------------------------------------------------------------------------- 1 | 2 | class fal_rename: public fal_task 3 | { 4 | public: 5 | fal_rename(dap_connection &c, int v, fal_params &p); 6 | virtual ~fal_rename(); 7 | virtual bool process_message(dap_message *m); 8 | 9 | private: 10 | char oldname[PATH_MAX]; 11 | int display; 12 | 13 | bool send_name(char *); 14 | }; 15 | -------------------------------------------------------------------------------- /dnprogs/fal-old/server.h: -------------------------------------------------------------------------------- 1 | // Class for FAL server. This class receives messages and passes them down to 2 | // fal_task objects that do the real work. 3 | // It is the basic child of the FAL listener and encapsulates the job of a 4 | // forked process that handles a single connection. 5 | // 6 | // The only DAP message handled by the server is the mandatory CONFIG message, 7 | // all others are passed down to dap_task classes. 8 | 9 | class fal_server 10 | { 11 | public: 12 | fal_server(dap_connection &c, fal_params &p): 13 | conn(c), 14 | verbose(p.verbosity), 15 | params(p) 16 | {} 17 | ~fal_server() {}; 18 | bool run(); 19 | void closedown(); 20 | 21 | private: 22 | void create_access_task(dap_message *m); 23 | bool exchange_config(); 24 | const char *func_name(int); 25 | 26 | dap_connection &conn; 27 | fal_task *current_task; 28 | int verbose; 29 | bool need_crcs; 30 | struct fal_params params; 31 | 32 | dap_attrib_message *attrib_msg; 33 | dap_alloc_message *alloc_msg; 34 | dap_protect_message *protect_msg; 35 | }; 36 | -------------------------------------------------------------------------------- /dnprogs/fal-old/submit.h: -------------------------------------------------------------------------------- 1 | 2 | class fal_submit: public fal_task 3 | { 4 | public: 5 | fal_submit(dap_connection &c, int v, fal_params &p); 6 | virtual ~fal_submit(); 7 | virtual bool process_message(dap_message *m); 8 | 9 | private: 10 | }; 11 | -------------------------------------------------------------------------------- /dnprogs/fal/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for FAL 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=fal 6 | MANPAGES8=fal.8 7 | PROG1OBJS=main.o dap.o fal.o directory.o file.o debug.o 8 | 9 | all: $(PROG1) 10 | 11 | .c.o: 12 | $(CC) $(CFLAGS) $(SYSCONF_PREFIX) -c -o $@ $< 13 | 14 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON) 15 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) $(LIBDAEMON) 16 | 17 | install: 18 | install -d $(prefix)/sbin 19 | install -d $(manprefix)/man/man8 20 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/sbin 21 | install -m 0644 $(MANPAGES8) $(manprefix)/man/man8 22 | 23 | dep depend: 24 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 25 | 26 | clean: 27 | rm -f $(PROG1) *.o *.bak .depend 28 | 29 | 30 | ifeq (.depend,$(wildcard .depend)) 31 | include .depend 32 | endif 33 | -------------------------------------------------------------------------------- /dnprogs/fal/decnet.proxy: -------------------------------------------------------------------------------- 1 | # /etc/decnet.proxy 2 | # 3 | # DECnet proxy database. 4 | # The format of this file is (one entry per line) 5 | # node::remoteuser localuser 6 | # 7 | # Regular expressions are allowed for node and remote user. Remember these are 8 | # POSIX regular expressions so use .* where you would use just * on VMS. 9 | # Also it is IMPORTANT that whole names (node and user) are enclosed 10 | # in anchors as below. 11 | # The entries are checked in the order they appear in this file. 12 | # * as a local user will be replaced by the remote username. 13 | # # is a comment. 14 | # 15 | # Here are some examples (commented out of course): 16 | # 17 | # ^tramp$::^test$ chrissie # Explicitly convert 'test' on tramp to 'chrissie' 18 | # ^zaphod$::.* none # Disable proxies from zaphod (assuming you don't have 19 | # # a user called 'none') 20 | # .*::.* decnet # Like a default DECnet account 21 | # .*::.* * # Equivalent to VMS *::* * proxy (make this last 22 | # # if you use it) 23 | -------------------------------------------------------------------------------- /dnprogs/fal/fal.8: -------------------------------------------------------------------------------- 1 | .TH FAL 8 "Oct 5 2020" "DECnet utilities" 2 | 3 | .SH NAME 4 | fal \- Alternate File Access Listener for DECnet 5 | .SH SYNOPSIS 6 | .B fal 7 | [options] 8 | .br 9 | Options: 10 | .br 11 | [\-dvV] 12 | .SH DESCRIPTION 13 | .PP 14 | .B fal 15 | is a daemon that serves incoming DAP (Data Access protocol) connections from 16 | remote systems. It provides sequential transfer and directory listing from 17 | remote machines using standard DECnet syntax. 18 | It may be started at system boot time (after DECnet has been started) running as root 19 | or started on demand by dnetd. Note that this version of 20 | .B fal 21 | does not support decnet.proxy. 22 | .br 23 | .br 24 | The file names output by 25 | .B fal 26 | will always be Unix-style and all files sent by 27 | .B fal 28 | will be sent in STREAMLF format. 29 | .br 30 | .br 31 | The options below affect the behaviour of fal. If you are using 32 | .B dnetd 33 | then these options should be specified in the 34 | .B dnetd.conf(5) 35 | file. 36 | .br 37 | .SH OPTIONS 38 | .TP 39 | .I "\-d" 40 | Don't fork and run the background. Use this for debugging. 41 | .TP 42 | .I "\-v" 43 | Verbose. The more of these there are the more verbose fal will be. Don't use 44 | more than one for normal operation because it will seriously impair 45 | performance. 46 | .TP 47 | .I \-h \-? 48 | Displays help for using the command. 49 | .TP 50 | .I \-V 51 | Show the version of fal. 52 | 53 | 54 | .SH SEE ALSO 55 | .BR dnetd "(8), " dnetd.conf "(5), " dntype "(1), " dndir "(1), " dndel "(1), " dntask "(1), " dnsubmit "(1), " dnprint "(1)" 56 | -------------------------------------------------------------------------------- /dnprogs/fal/main.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | int verbosity = 0; 23 | 24 | extern void process_request(int); 25 | 26 | void usage( 27 | char *prog, 28 | FILE *f 29 | ) 30 | { 31 | fprintf(f, "\n%s options:\n", prog); 32 | fprintf(f, " -v Verbose messages\n"); 33 | fprintf(f, " -h Display this message\n"); 34 | fprintf(f, " -d Show debug logging\n"); 35 | fprintf(f, " -V Show version number\n\n"); 36 | } 37 | 38 | int main( 39 | int argc, 40 | char **argv 41 | ) 42 | { 43 | int debug = 0; 44 | int insock; 45 | char opt; 46 | 47 | while ((opt = getopt(argc, argv, "?vVdh")) != EOF) { 48 | switch (opt) { 49 | case '?': 50 | case 'h': 51 | usage(argv[0], stdout); 52 | exit(0); 53 | 54 | case 'v': 55 | verbosity++; 56 | break; 57 | 58 | case 'd': 59 | debug++; 60 | break; 61 | 62 | case 'V': 63 | printf("\nnml from dnprogs version %s\n\n", VERSION); 64 | exit(1); 65 | } 66 | } 67 | 68 | init_daemon_logging("fal", debug ? 'e' : 's'); 69 | 70 | insock = dnet_daemon(DNOBJECT_FAL, NULL, verbosity, !debug); 71 | 72 | if (insock > -1) { 73 | dnet_accept(insock, 0, NULL, 0); 74 | process_request(insock); 75 | } 76 | return 0; 77 | } 78 | -------------------------------------------------------------------------------- /dnprogs/include/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for includes 2 | 3 | include ../Makefile.common 4 | 5 | all: 6 | @cp kernel/netdnet/dn.h netdnet || true 7 | 8 | install: 9 | if [ -L $(libprefix)/include/netdnet ]; then \ 10 | rm -f $(libprefix)/include/netdnet; \ 11 | fi 12 | install -d $(libprefix)/include/netdnet 13 | install -m 0644 netdnet/dn.h $(libprefix)/include/netdnet 14 | install -m 0644 netdnet/dnetdb.h $(libprefix)/include/netdnet 15 | 16 | dep depend: 17 | 18 | clean: 19 | rm -f dnetdb/dn.h 20 | 21 | # DO NOT DELETE 22 | -------------------------------------------------------------------------------- /dnprogs/include/dn_endian.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (c) 1998-2008 C.H Caulfield Christine.Caulfield@googlemail.com 3 | 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | ****************************************************************************** 15 | */ 16 | /* Header file to cope with endian issues */ 17 | 18 | #if defined(__NetBSD__) || defined(__FreeBSD__) 19 | #include 20 | #define __BYTE_ORDER BYTE_ORDER 21 | #endif 22 | 23 | 24 | #ifndef __BYTE_ORDER 25 | #error "Can't determine endianness - please inform Christine.Caulfield@googlemail.com with your distribution and hardware type." 26 | #endif 27 | 28 | #if (__BYTE_ORDER == 1234) 29 | 30 | /* It's a VAX or Intel, or some other obscure make :-) */ 31 | 32 | /* DECnet is little-endian so these are no-ops */ 33 | #define dn_ntohs(x) (x) 34 | #define dn_htons(x) (x) 35 | 36 | #define dn_ntohl(x) (x) 37 | #define dn_htonl(x) (x) 38 | 39 | #else 40 | #if (__BYTE_ORDER == 4321) 41 | 42 | /* It's a SPARC - most likely than not */ 43 | 44 | #define dn_ntohs(x) ((((x)&0x0ff)<<8) | (((x)&0xff00)>>8)) 45 | 46 | #define dn_ntohl(x) ( ((dn_ntohs((x)&0xffff))<<16) |\ 47 | ((dn_ntohs(((x)>>16)))) ) 48 | 49 | #define dn_htonl(x) dn_ntohl(x) 50 | #define dn_htons(x) dn_ntohs(x) 51 | #else 52 | 53 | /* it's a PDP??? */ 54 | #error "Unsupported endianness - please inform Christine.Caulfield@googlemail.com with your distribution and hardware type." 55 | #endif 56 | #endif 57 | -------------------------------------------------------------------------------- /dnprogs/libdaemon/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.common 2 | 3 | LIBOBJS=dnet_daemon.o dnetlog.o dnet_priv_check.o 4 | PICOBJS=dnet_daemon.po dnetlog.po dnet_priv_check.po 5 | MANPAGES3=dnet_daemon.3 6 | 7 | LIBNAME=libdnet_daemon 8 | LIB_MINOR_VERSION=43.1 9 | LIB_VERSION=$(MAJOR_VERSION).$(LIB_MINOR_VERSION) 10 | 11 | SHAREDLIB=$(LIBNAME).so.$(LIB_VERSION) 12 | STATICLIB=$(LIBNAME).a 13 | 14 | 15 | all: $(STATICLIB) $(SHAREDLIB) 16 | 17 | $(STATICLIB): $(LIBOBJS) 18 | ar -rv $@ $^ 19 | 20 | $(SHAREDLIB): $(PICOBJS) 21 | $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname=$(LIBNAME).so.$(MAJOR_VERSION) $^ $(LIBCRYPT) -L../libdnet/ -ldnet 22 | ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR_VERSION) 23 | ln -sf $(LIBNAME).so.$(MAJOR_VERSION) $(LIBNAME).so 24 | 25 | .c.o: 26 | $(CC) $(CFLAGS) $(SYSCONF_PREFIX) -c -o $@ $< 27 | 28 | .c.po: 29 | $(CC) $(CFLAGS) $(SYSCONF_PREFIX) -fPIC -c -o $@ $< 30 | 31 | dep depend: 32 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 33 | 34 | clean: 35 | rm -f *.o *.po *.bak $(STATICLIB) $(SHAREDLIB) $(LIBNAME).so* .depend 36 | 37 | install: 38 | install -m 0644 $(STRIPBIN) $(SHAREDLIB) $(libprefix)$(libdir) 39 | install -m 0644 $(STATICLIB) $(libprefix)$(libdir) 40 | ln -sf $(SHAREDLIB) $(libprefix)$(libdir)/$(LIBNAME).so.$(MAJOR_VERSION) 41 | ln -sf $(LIBNAME).so.$(MAJOR_VERSION) $(libprefix)$(libdir)/$(LIBNAME).so 42 | install -d $(manprefix)/man/man3 43 | install -m 0644 $(MANPAGES3) $(manprefix)/man/man3 44 | ln -sf dnet_daemon.3 $(manprefix)/man/man3/dnet_accept.3 45 | ln -sf dnet_daemon.3 $(manprefix)/man/man3/dnet_reject.3 46 | 47 | .SUFFIXES: .po 48 | 49 | ifeq (.depend,$(wildcard .depend)) 50 | include .depend 51 | endif 52 | 53 | -------------------------------------------------------------------------------- /dnprogs/libdap/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.common 2 | 3 | LIBOBJS=connection.o protocol.o vaxcrc.o logging.o 4 | PICOBJS=connection.po protocol.po vaxcrc.po logging.po 5 | 6 | LIBNAME=libdnet-dap 7 | LIB_MINOR_VERSION=46.0 8 | LIB_VERSION=$(MAJOR_VERSION).$(LIB_MINOR_VERSION) 9 | 10 | SHAREDLIB=$(LIBNAME).so.$(LIB_VERSION) 11 | STATICLIB=$(LIBNAME).a 12 | 13 | CXXFLAGS+=-Wno-format-y2k 14 | 15 | all: $(STATICLIB) $(SHAREDLIB) 16 | 17 | $(STATICLIB): $(LIBOBJS) 18 | ar -rv $@ $^ 19 | 20 | $(SHAREDLIB): $(PICOBJS) 21 | $(CXX) $(CXXFLAGS) -shared -o $@ -Wl,-soname=$(LIBNAME).so.$(MAJOR_VERSION) $^ -L../libdnet/ -ldnet 22 | ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR_VERSION) 23 | ln -sf $(LIBNAME).so.$(MAJOR_VERSION) $(LIBNAME).so 24 | 25 | .cc.o: 26 | $(CXX) $(CXXFLAGS) $(SYSCONF_PREFIX) -c -o $@ $< 27 | 28 | .cc.po: 29 | $(CXX) $(CXXFLAGS) $(SYSCONF_PREFIX) -fPIC -c -o $@ $< 30 | 31 | dep depend: 32 | $(CXX) $(CXXFLAGS) -MM *.cc >.depend 2>/dev/null 33 | 34 | clean: 35 | rm -f *.o *.po *.bak .depend $(STATICLIB) $(SHAREDLIB) $(LIBNAME).so* 36 | 37 | install: 38 | install -m 0644 $(STRIPBIN) $(SHAREDLIB) $(libprefix)$(libdir) 39 | install -m 0644 $(STATICLIB) $(libprefix)$(libdir) 40 | ln -sf $(SHAREDLIB) $(libprefix)$(libdir)/$(LIBNAME).so.$(MAJOR_VERSION) 41 | ln -sf $(LIBNAME).so.$(MAJOR_VERSION) $(libprefix)$(libdir)/$(LIBNAME).so 42 | 43 | .SUFFIXES: .po 44 | 45 | ifeq (.depend,$(wildcard .depend)) 46 | include .depend 47 | endif 48 | -------------------------------------------------------------------------------- /dnprogs/libdap/logging.h: -------------------------------------------------------------------------------- 1 | // libdap/logging.h 2 | // 3 | #include 4 | 5 | void init_logging(const char *, char, bool); 6 | void daplog(int level, const char *fmt, ...); 7 | 8 | #define DAPLOG(x) daplog x 9 | -------------------------------------------------------------------------------- /dnprogs/libdap/vaxcrc.h: -------------------------------------------------------------------------------- 1 | #ifndef _VAXCRC_H 2 | #define _VAXCRC_H 3 | 4 | #define DAPPOLY 0xE905 // X^16+X^15+X^13+X^7+X^4+X^2+X^1+X^0 5 | #define DAPINICRC 0xFFFF // -1 6 | #define DDCMPPOLY 0xA001 // X^16+X^15+X^2+X^0 7 | #define DDCMPINICRC 0x0000 // 0 8 | #define XXXPOLY 0x8408 // X^16+X^12+X^5+X^0 9 | #define XXXPINICRC 0x0000 // 0 10 | 11 | class vaxcrc 12 | { 13 | private: 14 | unsigned short crc; 15 | unsigned short crc_table[16]; 16 | public: 17 | vaxcrc(unsigned short poly,unsigned short inicrc); 18 | unsigned short getcrc(); 19 | void setcrc(unsigned short newcrc); 20 | void calc1shift(unsigned char *stream, int len); 21 | void calc2shift(unsigned char *stream, int len); 22 | void calc4shift(unsigned char *stream, int len); 23 | 24 | }; 25 | #endif 26 | -------------------------------------------------------------------------------- /dnprogs/libdnet/cuserid.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (c) 2010 Philipp 'ph3-der-loewe' Schafft 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #ifdef __NetBSD__ 23 | char *cuserid(char *string) { 24 | if ( string != NULL ) 25 | return NULL; 26 | 27 | // Fix this, use system databases! 28 | return getenv("USER"); 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /dnprogs/libdnet/dnet_addr.3: -------------------------------------------------------------------------------- 1 | .TH DNET_ADDR 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | dnet_addr \- DECnet nodename to address translation 4 | .SH SYNOPSIS 5 | .B #include 6 | .br 7 | .B #include 8 | .br 9 | .sp 10 | .B struct dn_naddr *dnet_addr (char *nodename) 11 | .sp 12 | .SH DESCRIPTION 13 | 14 | .B dnet_addr 15 | search the decnet hosts file for 16 | .B nodename 17 | and returns the DECnet address in the 18 | .B dn_naddr 19 | structure 20 | .br 21 | If no entry is found, returns 22 | .B NULL 23 | 24 | 25 | .SH EXAMPLE 26 | .nf 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | main(void) 33 | { 34 | struct dn_naddr *binaddr; 35 | struct sockaddr_dn sockaddr; 36 | int sockfd; 37 | 38 | if ( (binaddr=dnet_addr("mv3100")) == NULL) 39 | { 40 | printf("No entry in /etc/decnet.conf for mv3100\\n"); 41 | exit(0); 42 | } 43 | if ((sockfd=socket(AF_DECnet,SOCK_SEQPACKET,DNPROTO_NSP)) == \-1) 44 | { 45 | perror("socket"); 46 | exit(\-1); 47 | } 48 | 49 | sockaddr.sdn_family = AF_DECnet; 50 | sockaddr.sdn_flags = 0x00; 51 | sockaddr.sdn_objnum = 0x19; /* MIRROR */ 52 | sockaddr.sdn_objnamel = 0x00; 53 | memcpy(sockaddr.sdn_add.a_addr, binaddr->a_addr,binaddr->a_len); 54 | 55 | if (connect(sockfd, (struct sockaddr *)&sockaddr, 56 | sizeof(sockaddr)) < 0) 57 | { 58 | perror("connect"); 59 | exit(\-1); 60 | } 61 | close(sockfd); 62 | } 63 | .fi 64 | 65 | 66 | 67 | 68 | .SH SEE ALSO 69 | 70 | .BR dnet_htoa (3), 71 | .BR dnet_ntoa (3), 72 | .BR dnet_conn (3), 73 | .BR getnodeadd (3), 74 | .BR getnodebyname (3), 75 | .BR getnodebyaddr (3), 76 | .BR setnodeent (3) 77 | -------------------------------------------------------------------------------- /dnprogs/libdnet/dnet_conn.3: -------------------------------------------------------------------------------- 1 | .TH DNET_CONN 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | dnet_conn \- Connect to remote DECnet object by name. 4 | .SH SYNOPSIS 5 | .B #include 6 | .br 7 | .B #include 8 | .br 9 | .sp 10 | .B int dnet_conn (char *hostname, char *objname, int type, int,int,int,int) 11 | .sp 12 | .SH DESCRIPTION 13 | 14 | .B dnet_conn 15 | connects to the remote object 16 | .B objname 17 | in host 18 | .B hostname 19 | using the protocol denoted by 20 | .B type 21 | usually DNPROTO_NSP. 22 | If successful, returns an integer file descriptor, else return errno. 23 | 24 | 25 | 26 | .SH EXAMPLE 27 | .nf 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | main(void) 34 | { 35 | int sockfd; 36 | 37 | sockfd=dnet_conn("mv3100","X$X0",DNPROTO_NSP,0,0,0,0); 38 | if (sockfd < 0) 39 | printf ("Error connecting to remote object X$X0 on node mv3100"); 40 | else 41 | { 42 | printf ("Succesfully connected to remote object X$X0 on node mv3100"); 43 | close (sockfd); 44 | } 45 | } 46 | .fi 47 | 48 | 49 | 50 | 51 | .SH SEE ALSO 52 | 53 | .BR dnet_addr (3), 54 | .BR dnet_htoa (3), 55 | .BR dnet_ntoa (3), 56 | .BR getnodeadd (3), 57 | .BR getnodebyname (3), 58 | .BR getnodebyaddr (3), 59 | .BR setnodeent (3) 60 | -------------------------------------------------------------------------------- /dnprogs/libdnet/dnet_eof.3: -------------------------------------------------------------------------------- 1 | .TH DNET_EOF 3 "July 28, 1998" "DECnet functions" 2 | .SH NAME 3 | dnet_eof \- Is DECnet socket at End of File ? 4 | .SH SYNOPSIS 5 | .B #include 6 | .br 7 | .B #include 8 | .br 9 | .sp 10 | .B int dnet_eof (int fd) 11 | .sp 12 | .SH DESCRIPTION 13 | 14 | .B dnet_eof 15 | returns 0 if the socket is not at end-of-file. 16 | It will return \-1 otherwise, errno will be set accordingly. errno will be 17 | set to ENOTCONN if the socket is at EOF. 18 | .br 19 | .B dnet_eof 20 | is only supported on Linux 2.4.0 or later. On earlier kernels it will 21 | always return \-1 and errno will be set to EINVAL. 22 | 23 | .SH EXAMPLE 24 | Here is a primitive server example that just prints out anything sent to it 25 | from the remote side: 26 | .nf 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | int main(int argc, char **argv) 33 | { 34 | int insock, readnum; 35 | char ibuf[1024]; 36 | 37 | // Wait for something to happen (or check to see if it already has) 38 | insock = dnet_daemon(0, "GROT", 0, 0); 39 | 40 | if (insock > \-1) 41 | { 42 | dnet_accept(insock, 0, 0, NULL); 43 | while (!dnet_eof(insock)) 44 | { 45 | readnum=read(insock,ibuf,sizeof(ibuf)); 46 | fprintf(stderr, "%-*s\\n", readnum, ibuf); 47 | } 48 | close(insock); 49 | } 50 | 51 | 52 | } 53 | 54 | .SH SEE ALSO 55 | 56 | .BR dnet_addr (3), 57 | .BR dnet_htoa (3), 58 | .BR dnet_ntoa (3), 59 | .BR getnodeadd (3), 60 | .BR getnodebyname (3), 61 | .BR getnodebyaddr (3), 62 | .BR setnodeent (3) 63 | -------------------------------------------------------------------------------- /dnprogs/libdnet/dnet_eof.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | 10 | int dnet_eof(int s) 11 | { 12 | #ifdef DSO_LINKINFO 13 | struct linkinfo_dn li; 14 | socklen_t len=4; 15 | 16 | if (getsockopt(s, DNPROTO_NSP, DSO_LINKINFO, &li, &len) == -1) 17 | return -1; 18 | 19 | if (li.idn_linkstate==LL_DISCONNECTING) 20 | { 21 | errno = ENOTCONN; 22 | return -1; 23 | } 24 | else 25 | return 0; 26 | 27 | #else 28 | errno = EINVAL; 29 | return -1; 30 | #endif 31 | 32 | } 33 | -------------------------------------------------------------------------------- /dnprogs/libdnet/dnet_getnode.3: -------------------------------------------------------------------------------- 1 | .TH DNET_GETNODE 3 "April 3, 1999" "DECnet database functions" 2 | .SH NAME 3 | dnet_getnode, dnet_nextnode, dnet_endnode \- Get nodes from DECnet database 4 | .SH SYNOPSIS 5 | .B #include 6 | .br 7 | .B #include 8 | .br 9 | .sp 10 | .B void *dnet_getnode (void) 11 | .br 12 | .B char *dnet_nextnode (void *) 13 | .br 14 | .B void dnet_endnode (void *) 15 | .sp 16 | .SH DESCRIPTION 17 | 18 | .B dnet_getnode() 19 | Starts the search of the DECnet nodes database (/etc/decnet.conf). It returns 20 | an opaque pointer which is passed to the other two functions. 21 | .br 22 | .B dnet_nextnode() 23 | returns the next node name in the list. The pointer is 24 | private to the library and will be overwritten at the next dnet_nextnode call. 25 | .B dnet_endnode() 26 | ends the search. It must be called when you have finished 27 | with this group of functions or a memory leak will result. 28 | 29 | 30 | .SH EXAMPLE 31 | .nf 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | main(void) 38 | { 39 | void *nodelist; 40 | char *nodename; 41 | 42 | nodelist = dnet_getnode(); 43 | nodename = dnet_nextnode(nodelist); 44 | while(nodename) 45 | { 46 | printf("Found node %s\\n", nodename); 47 | nodename = dnet_nextnode(nodelist); 48 | } 49 | dnet_endnode(nodelist); 50 | 51 | } 52 | .fi 53 | 54 | 55 | 56 | 57 | .SH SEE ALSO 58 | 59 | .BR dnet_addr (3), 60 | .BR dnet_ntoa (3), 61 | .BR dnet_conn (3), 62 | .BR getnodeadd (3), 63 | .BR getnodebyname (3), 64 | .BR getnodebyaddr (3), 65 | .BR setnodeent (3) 66 | -------------------------------------------------------------------------------- /dnprogs/libdnet/dnet_htoa.3: -------------------------------------------------------------------------------- 1 | .TH DNET_HTOA 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | dnet_htoa \- DECnet address to host name translation 4 | .SH SYNOPSIS 5 | .B #include 6 | .br 7 | .B #include 8 | .br 9 | .sp 10 | .B char *dnet_htoa (struct dn_naddr *addr) 11 | .sp 12 | .SH DESCRIPTION 13 | 14 | .B dnet_htoa 15 | searches the decnet hosts file for 16 | .B addr 17 | and returns the DECnet node name. 18 | .br 19 | If no entry is found, returns the ascii DECnet address in the format 20 | .B area.node 21 | (1.1, 1.2, etc) 22 | 23 | 24 | .SH EXAMPLE 25 | .nf 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | main(void) 32 | { 33 | struct dn_naddr binaddr; 34 | 35 | binaddr.a_len = 2; 36 | binaddr.a_addr[0] = 0x02; 37 | binaddr.a_addr[1] = 0x04; 38 | 39 | printf ("DECnet node name is %s",dnet_htoa(binaddr)); 40 | 41 | } 42 | .fi 43 | 44 | 45 | 46 | 47 | .SH SEE ALSO 48 | 49 | .BR dnet_addr (3), 50 | .BR dnet_ntoa (3), 51 | .BR dnet_conn (3), 52 | .BR getnodeadd (3), 53 | .BR getnodebyname (3), 54 | .BR getnodebyaddr (3), 55 | .BR setnodeent (3) 56 | -------------------------------------------------------------------------------- /dnprogs/libdnet/dnet_ntoa.3: -------------------------------------------------------------------------------- 1 | .TH DNET_NTOA 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | dnet_ntoa \- DECnet address to ascii translation 4 | .SH SYNOPSIS 5 | .B #include 6 | .br 7 | .B #include 8 | .br 9 | .sp 10 | .B char *dnet_ntoa (struct dn_naddr *addr) 11 | .sp 12 | .SH DESCRIPTION 13 | 14 | .B dnet_ntoa 15 | Converts the binary DECnet address 16 | .B addr 17 | into 18 | .B area.node 19 | ascii notation (1.1, 63.4, etc). 20 | 21 | 22 | .SH EXAMPLE 23 | .nf 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | main(void) 30 | { 31 | struct dn_naddr binaddr; 32 | 33 | binaddr.a_len = 2; 34 | binaddr.a_addr[0] = 0x02; 35 | binaddr.a_addr[1] = 0x04; 36 | 37 | printf ("DECnet area.node is %s",dnet_ntoa(binaddr)); 38 | 39 | } 40 | .fi 41 | 42 | 43 | 44 | 45 | .SH SEE ALSO 46 | 47 | .BR dnet_addr (3), 48 | .BR dnet_htoa (3), 49 | .BR dnet_conn (3), 50 | .BR getnodeadd (3), 51 | .BR getnodebyname (3), 52 | .BR getnodebyaddr (3), 53 | .BR setnodeent (3) 54 | -------------------------------------------------------------------------------- /dnprogs/libdnet/dnet_ntoa.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (c) 1995-1998 E.M. Serrat emserrat@geocities.com 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | static char asc_addr[8]; 28 | 29 | char *dnet_ntoa(struct dn_naddr *addr) 30 | { 31 | sprintf(asc_addr,"%d.%d",(addr->a_addr[1] >> 2), 32 | (((addr->a_addr[1] & 0x03) << 8) | addr->a_addr[0])); 33 | return asc_addr; 34 | } 35 | -------------------------------------------------------------------------------- /dnprogs/libdnet/getnodeadd.3: -------------------------------------------------------------------------------- 1 | .TH GETNODEADD 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | getnodeadd \- DECnet address of executor node 4 | 5 | .SH SYNOPSIS 6 | .B #include 7 | .br 8 | .B #include 9 | .br 10 | .sp 11 | .B struct dn_naddr *getnodeadd (void) 12 | .sp 13 | .SH DESCRIPTION 14 | 15 | .B getnodeadd 16 | searches the decnet hosts file for the 17 | .B executor 18 | node and returns the DECnet address in the 19 | .B dn_naddr 20 | structure 21 | .br 22 | If no entry is found, returns 23 | .B NULL 24 | 25 | 26 | .SH EXAMPLE 27 | .nf 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | main(void) 34 | { 35 | struct dn_naddr *binaddr; 36 | 37 | if ( (binaddr=getnodeadd()) == NULL) 38 | printf("Error, cannot find executor node address"); 39 | else 40 | printf("getnodeadd successfully got executor node address"); 41 | } 42 | .fi 43 | 44 | 45 | 46 | 47 | .SH SEE ALSO 48 | 49 | .BR dnet_htoa (3), 50 | .BR dnet_ntoa (3), 51 | .BR dnet_conn (3), 52 | .BR dnet_addr (3), 53 | .BR getnodebyname (3), 54 | .BR getnodebyaddr (3), 55 | .BR setnodeent (3) 56 | -------------------------------------------------------------------------------- /dnprogs/libdnet/getnodebyaddr.3: -------------------------------------------------------------------------------- 1 | .TH GETNODEBYADDR 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | getnodebyaddr \- DECnet node entry retrieval by address 4 | 5 | .SH SYNOPSIS 6 | .B #include 7 | .br 8 | .B #include 9 | .br 10 | .sp 11 | .B struct nodeent *getnodebyaddr (char *addr, short len, const int family) 12 | .sp 13 | .SH DESCRIPTION 14 | 15 | .B getnodebyaddr 16 | searches the decnet hosts file for the DECnet node with address equal to 17 | .B addr 18 | of 19 | .B len 20 | bytes, belonging to protocol family 21 | .B family 22 | (PF_DECnet) and returns node information into the 23 | .B nodeent 24 | structure. 25 | .br 26 | If no entry is found, returns 27 | .B NULL 28 | 29 | 30 | .SH EXAMPLE 31 | .nf 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | main(void) 38 | { 39 | struct dn_naddr binaddr; 40 | struct nodeent *dp; 41 | 42 | binaddr->a_len = 2; 43 | binaddr->a_addr[0] = 0x02; 44 | binaddr->a_addr[1] = 0x04; 45 | 46 | if ( (dp=getnodebyaddr(binaddr->a_addr,binaddr->len, PF_DECnet)) == NULL) 47 | printf("Error, cannot find node entry"); 48 | else 49 | printf("Node name is %s",dp->n_name); 50 | } 51 | .fi 52 | 53 | 54 | 55 | 56 | .SH SEE ALSO 57 | 58 | .BR dnet_htoa (3), 59 | .BR dnet_ntoa (3), 60 | .BR dnet_conn (3), 61 | .BR dnet_addr (3), 62 | .BR getnodebyname (3), 63 | .BR getnodeadd (3), 64 | .BR setnodeent (3) 65 | -------------------------------------------------------------------------------- /dnprogs/libdnet/getnodebyname.3: -------------------------------------------------------------------------------- 1 | .TH GETNODEBYNAME 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | getnodebyname \- DECnet node entry retrieval by address 4 | 5 | .SH SYNOPSIS 6 | .B #include 7 | .br 8 | .B #include 9 | .br 10 | .sp 11 | .B struct nodeent *getnodebyname (char *name) 12 | .sp 13 | .SH DESCRIPTION 14 | 15 | .B getnodebyname 16 | searches the decnet hosts file for the DECnet node with name equal to 17 | .B name 18 | and returns node information into the 19 | .B nodeent 20 | structure. 21 | .br 22 | If no entry is found, returns 23 | .B NULL 24 | 25 | 26 | .SH EXAMPLE 27 | .nf 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | main(void) 34 | { 35 | struct nodeent *dp; 36 | 37 | 38 | if ( (dp=getnodebyname("mv3100")) == NULL) 39 | printf("Error, cannot find node entry"); 40 | else 41 | printf("Node name is %s",dp->n_name); 42 | } 43 | .fi 44 | 45 | 46 | 47 | 48 | .SH SEE ALSO 49 | 50 | .BR dnet_htoa (3), 51 | .BR dnet_ntoa (3), 52 | .BR dnet_conn (3), 53 | .BR dnet_addr (3), 54 | .BR getnodebyaddr (3), 55 | .BR getnodeadd (3), 56 | .BR setnodeent (3) 57 | -------------------------------------------------------------------------------- /dnprogs/libdnet/libdnet.3: -------------------------------------------------------------------------------- 1 | .TH LIBDNET 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | libdnet \- DECnet database functions library 4 | .SH SYNOPSIS 5 | 6 | .B /usr/lib/libdnet.a 7 | .br 8 | 9 | .B /usr/lib/libdnet.so 10 | .br 11 | 12 | .SH DESCRIPTION 13 | 14 | These are the DECnet database functions libraries. They are used 15 | to access and manipulate all the information contained in the 16 | decnet hosts configuration file: 17 | .br 18 | .B /etc/decnet.conf 19 | 20 | .SH SEE ALSO 21 | 22 | .BR dnet_addr (3), 23 | .BR dnet_htoa (3), 24 | .BR dnet_ntoa (3), 25 | .BR dnet_conn (3), 26 | .BR getnodeadd (3), 27 | .BR getnodebyname (3), 28 | .BR getnodebyaddr (3), 29 | .br 30 | .BR setnodeent (3) 31 | -------------------------------------------------------------------------------- /dnprogs/libdnet/setnodeent.3: -------------------------------------------------------------------------------- 1 | .TH SETNODEENT 3 "July 28, 1998" "DECnet database functions" 2 | .SH NAME 3 | setnodeent \- DECnet database seek function 4 | 5 | .SH SYNOPSIS 6 | .B #include 7 | .br 8 | .B #include 9 | .br 10 | .sp 11 | .B void setnodeent(int ent) 12 | .sp 13 | .SH DESCRIPTION 14 | 15 | .B setnodeent 16 | seeks the next record to be retrieved by getnodeent. Actually this function 17 | is present only for compatibility with X11R6. 18 | 19 | .SH EXAMPLE 20 | .nf 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | main(void) 27 | { 28 | setnodeent(1); /* points to the first entry in decnet.conf */ 29 | } 30 | .fi 31 | 32 | 33 | 34 | 35 | .SH SEE ALSO 36 | 37 | .BR dnet_htoa (3), 38 | .BR dnet_ntoa (3), 39 | .BR dnet_conn (3), 40 | .BR dnet_addr (3), 41 | .BR getnodebyaddr (3), 42 | .BR getnodeadd (3), 43 | .BR getnodebyname (3) 44 | -------------------------------------------------------------------------------- /dnprogs/libdnet/setnodeent.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (c) 1995-1998 E.M. Serrat emserrat@geocities.com 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | /*--------------------------------------------------------------------------*/ 19 | void setnodeent(int ent) 20 | { 21 | } 22 | /*--------------------------------------------------------------------------*/ 23 | void endnodeent(int ent) 24 | { 25 | } 26 | /*--------------------------------------------------------------------------*/ 27 | /*--------------------------------------------------------------------------*/ 28 | -------------------------------------------------------------------------------- /dnprogs/libdnet/setnodename.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) 1998 Steve Whitehouse 3 | 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #ifdef __NetBSD__ 25 | #include 26 | #endif 27 | 28 | #include "netdnet/dn.h" 29 | 30 | 31 | int setnodename(const char *name, size_t len) 32 | { 33 | FILE* procfile = fopen("/proc/sys/net/decnet/nodename", "w"); 34 | if (procfile == NULL) 35 | return -1; 36 | if (fwrite(name, 1, len, procfile) != len) 37 | { 38 | fclose(procfile); 39 | return -1; 40 | } 41 | if (fclose(procfile) == EOF) 42 | return -1; 43 | return 0; 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /dnprogs/librms/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.common 2 | 3 | LIBOBJS=open.o close.o readwrite.o getreply.o parse.o 4 | PICOBJS=open.po close.po readwrite.po getreply.po parse.po 5 | EXAMPLE1OBJS=example.o 6 | EXAMPLE2OBJS=t_example.o 7 | 8 | LIBNAME=librms 9 | LIB_MINOR_VERSION=43.0 10 | LIB_VERSION=$(MAJOR_VERSION).$(LIB_MINOR_VERSION) 11 | 12 | EXAMPLE1=example 13 | EXAMPLE2=t_example 14 | EXAMPLES=$(EXAMPLE1) $(EXAMPLE2) 15 | 16 | SHAREDLIB=$(LIBNAME).so.$(LIB_VERSION) 17 | STATICLIB=$(LIBNAME).a 18 | INCLUDEFILES=rms.h fabdef.h rabdef.h 19 | 20 | CFLAGS+=-I. -I../include -I../libdap -fdollars-in-identifiers 21 | LDFLAGS+=-Wl,-rpath-link,../libdnet -Wl,-rpath-link,../libdap 22 | 23 | all: $(STATICLIB) $(SHAREDLIB) $(EXAMPLES) 24 | 25 | $(STATICLIB): $(LIBOBJS) 26 | ar -rv $@ $^ 27 | 28 | $(SHAREDLIB): $(PICOBJS) 29 | $(CXX) $(CXXFLAGS) -shared -o $@ -Wl,-soname=$(LIBNAME).so.$(MAJOR_VERSION) $^ $(LIBS) 30 | ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR_VERSION) 31 | ln -sf $(LIBNAME).so.$(MAJOR_VERSION) $(LIBNAME).so 32 | 33 | $(EXAMPLE1): $(EXAMPLE1OBJS) $(SHAREDLIB) 34 | $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ $< -L. -lrms 35 | 36 | $(EXAMPLE2): $(EXAMPLE2OBJS) $(SHAREDLIB) 37 | $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ $< -L. -lrms 38 | 39 | .cc.o: 40 | $(CXX) $(CXXFLAGS) -c -o $@ $< 41 | 42 | .cc.po: 43 | $(CXX) $(CXXFLAGS) -fPIC -c -o $@ $< 44 | 45 | dep depend: 46 | $(CC) $(CFLAGS) -MM *.cc *.c >.depend 2>/dev/null 47 | 48 | clean: 49 | rm -f *.o *.po *.bak .depend $(STATICLIB) $(SHAREDLIB) $(LIBNAME).so* $(EXAMPLES) 50 | 51 | install: 52 | install -d $(prefix)/lib 53 | install -m 0644 $(STRIPBIN) $(SHAREDLIB) $(libprefix)$(libdir) 54 | install -m 0644 $(STATICLIB) $(libprefix)$(libdir) 55 | install -d $(prefix)/include 56 | install -m 0644 $(INCLUDEFILES) $(libprefix)/include 57 | ln -sf $(SHAREDLIB) $(libprefix)$(libdir)/$(LIBNAME).so.$(MAJOR_VERSION) 58 | ln -sf $(LIBNAME).so.$(MAJOR_VERSION) $(libprefix)$(libdir)/$(LIBNAME).so 59 | 60 | .SUFFIXES: .po 61 | 62 | ifeq (.depend,$(wildcard .depend)) 63 | include .depend 64 | endif 65 | 66 | -------------------------------------------------------------------------------- /dnprogs/librms/close.cc: -------------------------------------------------------------------------------- 1 | /* 2 | close.cc from librms 3 | 4 | Copyright (C) 1999 Christine Caulfield christine.caulfield@googlemail.com 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "connection.h" 29 | #include "protocol.h" 30 | #include "rms.h" 31 | #include "rmsp.h" 32 | 33 | int rms_close(RMSHANDLE h) 34 | { 35 | if (!h) return -1; 36 | 37 | rms_conn *rc = (rms_conn *)h; 38 | dap_connection *conn = (dap_connection *)rc->conn; 39 | 40 | dap_accomp_message ac; 41 | ac.set_cmpfunc(dap_accomp_message::CLOSE); 42 | ac.write(*conn); 43 | 44 | dap_message *m; 45 | int r = rms_getreply(h, 1, NULL, &m); 46 | 47 | conn->close(); 48 | 49 | delete conn; 50 | delete rc; 51 | 52 | return r; 53 | } 54 | 55 | 56 | // Just for consistancy 57 | int rms_t_close(RMSHANDLE h) 58 | { 59 | return rms_close(h); 60 | } 61 | -------------------------------------------------------------------------------- /dnprogs/librms/example.c: -------------------------------------------------------------------------------- 1 | /* Example librms program using the RAB/FAB functions. 2 | 3 | This program is in the public domain 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "rms.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | /* Open the file. Keep the RMSHANDLE returned */ 16 | RMSHANDLE h; 17 | 18 | h = rms_open("ford::index.dat", O_RDWR, NULL); 19 | 20 | if (h) 21 | { 22 | char b[10240]; 23 | int got; 24 | struct RAB rab; 25 | 26 | /* Clear out the rab */ 27 | memset(&rab, 0, sizeof(rab)); 28 | 29 | /* Look for the record with my name in it. */ 30 | rab.rab$b_rac = RAB$C_KEY; 31 | rab.rab$l_kbf = "CHRISSIE"; 32 | 33 | got = rms_read(h, b, sizeof(b), &rab); 34 | if (got > 0) 35 | { 36 | b[got] = '\0'; 37 | printf("Got %d bytes: %s\n", got, b); 38 | } 39 | else 40 | { 41 | fprintf(stderr, "%s\n", rms_lasterror(h)); 42 | } 43 | 44 | /* Update it */ 45 | memcpy(b+8, "????", 4); 46 | if (rms_update(h, b, got, NULL) == -1) 47 | { 48 | fprintf(stderr, "%s\n", rms_lasterror(h)); 49 | } 50 | 51 | rms_close(h); 52 | } 53 | else 54 | { 55 | fprintf(stderr, "connect: %s\n", rms_openerror()); 56 | } 57 | 58 | return 0; 59 | } 60 | -------------------------------------------------------------------------------- /dnprogs/librms/rmsp.h: -------------------------------------------------------------------------------- 1 | /* 2 | rmsp.h from librms 3 | 4 | Copyright (C) 1999 Christine Caulfield christine.caulfield@googlemail.com 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | // Private definitions for librms 22 | // If you rely on the contents of this file in your application 23 | // IT WILL BREAK when I release future versions of librms. 24 | // You have been warned! 25 | 26 | class rms_conn 27 | { 28 | public: 29 | dap_connection *conn; 30 | int lasterr; // DAP code of last error 31 | char *lasterror; // Text of last error 32 | char *record; // Temp storage for records that are too long 33 | int dlen; // Size of message 34 | char key[256]; 35 | 36 | rms_conn(dap_connection *c) 37 | { 38 | conn = c; 39 | lasterr = 0; 40 | lasterror = NULL; 41 | record = NULL; 42 | } 43 | 44 | }; 45 | 46 | int rms_getreply(RMSHANDLE h, int wait, struct FAB *fab, dap_message **msg); 47 | int check_status(rms_conn *c, dap_message *m); 48 | bool parse_options(RMSHANDLE h, char *options, struct FAB *fab, struct RAB *rab, va_list ap); 49 | 50 | -------------------------------------------------------------------------------- /dnprogs/librms/t_example.c: -------------------------------------------------------------------------------- 1 | /* Example librms program using text functions. This is the same as the 2 | example.c program but using the _t functions rather than the RAB/FAB ones. 3 | 4 | This program is in the public domain 5 | 6 | */ 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "rms.h" 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | /* Open the file. Keep the RMSHANDLE returned */ 18 | RMSHANDLE h = rms_t_open("ford::index.dat", O_RDWR, NULL); 19 | if (h) 20 | { 21 | char b[10240]; 22 | char key[256]; 23 | int keylen = 7; 24 | int got; 25 | 26 | /* Look for the record with my name in it. We don't need rac=key 27 | here because librms gives us it for free */ 28 | memcpy(key, "\0\0\0CHRISSIE\0", keylen); 29 | got = rms_t_read(h, b, sizeof(b), "ksz=%d,key=%*s,kop=kge", keylen, keylen, key); 30 | if (got > 0) 31 | { 32 | b[got] = '\0'; 33 | printf("Got %d bytes: %s\n", got, b); 34 | } 35 | else 36 | { 37 | fprintf(stderr, "Read failed: %s\n", rms_lasterror(h)); 38 | } 39 | 40 | /* Update it */ 41 | memcpy(b+8, "PATWHO?", 7); 42 | if (rms_t_update(h, b, got, NULL) == -1) 43 | { 44 | fprintf(stderr, "Update failed: %s\n", rms_lasterror(h)); 45 | } 46 | 47 | rms_t_close(h); 48 | } 49 | else 50 | { 51 | fprintf(stderr, "connect: %s\n", rms_openerror()); 52 | } 53 | 54 | return 0; 55 | } 56 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.common 2 | 3 | ARCH=$(shell uname -m) 4 | 5 | all: 6 | cd linux; $(MAKE) -f makefile.gcc 7 | 8 | clean: 9 | cd linux; $(MAKE) -f makefile.gcc clean 10 | 11 | install: 12 | install -d $(prefix)/include 13 | install -m 0644 src/convert_vax_data.h $(prefix)/include 14 | install -d $(prefix)/lib 15 | install -m0644 linux/$(ARCH)/libvaxdata.a $(libprefix)$(libdir) 16 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/contents.txt: -------------------------------------------------------------------------------- 1 | Distribution Kit Contents 2 | 3 | 4 | libvaxdata/ Top-level directory 5 | | 6 | +- contents.txt This file 7 | | 8 | +- linux/ Linux makefiles, readme.txt 9 | | | 10 | | +- makefile.gcc 11 | | +- makefile.icc 12 | | +- makefile.linux 13 | | +- makefile.pathcc 14 | | +- makefile.pgcc 15 | | +- readme.txt 16 | | 17 | +- macosx/ Apple Macintosh OS X makefiles, readme.txt 18 | | | 19 | | +- makefile.gcc 20 | | +- makefile.icc 21 | | +- makefile.macosx 22 | | +- makefile.xlc 23 | | +- readme.txt 24 | | 25 | +- of2005-1424-v1.1.pdf libvaxdata USGS Open-File Report 2005-1424, v1.2 26 | +- readme.txt Top-level readme.txt 27 | | 28 | +- solaris/ Sun Solaris makefiles, readme.txt 29 | | | 30 | | +- makefile.cc 31 | | +- makefile.gcc 32 | | +- makefile.solaris 33 | | +- readme.txt 34 | | 35 | +- src/ Source files 36 | | | 37 | | +- convert_vax_data.c 38 | | +- convert_vax_data.h 39 | | +- endian.f 40 | | +- from_vax_d8.c 41 | | +- from_vax_d8_.c 42 | | +- from_vax_g8.c 43 | | +- from_vax_g8_.c 44 | | +- from_vax_h16.c 45 | | +- from_vax_h16_.c 46 | | +- from_vax_i2.c 47 | | +- from_vax_i2_.c 48 | | +- from_vax_i4.c 49 | | +- from_vax_i4_.c 50 | | +- from_vax_r4.c 51 | | +- from_vax_r4_.c 52 | | +- is_little_endian.c 53 | | +- is_little_endian_.c 54 | | +- test.c 55 | | +- to_vax_d8.c 56 | | +- to_vax_d8_.c 57 | | +- to_vax_g8.c 58 | | +- to_vax_g8_.c 59 | | +- to_vax_h16.c 60 | | +- to_vax_h16_.c 61 | | +- to_vax_i2.c 62 | | +- to_vax_i2_.c 63 | | +- to_vax_i4.c 64 | | +- to_vax_i4_.c 65 | | +- to_vax_r4.c 66 | | +- to_vax_r4_.c 67 | | 68 | +- tru64/ HP Tru64 UNIX makefiles, readme.txt 69 | | | 70 | | +- makefile.cc 71 | | +- makefile.gcc 72 | | +- makefile.osf1 73 | | +- readme.txt 74 | | 75 | +- vms/ HP OpenVMS DCL command procedures, readme.txt 76 | | | 77 | | +- make.com 78 | | +- readme.txt 79 | | 80 | +- win32/ Microsoft Windows batch files, readme.txt 81 | | 82 | +- cwmake.bat 83 | +- readme.txt 84 | +- vcmake.bat 85 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/libvaxdata.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnForecast/LinuxDECnet/944560045e61dc8e88b2850ffa90ce443bcef0c7/dnprogs/libvaxdata/libvaxdata.pdf -------------------------------------------------------------------------------- /dnprogs/libvaxdata/linux/makefile.gcc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.gcc - Make library of functions for reading and writing VAX format 3 | # data for Linux using GNU C (gcc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.gcc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (highest level of optimization) -ansi (strict ANSI) 10 | CC = gcc 11 | CFLAGS = -O3 -ansi 12 | 13 | include makefile.linux 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/linux/makefile.icc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.icc - Make library of functions for reading and writing VAX format 3 | # data for Linux using Intel C (icc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.icc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (highest level of optimization) -ansi (strict ANSI) 10 | CC = icc 11 | CFLAGS = -O3 -ansi 12 | 13 | include makefile.linux 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/linux/makefile.pathcc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.pathcc - Make library of functions for reading and writing VAX format 3 | # data for Linux using PathScale C (pathcc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.pathcc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (highest level of optimization) -std=c89 (strict ANSI) 10 | CC = pathcc 11 | CFLAGS = -O3 -std=c89 12 | 13 | include makefile.linux 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/linux/makefile.pgcc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.pgcc - Make library of functions for reading and writing VAX format 3 | # data for Linux using Portland Group C (pgcc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.pgcc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (highest level of optimization) -Xa (strict ANSI) 10 | CC = pgcc 11 | CFLAGS = -O3 -Xa 12 | 13 | include makefile.linux 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/linux/readme: -------------------------------------------------------------------------------- 1 | Three makefiles have been provided for Linux: 2 | 3 | makefile.gcc GNU C (gcc) 4 | makefile.icc Intel C (icc) 5 | makefile.pgcc Portland Group C (pgcc) 6 | 7 | To create libvaxdata.a from here: 8 | 9 | # make -f makefile.xxx [ all | libvaxdata | clean ] 10 | 11 | substituting gcc, icc, or pgcc for xxx. The default make target is all. 12 | The library and all object files will be written to a subdirectory named 13 | for the system architecture returned by "uname -m". 14 | 15 | To link a C program with the library: 16 | 17 | # xxx -o program program.o -lvaxdata -Lhere/arch 18 | 19 | substituting gcc, icc, or pgcc for xxx, and the path to the library for 20 | here/arch (assuming it has not been moved or copied somewhere else). 21 | 22 | To link a Fortran program with the library, substitute g77, ifort, or pgf77 23 | (pgf90, pgf95) for xxx, plus the path to the library for here/arch. -------------------------------------------------------------------------------- /dnprogs/libvaxdata/linux/readme.txt: -------------------------------------------------------------------------------- 1 | Four makefiles have been provided for Linux: 2 | 3 | makefile.gcc GNU C (gcc) 4 | makefile.icc Intel C (icc) 5 | makefile.pathcc PathScale C (pathcc) 6 | makefile.pgcc Portland Group C (pgcc) 7 | 8 | To create libvaxdata.a and the test program: 9 | 10 | # make -f makefile.xxx 11 | 12 | substituting gcc, icc, pathcc, or pgcc for xxx. The default make target 13 | is all. 14 | 15 | The library and all object files will be written to a subdirectory named 16 | for the system architecture returned by "uname -m". 17 | 18 | To link a C program with the library: 19 | 20 | # xxx -o program program.o -lvaxdata -Lhere/arch 21 | 22 | substituting gcc, icc, pathcc, or pgcc for xxx, and the path to the library 23 | for here/arch (assuming it has not been moved or copied somewhere else). 24 | 25 | To link a Fortran program with the library, substitute g95, gfortran, ifort, 26 | pathf90, pathf95, pgf90, or pgf95 for xxx, plus the path to the library 27 | for here/arch. -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macos9/make.macos9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnForecast/LinuxDECnet/944560045e61dc8e88b2850ffa90ce443bcef0c7/dnprogs/libvaxdata/macos9/make.macos9 -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macos9/make.mrc: -------------------------------------------------------------------------------- 1 | # # make.mrc - Make library of functions for reading and writing VAX format data # for Macintosh PowerPC using Apple MPW C (MrC). # # MPW command syntax: make.mrc [ all | libvaxdata | clean ] # # -opt speed (optimize for speed) -ansi strict (strict ANSI) Set CC "MrC" Set CFlags "-opt speed -ansi strict" Execute make.macos9 -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macos9/make.mwcc: -------------------------------------------------------------------------------- 1 | # # make.mwcc - Make library of functions for reading and writing VAX format data # for Macintosh PowerPC using Metrowerks CodeWarrior C (mwcc). # # MPW command syntax: make.mwcc [ all | libvaxdata | clean ] # # -opt all (optimize for speed) -ansi on (strict ANSI) Set CC "mwcc" Set CFlags "-opt all -ansi on" Execute make.macos9 -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macos9/readme: -------------------------------------------------------------------------------- 1 | Two MPW scripts have been provided for Mac OS 9: make.mrc Apple/Motorola C (MrC) make.mwcc Metrowerks CodeWarrior C (mwcc) To create libvaxdata.o from here: make.xxx [ all | libvaxdata | clean ] substituting mrc or mwcc for xxx. The default make target is all. The library and all object files will be written here. Note The MPW Shell requires that the make.* files have Macintosh line endings (CR), not Unix line endings (LF) or Windows/DOS line endings (CR-LF). To link a C program with the library: PPCLink -o program program.c.o :here:libvaxdata.o substituting the path to the library for here (assuming it has not been moved or copied somewhere else). -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macosx/makefile.gcc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.gcc - Make library of functions for reading and writing VAX format 3 | # data for Macintosh OS X using GNU C (gcc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.gcc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (highest level of optimization) -ansi (strict ANSI) 10 | CC = gcc 11 | CFLAGS = -O3 -ansi 12 | 13 | include makefile.macosx 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macosx/makefile.icc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.icc - Make library of functions for reading and writing VAX format 3 | # data for Macintosh OS X using Intel C (icc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.icc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (highest level of optimization) -ansi (strict ANSI) 10 | CC = icc 11 | CFLAGS = -O3 -ansi 12 | 13 | include makefile.macosx 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macosx/makefile.xlc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.xlc - Make library of functions for reading and writing VAX format 3 | # data for Macintosh OS X using IBM XL C (xlc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.xlc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (intensive optimization) -qlanglvl=stdc89 (strict ANSI) 10 | # -D_ANSI_SOURCE (for signal.h) -D_POSIX_SOURCE (for {ppc,i386}/endian.h) 11 | CC = xlc 12 | CFLAGS = -O3 -qlanglvl=stdc89 -D_ANSI_SOURCE -D_POSIX_SOURCE 13 | 14 | include makefile.macosx 15 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macosx/readme: -------------------------------------------------------------------------------- 1 | Two makefiles have been provided for Mac OS X: 2 | 3 | makefile.gcc GNU C (gcc) 4 | makefile.xlc IBM XL C (xlc) 5 | 6 | To create libvaxdata.a from here: 7 | 8 | # make -f makefile.xxx [ all | libvaxdata | clean ] 9 | 10 | substituting gcc or xlc for xxx. The default make target is all. The 11 | library and all object files will be written to a subdirectory named for 12 | the system architecture returned by "uname -p". 13 | 14 | To link a C program with the library: 15 | 16 | # xxx -o program program.o -lvaxdata -Lhere/arch 17 | 18 | substituting gcc or xlc for xxx, and the path to the library for here/arch 19 | (assuming it has not been moved or copied somewhere else). 20 | 21 | To link a Fortran program with the library, substitute g77 or xlf (xlf90, 22 | xlf95) for xxx, plus the path to the library for here/arch. 23 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/macosx/readme.txt: -------------------------------------------------------------------------------- 1 | Three makefiles have been provided for Mac OS X: 2 | 3 | makefile.gcc GNU C (gcc) 4 | makefile.icc Intel C (icc) 5 | makefile.xlc IBM XL C (xlc) 6 | 7 | To create libvaxdata.a and the test program: 8 | 9 | # make -f makefile.xxx 10 | 11 | substituting gcc, icc or xlc for xxx. The default make target is all. 12 | 13 | The library and all object files will be written to a subdirectory named 14 | for the system architecture returned by "uname -p". 15 | 16 | To link a C program with the library: 17 | 18 | # xxx -o program program.o -lvaxdata -Lhere/arch 19 | 20 | substituting gcc, icc or xlc for xxx, and the path to the library for 21 | here/arch (assuming it has not been moved or copied somewhere else). 22 | 23 | To link a Fortran program with the library, substitute g95, gfortran, ifort, 24 | xlf90, or xlf95 for xxx, plus the path to the library for here/arch. 25 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/readme.txt: -------------------------------------------------------------------------------- 1 | See the accompanying USGS Open-File Report 2005-1424, v1.2, libvaxdata: VAX Data 2 | Format Conversion Routines, for a description of the libvaxdata routines, with 3 | sample C and Fortran code and compilation instructions. There is a readme.txt 4 | file with compilation and link instructions for each platform that has been 5 | tested, in a directory named for the platform (linux, macosx, tru64, vms, and 6 | win32). 7 | 8 | Lawrence M. Baker 9 | US Geological Survey 10 | baker@usgs.gov 11 | November 22, 2005 12 | Updated February 2, 2010 (v1.1) 13 | Updated April 15, 2010 (v1.2) 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/solaris/makefile.cc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.cc - Make library of functions for reading and writing VAX format 3 | # data for Solaris using Sun C (cc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.cc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O (standard optimization) -Xc (strict ANSI) 10 | CC = cc 11 | CFLAGS = -O -Xc 12 | 13 | include makefile.solaris 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/solaris/makefile.gcc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.gcc - Make library of functions for reading and writing VAX format 3 | # data for Solaris using GNU C (gcc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.gcc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (highest level of optimization) -ansi (strict ANSI) 10 | CC = gcc 11 | CFLAGS = -O3 -ansi 12 | 13 | include makefile.solaris 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/solaris/readme: -------------------------------------------------------------------------------- 1 | Two makefiles have been provided for Solaris: 2 | 3 | makefile.gcc GNU C (gcc) 4 | makefile.cc Sun C (cc) 5 | 6 | To create libvaxdata.a from here: 7 | 8 | # make -f makefile.xxx [ all | libvaxdata | clean ] 9 | 10 | substituting gcc or cc for xxx. The default make target is all. The 11 | library and all object files will be written to a subdirectory named 12 | for the system architecture returned by "uname -p". 13 | 14 | To link a C program program.o with the library: 15 | 16 | # xxx -o program program.o -lvaxdata -Lhere/arch 17 | 18 | substituting gcc or cc for xxx, and the path to the library for here/arch 19 | (assuming it has not been moved or copied somewhere else). 20 | 21 | To link a Fortran program with the library, substitute g77 or f77 for xxx, 22 | plus the path to the library for here/arch. 23 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/solaris/readme.txt: -------------------------------------------------------------------------------- 1 | Two makefiles have been provided for Solaris: 2 | 3 | makefile.gcc GNU C (gcc) 4 | makefile.cc Sun C (cc) 5 | 6 | To create libvaxdata.a and the test program: 7 | 8 | # make -f makefile.xxx 9 | 10 | substituting gcc or cc for xxx. The default make target is all 11 | 12 | The library and all object files will be written to a subdirectory named 13 | for the system architecture returned by "uname -p". 14 | 15 | To link a C program program.o with the library: 16 | 17 | # xxx -o program program.o -lvaxdata -Lhere/arch 18 | 19 | substituting gcc or cc for xxx, and the path to the library for here/arch 20 | (assuming it has not been moved or copied somewhere else). 21 | 22 | To link a Fortran program with the library, substitute g95, gfortran, f90, 23 | or f95 for xxx, plus the path to the library for here/arch. 24 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_d8.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module from_vax_d8 3 | #endif 4 | #define MAKE_FROM_VAX_D8 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_d8_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "from_vax_d8.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_g8.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module from_vax_g8 3 | #endif 4 | #define MAKE_FROM_VAX_G8 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_g8_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "from_vax_g8.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_h16.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module from_vax_h16 3 | #endif 4 | #define MAKE_FROM_VAX_H16 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_h16_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "from_vax_h16.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_i2.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module from_vax_i2 3 | #endif 4 | #define MAKE_FROM_VAX_I2 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_i2_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "from_vax_i2.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_i4.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module from_vax_i4 3 | #endif 4 | #define MAKE_FROM_VAX_I4 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_i4_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "from_vax_i4.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_r4.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module from_vax_r4 3 | #endif 4 | #define MAKE_FROM_VAX_R4 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/from_vax_r4_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "from_vax_r4.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/is_little_endian_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "is_little_endian.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_d8.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module to_vax_d8 3 | #endif 4 | #define MAKE_TO_VAX_D8 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_d8_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "to_vax_d8.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_g8.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module to_vax_g8 3 | #endif 4 | #define MAKE_TO_VAX_G8 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_g8_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "to_vax_g8.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_h16.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module to_vax_h16 3 | #endif 4 | #define MAKE_TO_VAX_H16 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_h16_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "to_vax_h16.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_i2.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module to_vax_i2 3 | #endif 4 | #define MAKE_TO_VAX_I2 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_i2_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "to_vax_i2.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_i4.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module to_vax_i4 3 | #endif 4 | #define MAKE_TO_VAX_I4 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_i4_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "to_vax_i4.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_r4.c: -------------------------------------------------------------------------------- 1 | #if defined( __VMS ) && defined( __DECC ) 2 | #pragma module to_vax_r4 3 | #endif 4 | #define MAKE_TO_VAX_R4 5 | #include "convert_vax_data.c" 6 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/src/to_vax_r4_.c: -------------------------------------------------------------------------------- 1 | #define APPEND_UNDERSCORE 2 | #include "to_vax_r4.c" 3 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/tru64/makefile.cc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.cc - Make library of functions for reading and writing VAX format 3 | # data for Tru64 UNIX using DEC/Compaq/HP C (cc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.cc [ all | libvaxdata | test | clean ] 8 | # 9 | # -fast (optimize for speed) -std1 (strict ANSI) 10 | CC = cc 11 | CFLAGS = -fast -std1 12 | 13 | include makefile.osf1 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/tru64/makefile.gcc: -------------------------------------------------------------------------------- 1 | # 2 | # makefile.gcc - Make library of functions for reading and writing VAX format 3 | # data for Tru64 UNIX using GNU C (gcc). 4 | # 5 | # Shell command syntax: 6 | # 7 | # make -f makefile.gcc [ all | libvaxdata | test | clean ] 8 | # 9 | # -O3 (highest level of optimization) -ansi (strict ANSI) 10 | CC = gcc 11 | CFLAGS = -O3 -ansi 12 | 13 | include makefile.osf1 14 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/tru64/readme: -------------------------------------------------------------------------------- 1 | Two makefiles have been provided for Tru64 Unix: 2 | 3 | makefile.gcc GNU C (gcc) 4 | makefile.cc DEC/Compaq/HP C (cc) 5 | 6 | To create libvaxdata.a from here: 7 | 8 | # make -f makefile.xxx [ all | libvaxdata | clean ] 9 | 10 | substituting gcc or cc for xxx. The default make target is all. The 11 | library and all object files will be written to a subdirectory named 12 | for the system architecture returned by "uname -p". 13 | 14 | To link a C program with the library: 15 | 16 | # xxx -o program program.o -lvaxdata -Lhere/arch 17 | 18 | substituting gcc or cc for xxx, and the path to the library for here/arch 19 | (assuming it has not been moved or copied somewhere else). 20 | 21 | To link a Fortran program with the library, substitute g77 or f77 (f90, 22 | f95) for xxx, plus the path to the library for here/arch. 23 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/tru64/readme.txt: -------------------------------------------------------------------------------- 1 | Two makefiles have been provided for Tru64 Unix: 2 | 3 | makefile.gcc GNU C (gcc) 4 | makefile.cc DEC/Compaq/HP C (cc) 5 | 6 | To create libvaxdata.a and the test program: 7 | 8 | # make -f makefile.xxx 9 | 10 | substituting gcc or cc for xxx. The default make target is all 11 | 12 | The library and all object files will be written to a subdirectory named 13 | for the system architecture returned by "uname -p". 14 | 15 | To link a C program with the library: 16 | 17 | # xxx -o program program.o -lvaxdata -Lhere/arch 18 | 19 | substituting gcc or cc for xxx, and the path to the library for here/arch 20 | (assuming it has not been moved or copied somewhere else). 21 | 22 | To link a Fortran program with the library, substitute g95, gfortran, f90, 23 | or f95 for xxx, plus the path to the library for here/arch. 24 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/vms/readme: -------------------------------------------------------------------------------- 1 | An OpenVMS command procedure has been provided to compile libvaxdata on either 2 | OpenVMS/VAX or OpenVMS/Alpha using DEC/Compaq/HP C. 3 | 4 | To create libvaxdata.o from here: 5 | 6 | $ @make [ all | libvaxdata | clean ] 7 | 8 | The default make target is all. The library and all object files will be 9 | written to a subdirectory named for the system architecture returned by the 10 | DCL lexical function F$GetSYI( "ARCH_NAME" ). 11 | 12 | To link a C program with the library: 13 | 14 | $ Link program,[here.arch]libvaxdata/Library 15 | 16 | substituting the path to the library for here.arch (assuming it has not been 17 | moved or copied somewhere else). 18 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/vms/readme.txt: -------------------------------------------------------------------------------- 1 | An OpenVMS command procedure has been provided to compile libvaxdata on 2 | either OpenVMS/VAX or OpenVMS/Alpha using DEC/Compaq/HP C. 3 | 4 | To create libvaxdata.obj and the test.exe program: 5 | 6 | $ @make 7 | 8 | The default make target is all. 9 | 10 | The library and all object files will be written to a subdirectory named 11 | for the system architecture returned by the DCL lexical function 12 | F$GetSYI( "ARCH_NAME" ). 13 | 14 | To link a C program with the library: 15 | 16 | $ Link program,[here.arch]libvaxdata/Library 17 | 18 | substituting the path to the library for here.arch (assuming it has not 19 | been moved or copied somewhere else). 20 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/win32/readme: -------------------------------------------------------------------------------- 1 | Two DOS Batch scripts have been provided for Windows: 2 | 3 | cwmake.bat Metrowerks CodeWarrior C (MWCC) 4 | vcmake.bat Microsoft Visual C (CL) 5 | 6 | To create libvaxdata.o from here: 7 | 8 | For Metrowerks CodeWarrior: 9 | 10 | > "C:\Program Files\Metrowerks\CodeWarrior\Other Metrowerks Tools\ 11 | Command Line Tools\CWEnv.bat" [on a single line] 12 | > cwmake.bat [ all | libvaxdata | clean ] 13 | 14 | For Microsoft Visual C++: 15 | 16 | > "C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVars32.bat" 17 | > vcmake.bat [ all | libvaxdata | clean ] 18 | 19 | Substitute the correct path to set up the compiler command-line environment for 20 | your compiler. The default make target is all. The library and all object 21 | files will be written here. 22 | 23 | To link a C program with the library: 24 | 25 | For Metrowerks CodeWarrior: 26 | 27 | > MWLD program.obj path\libvaxdata.lib 28 | 29 | For Microsoft Visual C++: 30 | 31 | > LINK program.obj path\libvaxdata.lib 32 | 33 | substituting the path to the library for here (assuming it has not been moved 34 | or copied somewhere else). 35 | -------------------------------------------------------------------------------- /dnprogs/libvaxdata/win32/readme.txt: -------------------------------------------------------------------------------- 1 | Two DOS Batch scripts have been provided for Windows: 2 | 3 | cwmake.bat Metrowerks CodeWarrior C (MWCC) 4 | vcmake.bat Microsoft Visual C (CL) 5 | 6 | To create libvaxdata.lib and the test.exe program: 7 | 8 | For Metrowerks CodeWarrior: 9 | 10 | > "C:\Program Files\Metrowerks\CodeWarrior\Other Metrowerks Tools\ 11 | Command Line Tools\CWEnv.bat" [on a single line] 12 | > cwmake.bat [ all | libvaxdata | test | clean ] 13 | 14 | For Microsoft Visual C++: 15 | 16 | > "C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVars32.bat" 17 | > vcmake.bat [ all | libvaxdata | test | clean ] 18 | 19 | Substitute the correct path to set up the compiler command-line environment for 20 | your compiler. The default make target is all. 21 | 22 | The library and all object files will be written here. 23 | 24 | To link a C program with the library: 25 | 26 | For Metrowerks CodeWarrior: 27 | 28 | > MWLD program.obj path\libvaxdata.lib 29 | 30 | For Microsoft Visual C++: 31 | 32 | > LINK program.obj path\libvaxdata.lib 33 | 34 | substituting the path to the library for here (assuming it has not been moved 35 | or copied somewhere else). 36 | -------------------------------------------------------------------------------- /dnprogs/mail/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for mail progs 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=vmsmaild 6 | PROG2=sendvmsmail 7 | 8 | UUDIR=uulib 9 | UULIB=$(UUDIR)/libuu.a 10 | LIBUU=$(UULIB) 11 | 12 | MANPAGES5=vmsmail.conf.5 13 | MANPAGES8=vmsmaild.8 sendvmsmail.8 14 | 15 | PROG1OBJS=vmsmaild.o receive.o configfile.o 16 | PROG2OBJS=sendvmsmail.o configfile.o 17 | 18 | CDEFS+=-I$(UUDIR) -DPROTOTYPES 19 | CFLAGS+=-fdollars-in-identifiers 20 | 21 | all: $(UULIB) $(PROG1) $(PROG2) 22 | 23 | $(UULIB): 24 | $(MAKE) -C $(UUDIR) 25 | 26 | .c.o: 27 | $(CC) $(CFLAGS) $(SYSCONF_PREFIX) -c -o $@ $< 28 | 29 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON) $(UULIB) 30 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) $(LIBUU) $(LIBDAEMON) 31 | 32 | $(PROG2): $(PROG2OBJS) $(DEPLIBDNET) $(UULIB) 33 | $(CC) $(CFLAGS) -o $@ $(PROG2OBJS) $(LIBDNET) $(LIBUU) 34 | 35 | install: 36 | install -d $(prefix)/bin 37 | install -d $(manprefix)/man/man5 38 | install -d $(manprefix)/man/man8 39 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/sbin 40 | install -m 0755 $(STRIPBIN) $(PROG2) $(prefix)/sbin 41 | install -m 0644 $(MANPAGES5) $(manprefix)/man/man5 42 | install -m 0644 $(MANPAGES8) $(manprefix)/man/man8 43 | 44 | dep depend: 45 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 46 | 47 | clean: 48 | rm -f $(PROG1) $(PROG2) *.o *.bak .depend 49 | $(MAKE) -C $(UUDIR) clean 50 | 51 | 52 | ifeq (.depend,$(wildcard .depend)) 53 | include .depend 54 | endif 55 | -------------------------------------------------------------------------------- /dnprogs/mail/configfile.h: -------------------------------------------------------------------------------- 1 | /* configfile.h */ 2 | #ifdef __cplusplus 3 | extern "C" 4 | { 5 | #endif 6 | void read_configfile(void); 7 | 8 | extern char config_hostname[1024]; 9 | extern char config_vmsmailuser[1024]; 10 | extern char config_smtphost[1024]; 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | -------------------------------------------------------------------------------- /dnprogs/mail/receive.h: -------------------------------------------------------------------------------- 1 | void receive_mail(int); 2 | -------------------------------------------------------------------------------- /dnprogs/mail/sendvmsmail.8: -------------------------------------------------------------------------------- 1 | .TH SENDVMSMAIL 8 "November 29 2023" "DECnet utilities" 2 | 3 | .SH NAME 4 | sendvmsmail \- mail forwarder for DECnet 5 | .SH SYNOPSIS 6 | .B sendvmsmail 7 | .SH DESCRIPTION 8 | .PP 9 | .B sendvmsmail 10 | Is the mail forwarding program that sends Unix mail messages to VMSmail on an OpenVMS(R) 11 | System. It should be the default destination of the "vmsmail" user. The usual way to do this 12 | is to create a .forward file in that user's home directory with the following contents: 13 | 14 | | /usr/sbin/sendvmsmail 15 | 16 | By default, sendvmsmail will use an older version of the mail-11 protocol. If 17 | you wish to use the latest version, mail11v3, add a "-3" switch to the above 18 | command: 19 | 20 | | /usr/sbin/sendvmsmail -3 21 | 22 | .SH SEE ALSO 23 | .BR vmsmaild "(8), " dnetd "(8), " dnetd.conf "(5) 24 | -------------------------------------------------------------------------------- /dnprogs/mail/uulib/acconfig.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * needed for auto configuration 4 | * $Id: acconfig.h,v 1.2 2008/08/20 12:43:59 chrissie_c Exp $ 5 | */ 6 | 7 | /* 8 | * If your system is kinda special 9 | */ 10 | #undef SYSTEM_DOS 11 | #undef SYSTEM_QUICKWIN 12 | #undef SYSTEM_WINDLL 13 | #undef SYSTEM_OS2 14 | 15 | /* 16 | * If your system has stdin/stdout/stderr 17 | */ 18 | #undef HAVE_STDIO 19 | 20 | /* 21 | * how to declare functions that are exported from the UU library 22 | */ 23 | #undef UUEXPORT 24 | 25 | /* 26 | * how to declare functions that are exported from the fptools library 27 | */ 28 | #undef TOOLEXPORT 29 | 30 | /* 31 | * define if your compiler supports function prototypes 32 | */ 33 | #undef PROTOTYPES 34 | 35 | /* 36 | * Replacement functions. 37 | * #define strerror _FP_strerror 38 | * #define tempnam _FP_tempnam 39 | * if you don't have these functions 40 | */ 41 | #undef strerror 42 | #undef tempnam 43 | 44 | /* 45 | * your mailing program. full path and the necessary parameters. 46 | * the recepient address is added to the command line (with a leading 47 | * space) without any further options 48 | */ 49 | #undef PROG_MAILER 50 | 51 | /* 52 | * define if the mailer needs to have the subject set on the command 53 | * line with -s "Subject". Preferredly, we send the subject as a header. 54 | */ 55 | #undef MAILER_NEEDS_SUBJECT 56 | 57 | /* 58 | * define if posting is enabled. Do not edit. 59 | */ 60 | #undef HAVE_NEWS 61 | 62 | /* 63 | * your local news posting program. full path and parameters, so that 64 | * the article and all its headers are read from stdin 65 | */ 66 | #undef PROG_INEWS 67 | 68 | -------------------------------------------------------------------------------- /dnprogs/mail/uulib/uustring.awk: -------------------------------------------------------------------------------- 1 | #! /usr/bin/awk 2 | # 3 | # $Id: uustring.awk,v 1.1.1.1 2000/04/26 08:22:04 patrick Exp $ 4 | # 5 | # Extract definitions for string codes from uustring.c into uustring.h 6 | # Does this script require GAWK? 7 | # 8 | BEGIN { i=1; } 9 | /\$Id/ { 10 | match ($0, "\\$Id.*\\$"); 11 | printf ("/* extracted from %s */\n", 12 | substr ($0, RSTART+1, RLENGTH-2)); 13 | } 14 | /^[ ]*\{[ ]*S_[A-Z_]+.*\}[ ]*,[ ]*$/ { 15 | match ($0, "S_[A-Z_]+"); 16 | printf ("#define %-20s %3d\n", 17 | substr ($0, RSTART, RLENGTH), 18 | i); 19 | i++; 20 | } 21 | -------------------------------------------------------------------------------- /dnprogs/mail/uulib/uustring.h: -------------------------------------------------------------------------------- 1 | /* extracted from Id: uustring.c,v 1.2 2008/08/20 12:43:59 chrissie_c Exp */ 2 | #define S_NOT_OPEN_SOURCE 1 3 | #define S_NOT_OPEN_TARGET 2 4 | #define S_NOT_OPEN_FILE 3 5 | #define S_NOT_STAT_FILE 4 6 | #define S_SOURCE_READ_ERR 5 7 | #define S_READ_ERROR 6 8 | #define S_IO_ERR_TARGET 7 9 | #define S_WR_ERR_TARGET 8 10 | #define S_WR_ERR_TEMP 9 11 | #define S_TMP_NOT_REMOVED 10 12 | #define S_OUT_OF_MEMORY 11 13 | #define S_TARGET_EXISTS 12 14 | #define S_NOT_RENAME 13 15 | #define S_ERR_ENCODING 14 16 | #define S_STAT_ONE_PART 15 17 | #define S_PARM_CHECK 16 18 | #define S_SHORT_BINHEX 17 19 | #define S_DECODE_CANCEL 18 20 | #define S_ENCODE_CANCEL 19 21 | #define S_SCAN_CANCEL 20 22 | #define S_LOADED_PART 21 23 | #define S_NO_DATA_FOUND 22 24 | #define S_NO_BIN_FILE 23 25 | #define S_STRIPPED_SETUID 24 26 | #define S_DATA_SUSPICIOUS 25 27 | #define S_NO_TEMP_NAME 26 28 | #define S_BINHEX_SIZES 27 29 | #define S_BINHEX_BOTH 28 30 | #define S_SMERGE_MERGED 29 31 | #define S_MIME_NO_BOUNDARY 30 32 | #define S_MIME_B_NOT_FOUND 31 33 | #define S_MIME_MULTI_DEPTH 32 34 | #define S_MIME_PART_MULTI 33 35 | -------------------------------------------------------------------------------- /dnprogs/mail/vmsmail.conf.5: -------------------------------------------------------------------------------- 1 | .TH VMSMAIL.CONF 5 "30 December 1998" "DECnet for Linux" 2 | .SH NAME 3 | /etc/vmsmail.conf \- VMSmail configuration file 4 | .SH DESCRIPTION 5 | .B /etc/vmsmail.conf 6 | is an ASCII file which contains names and values of configuration variables 7 | for the VMSmail gateway programs. 8 | .PP 9 | There is one entry per line, and each line has the format: 10 | .sp 11 | .RS 12 | = 13 | .RE 14 | .sp 15 | Valid values for are 16 | .sp 17 | .RS 18 | .TP 1.0in 19 | .I hostname 20 | The name of the gateway machine (to put in the mail header). Defaults to 21 | the value returned by 22 | .B gethostname(2). 23 | .TP 24 | .I username 25 | The name of the user associated with sending mail from VMS to Linux. 26 | Defaults to vmsmail. 27 | .TP 28 | .I smtphost 29 | The name of the SMTP mail host to send mail to. If this entry is omitted 30 | them vmsmaild will send mail by running 'sendmail' on the local machine. 31 | .TP 32 | .SH EXAMPLE 33 | .nf 34 | .ft CW 35 | .in +3n 36 | hostname=myhost.domain.net 37 | username=vms 38 | .ft 39 | -------------------------------------------------------------------------------- /dnprogs/mail/vmsmaild.8: -------------------------------------------------------------------------------- 1 | .TH VMSMAILD 8 "Decembet 26 2000" "DECnet utilities" 2 | 3 | .SH NAME 4 | vmsmaild \- mail daemon for DECnet 5 | .SH SYNOPSIS 6 | .B vmsmaild 7 | [options] 8 | .br 9 | Options: 10 | .br 11 | [\-vVhfU] [\-l logtype] 12 | .SH DESCRIPTION 13 | .PP 14 | .B vmsmaild 15 | is a daemon that forwards incoming VMSmail (or mail11) message to Unix users. 16 | It should be started at system boot time (after DECnet has been started) and 17 | must be run as root. It is recommended that you run vmsmaild from 18 | .B dnetd(8) 19 | .br 20 | The options below affect the behaviour of vmsmaild. If you are using 21 | .B dnetd 22 | then these options should be specified in the 23 | .B dnetd.conf(5) 24 | file. 25 | .br 26 | 27 | .SH OPTIONS 28 | .TP 29 | .I "\-l" 30 | Set logging options. The following are available: 31 | .br 32 | .B -lm 33 | Log to /dev/mono. (only useful if you have my mono monitor driver or mdacon 34 | and a second monitor) 35 | .br 36 | .B -le 37 | Log to stderr. Use this for debugging or testing combined with 38 | .B -d. 39 | .br 40 | .B -ls 41 | Log to syslog(3). This is the default if no options are given. 42 | .TP 43 | .TP 44 | .I "\-v" 45 | Verbose. The more of these there are the more verbose vmsmaild will be. 46 | Don't use more than one for normal operation because it will seriously impair 47 | performance. 48 | .TP 49 | .I \-h \-? 50 | Displays help for using the command. 51 | .TP 52 | .I \-V 53 | Show the version of vmsmaild. 54 | .TP 55 | .I \-f 56 | Accepts mail send with the MAIL/FOREIGN command. Setting this option 57 | complicates the decoding of all mail message quite substantially because the 58 | remote end thinks it is talking to a VMS machine that understands RMS file 59 | formats. Only use this option if you really need it. 60 | .TP 61 | .I \-U 62 | Don't check that the reply user exists when starting up. If you only want to 63 | use linux as a recipient of mail from VMS systems and don't want to create a 64 | vmsmail user then set this option. See the Documentation/mail.README file 65 | for more information on setting up a mail gateway. 66 | 67 | 68 | .SH SEE ALSO 69 | .BR decnet.proxy "(5), " dnetd "(8), " dnetd.conf "(5) 70 | -------------------------------------------------------------------------------- /dnprogs/multinet/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.common 2 | 3 | all: multinet 4 | 5 | multinet: multinet.c 6 | $(CC) $(CFLAGS) $(LDFLAGS) -o multinet multinet.c 7 | 8 | 9 | install: 10 | install -d $(prefix)/sbin 11 | install -d $(manprefix)/man/man8 12 | install -m 0755 $(STRIPBIN) multinet $(prefix)/sbin 13 | install -m 0644 multinet.8 $(manprefix)/man/man8 14 | 15 | dep depend: 16 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 17 | 18 | clean: 19 | rm -f *.o *~ multinet 20 | -------------------------------------------------------------------------------- /dnprogs/ncp/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for NCP 2 | CFLAGS=-g -O0 3 | 4 | include ../Makefile.common 5 | 6 | PROG1=ncp 7 | MANPAGES1=ncp.1 8 | PROG1OBJS=ncp.o tables.o show.o nice.o network.o line.o node.o logging.o \ 9 | circuit.o module.o area.o zero.o copy.o loop.o params.o 10 | LIBS=-lreadline -lhistory 11 | 12 | all: $(PROG1) 13 | 14 | .c.o: 15 | $(CC) $(CFLAGS) $(SYSCONF_PREFIX) -c -o $@ $< 16 | 17 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) 18 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) $(LIBS) 19 | 20 | install: 21 | install -d $(prefix)/sbin 22 | install -d $(manprefix)/man/man1 23 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/sbin 24 | install -m 644 $(MANPAGES1) $(manprefix)/man/man1 25 | 26 | dep depend: 27 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 28 | 29 | clean: 30 | rm -f $(PROG1) *.o *.bak .depend 31 | 32 | ifeq (.depend,$(wildcard .depend)) 33 | include .depend 34 | endif 35 | 36 | -------------------------------------------------------------------------------- /dnprogs/ncp/area.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #ifndef __AREA_H__ 16 | #define __AREA_H__ 17 | 18 | extern void showArea(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t *); 19 | extern int parseArea(char *); 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /dnprogs/ncp/circuit.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #ifndef __CIRCUIT_H__ 16 | #define __CIRCUIT_H__ 17 | 18 | extern void showCircuit(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t *); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /dnprogs/ncp/line.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "ncp.h" 26 | #include "nice.h" 27 | 28 | void showLine( 29 | uint8_t code, 30 | uint8_t option, 31 | uint8_t infotype, 32 | uint8_t format, 33 | uint8_t display, 34 | uint8_t first, 35 | uint8_t *oneshot 36 | ) 37 | { 38 | if (display) 39 | printf("Line =\n"); 40 | 41 | printf("showLine()\n"); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /dnprogs/ncp/line.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #ifndef __LINE_H__ 16 | #define __LINE_H__ 17 | 18 | extern void showLine(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t *); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /dnprogs/ncp/logging.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "ncp.h" 26 | #include "nice.h" 27 | 28 | void showLogging( 29 | uint8_t code, 30 | uint8_t option, 31 | uint8_t infotype, 32 | uint8_t format, 33 | uint8_t display, 34 | uint8_t first, 35 | uint8_t *oneshot 36 | ) 37 | { 38 | if (display) 39 | printf("Logging = \n"); 40 | 41 | printf("showLogging()\n"); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /dnprogs/ncp/logging.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #ifndef __LOGGING_H__ 16 | #define __LOGGING_H__ 17 | 18 | extern void showLogging(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t *); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /dnprogs/ncp/module.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "ncp.h" 26 | #include "nice.h" 27 | 28 | void showModule( 29 | uint8_t code, 30 | uint8_t option, 31 | uint8_t infotype, 32 | uint8_t format, 33 | uint8_t display, 34 | uint8_t first, 35 | uint8_t *oneshot 36 | ) 37 | { 38 | if (display) 39 | printf("Module = \n"); 40 | 41 | printf("showModule()\n"); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /dnprogs/ncp/module.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #ifndef __MODULE_H__ 16 | #define __MODULE_H__ 17 | 18 | extern void showModule(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t *); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /dnprogs/ncp/node.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | (C) John Forecast john@forecast.name 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | ******************************************************************************/ 14 | 15 | #ifndef __NODE_H__ 16 | #define __NODE_H__ 17 | 18 | extern void showNode(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t *); 19 | extern int parseNode(char *); 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /dnprogs/nml/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for NML 2 | 3 | include ../Makefile.common 4 | 5 | PROG1=dnetnml 6 | MANPAGES8=dnetnml.8 7 | PROG1OBJS=main.o nice.o nml.o 8 | 9 | all: $(PROG1) 10 | 11 | .c.o: 12 | $(CC) $(CFLAGS) $(SYSCONF_PREFIX) -c -o $@ $< 13 | 14 | $(PROG1): $(PROG1OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON) 15 | $(CC) $(CFLAGS) -o $@ $(PROG1OBJS) $(LIBDNET) $(LIBDAEMON) 16 | 17 | install: 18 | install -d $(prefix)/sbin 19 | install -d $(manprefix)/man/man8 20 | install -m 0755 $(STRIPBIN) $(PROG1) $(prefix)/sbin 21 | install -m 0644 $(MANPAGES8) $(manprefix)/man/man8 22 | 23 | dep depend: 24 | $(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null 25 | 26 | clean: 27 | rm -f $(PROG1) *.o *.bak .depend 28 | 29 | 30 | ifeq (.depend,$(wildcard .depend)) 31 | include .depend 32 | endif 33 | -------------------------------------------------------------------------------- /dnprogs/nml/dnetnml.8: -------------------------------------------------------------------------------- 1 | .TH DNETNML 8 "September 3 2023" "DECnet utilities" 2 | 3 | .SH NAME 4 | dnetnml \- DECnet Network Management Listener 5 | .SH SYNOPSIS 6 | .B dnetnml 7 | [options] 8 | .br 9 | Options: 10 | .br 11 | [\-dVvh] 12 | .SH DESCRIPTION 13 | .PP 14 | .B dnetnml 15 | is a daemon that serves incoming management requests from remote systems, usually 16 | NCP in the case of VMS and RSX. It is recommended that the daemon be run from dnetd 17 | by adding the following line to /etc/dnetd.conf: 18 | 19 | .br 20 | NML 19 N,N nobody dnetnml 21 | .br 22 | 23 | .br 24 | Currently it only serves a subset of information requests. These include all 25 | forms of requests (SUMMARY, STATUS and CHARACTERISTICS) for NODES, CIRCUITS and 26 | AREAS, counter requests for NODES and zero requests for NODES. 27 | .SH OPTIONS 28 | .TP 29 | .I "\-d" 30 | Don't fork and run the background. Use this for debugging. 31 | .TP 32 | .I "\-v" 33 | Verbose. The more of these there are the more verbose dnetnml will be. Don't use 34 | more than one for normal operation because it will seriously impair 35 | performance. 36 | .TP 37 | .I \-h \-? 38 | Displays help for using the command. 39 | .TP 40 | .I \-V 41 | Show the version of dnetnml. 42 | .SH SEE ALSO 43 | .BR dnetd "(8), " dnetd.conf "(5)" 44 | -------------------------------------------------------------------------------- /dnprogs/phone/backend.h: -------------------------------------------------------------------------------- 1 | struct fd_list 2 | { 3 | int in_fd; 4 | int out_fd; 5 | char *remote_name; 6 | }; 7 | 8 | 9 | struct callback_routines 10 | { 11 | void (*new_caller)(int, int, char *, fd_callback); 12 | void (*delete_caller)(int); 13 | void (*show_error)(int, char *); 14 | void (*write_text)(char *, char*); 15 | void (*hold)(int, char *); 16 | void (*answer)(int, int); 17 | int (*get_fds)(struct fd_list *); 18 | void (*lost_server)(void); 19 | void (*open_display_window)(char *); 20 | void (*display_line)(char *); 21 | void (*quit)(void); 22 | }; 23 | 24 | 25 | void register_callbacks(struct callback_routines *new_cr); 26 | void do_command(char *cmd); 27 | void send_data(int fd, char *text, int len); 28 | char *get_local_name(void); 29 | void close_connection(int); 30 | void send_hold(int held, int fd); 31 | void localsock_callback(int fd); 32 | int init_backend(void); 33 | void cancel_dial(void); 34 | -------------------------------------------------------------------------------- /dnprogs/phone/common.h: -------------------------------------------------------------------------------- 1 | /* Common definitions for phone client and server processes */ 2 | 3 | /* This is the name of the socket used to communicte between the 4 | server and user processes - the user's name is appended to this 5 | string 6 | */ 7 | #define SOCKETNAME "/var/run/phoned" 8 | 9 | /* Phone network commands - ie the first byte of a packet read from 10 | the phone client or sent by the phone server. 11 | 12 | The names are mine - the numbers were got fron snooping the 13 | network connection. 14 | */ 15 | #define PHONE_REPLYOK 0x01 16 | #define PHONE_REPLYNOUSER 0x06 17 | #define PHONE_CONNECT 0x07 18 | #define PHONE_DIAL 0x08 19 | #define PHONE_HANGUP 0x09 20 | #define PHONE_UNSURE 0x0a // Something to do with error recovery 21 | #define PHONE_ANSWER 0x0b 22 | #define PHONE_REJECT 0x0c 23 | #define PHONE_GOODBYE 0x0d 24 | #define PHONE_DATA 0x0e 25 | #define PHONE_DIRECTORY 0x0f 26 | #define PHONE_HOLD 0x12 27 | #define PHONE_UNHOLD 0x13 28 | 29 | /* DECnet phone object number */ 30 | #define PHONE_OBJECT 29 31 | 32 | /* Needed for libc5 systems */ 33 | #ifndef CMSG_DATA 34 | # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) 35 | #endif 36 | -------------------------------------------------------------------------------- /dnprogs/phone/phone.h: -------------------------------------------------------------------------------- 1 | typedef int (*fd_callback) (int); 2 | -------------------------------------------------------------------------------- /dnprogs/phone/phone_gtk.h: -------------------------------------------------------------------------------- 1 | void gtkphone_backend_init(void); 2 | void write_typed_text(char *text); 3 | -------------------------------------------------------------------------------- /dnprogs/phone/phone_ncurses.h: -------------------------------------------------------------------------------- 1 | 2 | int ncurses_init(char); 3 | int ncurses_run(char *); 4 | -------------------------------------------------------------------------------- /dnprogs/phone/phone_server.h: -------------------------------------------------------------------------------- 1 | void new_phone_connection(int insock, int verbosity); 2 | void accept_unix(int entry); 3 | void accept_decnet(int entry); 4 | void read_unix(int entry); 5 | void read_decnet(int entry); 6 | -------------------------------------------------------------------------------- /dnprogs/phone/phoned.8: -------------------------------------------------------------------------------- 1 | .TH PHONED 8 "March 26 1999" "DECnet utilities" 2 | 3 | .SH NAME 4 | phoned \- DECnet phone server daemon 5 | .SH SYNOPSIS 6 | .B phoned 7 | [options] 8 | .br 9 | Options: 10 | .br 11 | [\-dvVh] [\-u user] 12 | .SH DESCRIPTION 13 | .PP 14 | .B phoned 15 | is a daemon that serves phone clients. It must be running for any users 16 | to the phone command. 17 | .SH OPTIONS 18 | .TP 19 | .I "\-u" 20 | Specifies the username that 21 | .B phoned 22 | runs as. By default this is "nobody". If this user does not exist then 23 | phoned will run as root which could be a security hole. 24 | .br 25 | NOTE that phoned must be started as root to allow it to bind to the phone 26 | DECnet object. 27 | .TP 28 | .I "\-d" 29 | Don't fork and run the background. Use this for debugging. 30 | .TP 31 | .I "\-v" 32 | Verbose. The more of these there are the more verbose phoned will be. Don't 33 | use more than one for normal operation because it will seriously impair 34 | performance. 35 | .TP 36 | .I \-h \-? 37 | Displays help for using the command. 38 | .TP 39 | .I \-V 40 | Show the version of phoned. 41 | 42 | 43 | .SH SEE ALSO 44 | .BR phone "(1)" 45 | -------------------------------------------------------------------------------- /dnprogs/phone/phoned.h: -------------------------------------------------------------------------------- 1 | #define MAX_CONNECTIONS 100 2 | typedef enum {INACTIVE=0, DECNET_RENDEZVOUS, UNIX_RENDEZVOUS, UNIX, DECNET} sock_type; 3 | 4 | struct fd_array 5 | { 6 | int fd; 7 | char local_user[64]; // node::user in CAPS 8 | char local_login[64]; // user in lower 9 | char remote_user[32]; // remote node::user in CAPS 10 | sock_type type; 11 | }; 12 | 13 | extern struct fd_array fdarray[MAX_CONNECTIONS]; 14 | -------------------------------------------------------------------------------- /dnprogs/phone/pixmaps/exit.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *exit[] = { 3 | /* width height num_colors chars_per_pixel */ 4 | " 32 32 4 1", 5 | /* colors */ 6 | ". c #b2c0dc", 7 | "# c #000000", 8 | "a c #ffffff", 9 | "b c #8b0000", 10 | /* pixels */ 11 | "................................", 12 | "................................", 13 | "..............#################.", 14 | "..............#################.", 15 | "..............##aaaaaaaaaaa####.", 16 | "..............##aaaaaaaaaaa####.", 17 | "..............##aaaaaaaaaaa####.", 18 | "..............##aaaaaaaaaaa####.", 19 | "..........######aaaaaaaaaaa####.", 20 | "..........######aaaaaaaaaaa####.", 21 | "..........##bb##aaaaaaaaaaa####.", 22 | "..........##bb##aaaaaaaaaaa####.", 23 | "############bbbb#aaaa####aa####.", 24 | "############bbbb#aaaa####aa####.", 25 | "##bbbbbbbbbbbbbbb##aa####aa####.", 26 | "##bbbbbbbbbbbbbbb##aa####aa####.", 27 | "##bbbbbbbbbbbbbbb##aaaaaaaa####.", 28 | "############bbbb#aaaaaaaaaa####.", 29 | "############bbbb#aaaaaaaaaa####.", 30 | "..........##bb##aaaaaaaaaaa####.", 31 | "..........##bb##aaaaaaaaaaa####.", 32 | "..........######aaaaaaaaaaa####.", 33 | "..........######aaaaaaaaaaa####.", 34 | "..............##aaaaaaa########.", 35 | "..............##aaaaaaa########.", 36 | "..............##aaa############.", 37 | "..............##aaa############.", 38 | "..............#################.", 39 | "..............#################.", 40 | "................................", 41 | "................................", 42 | "................................" 43 | }; 44 | -------------------------------------------------------------------------------- /dnprogs/phone/pixmaps/facsimile.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *fax[] = { 3 | /* width height num_colors chars_per_pixel */ 4 | " 32 32 31 1", 5 | /* colors */ 6 | ". c #ffffff", 7 | "# c #fffff7", 8 | "a c #fff7f7", 9 | "b c #ffefef", 10 | "c c #f7f1f7", 11 | "d c #f6efef", 12 | "e c #ffe7ef", 13 | "f c #f5e6ef", 14 | "g c #f1dfe5", 15 | "h c #e5d7e1", 16 | "i c #e1ced3", 17 | "j c #d2c3ca", 18 | "k c #c7b1bf", 19 | "l c #baa2ae", 20 | "m c #ac9cad", 21 | "n c #aa95a4", 22 | "o c #a58c9c", 23 | "p c #9b8c9b", 24 | "q c #978394", 25 | "r c #977e88", 26 | "s c #897787", 27 | "t c #836b7f", 28 | "u c #79606e", 29 | "v c #665363", 30 | "w c #5a4658", 31 | "x c #493e54", 32 | "y c #4c3949", 33 | "z c #423444", 34 | "A c #2f2a4a", 35 | "B c #2f283b", 36 | "C c #1c1c00", 37 | /* pixels */ 38 | "................................", 39 | "...........dtBA.................", 40 | "...........AAAAhm...............", 41 | "...........BzxzAA...............", 42 | "...........jAzABA...............", 43 | "............AAABAd..............", 44 | "............BAABAv..............", 45 | "............xBzxwtlkkk..........", 46 | ".........hnttvxxvniiigdi........", 47 | "....jlkkjjjjrvwtol.ghjhii.......", 48 | "...lvhjiiigafknqqrlbdhhha.......", 49 | "...wkt.dffghgad.....a.aand......", 50 | "...vnhohgfhf.......a.aafjad.....", 51 | "...vvhli.l.......aeeefgda..g....", 52 | "..fvvtgv.q...g..afb....e.fc.....", 53 | "..hulwgf..r........fv..hgafgc...", 54 | "..agdvyfgd.gg..laqrl.....eif.c..", 55 | ".ivdckzikr..ff..i....e#..hgcff..", 56 | "..y.aczwcw...f.d....c........jf.", 57 | "..ctcaagacr.a.ba.i.c.f....lnlld.", 58 | "...w....u.v..bh.a.....goonnnlpl.", 59 | "....l...w.oo......kqpponnnnlpql.", 60 | "....w....y.vooopoqononltzzzBBrm.", 61 | "....u...By.noooooonuzyzyBzyyBom.", 62 | "....rk.hsxtpnnnvBBzyBzyyyxywunn.", 63 | "....luvymwtqopBzzzzyyyxwunpqnno.", 64 | ".....j.lwwtqptyyzyuwtnnroqtmph..", 65 | ".....zhgyxtqnwwvppsuqnsqnpptq...", 66 | ".....sn..ytprpqsqqvttqqqqqif....", 67 | "......v...tqqqpqsssssld.....g...", 68 | "......t...uqsstttrd....c...ci...", 69 | "...........tpkj.........cc......" 70 | }; 71 | -------------------------------------------------------------------------------- /dnprogs/phone/pixmaps/help.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * help_xpm[] = { 3 | "30 27 54 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #1E1E1E", 7 | "@ c #696969", 8 | "# c #A5A5A5", 9 | "$ c #D1D1D1", 10 | "% c #EEEEEE", 11 | "& c #FDFDFD", 12 | "* c #464646", 13 | "= c #B6B6B6", 14 | "- c #FFFFFF", 15 | "; c #0E0E0E", 16 | "> c #A9A9A9", 17 | ", c #202020", 18 | "' c #E4E4E4", 19 | ") c #9C9C9C", 20 | "! c #1D1D1D", 21 | "~ c #505050", 22 | "{ c #1F1F1F", 23 | "] c #BFBFBF", 24 | "^ c #333333", 25 | "/ c #040404", 26 | "( c #585858", 27 | "_ c #727272", 28 | ": c #CBCBCB", 29 | "< c #B2B2B2", 30 | "[ c #EBEBEB", 31 | "} c #0D0D0D", 32 | "| c #FEFEFE", 33 | "1 c #F7F7F7", 34 | "2 c #878787", 35 | "3 c #CDCDCD", 36 | "4 c #BDBDBD", 37 | "5 c #686868", 38 | "6 c #D7D7D7", 39 | "7 c #242424", 40 | "8 c #EFEFEF", 41 | "9 c #606060", 42 | "0 c #767676", 43 | "a c #2D2D2D", 44 | "b c #FCFCFC", 45 | "c c #D9D9D9", 46 | "d c #5B5B5B", 47 | "e c #E7E7E7", 48 | "f c #1C1C1C", 49 | "g c #C6C6C6", 50 | "h c #8D8D8D", 51 | "i c #C8C8C8", 52 | "j c #555555", 53 | "k c #E2E2E2", 54 | "l c #AAAAAA", 55 | "m c #151515", 56 | "n c #383838", 57 | "o c #717171", 58 | " ", 59 | " .......... ", 60 | " .+@#$%&&%$#@+.. ", 61 | " .*=------------=*.. ", 62 | " ;>---------------->;.. ", 63 | " ,'-------)!!~-------'{.. ", 64 | " .]-------^.!!/!-------]... ", 65 | " (--------._--:.~-------(... ", 66 | " .<--------:----!!-------<... ", 67 | " .[-------------}!-------[... ", 68 | " .------------)}.)--------....", 69 | " .[----------/./_--------[....", 70 | " .<----------.~----------<....", 71 | " .(--------|123----------(....", 72 | " .]-------1456---------].... ", 73 | " 7-------89.0--------'{.... ", 74 | " .a------bcde------->}.... ", 75 | " .f--------------=*...... ", 76 | " .fg-----------=....... ", 77 | " ..h---------i........ ", 78 | " ..fh--------j...... ", 79 | " ...fhk------f..... ", 80 | " ....jl----km.... ", 81 | " ......nol-km... ", 82 | " ........fjn... ", 83 | " ............ ", 84 | " ......... "}; 85 | -------------------------------------------------------------------------------- /dnprogs/scripts/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for scripts 2 | # 3 | # With luck this should cope with Debian, Redhat, SuSE, Caldera & Slackware type 4 | # distributions - but no promises. 5 | # 6 | 7 | 8 | include ../Makefile.common 9 | 10 | all: 11 | 12 | 13 | install: 14 | ifndef MAKEDEB 15 | if [ -d /var/lib/dpkg ]; then \ 16 | install -Dm 0700 decnet.sh $(sysconfprefix)/etc/init.d/decnet.sh; \ 17 | elif [ -d /var/lib/YaST ]; then \ 18 | install -Dm 0700 decnet.sh $(sysconfprefix)/sbin/init.d/decnet; \ 19 | elif [ -d /var/lib/rpm ]; then \ 20 | install -Dm 0700 decnet.sh $(sysconfprefix)/etc/rc.d/init.d/decnet; \ 21 | elif [ -d /var/lib/portage ]; then \ 22 | install -Dm 0700 dnetd $(sysconfprefix)/etc/init.d/dnetd; \ 23 | install -Dm 0700 dnetconf $(sysconfprefix)/etc/conf.d/dnetd; \ 24 | else install -Dm 0700 rc.decnet $(sysconfprefix)/etc/rc.d/rc.decnet; \ 25 | fi 26 | endif 27 | install -m 0755 setup.sh $(prefix)/sbin/decnetconf 28 | install -m 0644 decnetconf.8 $(manprefix)/man/man8 29 | install -m 0755 dnetLoadModule $(prefix)/sbin 30 | install -m 0755 dnetChangeMAC $(prefix)/sbin 31 | 32 | location: 33 | $(info $(prefix)) 34 | 35 | dep depend: 36 | 37 | 38 | clean: 39 | 40 | 41 | # DO NOT DELETE THIS LINE -- make depend depends on it. 42 | -------------------------------------------------------------------------------- /dnprogs/scripts/check_kernel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Check the kernel headers available to us. 4 | # 5 | # 6 | 7 | # But not for production builds. we assume a 2.4 kernel 8 | if [ -n "$RELEASE" ] 9 | then 10 | return 0 11 | fi 12 | 13 | rm -f include/netdnet/dn.h 14 | 15 | if [ -f /usr/src/linux/include/netdnet/dn.h ] 16 | then 17 | # 18 | # Eduardo's kernel - only use dn.h if it doesn't define nodeent 19 | # (which belongs in dnetdb.h) 20 | # 21 | grep -q nodeent /usr/src/linux/include/netdnet/dn.h 22 | if [ $? = 1 ] 23 | then 24 | echo Using dn.h from Eduardo\'s kernel 25 | cp /usr/src/linux/include/netdnet/dn.h include/netdnet 26 | else 27 | echo Using dn.h from our distribution 28 | cp include/kernel/netdnet/dn.h include/netdnet 29 | fi 30 | fi 31 | 32 | if [ -f /usr/src/linux/include/linux/dn.h ] 33 | then 34 | # 35 | # Steve's kernel 36 | # 37 | echo Using dn.h from Steve\'s kernel 38 | cp /usr/src/linux/include/linux/dn.h include/netdnet 39 | fi 40 | 41 | if [ ! -f include/netdnet/dn.h ] 42 | then 43 | # 44 | # Use our fallback include file 45 | # 46 | echo Assuming 2.4+ kernel 47 | cp include/kernel/netdnet/dn.h include/netdnet 48 | fi 49 | return 0 50 | -------------------------------------------------------------------------------- /dnprogs/scripts/decnetconf.8: -------------------------------------------------------------------------------- 1 | .TH DECNETCONF 8 "January 15 2001" "DECnet utilities" 2 | 3 | .SH NAME 4 | decnetconf \- Simple configuration script for DECnet 5 | .SH SYNOPSIS 6 | .B decnetconf 7 | .SH DESCRIPTION 8 | .PP 9 | .B decnetconf 10 | Is a simple configuration tool for DECnet. It prompts you for your host (executor) 11 | name, node address and ethernet interface. It then asks for a node name in turn 12 | and writes these to a temporary file. When you have finished (by pressing enter on 13 | an empty line) the newly created file willbe copied to /etc/decnet.conf. 14 | .br 15 | This script is only really useful for the initial set up of a DECnet system, 16 | once 17 | .B /etc/decnet.conf 18 | has been populated it is easier to edit it by hand because this script will 19 | overwrite any onformation in it. 20 | 21 | 22 | .SH SEE ALSO 23 | .BR decnet.conf "(5)" 24 | -------------------------------------------------------------------------------- /dnprogs/scripts/dnetChangeMAC: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ ${EUID} -ne 0 ]]; then 4 | echo "You must be a root user to run this script" 2>&1 5 | exit 1 6 | fi 7 | 8 | if [ -e /etc/decnet.conf ]; then 9 | addr=`grep ^executor /etc/decnet.conf | tr -s " " "\t" | cut -f2` 10 | ifc=`grep ^executor /etc/decnet.conf | tr -s " " "\t" | cut -f6` 11 | 12 | area=`echo ${addr} | sed -n 's/\([0-9]*\).\([0-9]*\)/\1/p'` 13 | node=`echo ${addr} | sed -n 's/\([0-9]*\).\([0-9]*\)/\2/p'` 14 | 15 | [ -z "${area}" ] && area=0 16 | [ -z "${node}" ] && node=0 17 | 18 | if [ ${node} -le 1023 -a ${node} -ge 1 -a ${area} -le 63 -a ${area} -ge 1 ]; then 19 | num=$((${area}*1024 + ${node})) 20 | macaddr="`printf \"aa:00:04:00:%02x:%02x\" $((num%256)) $((num/256))`" 21 | 22 | ip link set dev ${ifc} address ${macaddr} 23 | exit 0 24 | fi 25 | fi 26 | exit 1 27 | 28 | -------------------------------------------------------------------------------- /dnprogs/scripts/dnetLoadModule: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ ${EUID} -ne 0 ]]; then 4 | echo "You must be a root user to run this script" 2>&1 5 | exit 1 6 | fi 7 | 8 | grep ^decnet3 /proc/modules >/dev/null 2>&1 9 | 10 | if [ $? -ne 0 ]; then 11 | node=`grep ^executor /etc/decnet.conf | tr -s " " "\t" | cut -f4` 12 | addr=`grep ^executor /etc/decnet.conf | tr -s " " "\t" | cut -f2` 13 | ifc=`grep ^executor /etc/decnet.conf | tr -s " " "\t" | cut -f6` 14 | /sbin/modprobe decnet3 dn_nodeaddr="${addr}" dn_nodename="${node}" dn_ifname="${ifc}" 15 | fi 16 | exit 0 17 | 18 | -------------------------------------------------------------------------------- /dnprogs/scripts/dnetconf: -------------------------------------------------------------------------------- 1 | # Dnetd config file for gentoo 2 | # DECnet services 3 | # Daemons to start. You may remove the ones you don't want 4 | 5 | daemons="dnetd" 6 | #daemons="dnetd phoned" 7 | 8 | # Prefix for where the progs are installed. Either /usr or /usr/local 9 | # depending on whether a certain use flag was set during emerge. 10 | 11 | prefix=/usr/local 12 | 13 | # Please set this to the same interface as the default one that 14 | # has been specified in the /etc/decnet.conf file 15 | # this is only used for the /etc/init.d/dnetd file 16 | ETHER=eth2 17 | 18 | # Interfaces to set the MAC address of. By default only the default 19 | # interface in /etc/decnet.conf will be set. If you want to setup 20 | # more interfaces for DECnet than add them here. 21 | 22 | extra_interfaces="" 23 | 24 | # DON'T EDIT THESE YET! 25 | # Various variables 26 | 27 | startendecho="" 28 | stopendecho="done." 29 | 30 | # INFORMATION ON STARTING DNETD FROM /etc/conf.d/local.start 31 | # 32 | # Here is an example from my own machine that I use to get the 33 | # service started in the bootup process 34 | 35 | # bring the interface down 36 | # ifconfig your_default_interface down 37 | 38 | # run the dnetd startup script 39 | # /etc/init.d/dnetd start 40 | 41 | # bring the interface backup 42 | # ifconfig your_default_interface up 43 | 44 | # make sure the default interface is known to the kernel 45 | # echo "your_default_interface" > /proc/sys/net/decnet/default_device 46 | 47 | # make sure this hosts node name is known to the kernel 48 | # echo "mynodename" > /proc/sys/net/decnet/node_name 49 | 50 | # echo make sure this hosts node address is known to the kernel 51 | # echo mynodeaddress > /proc/sys/net/decnet/node_address 52 | 53 | # re-add the default gateway is your gateway is set manually or is static 54 | # route add default gw default_gw 55 | 56 | # Add neighbors to the default interface with addresses of remote_node_address(1-3) 57 | # to the kernel 58 | # ip -f dnet neigh add remote_node_address1 dev default_interface 59 | # ip -f dnet neigh add remote_node_address2 dev default_interface 60 | # ip -f dnet neigh add remote_node_address3 dev default_interface 61 | 62 | -------------------------------------------------------------------------------- /dnprogs/scripts/dnetd: -------------------------------------------------------------------------------- 1 | #!/sbin/runscript 2 | # 3 | # /etc/init.d/dnetd 4 | # 5 | # Starts/Stops DECnet processes 6 | # 7 | # description: DECnet. 8 | # processname: dnetd 9 | # config: /etc/decnet.conf 10 | # 11 | # 12 | # This script should go in 13 | # /etc/init.d for Gentoo Linux 14 | # 15 | # You can install it using the following command: 16 | # 17 | # rc-update add dnetd default 18 | # 19 | # ----------------------------------------------------------------------------- 20 | # 21 | 22 | depend() { 23 | before net.${ETHER} 24 | } 25 | 26 | checkconfig() { 27 | [[ ! -f /etc/decnet.conf ]] && echo $"DECnet not started as it is not configured." && return 1 28 | 29 | # If there is no DECnet in the kernel then try to load it. 30 | [[ ! -f /proc/net/decnet ]] && modprobe decnet 31 | [[ ! -f /proc/net/decnet ]] && echo $"DECnet not started as it is not in the kernel." && return 1 32 | } 33 | 34 | start() { 35 | local myopts="/var/run/${SVCNAME}.pid" 36 | 37 | checkconfig || (echo "not checked good" && return 1) 38 | #echo -n $"Starting DECnet: " 39 | NODE=`grep executor /etc/decnet.conf| awk '{print $2}'` 40 | echo "$NODE" > /proc/sys/net/decnet/node_address 41 | CCT=`grep executor /etc/decnet.conf | awk '{print $6}'` 42 | echo "$CCT" > /proc/sys/net/decnet/default_device 43 | $prefix/sbin/setether $NODE $CCT $extra_interfaces 44 | ebegin "Starting ${SVCNAME}" 45 | 46 | for i in $daemons 47 | do 48 | echo " starting $i"; 49 | start-stop-daemon --start --startas $prefix/sbin/$i --name dnetd 50 | # echo -n $" `eval echo $startecho`" 51 | done 52 | #echo $"$startendecho" 53 | 54 | eend $? 55 | } 56 | 57 | stop() { 58 | ebegin "Stopping ${SVCNAME}" 59 | start-stop-daemon --stop --quiet --exec dnetd 60 | eend $? 61 | } 62 | 63 | reload() { 64 | ebegin "Reloading ${SVCNAME}" 65 | start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid \ 66 | --signal HUP 67 | eend $? 68 | } 69 | 70 | 71 | restart() { 72 | svc_stop 73 | svc_start 74 | eend $? 75 | } 76 | 77 | 78 | -------------------------------------------------------------------------------- /dnprogs/scripts/rc.decnet: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # rc.decnet 4 | # 5 | # Starts DECnet processes on a slackware system 6 | # 7 | # This script should go in /etc/rc.d 8 | # 9 | # This script MUST be run before TCP/IP is started unless you have a DEC 10 | # TULIP based ethernet card. 11 | # 12 | # ----------------------------------------------------------------------------- 13 | # 14 | # Daemons to start. You may remove the ones you don't want 15 | # 16 | prefix="/usr/local" 17 | daemons="dnetd phoned" 18 | 19 | # 20 | # the -hw flag to startnet tells it to set the hardware address of the ethernet 21 | # card to match the DECnet node address. You probably don't need this if you 22 | # are using the tulip or de4x5 drivers for your ethernet card. If you are 23 | # unsure just leave it as it is. 24 | # 25 | startnet="$prefix/sbin/startnet -hw" 26 | 27 | echo -n "Starting DECnet: " 28 | $startnet 29 | if [ $? != 0 ] 30 | then 31 | echo error starting socket layer. 32 | exit 1 33 | fi 34 | 35 | # 36 | # Start daemons 37 | # 38 | for i in $daemons 39 | do 40 | $prefix/sbin/$i 41 | echo -n " $i" 42 | done 43 | echo "." 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /kernel/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0 2 | 3 | # Makefile for DECnet ethernet endnode kernel module 4 | obj-m += decnet3.o 5 | 6 | decnet3-y += dnet_dev.o dnet_next.o dnet_node.o dnet_nsp.o dnet_route.o 7 | decnet3-y += dnet_sock.o dnet_sys.o dnet_timr.o dnet_trc.o dnet.o 8 | -------------------------------------------------------------------------------- /kernel/dnet_dev.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | 3 | /* 4 | * John Forecast (C) 2023 5 | * 6 | * Re-implementation of the kernel code from DECnet for Linux with the 7 | * following changes/restrictions: 8 | * 9 | * Ethernet (or WLAN) endnode only 10 | * Latent support for Phase IV Prime 11 | * Designed to be built as an external module 12 | */ 13 | 14 | #ifndef __DNET_DEV_H__ 15 | #define __DNET_DEV_H__ 16 | 17 | struct dn_device { 18 | struct net_device *dev; 19 | struct timer_list timer; 20 | char *type; 21 | struct dn_next_entry *router; 22 | uint8_t *macAddr; 23 | uint16_t t3; 24 | uint16_t t4; 25 | uint16_t hello; 26 | uint16_t listen; 27 | uint16_t multiplier; 28 | uint16_t blksize; 29 | uint8_t iinfo; 30 | }; 31 | 32 | extern struct dn_device dn_devices[2]; 33 | #define LOOPINDEX 0 34 | #define ETHINDEX 1 35 | #define LOOPDEVICE dn_devices[LOOPINDEX] 36 | #define ETHDEVICE dn_devices[ETHINDEX] 37 | 38 | extern uint8_t dn_all_endnodes[6]; 39 | extern uint8_t dn_all_routers[6]; 40 | extern uint8_t dn_hiord[6]; 41 | extern uint8_t dn_all_primertr[6]; 42 | extern uint8_t dn_unknown_dest[6]; 43 | 44 | extern char *dn_ifname; 45 | extern char *dn_nodeaddr; 46 | extern char *dn_nodename; 47 | 48 | extern int dn_dev_init(void); 49 | extern void dn_dev_exit(void); 50 | 51 | void dn_dev_timer(struct timer_list *); 52 | uint16_t mtu2blksize(struct net_device *); 53 | int dn_dev_unknown_mcast(struct sk_buff *); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /kernel/dnet_nsp.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | 3 | /* 4 | * John Forecast (C) 2023 5 | * 6 | * Re-implementation of the kernel code from DECnet for Linux with the 7 | * following changes/restrictions: 8 | * 9 | * Ethernet (or WLAN) endnode only 10 | * Latent support for Phase IV Prime 11 | * Designed to be built as an external module 12 | */ 13 | 14 | #ifndef __DNET_NSP_H__ 15 | #define __DNET_NSP_H__ 16 | 17 | int dn_nsp_rcv(struct sk_buff *); 18 | int dn_nsp_rcv_backlog(struct sock *, struct sk_buff *); 19 | 20 | unsigned long dn_nsp_persist(struct dn_scp *); 21 | void dn_nsp_xmt(struct sk_buff *); 22 | void dn_nsp_xmt_socket(struct sock *); 23 | void dn_nsp_queue_xmt(struct sock *, struct sk_buff *, gfp_t, int); 24 | 25 | void dn_nsp_xmt_ack_ci(struct sock *); 26 | void dn_nsp_xmt_ack_data(struct sock *); 27 | void dn_nsp_xmt_ack_oth(struct sock *); 28 | void dn_nsp_xmt_cc(struct sock *, gfp_t); 29 | int dn_nsp_rexmt_cc(struct sock *); 30 | void dn_nsp_xmt_ci(struct sock *, uint8_t, uint8_t); 31 | int dn_nsp_rexmt_ci(struct sock *); 32 | int dn_nsp_xmt_timeout(struct sock *); 33 | void dn_nsp_xmt_disc(struct sock *, uint8_t, uint16_t, gfp_t); 34 | void dn_nsp_return_disc(struct sk_buff *, uint8_t, uint16_t); 35 | int dn_nsp_xmt_ls(struct sock *, uint8_t, uint8_t); 36 | void dn_nsp_sched_pending(struct sock *, int); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /kernel/dnet_route.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | 3 | /* 4 | * John Forecast (C) 2023 5 | * 6 | * Re-implementation of the kernel code from DECnet for Linux with the 7 | * following changes/restrictions: 8 | * 9 | * Ethernet (or WLAN) endnode only 10 | * Latent support for Phase IV Prime 11 | * Designed to be built as an external module 12 | */ 13 | 14 | #ifndef __DNET_ROUTE_H__ 15 | #define __DNET_ROUTE_H__ 16 | 17 | #ifdef DNET_COMPAT 18 | #define dn_IVprime 0 19 | #else 20 | extern int dn_IVprime; 21 | #endif 22 | 23 | extern uint16_t decnet_address; 24 | extern uint64_t dn_rtrchange; 25 | 26 | int dn_routing_rcv(struct sk_buff *, struct net_device *, 27 | struct packet_type *, struct net_device *); 28 | void dn_routing_tx_endnode_hello(struct net_device *); 29 | int dn_routing_tx_long(struct sk_buff *, struct dn_next_entry *); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /kernel/dnet_sock.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | 3 | /* 4 | * John Forecast (C) 2023 5 | * 6 | * Re-implementation of the kernel code from DECnet for Linux with the 7 | * following changes/restrictions: 8 | * 9 | * Ethernet (or WLAN) endnode only 10 | * Latent support for Phase IV Prime 11 | * Designed to be built as an external module 12 | */ 13 | 14 | #ifndef __DNET_SOCK_H__ 15 | #define __DNET_SOCK_H__ 16 | 17 | struct dn_sock_seq_state { 18 | int bucket; 19 | }; 20 | 21 | int dn_sk_hash_sock(struct sock *); 22 | void dn_sk_unhash_sock_bh(struct sock *); 23 | void dn_sk_rehash_sock(struct sock *); 24 | struct sock *dn_sk_find_listener(struct sockaddr_dn *); 25 | struct sock *dn_sk_lookup_by_skb(struct sk_buff *); 26 | int dn_sk_port_in_use(uint16_t); 27 | uint16_t dn_sk_alloc_port(struct sock *); 28 | int dn_sk_check_duplicate(struct sk_buff *); 29 | struct sock *dn_sk_check_returned(struct sk_buff *); 30 | struct sock *dn_alloc_sock(struct net *, struct socket *, gfp_t, int); 31 | void dn_sk_destruct(struct sock *); 32 | int dn_sk_destroy_timer(struct sock *); 33 | void __init dn_sock_init(void); 34 | void __exit dn_sock_exit(void); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /kernel/dnet_sys.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | 3 | /* 4 | * John Forecast (C) 2023 5 | * 6 | * Re-implementation of the kernel code from DECnet for Linux with the 7 | * following changes/restrictions: 8 | * 9 | * Ethernet (or WLAN) endnode only 10 | * Latent support for Phase IV Prime 11 | * Designed to be built as an external module 12 | */ 13 | 14 | #ifndef __DNET_SYS_H__ 15 | #define __DNET_SYS_H__ 16 | 17 | #define DN_ASCBUF_LEN 9 18 | 19 | void dn_register_sysctl(void); 20 | void dn_unregister_sysctl(void); 21 | 22 | extern int decnet_debug_level; 23 | extern int decnet_log_malformed; 24 | extern int decnet_dlyack_seq; 25 | extern int decnet_segbufsize; 26 | extern int decnet_outgoing_timer; 27 | extern int decnet_NSPdelay; 28 | extern int decnet_NSPweight; 29 | extern int decnet_NSPretrans; 30 | extern int decnet_ACKdelay; 31 | extern int decnet_maxWindow; 32 | 33 | extern char node_name[7]; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /kernel/dnet_timr.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | 3 | /* 4 | * John Forecast (C) 2023 5 | * 6 | * Re-implementation of the kernel code from DECnet for Linux with the 7 | * following changes/restrictions: 8 | * 9 | * Ethernet (or WLAN) endnode only 10 | * Latent support for Phase IV Prime 11 | * Designed to be built as an external module 12 | */ 13 | 14 | #ifndef __DNET_TIMR_H__ 15 | #define __DNET_TIMR_H__ 16 | 17 | void dn_keepalive(struct sock *); 18 | void dn_start_slow_timer(struct sock *); 19 | void dn_stop_slow_timer(struct sock *); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /kernel/dnet_trc.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | 3 | /* 4 | * John Forecast (C) 2023 5 | * 6 | * Re-implementation of the kernel code from DECnet for Linux with the 7 | * following changes/restrictions: 8 | * 9 | * Ethernet (or WLAN) endnode only 10 | * Latent support for Phase IV Prime 11 | * Designed to be built as an external module 12 | */ 13 | 14 | #ifdef DEBUG 15 | #ifndef __DNET_TRC_H__ 16 | #define __DNET_TRC_H__ 17 | 18 | void DBGtrace(char *); 19 | void DBGtrace_bh(char *); 20 | void DBGtrace_dump(int); 21 | void DBGtrace_dump_bh(int); 22 | 23 | void __init trc_init(void); 24 | 25 | #endif 26 | #endif 27 | --------------------------------------------------------------------------------