They can write a full-fledged pppd replacement, but can't just have pppd as a child process and happily control it? (May possibly need a tiny patch or two, but that's barely an issue)
I'd get it if one needs some very tight integration, but pppd is self-sufficient, fairly controllable and well-tested.
Looks like NIH syndrome to me. But maybe I'm missing something from the picture and pppd isn't a good fit. Then, okay.
Existing pppd would have to be using one of simple, forking, oneshot or idle to indicate that it is up. And quite possible they have deemed that too unreliable for whatever use case they have.
The other options would be to modify the existing pppd to use dbus or notify. And at that point they may well have gone with reimplementing the parts of ppp they need for their existing use case.
Teaching it to notify via dbus is as trivial as passing a bunch of `connect /usr/lib/networkd/ppp/ip-down`-type options or writing a simple plugin library to do dbus messaging or `sd_notify` calls. Available plugin API hooks should allow for anything necessary to have a good understanding of pppd's state and provide a good amount of control over it (link state changes, authentication, IP address negotiation, idling etc) when necessary: http://ftp.samba.org/pub/unpacked/ppp/PLUGINS
I'm almost certain there's no need to write a whole new pppd from scratch.
The docs say:
> native PPPoE library has been added to sd-network, systemd's library of light-weight networking protocols. This library will be used in a future version of networkd to enable PPPoE communication without an external pppd daemon. (emphasis mine)
Usually, it works like this - a separate entity (either as a separate daemon that talks to pppd through a pipe or as rp-pppoe.so plugin to Samba's pppd) does the PPPoE session discovery and management, then passes decapsulated PPP frames to a full-fledged PPP daemon implementation. Which is a quite large entity.
Did they implement only PPPoE part (that is, just handling encapsulated PPP frames) or systemd now has a full-fledged PPP (with all the important subprotocols like LCP, EAP, IPCP and possibly IP6CP) reimplementation?
Not like I care about systemd gaining PPP support. Heck, they want to build their own OS core - that's great. What I don't get is why rewrite things that aren't broken in the first place? (Samba's pppd may be a bit messy and has some nearly-dead stuff like IPX support, but is generally fine.)