index
ccdns-client - computercraft dns client
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 client version and contains a couple commands and programming functions
it requires a server running ccdns-server to talk to
the client package works on basic and advanced computers


2 - commands - dns - /bin/dns.sh
renew - renew dhcp server information
example: dns renew
no input, output is the found dhcp server.

lookup - look up dns registry information
example: dns lookup testcomputer
input can be a computer id or registered name
output is the register details

set - change settings
example: dns set dhcp true
input can be "dhcp true" or "dhcp false"
output reports if the setting is changed or not

register - register on dns
example: dns register name id owner desc
input: the system name, the ID, the owner, a description.
output: either accepts, or doesn't.

unregister - removes from dns
example: dns unregister id user pass
input: system name/id, dns username, dns pass
output: either accepts, or doesn't.

list - show a list of all registered systems.
example: dns list
input: none
output: displays a list of all registered systems.

3 - developer functions - lua functions
dns.getdhcp - searches for dhcp server
example: data = dns.getdhcp()
input1: no input
output: dhcp server as number or false as bool

dns.lookup - look up in the dns registery
example: dns.lookup("testcomputer")
input1: computer name or id as string
output: registry data as table, 1 = name, 2 = id, 3 = owner, 4 = use

dns.setdhcp - set dhcp on boot setting
example: dns.setdhcp("true")
input1: either "true" or "false" as string
output: true if yes, 503 as number if already exists

dns.register - registers a system to the dns
example: dns.register(name,id,owner,descr)
input1: system name, used for searches
input2: system ID, used for searches
input3: system owner, fluff
input4: system description, fluff
output: 500 if yes, other number if error

dns.unregister - unregisters a system from the dns
example: dns.unregister(target, user, pass)
input1: target to be removed, name or id
input2: dns server username
input3: dns server password
output: 500 if yes, other number if error

dns.list - retrieves a list of all dns registered systems
example: dns.list()
input1: no input
output: table containing dns list.