index
ccdns-server - computercraft dns server
contents:
1: introduction and requirements
2: program commands
3: developer functions
1 - intruductions and requirements
CCdns is a computercraft dhcp and name service
it allows users and programs to request computer information much like a real life dns system would
this is the server side version and offers it's services to a dns client
it contains a few binaries to operate and configure the server and developer functions
this program requires an advanced (golden) computer to function
installing is as easy as "mapt install ccdns-server"
you can change the settings but it should run out of the box.
2 - program commands - ccdns - /bin/ccdns.sh
start - starts the server
stop - stops the server (might take a few seconds)
set - changes a setting
example: ccdns set root /var/dns/
changes a setting, has multiple potentials inputs:
set root - root path setting
example: ccdns set root /var/dns
input1: path to new root directory
output: reports results
register - register a system in the dns registry
example: ccdns register name id owner use
input1: computer name, this will be searchable
input2: computer id, this will be searchable
input3: computer owner
input4: computer use/description
unregister - remove a system from the dns registry
example: ccdns unregister name
input1: either name or id
3 - developer functions - lua functions
request - handlres a dns request
example: ccnds.request(target)
input1: target as name or computer id
output: 0 as number if not found, registry information as table, 1 = name, 2 = id, 3 = owner, 4 = use
register - add a computer to dns registery
example: ccdns.register(name,id,owner,use)
input1: name as string, is searchable
input2: id as string, is searchable
input3: owner as string
input4: system use/description as string
output: 601 if exists, 600 if success
unregister - remove a computer from dns registery
example: ccdns.unregister(name)
input1: computer name or id as string
output: 601 if no exist, 600 if removed
list - produce a list of all registered systems in a table
example: ccdns.list()
input1: no input
output: a table containing all registered systems.