netifd reads UCI network configuration, maintains interface state, invokes protocol handlers and exposes network.interface/network.device over ubus. This article covers startup, ifup vs reload, protocol scripts and troubleshooting.
The official examples/client.c hands a received fd to ustream_fd and parses lines in notify_read. ustream handles nonblocking I/O, edge-triggered reads, buffering and partial writes. Includes a complete TCP echo server and explains why you do not split every socket write into a state machine.
Build a minimal ubus server/client in C: ubus_connect, ubus_add_object, ubus_lookup_id, ubus_invoke, blobmsg policy, uloop and ACL pitfalls. Includes compile and run output.
Use ubus list/call to inspect objects and invoke methods, listen/send for events, and monitor to capture bus traffic. Includes a troubleshooting table for Not found, Invalid argument and Permission denied.
ubus has two models: objects/methods/signatures on the bus, and a per-call blob/blobmsg payload. The official examples/server.c and client.c demonstrate policy parsing, deferred replies and subscriptions via hello/watch/count. This article breaks down the data model and includes a PC run.
A dedicated AMX / prplOS development environment: build libubox/ubus/libamx*/amxrt/amxb_ubus from source, on a PC or as a Docker base image, with a ubus ACL (the file must be root:root 0644). Every example article then only clones and compiles on top of it.