예제 #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);
}
예제 #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;
}
예제 #3
0
파일: vchan-shim.c 프로젝트: backesj/smaccm
void vchan_con_ping() {
    rpc_ping();
}