Esempio n. 1
0
int main(int argc, char **argv)
{
	int ret;
	double res = 0.0;

	ret = rpc_ping("budgie", 10, 0);
	printf("ret = %d\n", ret);

	res = 0.0;
	ret = rpc_time("raven", NFS2_VERSION, RPC_PING_TCP, 10, 0, &res);
	printf("v2 tcp ret = %d, res = %f\n", ret, res);

	res = 0.0;
	ret = rpc_time("raven", NFS3_VERSION, RPC_PING_TCP, 10, 0, &res);
	printf("v3 tcp ret = %d, res = %f\n", ret, res);

	res = 0.0;
	ret = rpc_time("raven", NFS2_VERSION, RPC_PING_UDP, 10, 0, &res);
	printf("v2 udp ret = %d, res = %f\n", ret, res);

	res = 0.0;
	ret = rpc_time("raven", NFS3_VERSION, RPC_PING_UDP, 10, 0, &res);
	printf("v3 udp ret = %d, res = %f\n", ret, res);

	exit(0);
}
Esempio n. 2
0
int8_t cmd_rping(uint8_t argc, char **argv)
{
    node_id_t recipient;
    uint8_t token;
    int8_t rc;

    if (argc != 2 && argc != 3) {
        OUT("usage: rping <recipient> [<token>]\r\n");
        return NRK_ERROR;
    }

    recipient = atoi(argv[1]);
    token = argc == 3 ? atoi(argv[2]) : 0;

    nrk_led_set(led_awaiting_pong);
    rc = rpc_ping(recipient, token);
    nrk_led_clr(led_awaiting_pong);

    return rc;
}
Esempio n. 3
0
void vchan_con_ping() {
    rpc_ping();
}