Re: netlink socket does not accept SOCK_DGRAM

2023-01-21 Thread Alexander V. Chernikov
> On 16 Jan 2023, at 15:13, Alexander V. Chernikov wrote: > > > >> On 15 Jan 2023, at 13:09, Alexander V. Chernikov wrote: >> >>> >>> On 15 Jan 2023, at 02:26, User Ngor wrote: >>> >>> man 4 rtnetlink says: >>> >>> int socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); >>> >>> >>> >>>

Re: netlink socket does not accept SOCK_DGRAM

2023-01-16 Thread Alexander V. Chernikov
> On 16 Jan 2023, at 18:00, User Ngor wrote: > > > On 1/15/23 12:43, Alexander V. Chernikov wrote: >> The snl(3) manpage itself includes some examples, including the complete >> working program in the end >> > man snl > No manual entry for snl > > > Looks like not connected to the

Re: netlink socket does not accept SOCK_DGRAM

2023-01-16 Thread User Ngor
On 1/15/23 12:43, Alexander V. Chernikov wrote: The snl(3) manpage itself includes some examples, including the complete working program in the end     man snl     No manual entry for snl Looks like not connected to the buildworld.. -- Ihor Antonov

Re: netlink socket does not accept SOCK_DGRAM

2023-01-16 Thread Alexander V. Chernikov
> On 15 Jan 2023, at 13:09, Alexander V. Chernikov wrote: > >> >> On 15 Jan 2023, at 02:26, User Ngor wrote: >> >> man 4 rtnetlink says: >> >>int socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); >> >> >> >> The following snippet fails >> >> int fd = socket(AF_NETLINK, SOCK_DGRAM, N

Re: netlink socket does not accept SOCK_DGRAM

2023-01-15 Thread Alexander V . Chernikov
The snl(3) manpage itself includes some examples, including the complete working program in the end/Alexander15.01.2023, 16:55, "User Ngor" : It’s a bug. The manage should state SOCK_RAW, but both options should be supported, which is not the case ATM. I’ll fix it in a couple of days. Meanwhile it

Re: netlink socket does not accept SOCK_DGRAM

2023-01-15 Thread User Ngor
It’s a bug. The manage should state SOCK_RAW, but both options should be supported, which is not the case ATM. I’ll fix it in a couple of days. Meanwhile it may be worth looking into snl(3) which abstracts issues like this one. Thanks, I will take a look. Is there an example somewhere of snl

Re: netlink socket does not accept SOCK_DGRAM

2023-01-15 Thread Alexander V. Chernikov
> On 15 Jan 2023, at 02:26, User Ngor wrote: > > man 4 rtnetlink says: > > int socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); > > > > The following snippet fails > >int fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); >if (fd < 0) { >perror("Failed to open netlink so

netlink socket does not accept SOCK_DGRAM

2023-01-14 Thread User Ngor
man 4 rtnetlink says:     int socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); The following snippet fails int fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); if (fd < 0) { perror("Failed to open netlink socket"); return -1; } printf("all good\n"); close(