From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,4a0892423ba465da,start X-Google-Attributes: gidfee84,public From: rjsparks@esl.tamu.edu (Robert Sparks) Subject: getsockopt error ( trying to build mtr ) Date: 1998/03/31 Message-ID: <6fr4ti$f6u$1@news.tamu.edu>#1/1 X-Deja-AN: 339516392 Organization: Energy Systems Lab, Texas A&M University NNTP-Posting-Date: 31 Mar 1998 16:16:50 GMT Newsgroups: comp.unix.osf.osf1 X-Newsposter: Pnews 4.0-test49 (12 Dec 96) 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 #include #include #include 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");} }