ctdb-protocol: Use length routines for protocol elements