getsockopt error

2018-01-11 Thread Ferenc Wágner
Dear Hurd porters,

why does

#include 
#include 

int
main (void)
{
unsigned int optval;
socklen_t optlen = sizeof optval;
int rc, s;

s = socket (AF_UNIX, SOCK_STREAM, 0);
if (s == -1) {
perror ("socket");
return 1;
}
rc = getsockopt (s, SOL_SOCKET, SO_SNDBUF, &optval, &optlen);
if (rc) {
perror ("getsockopt");
return 1;
}
if (optlen == sizeof optval) {
printf ("SNDBUF: %u\n", optval);
} else {
printf ("optlen = %ul\n", optlen);
}
return 0;
}

fail on Hurd like

wferi@exodar:~$ ./sndbuf 
getsockopt: Protocol not available

?
-- 
Thanks,
Feri



Re: getsockopt error

2018-01-11 Thread Samuel Thibault
Hello,

Ferenc Wágner, on jeu. 11 janv. 2018 16:13:21 +0100, wrote:
>   s = socket (AF_UNIX, SOCK_STREAM, 0);
>   rc = getsockopt (s, SOL_SOCKET, SO_SNDBUF, &optval, &optlen);

> getsockopt: Protocol not available

It hasn't been implemented in pflocal/ indeed. IIRC Svante started
something?  The get part should be quite easy, the set part is more
involved since that may have to wake writers.  That should be done in
S_socket_getopt and S_socket_setopt.

Samuel



Re: getsockopt error

2018-01-11 Thread Ferenc Wágner
Samuel Thibault  writes:

> Ferenc Wágner, on jeu. 11 janv. 2018 16:13:21 +0100, wrote:
>
>>  s = socket (AF_UNIX, SOCK_STREAM, 0);
>>  rc = getsockopt (s, SOL_SOCKET, SO_SNDBUF, &optval, &optlen);
>>
>> getsockopt: Protocol not available
>
> It hasn't been implemented in pflocal/ indeed. IIRC Svante started
> something?  The get part should be quite easy, the set part is more
> involved since that may have to wake writers.  That should be done in
> S_socket_getopt and S_socket_setopt.

Thanks for looking into this.
Meanwhile, what's the actual UNIX socket buffer size on Hurd?
-- 
Regards,
Feri



Re: getsockopt error

2018-01-11 Thread Samuel Thibault
Ferenc Wágner, on ven. 12 janv. 2018 00:03:21 +0100, wrote:
> Samuel Thibault  writes:
> > Ferenc Wágner, on jeu. 11 janv. 2018 16:13:21 +0100, wrote:
> >
> >>s = socket (AF_UNIX, SOCK_STREAM, 0);
> >>rc = getsockopt (s, SOL_SOCKET, SO_SNDBUF, &optval, &optlen);
> >>
> >> getsockopt: Protocol not available
> >
> > It hasn't been implemented in pflocal/ indeed. IIRC Svante started
> > something?  The get part should be quite easy, the set part is more
> > involved since that may have to wake writers.  That should be done in
> > S_socket_getopt and S_socket_setopt.
> 
> Thanks for looking into this.

(note: I didn't add it to my TODO list which is already too full)

> Meanwhile, what's the actual UNIX socket buffer size on Hurd?

libpipe/pipe.c:  new->write_limit = 16*1024;

apparently.

Samuel



Re: getsockopt error

2018-01-11 Thread Ferenc Wágner
Samuel Thibault  writes:

> Ferenc Wágner, on ven. 12 janv. 2018 00:03:21 +0100, wrote:
>
>> Samuel Thibault  writes:
>>
>>> Ferenc Wágner, on jeu. 11 janv. 2018 16:13:21 +0100, wrote:
>>>
s = socket (AF_UNIX, SOCK_STREAM, 0);
rc = getsockopt (s, SOL_SOCKET, SO_SNDBUF, &optval, &optlen);

 getsockopt: Protocol not available
>>>
>>> It hasn't been implemented in pflocal/ indeed. IIRC Svante started
>>> something?  The get part should be quite easy, the set part is more
>>> involved since that may have to wake writers.  That should be done in
>>> S_socket_getopt and S_socket_setopt.
>> 
>> Thanks for looking into this.
>
> (note: I didn't add it to my TODO list which is already too full)

I didn't even dream of that.  But you did some research to find the
answer to my question, for which I thanked you.

>> Meanwhile, what's the actual UNIX socket buffer size on Hurd?
>
> libpipe/pipe.c:  new->write_limit = 16*1024;
> apparently.

Thanks again, this might be enough for now.
-- 
Regards,
Feri



Re: getsockopt error

2018-01-11 Thread Samuel Thibault
Ferenc Wágner, on ven. 12 janv. 2018 01:25:15 +0100, wrote:
> Samuel Thibault  writes:
> > Ferenc Wágner, on ven. 12 janv. 2018 00:03:21 +0100, wrote:
> >
> >> Samuel Thibault  writes:
> >>
> >>> Ferenc Wágner, on jeu. 11 janv. 2018 16:13:21 +0100, wrote:
> >>>
>   s = socket (AF_UNIX, SOCK_STREAM, 0);
>   rc = getsockopt (s, SOL_SOCKET, SO_SNDBUF, &optval, &optlen);
> 
>  getsockopt: Protocol not available
> >>>
> >>> It hasn't been implemented in pflocal/ indeed. IIRC Svante started
> >>> something?  The get part should be quite easy, the set part is more
> >>> involved since that may have to wake writers.  That should be done in
> >>> S_socket_getopt and S_socket_setopt.
> >> 
> >> Thanks for looking into this.
> >
> > (note: I didn't add it to my TODO list which is already too full)
> 
> I didn't even dream of that.  But you did some research to find the
> answer to my question,

I didn't even research, I just vaguely remembered something and wrote it
down :)

Samuel



Bug#886972: kronosnet: FTBFS on hurd-i386: missing required SCTP headers

2018-01-11 Thread Aaron M. Ucko
Source: kronosnet
Version: 1.0-1
Severity: important
Justification: fails to build from source
User: debian-hurd@lists.debian.org
Usertags: hurd-i386

The build of kronosnet for hurd-i386 (admittedly not a release
architecture) failed:

  checking for netinet/sctp.h... no
  configure: error: "missing required SCTP headers"

Please consider restricting the package's Architecture setting
accordingly so that Hurd autobuilders don't bother trying to cover
it.  I would specify

Architecture: linux-any kfreebsd-any

giving kFreeBSD the benefit of the doubt (while its autobuilders are
out of commission) because netinet/sctp.h does exist there.

Thanks!

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu