From:	ADVAX::"mcnc!VM1.NoDak.EDU!GIH900%SAO.AARNET.EDU.AU" "Geoff Huston" 16-FEB-1991 10:12:18.67
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	RE: NNTP with Multinet, access not working

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Sat, 16 Feb 91 10:11:34 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA19406 for ; Sat, 16 Feb 91 09:46:10 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA25698; Thu, 14 Feb 91 21:55:27 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9102150255.AA25698@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 4578; Thu, 14 Feb 91 20:54:54 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 7376; Thu, 14 Feb 91 20:54:46 CST
Date:         Fri, 15 Feb 91 13:53:34 EST
Reply-To: Geoff Huston <mcnc!VM1.NoDak.EDU!GIH900%SAO.AARNET.EDU.AU>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: Geoff Huston <mcnc!VM1.NoDak.EDU!GIH900%SAO.AARNET.EDU.AU>
Subject:      RE: NNTP with Multinet, access not working
X-To:         anu-news@VM1.NoDak.EDU
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
>$ run nentp_client
>Node: nodename
>Channel (DECNET, MULTINETtcp)? [DECNET]: Multi
>gethostbyaddr: error 1 200 ANU NEWS/NNTP server nodename (V6.0)
>.. Ready at Tue Feb 12 17:32:01 1991 (posting ok).
>500 command not recognized.
>exit
>500 command not recognized.
>quit
>exit
>%MULTINET-F-ECONNRESET, Connection reset by peer
>
>
>Note the error on gethostbyaddr.  The code indicates that this was written for
>WIN (which I shutter to think about).  Is there any patches or replacement
>code to make this work better with Multinet?
 
Try the following patch to nntp_tcpwinmultinet.c
 
int getremhost(remhost, remuser, unit)
  char *remhost, *remuser;
  int unit;
{
  struct hostent *hp;
  struct sockaddr name;
  int namelen;
 
  if (remuser) strcpy(remuser,"nntp");
  if (remhost) {
    namelen=sizeof(name);
    getpeername(f_i,&name,&namelen);
    hp = gethostbyaddr(&name.sa_data[2],4,AF_INET);
    if (hp == NULL) {
 
/* say nothing!
 
      fprintf (stderr,"gethostbyaddr: error %d \n",h_errno);
 
*/
      strcpy(remhost,"TCP");
      }
    else
      strcpy(remhost,hp->h_name);
    }
}
