AF_UNIX SEQPACKET/DGRAM, writable /dev overlay, uevent netlink socket; eudev packages
udevd now starts, reads its rules and listens. Still to come: the sysfs device tree and writable uevent files so a trigger has something to replay. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EVRhxi9zpdW2uDUN4FVcao
This commit is contained in:
parent
ed81f9a07a
commit
a9f8cb7e0f
7 changed files with 457 additions and 40 deletions
|
|
@ -24,10 +24,14 @@
|
|||
#define AF_NETLINK 16
|
||||
#define PF_NETLINK AF_NETLINK
|
||||
#define NETLINK_ROUTE 0
|
||||
#define NETLINK_KOBJECT_UEVENT 15
|
||||
#define UEVENT_GROUP_KERNEL 1 // what the kernel announces
|
||||
#define UEVENT_GROUP_UDEV 2 // what udevd re-announces after its rules
|
||||
|
||||
#define SOCK_STREAM 1
|
||||
#define SOCK_DGRAM 2
|
||||
#define SOCK_RAW 3
|
||||
#define SOCK_SEQPACKET 5
|
||||
|
||||
// Flags ORed into socket()'s and accept4()'s `type`/`flags` argument. Linux's
|
||||
// values, because a musl program passes Linux's constants.
|
||||
|
|
@ -337,6 +341,10 @@ struct socket {
|
|||
char data[SOCKBUF];
|
||||
uint nread, nwrite;
|
||||
|
||||
// AF_NETLINK only: which protocol, and the multicast groups bound.
|
||||
int nlproto;
|
||||
uint nlgroups;
|
||||
|
||||
// Connections waiting to be accepted, on a listener.
|
||||
struct socket *queue[NBACKLOG];
|
||||
int nqueue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue