Subject: misc/3133: EHOSTUNREACH undocumented in manpage for sendto(2)
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/22/1997 17:56:26
>Number:         3133
>Category:       misc
>Synopsis:       EHOSTUNREACH undocumented in manpage for sendto(2)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 22 09:20:01 1997
>Originator:     Heiko W.Rupp
	Private site
>Release:        1.1
	486dx2/80, NetBSD 1.1
System: NetBSD 1.1 NetBSD 1.1 (SNERT) #64: Fri Oct 4 20:43:25 GMT+0200 1996 i386

>From the manpage:

     The call returns the number of characters sent, or -1 if an error oc-

but sendto() can also return -1 if the remote host/net was unreachable and
errno is e.g. set to: EHOSTUNREACH

	man sendto 


|    res=sendto(to->fd,buffer,len,NULL,   
|        (struct sockaddr *)&to->addr,sizeof(to->addr));
|    if(res==-1) {
|        perror("sendto: "); 
|        return (-1);
|    }

can give the following output:

|sendto: : No route to host