Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 1999 12:08:50 +0530 (IST)
From:      "S.RadhaKrishna" <singuru@wipinfo.soft.net>
To:        freebsd-hackers@FreeBSD.ORG, linux-net@vger.rutgers.edu
Subject:   getsockopt not working??
Message-ID:  <9910121209.AA23161@tagore.wipinfo.soft.net>

next in thread | raw e-mail | index | archive | help
hi,
  I'm using getsockopt to get IP_MULTICAST_TTL. But it always returns ttl
as 0. It doesn't fail either.
Here is the call I'm using :
-----------
int get_ttl=0;
u_char ttlSize=0;
if (getsockopt(sockfd, IPPROTO_IP, IP_MULTICAST_TTL,
                   (void*)&get_ttl,(int *)&ttlSize) < 0)
     {
          printf("ttl.c:get ttl failed\n");
          perror("getsockopt");
          exit(1);
     }
----------
I used setsockopt to set ttl value. It works fine (I saw the packets on the
network using a sniffer). But getsockopt returns always 0. 
Any help on this would be appreciated.

regards
radha


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9910121209.AA23161>