c interface for message passing