Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* getsockopt error ( trying to build mtr )
@ 1998-03-31  5:00 Robert Sparks
  1998-04-02  5:00 ` Robert Sparks
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Sparks @ 1998-03-31  5:00 UTC (permalink / raw)



I am trying to get mtr (http://www.mkimball.org/mtr.html)
running on a DU 3.2c system. It fails as distributed. The
following short program exercises the error that is killing
it off. When run (as root of course), setsockopt returns -1
and errno is set to EACCES. What is messed up here? 

Has anyone else gotten mtr to go on 3.2 or 4.0?

RjS

-----------------------------------------------------------

#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

main()
{
   int sock;
   int rval;
   int hop=1;

   sock = socket(AF_INET,SOCK_RAW,IPPROTO_ICMP);
   if (sock==-1) {perror("socket");}
   

   rval = setsockopt(sock,IPPROTO_IP,IP_TTL,(char*)&hop,sizeof(hop));
   if (rval==-1) {perror("setsockopt");}
   
}







^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-04-02  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-31  5:00 getsockopt error ( trying to build mtr ) Robert Sparks
1998-04-02  5:00 ` Robert Sparks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox