The calls available through the state pointer come from the console I/O pointer within the state structure. The console I/O pointer (conio) is a structure of type ConsoleIO. It points to an entry in the console_io array that you must declare in your program. There are several predefined definitions for populating the console_io array. See the snippet from zconsole.lib below:
// ConsoleIO structure
typedef struct {
long param;
int (*open)();
void (*close)();
int (*tick)();
int (*puts)();
int (*rdUsed)();
int (*wrUsed)();
int (*wrFree)();
int (*read)();
int (*write)();
} ConsoleIO;
... (lines left out here for brevity)
// pre-defined console_io structs
#define CONSOLE_IO_SERA(param) { param, serAopen, conio_serA_close, NULL, conio_serA_puts, serArdUsed, serAwrUsed, serAwrFree, serAread, serAwrite }
#define CONSOLE_IO_SERB(param) { param, serBopen, conio_serB_close, NULL, conio_serB_puts, serBrdUsed, serBwrUsed, serBwrFree, serBread, serBwrite }
#define CONSOLE_IO_SERC(param) { param, serCopen, conio_serC_close, NULL, conio_serC_puts, serCrdUsed, serCwrUsed, serCwrFree, serCread, serCwrite }
#define CONSOLE_IO_SERD(param) { param, serDopen, conio_serD_close, NULL, conio_serD_puts, serDrdUsed, serDwrUsed, serDwrFree, serDread, serDwrite }
#define CONSOLE_IO_SERE(param) { param, serEopen, conio_serE_close, NULL, conio_serE_puts, serErdUsed, serEwrUsed, serEwrFree, serEread, serEwrite }
#define CONSOLE_IO_SERF(param) { param, serFopen, conio_serF_close, NULL, conio_serF_puts, serFrdUsed, serFwrUsed, serFwrFree, serFread, serFwrite }
#define CONSOLE_IO_TELNET(port) { port, conio_telnet_open, conio_telnet_close, conio_telnet_tick, conio_telnet_puts, conio_telnet_rdUsed, conio_telnet_wrUsed, conio_telnet_wrFree, conio_telnet_read, conio_telnet_write }
#define CONSOLE_IO_SP(channel) { (long)channel, conio_sp_open, conio_sp_close, conio_sp_tick, conio_sp_puts, conio_sp_rdUsed, conio_sp_wrUsed, conio_sp_wrFree, conio_sp_read, conio_sp_write }
This allows 9 functions to be called for each defined Console I/O type in the console_io array. If you look at any sample using Zconsole, you will find a declaration of the console_io array. This sets up which functions are to be called from the 9 function pointers available under the state->conio pointer based on connection type.