# Config file for CBX scripts
#
# Frank da Cruz, Columbia University
# Creation: Wed Nov  5 12:43:14 2008
# Last update: Thu Mar 17 10:54:49 2011 (for export)
#
# Call with argument "*" to get a list of all nodenames, or...
#
# Usage: invoked by any Kermit script that needs to access the CBX 
# as follows:
#
#   take config nodename
#
# where 'nodename' is the name of the desired CBX node from the
# list below.  If the node name is not given or not recognized,
# the entire script halts with an error status (1).
# Upon successful execution the following variables are defined
# for the given node:
#
#  site              Node name
#  telnet_ip         IP address for Telnet connection
#  telnet_username   Username for Telnet login
#  telnet_password   Password for Telnet login
#  digi_username     Username for Telnet login
#  digi_password     Password for Telnet login
#
# which can be referenced by the calling script as \m(site),
# \m(telnet_ip), etc.
#
# This file must be kept in a secure location accessible only to
# authorized users.  It is to be shared by by all CBX access scripts 
# to obtain the access and authentication information required for
# the desired CBX node.
#
# The contents of this file are Kermit commands, to be executed by
# C-Kermit 8.0 or later or Kermit 95 2.0 or later.
#
# Code starts here.

undef nodes

define xx {
# Macro to define a macro to set the parameters for the selected node.
    .nodes := \m(nodes):\%1
    .node_type = 9005
    _asg \%1 .telnet_ip := \%2
    if def \%3 .node_type := \%3
}
# Associate node names with IP address and node type
# The names (morningside, etc) are specific to Columbia
# Put your own node names.  Put real IP addresses 
# for the xxx's.  These are addresses of the reverse
# terminal servers than connect to the node's control port.

xx morningside    xxx.xxx.xxx.xxx   9005
xx bankstreet     xxx.xxx.xxx.xxx   9005
xx carltonarms    xxx.xxx.xxx.xxx   9005
xx 33w60st        xxx.xxx.xxx.xxx   9005
xx crf59st        xxx.xxx.xxx.xxx   9005
xx crflighthouse  xxx.xxx.xxx.xxx   9005
xx auduboniii     xxx.xxx.xxx.xxx   9005
xx parkerbuilding xxx.xxx.xxx.xxx   9005
xx harmonyhall    xxx.xxx.xxx.xxx   9005
xx hicom300       xxx.xxx.xxx.xxx   9006

if equ "\%1" "*" end 0
if not def \%1 exit 1 "\v(cmdfile): node name required"
if not def \m(\%1) exit 1 "Site name '\%1' unknown"

# From here on we don't fail - we're just assigning values to variables.

asg site \%1				# Do the site-specific part
do \%1

# Common or default authentication info for all 9005 nodes.
# Substitute the actual usernames and passwords for the XXX's.
# The doublequote are in case the password includes spaces.

def telnet_username XXXXXX    ; For logging into the reverse terminal server
def telnet_password "XXXXXX"

def digi_username XXXXXX      ; Ditto - second stage
def digi_password "XXXXXX"

def cbx_username XXXXXX       ; For logging in to the Rolm CBX
def cbx_password "XXXXXX"

# If some nodes have distinct prompts, login names, or passwords, handle
# the exceptions here:

switch \%1 {
 :harmonyhall
    def digi_username_prompt "HARMONY HALL UserName "
    break
 # add more switch cases here for other special cases.
}    

; Local Variables:
; comment-column:40
; comment-start:"# "
; End:

end 0 
