Subject: Re: How to find socket buffer size
To: Prasanta Sadhukhan <Prasanta.Sadhukhan@Sun.COM>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 12/05/2006 08:54:25
On Tue, Dec 05, 2006 at 10:04:54AM +0530, Prasanta Sadhukhan wrote:
> 
> 
> Manuel Bouyer wrote On 12/05/06 00:48,:
> > On Mon, Dec 04, 2006 at 06:29:40PM +0530, Prasanta Sadhukhan wrote:
> > 
> >>Hi,
> >>
> >>How can I find the default maximum socket buffer size in NetBSD?
> >>For example, in Solaris it's 64KB and can be found using
> >>s = open ("/dev/udp", O_RDWR);
> >>   if (s < 0) {
> >>       return dflt;
> >>   }
> >>   strncpy (buf, "udp_max_buf", sizeof(buf));
> >>   stri.ic_cmd = ND_GET;
> >>   stri.ic_timout = 0;
> >>   stri.ic_dp = buf;
> >>   stri.ic_len = sizeof(buf);
> >>   if (ioctl (s, I_STR, &stri) < 0) {
> >>       value = dflt;
> >>   } else {
> >>       value = atoi(buf);
> >>
> >>I could not find any /dev/udp as such. Any clue?
> > 
> > 
> > I think it's:
> > sysctl kern.sbmax 
> Thanks.. I knew that but the question is how to obtain the value
> programatically?

man 3 sysctl

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
     NetBSD: 26 ans d'experience feront toujours la difference
--