Follow Excellent, Success will Chase you

0%

rpc

RPC是远程过程调用(Remote Procedure Call)的缩写形式。SAP系统RPC调用的原理其实很简单,有一些类似于三层构架的C/S系统,第三方的客户程序通过接口调用SAP内部的标准或自定义函数,获得函数返回的数据进行处理后显示或打印

Since the idea of RPC goes back to 1976 and the first business use was by Xerox in 1981, I’m not exactly sure what qualifies as a really old tutorial.

Here are a few resources you might find helpful.

rpcgen

1
2
$rpcgen --version
rpcgen (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

rpcinfo

report RPC information

Q&A

Cannot register service: RPC: Unable to receive; errno = Connection refused

portmap是为RPC程序服务的。每一个RPC server程序启动的时候要向portmap程序注册。这样portmap程序就知道这些RPC server监听在哪个端口。 而RPC client在发起连接向portmap发起查询,知道了想要查询的RPC server的监听端口后再去连接server

1
2
sudo apt install portmap rpcbind
sudo systemctl status portmap.service

示例

1
2
3
4
5
6
$find /usr/include/ -name "*.x"
/usr/include/rpcsvc/key_prot.x
/usr/include/rpcsvc/bootparam_prot.x
/usr/include/rpcsvc/sm_inter.x
/usr/include/rpcsvc/klm_prot.x
...

结构体

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
program YPPASSWDPROG {
version YPPASSWDVERS {
/*
* Update my passwd entry
*/
int
YPPASSWDPROC_UPDATE(yppasswd) = 1;
} = 1;
} = 100009;


struct passwd {
string pw_name<>; /* username */
string pw_passwd<>; /* encrypted password */
int pw_uid; /* user id */
int pw_gid; /* group id */
string pw_gecos<>; /* in real life name */
string pw_dir<>; /* home directory */
string pw_shell<>; /* default shell */
};

struct yppasswd {
string oldpass<>; /* unencrypted old password */
passwd newpw; /* new passwd entry */
};

https://unix.stackexchange.com/questions/344015/what-are-the-x-files-in-usr-include

函数指针

參考

-------------本文结束感谢您的阅读-------------
  • 本文作者: Winddoing
  • 本文链接: https://winddoing.github.io/post/62149.html
  • 作者声明: 本博文为个人笔记, 由于个人能力有限,难免出现错误,欢迎大家批评指正。
  • 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!