Is there a way in the hamlib api to send a raw string of characters to the serial port? I would like to add a function to my logging program so the user can control rig functions that are not in the hamlib api- things like switching the rx antenna port, sending dvk messages, etc.

In rigctl_parse.c I see the 'w' command, but the write_block needed to do this seems to be an internal function.