%' %'************************************************************************ %' niaCFG.MAC %'************************************************************************ %' %' The following macros are tools for configuring the various resources %' in iRMX-NET. %' %' This file has been introduced in Rel 3.0 of iRMX-NET. %' REVISION HISTORY %' Version Author Date Remarks %' 1.0 R.Dhesikan 05/16/88 Created %' 1.0 R.Dhesikan 05/25/88 Debugged %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' UTILITY MACROS USED BY ALL MAIN MACROS TO CLEANUP PARAMETERS %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Define strings for strip. %' %define(cr) ( ) %define(lf) ( ) %define(tab) ( ) %define(space) ( ) %' %' Strip: %' strip all occurrences of "char" string from "arg" string. %' %*define(strip(char,arg)) local str head tail (%' %' '%define(str) (%0)%' %' '%define(tail) (%arg)%' %' '%while(%nes(%tail,%0)) (%' %' '%match(head%(%char)tail) (%tail)%' %' '%define(str) (%str%head)%' %' ')%' %' '%str%' )%' %' %' Cleanup: %' strip spaces, tabs and CRLFs from string. %' %*define(cleanup(str)) (%strip(%space,%strip(%tab,%strip(%cr,%strip(%lf,%str))))) %If (%Asm286) Then ( ) Else ( ina970_cgroup group ina970_code dgroup group base_data )Fi %';; TL_ON_COMM_ENGINE %' %' This macro defines whether the transport software is running on a %' Comm Engine, e.g. iSBC 552. %' %*define(tl_on_comm_engine( type_p ))(%' %define(type)(%cleanup(%type_p))%' %' %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public tl_comm_engine %if ( (%eqs(%type,Y)) or (%eqs(%type,y)) ) then(%' tl_comm_engine db 0FFH ina970_code ends ) else( tl_comm_engine db 00H ina970_code ends )fi ) %';; NS_ON_COMM_ENGINE %' %' This macro defines whether the Name Server software is running on a %' Comm Engine, e.g. iSBC 552. %' %*define(ns_on_comm_engine( type_p ))(%' %define(type)(%cleanup(%type_p))%' %' %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public ns_comm_engine %if ( (%eqs(%type,Y)) or (%eqs(%type,y)) ) then(%' ns_comm_engine db 0FFH ina970_code ends ) else( ns_comm_engine db 00H ina970_code ends )fi ) %';; INA_NETWORK_LAYER %' %' This macro defines whether the transport software is running on a %' Comm Engine, e.g. iSBC 552. %' %*define(ina_network_layer ( type_p ))(%' %define(type)(%cleanup(%type_p))%' %' %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public ina_network ina_network db %type ina970_code ends ) %';; INA_RELEASE %' %' This macro defines whether we wish the code to use iNA release %' 2.0 request blocks. %' %*define(ina_release( type_p ))(%' %define(type)(%cleanup(%type_p))%' %' %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public ina_release_num ina_release_num db %type ina970_code ends ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies whether console error reporting is wanted or not %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(console_error_reporting( y_n_p ))(%' %' %define(y_n)(%cleanup(%y_n_p))%' %' %if ( (%eqs(%y_n,Y)) or (%eqs(%y_n,y)) ) then(%' %IF (%asm286) THEN( code segment er public )ELSE( code segment byte public 'code' )FI public err_report err_report db 0FFH )else( %IF (%asm286) THEN( code segment er public )ELSE( code segment byte public 'code' )FI public err_report err_report db 0H )fi code ends %' ) %';; BUS_TYPE %' %' This macro defines whether MULTIBUS 1 or MULTIBUS 2 is being used. %' If this parameter is set to MB2, then MULTIBUS 2 is assumed. IF set to %' PC, then PC BUS is assumed. Otherwise, MULTIBUS 1 is assumed. %*define(bus_type ( type_p ))(%' %define(type)(%cleanup(%type_p))%' %' %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public bus_version %if ( (%eqs(%type,MB2)) or (%eqs(%type,mb2)) ) then(%' bus_version db 2H ina970_code ends ) else( %if ( (%eqs(%type,PC)) or (%eqs(%type,pc)) ) then(%' bus_version db 0H ina970_code ends ) else( bus_version db 1H ina970_code ends )fi )fi ) %';; END_comm_CONFIG %' %' This Macro actually allocates the previously defined %' resources. %' %*define(end_comm_config)( %If (%Asm286) Then ( base_data segment RW public ) Else ( base_data segment public 'data' )Fi public mb2_slot_id mb2_slot_id db 0 base_data ends ) %';; INA_SUBNET_NUMBER (sn_num) %' %' WHERE: %' %' sn_num : is the subnet number configured in iNA. This will %' be used as the subnet number in datagrams transmitted %' by the Name Server. If the network layer in iNA is ES-IS, %' then the Name Server will set the subnet number in iNA to %' this value by an NMF call. %' %*define(ina_subnet_number ( sn_num_p ))(%' %define(sn_num)(%cleanup(%sn_num_p))%' %' %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public subnet_number subnet_number dw %sn_num ina970_code ends )