aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/netlink/netlink.go
AgeCommit message (Collapse)Author
2026-03-30internal/netlink: optional recvmsg without netpollOphestra
For draining the socket receive buffer. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-30internal/netlink: set receive buffer sizeOphestra
This is done by both systemd sd-device and AOSP ueventd to improve robustness. Rosa OS will still handle ENOBUFS via coldboot but a big buffer should mitigate this as well. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-29internal/netlink: switch to recvmsg/sendmsgOphestra
These are more flexible than recvfrom/sendto. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-27internal/netlink: export generic connectionOphestra
This enables abstractions around some families to be implemented in a separate package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-25internal/netlink: optional check header as replyOphestra
Not every received message is a reply. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-25internal/netlink: expose multicast groupsOphestra
This also gets rid of the cached pid value for port since that prevents multiple sockets from being open at once. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-25internal/netlink: enlarge recvfrom bufferOphestra
This also uses an array type for the buffer since its size now uses the hardcoded value found in the kernel. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-25internal/netlink: wrap netpoll via contextOphestra
This removes netpoll boilerplate for the most common use case. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-25internal/netlink: nonblocking socket I/OOphestra
This enables use with blocking calls like when used with NETLINK_KOBJECT_UEVENT. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-23internal/netlink: make full response availableOphestra
The previous API makes it impossible to retrieve remaining messages in the current iteration. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-23internal/netlink: isolate receive methodOphestra
This enables use with epoll for receiving events only. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-16internal/netlink: generalise implementation from containerOphestra
This is useful for uevent implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>