> * The nscd protocol does not support enumeration, so primitives such as getpwent() cannot be implemented over nscd.
Making a new, properly documented protocol, independent from That One Libc You Want To Get Rid Of Anyway, is probably a good idea.
The protocol has a version number (so no fundamental limitation), and is implemented in 500 + 170 lines of code:
https://github.com/pikhq/musl-nscd/blob/master/src/socket_ha...
https://github.com/pikhq/musl-nscd/blob/master/src/write_val...
Code isn't docs, but reading 670 lines of code is not "woefully underdocumented". Yes, a spec would be great. So, write one.
Especially since the work for the "new" protocol is the same - or is that equally underdocumented?