C library interface implementation