Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: rjsparks@esl.tamu.edu (Robert Sparks)
Subject: getsockopt error ( trying to build mtr )
Date: 1998/03/31	[thread overview]
Message-ID: <6fr4ti$f6u$1@news.tamu.edu> (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");}
   
}







             reply	other threads:[~1998-03-31  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-31  5:00 Robert Sparks [this message]
1998-04-02  5:00 ` getsockopt error ( trying to build mtr ) Robert Sparks
read-only archive

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