OC-Minitel/RPC/OpenOS/usr/man/rpc

36 lines
1.4 KiB
Plaintext
Raw Normal View History

2019-12-08 14:01:53 +11:00
# RPC
2020-10-17 18:49:00 +11:00
Minitel Remote Procedure Call Library for OpenOS
2019-12-08 14:01:53 +11:00
## API
In all instances, if *hostname* is replaced with *localhost*, an attempt will be made to call the registered procedure on the local machine.
### rpc.call(*hostname*, *name*, ...)
Call function *name* on remote host *hostname* with arguments ...
### rpc.proxy(*hostname*, *filter*)
Return a table containing the functions on *hostname* matching *filter*, which is a Lua pattern.
### rpc.register(*name*, *function*)
Registers *function* as the RPC call for *name* on the current host.
2020-10-17 18:49:00 +11:00
### rpc.allow(*fname*, *hostname*)
Adds *hostname* to the list of remote hosts allowed to execute the function *fname*.
## Access control
Access control is implemented by way of an "allow" list and a "deny" list. Any function lacking both lists will default to the function being available to all hosts.
Any entries in the 'allow' list for a function will disable access for any but those in the allow list.
Entries in the 'deny' list will result in the hosts in said list being denied, but other hosts are allowed. This will not override the 'allow' list.
2019-12-08 14:01:53 +11:00
## Variables
### rpc.port = 111
Port to use for RPC calls and registration.
2020-10-17 18:49:00 +11:00
### rpc.allow = {}
Table containing the allow lists of exported functions. Contents subject to change.
### rpc.deny = {}
Table containing the deny lists of exported functions. Contents subject to change.