所有跟portmap service服务相关的函数调用都失败,什么原因?

pmap_unset函数调用失败, 返回0.

所有跟portmap service服务相关的函数调用都失败,什么原因?

	if (! pmap_unset (TESTPROG, VERSION))
	{
		fprintf (stderr, "%s", "pmap_unset error.");
		exit(1);
	}
	if (!svc_register(transp, TESTPROG, VERSION, testprog_1, IPPROTO_UDP)) {
		fprintf (stderr, "%s", "unable to register (TESTPROG, VERSION, udp).");
		exit(1);
	}
	result = svc_register(transp, TESTPROG, VERSION, testprog_1, IPPROTO_TCP);
	if (! result) {
		fprintf (stderr, "%s", "unable to register (TESTPROG, VERSION, tcp).");
		exit(1);
	}

但是我portmap服务已经启动了:

./portmap -d

./rpcinfo.exe  -p

   program vers proto   port

    100000    2   tcp    111

    100000    2   udp    111

猜你喜欢

转载自lobin.iteye.com/blog/2439743
今日推荐