Ejemplo n.º 1
0
vlFILE* GFB_open( ot_u8 id, ot_u8 mod, id_tmpl* user_id ) {
#   if ( GFB_HEAP_BYTES > 0 )
        return vl_open(VL_GFB_BLOCKID, id, mod, user_id);
#   else
        return NULL;
#   endif
}
Ejemplo n.º 2
0
vlFILE* GFB_open_su( ot_u8 id ) {
#   if ( GFB_HEAP_BYTES > 0 )
        return vl_open(VL_GFB_BLOCKID, id, VL_ACCESS_SU, NULL);
#   else
        return NULL;
#   endif
}
Ejemplo n.º 3
0
int main (void)
{
	VL_CONNECTION	*vl_conn[NUM_CONNS];
	int				ret_val;
	char			buff[VL_MAX_ERRMSG_LEN];
	unsigned int	err_code;
	int				i;

	
	for (i = 0; i <= NUM_CONNS; i++)
	{

		ret_val = vl_open(NULL, &vl_conn[i]);

		if (ret_val == VL_ERROR)
		{
			vl_get_error (vl_conn[i], &err_code);
			printf ("\nError: Connection %d rejected! %s\n", (i+1), vl_err_string(err_code));
		}
		else
		{			
			printf ("\nConnection %d accepted...", (i+1));
		
			sprintf (buff, "echo 'hi from connection %d!'", (i+1));

			ret_val = vl_exec(vl_conn[i], buff);
			
			if (ret_val != VL_OK)
			{
				printf ("\n");
				printf ("\nError: ret_val of vl_exec is %d",ret_val);
			}
		}

	}


	
	
	for (i = 0; i <= NUM_CONNS; i++)
	{
		vl_close(vl_conn[i]);
	}

	printf ("\n");
	return (0);
}
Ejemplo n.º 4
0
vlFILE* ISF_open( ot_u8 id, ot_u8 mod, id_tmpl* user_id ) {
    return vl_open(VL_ISF_BLOCKID, id, mod, user_id);
}
Ejemplo n.º 5
0
vlFILE* ISF_open_su( ot_u8 id ) {
    return vl_open(VL_ISF_BLOCKID, id, VL_ACCESS_SU, NULL);
}