	 NNTP_XMIT 	 ---------     J NNTP_XMIT is a utility used to send news items from the local  system to aM remote system using the NNTP transfer protocols. The  actual protocol used is N the local system sending "ihave" messages  to the remote system notifying thatN system of locally held message  identifier strings, to which the remote systemN will either respond  with a "please send me" string to receive the actual textO of the  relevant item, or a rejection indicating that it already has the  item. M This utility essentially makes the local system is the  active partner in the 	 transfer.   E The list of message identifier strings is set up by NEWS itself  when O performing  both ADDing of NEWS batch files or local POSTing  of news items. In M either case the NEWS.SYS file is consulted, and  if the system flag is 'n' or O 'nx', then the message identifier  string is appended into the message file for  each relevant remote  system.   K The message identifier files are, by default, organised as  sequential text H files with one identifier string per line. In most  cases this should beL adequate, but where the NEWS traffic level is  high, or the remote system isJ connected with a low bandwidth line,  there may be contention on this fileN between the NEWS writer and  the NNTP_XMIT reader. In such cases the 'nx' flagO should used in  the NEWS.SYS file, and a shared access RMS indexed file is used ) to  store the message identifier strings.    Installation ------------  O NEWS_FILES:[NEWS_DIST]NNTP_XMIT.EXE is created by the NEWSBUILD  procedure. The J installation procedure is to copy this file to the  news_manager area, andL ensure that the protection (or ACLs) on the .EXE file are such that onlt theF NEWS_MANAGER account may execute  the program. The NEW_MANAGER account) login.com should also contain  the entry:   ) 	$ NNTP_XMIT :== $ NEWS_MANAGER:NNTP_XMIT     	 Execution 	 ---------   ? The execution of NNTP_XMIT should be using a procedure such as:   : 	$ ! Obtain SYSPRV to allow reading of all NEWS item files 	$ SET PROC/PRIV=SYSPRV  	$ NNTP_XMIT command parameters      Command Parameters ------------------  < $ NNTP_XMIT [-s] [-x] [-t decnet-task] node protocol id-file#             [log-file] [debug-file]   A -s		optional parameter    is used in conjunction with the  DECnet J protocol to specify that stream input routines wshould be  used insetad ofL record-based input calls. This is only relevant  when connecting to a remoteO NNTP server running on an Ultrix  platform over DECnet. For remote VMS systems,  this option is not  required.   C -x		optional parameter      is used to spscify that the id- file is J an RMS indexed file (corresp[onding to the 'nx' flag in  the NEWS.SYS fileM entry.. If not specified sequential text read  functions will be used to read 	 the file.   K -t decnet-task	optional parameter     is used to specify the  remote DECnet K object string. By default NNTP_XMIT will attempt to  connect to the defined N task for the remote node. For remote Ultrix  DECnet NNTP servers the parameterN -t NNTP=   should be used. The  parameter is not consulted if the TCP protocol is selected.  A node		required parameter      is used to specify the name  of the O remote system. In the case of DECnet this is normally the  DECnet nodename, and N in the case of TCP, the TCP node name. An IP  address may be used instead of a
 node name.  C protocol	  required parameter     is used to specify the  transport O protocol to use. This keyword may be either DECNET or  TCP. In the case of TCP, M normally NEWSBUILD will determine which  of the supported TCP implementations K (Multinet, WIN or CMU) has  been loaded into the local system, and will use O this as the  default TCP protocol automatically. The keywords MULTINET, WIN and O CMU may be used instead of TCP. In the case of TCP the  NNTP_XMIT  process will I attempt to connect to remote TCP port 119 (the remote  NNTP_server port).   : id-file		required parameter    is the full filename of the@ mesage-identifier file to use as input to the NNTP_XMIT process.  > log-file		optional parameter    is the name of a file to whichM will be appended a one line summary of the activity of the  NNTP_XMIT process O on completion. This summary will list the number  of identifiers offered to the M remote system, the number accepted,  rejected, and the number of local lookup 	 failures.   J debug-file	optional parameter    is the name of a file which  will receiveJ a full traffic log of NNTP_XMIT. This file will  expand quite rapidly whenM processing a large batch of identifiers,  so the parmater should be used only % in a controlled testing  environment.      Logical Name Environment ------------------------  = There are two logical names which are consulted by NNTP_XMIT:    NEWS_node_TASK  N This logical name is translated if the DECnet protocol is  selected, and no -tE command parameter is used. If this logical  name is defined, then the M translation is used as the task string.  If no such logical name exists, then 0 the default string of  "TASK=NNTP" is used. e.g.  " 	$ DEFINE NEWS_EMU_TASK    "NNTP="  N will cause NNTP to use the object string "NNTP=" when connecting  to node EMU.    	 NEWS_STOP   K If defined as a /SYSTEM/EXEC logical name, NNTP_XMIT will not run,  and the L process will stop as soon as this name is defined during  execution (see the next section).     Actions  -------   J NNTP_XMIT will establish a NNTP connection to the remote system,  and thenI commence a sequence of "ihave" messages to the remote  server. The remote B server will respond with either a send text or  a reject response.  ! This process will continue until:   0 	a)  the input identifier file is fully read, or  9 	b)  5,000 message identifiers are offerred to the remote 4 	    system (this number is a compile time constant,' 	    NNTP_MAX_OFFER in NNTP_XMIT.C), or   9 	c)  the logical name 'NEWS_STOP" is defined on the local . 	    system as a /STSTEM/EXEC logical name, or  8 	d)  the remote or local system terminates the transport
 	    link.  B There are two ways in which NNTP_XMIT manages the identifier file:  L Sequential files (the default reader) are opened in read mode, and  a secondL work file NNTP_pid.tmp is opened in the same directory in  write mode. If anM item cannot be locally read, then the text will  be written to this temp file O for a subsequent retry. If the  trransfer is terminated before complete reading N of the input file,  all unofferred message identifier strings are then writtenO into  this work file. On exit the original input file is deleted, and  the work 0 file is renamed to the original input file name.  M With indexed files, NNTP_XMIT makes a sequential pass thorough the  file. All M offers (i.e. remote acceptance or remote rejection) are  followed by deletion 6 of the corresponding record from the  identifier file.     Compilation constants  ---------------------    NNTP_MAX_OFFER  H The maximum number of items to offer to the remote system in any  single. execution pass. Distribution settting is 5000.     CLIENT_TIMER  I The maximum time which the local system will wait for remote data  before L terminating the link on a timeout. The distribution value  is 250 (seconds).  
 RESP_TIMER  N The maximum time to wait when "pinging" the remote system to check  that it is4 still alive. The distribution value is 30 (seconds).     Examples --------  J $ nntp_xmit wombat.bush.au tcp news_manager_dev:[ihave_wombat]wombat.idx - 	news_manager:nntpxmit.log  E This command will contact the remote system wombat.bush.au using tcp.       & $ nntp_xmit emu decnet -s -t "NNTP=" -> 	news_manager_dev:[ihave_emu]emu.ids news_manager:nntpxmit.log  K This command will use DECnet to contact the remote Ultrix NNTP  server over  DECnet      B $ nntp_xmit koala decnet news_manager_dev:[ihave_koala]koala.ids - 	news_manager:nntpxmit.log  A This command will use DECNET to contact a remote VMS NNTP server. 