%' %'************************************************************************ %' NAMCFG.MAC %'************************************************************************ %' %' The following macros are tools for configuring the various resources %' in the iRMX-NET Name Server. %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' 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 occurances 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))))) ;Following four lines used for configuring number of buffers %set (buffers_configured, 0 ) absolute_max_pv equ 256 max_name_len equ 16 max_extra_len equ 4096 %If (%Asm286) Then ( ) Else ( ina970_cgroup group ina970_code ns_dgroup group ns_data )Fi %';; MAX_NUMBER_OF_OBJECT (n_obj) %' %' WHERE: %' %' n_vc - The maximum number of objects that the %' Name Server can support. %*define(max_number_of_object(n_obj))( %' %' Clean up the parameters. %' %' Add 9 to the max_obj to allow for the initial entries. %' %set (n_obj_x, %cleanup(%n_obj) + 9) ) %';; MAX_LENGTH_FOR_VALUE (max_value_len) %' %' WHERE: %' %' max_value_len - The maximum length of property value. %' %*define(max_length_for_value(max_value_len))( %' %' Clean up the parameters. %' %define (max_value_len_x) (%cleanup(%max_value_len)) ) %';; NAME_SERVER_MC_ID (m1, m2, m3, m4, m5, m6) %' %' WHERE: %' %' m1 to m6 - The multicast address to be used by the Name %' Server. %' %*define(name_server_mc_id(m1,m2,m3,m4,m5,m6))( %' %' Clean up the parameters. %' %define (m1_x) (%cleanup(%m1)) %define (m2_x) (%cleanup(%m2)) %define (m3_x) (%cleanup(%m3)) %define (m4_x) (%cleanup(%m4)) %define (m5_x) (%cleanup(%m5)) %define (m6_x) (%cleanup(%m6)) %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )FI public name_mc_id even name_mc_id equ $ db %m1_x db %m2_x db %m3_x db %m4_x db %m5_x db %m6_x ina970_code ends ) %';; NAME_TSAP_ID (init_tsap, resp_tsap) %' %' WHERE: %' %' init_tsap - The TSAP ID to be used by the Name Server Initiator. %' resp_tsap - The TSAP ID to be used by the Name Server Responder. %' %*define(name_tsap_id(init_tsap, resp_tsap))( %' %' Clean up the parameters. %' %define (init_tsap_x) (%cleanup(%init_tsap)) %define (resp_tsap_x) (%cleanup(%resp_tsap)) %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public name_init_tsap, name_resp_tsap name_init_tsap dw 00%init_tsap_x name_resp_tsap dw 00%resp_tsap_x ina970_code ends ) %';; NFS_TSAP (fs_tsap, fc_tsap) %' %' WHERE: %' %' fs_tsap - The TSAP ID portion of a File Server Transport %' Address. %' %' fc_tsap - The TSAP ID portion of a File Consumer Transport %' Address. %' %*define(nfs_tsap(fs_tsap, fc_tsap))( %' %' Clean up the parameters. %' %define (fs_tsap_x) (%cleanup(%fs_tsap)) %define (fc_tsap_x) (%cleanup(%fc_tsap)) %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public fs_tsap_id, fc_tsap_id, fs_tsap_name, fc_tsap_name fs_tsap_name db 6, 'FSTSAP' fc_tsap_name db 6, 'FCTSAP' fs_tsap_id dw %fs_tsap_x fc_tsap_id dw %fc_tsap_x ina970_code ends ) %';; RETRY_TIMEOUT (time_out) %' %' WHERE: %' %' time_out - The retry timeout in 100 microsec. unit. %' %' %*define(retry_timeout(time_out))( %' %' Clean up the parameters. %' %define (time_out_x) (%cleanup(%time_out)) %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public retry_timeout retry_timeout dw %time_out_x ina970_code ends ) %';; MAX_RETRY (num) %' %' WHERE: %' %' num - The maximum number of retry. %' %' %*define(max_retry(num))( %' %' Clean up the parameters. %' %define (num_x) (%cleanup(%num)) %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public max_retry max_retry dw %num_x ina970_code ends ) %';; NUMBER_OF_IRB (n_irb) %' %' WHERE: %' %' n_irb - The number of Internal Request Blocks (IRB). %' The Name Server uses IRBs to receive name %' queries from other stations. %*define(number_of_irb(n_irb))( %' %' Clean up the parameters. %' %define (n_irb_x) (%cleanup(%n_irb)) ) %';; NUMBER_OF_BUFFERS (n_nam_buf, n_val_buf, n_ext_buf) %' %' WHERE: %' %' n_XXX_buf - Number of internal buffers. %' Used in MB2 and PCLINK only. %' Not necessary to invoke in MB1. %' %*define(number_of_buffers (n_nam_buf, n_val_buf, n_ext_buf) ) ( %' %' Clean up the parameters. %' %define (n_nam_bufx) (%cleanup(%n_nam_buf)) %define (n_val_bufx) (%cleanup(%n_val_buf)) %define (n_ext_bufx) (%cleanup(%n_ext_buf)) %set (buffers_configured, 1 ) ) %';; MAX_RESPONSES (MAX_RESP) %' %' WHERE: %' %' max_resp - The number of maximum responses initiator can handle. %' The Name Server receives multiple responses for %' GET NAME and GET VALUE on a non-unique name. %*define(max_responses(max_resp))( %' %' Clean up the parameters. %' %define (max_resp_x) (%cleanup(%max_resp)) ) %';; END_NAME_CONFIG %' %' This Macro actually allocates the previously defined %' resources. %' %*define(end_name_config)( %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )FI public max_obj, max_pv_len, len_irb_buff, max_resp_irb, max_resp public num_name_buff, num_value_buff, num_extra_buff %' %' Define the number of entries for each data structure. %' %set (len_buff_x, 100+%max_value_len_x) %IF ( not %buffers_configured ) then ( %set ( n_nam_bufx, 1) %set ( n_val_bufx, 1) %set ( n_ext_bufx, 1) )FI max_obj dw (%n_obj_x) max_pv_len dw %max_value_len_x len_irb_buff dw %len_buff_x max_resp_irb dw %n_irb_x max_resp dw %max_resp_x num_name_buff db %n_nam_bufx num_value_buff db %n_val_bufx num_extra_buff db %n_ext_bufx ina970_code ends %If (%Asm286) Then ( ns_data segment RW public ) Else ( ns_data segment public 'data' )FI public obj_area, pv_area, tx_irb_area, info_buff_area public rx_irb_area, resp_irb_area, dl_rb_area, resp_arr_area public name_buff_area, value_buff_area, extra_buff_area even obj_area equ $ db (33 * %n_obj_x) dup(?) even pv_area equ $ db (%max_value_len_x * %n_obj_x) dup(?) even tx_irb_area equ $ db (76 + %len_buff_x) dup(?) even rx_irb_area equ $ db (76 + %len_buff_x) dup(?) even resp_irb_area equ $ db (%n_irb_x * (76 + %len_buff_x)) dup(?) even info_buff_area equ $ db (4 + %max_value_len_x) dup(?) even dl_rb_area equ $ db 28 dup(?) even resp_arr_area equ $ db (6 * %max_resp_x) dup(?) even name_buff_area equ $ db (%n_nam_bufx*(max_name_len+5)) dup(?) even value_buff_area equ $ db (%n_val_bufx*(absolute_max_pv+6)) dup(?) even extra_buff_area equ $ db (%n_ext_bufx*(max_extra_len+4)) dup(?) %If (%Asm286) Then ( ns_data ends ) Else ( ns_data ends )FI ) %';; NS_LOCAL_ONLY (LOCAL_ONLY) %' %' WHERE: %' %' local_only - The flag indicating whether the name server supports %' only local object table or both local and remote %' object tables. If y then local operations alone %' are performed. Otherwise remote tables are also %' supported in name server operations. %*define(ns_local_only( type_p ))(%' %define(type)(%cleanup(%type_p))%' %' %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public local_only %if ( (%eqs(%type,Y)) or (%eqs(%type,y)) ) then(%' local_only db 0FFH ina970_code ends ) else( local_only db 00H ina970_code ends )fi ) %';; Data Link Hardware Type (hardtype) %' %' WHERE: %' %' hardtype - Data Link hardware type. Use one of the following %' values: %' %' 20H for 82586, 82596 and MIX %' 21H for SBX 586 %' %*define(dl_hardware_type (hardtype_x))( %' %' Clean up the parameters. %' %define (hardtype) (%cleanup(%hardtype_x)) %If (%Asm286) Then ( ina970_code segment Er public ) Else ( ina970_code segment public 'code' )Fi public objecthid, dl_subsys_code objecthid dw (%hardtype*100h)+2h dl_subsys_code db %hardtype ina970_code ends )