DCHP-like server & client to setup faces for ccnx
C Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Edit the variable CCNX_DIR in the Makefile to the location of your already compiled ccnx-release. 

This allows a server to propagate all known faces (from the config file) to anyone in the same LAN. The clients will then act like servers themselves so anyone that knows something can reply to those who ask as long as the data is not stale.

DHCP group:
DHCP port: 59695
DHCP prefix: ccnx:/local/dhcp
DHCP content name: ccnx:/local/dhcp/content
DHCP configuration file: specified by -f parameter, or ./ccn_dhcp_server.conf and ./ccn_dhcp_client.conf by default depending on usage

configuration format:
There should be a three tuple per line separated by some whitespaces
(name-prefix, host, port)
if the line starts with '#' it is considered a comment and ignored
if the line starts with '!' it is a default entry -- if you get no response the dhcpnode will setup these instead (only useful for clients).
The server only sends out the regular routes (those with nothing preceding the start of the line).
Look at the files 'ccn_dhcp_server.conf' and 'ccn_dhcp_client.conf' for examples

Right now faces are setup using UDP, an option for changing this will be available soon.

DHCP Node:
1. Join DHCP group
    1) join multicast group
    2) create a new face towards the DHCP group and port (the new face uses UDP)
    3) bind DHCP prefix to this new face
2. (Server is S, Client is C)
    S1) read DHCP configuration file (all entries of the config file are sent to the requesting node in one message)
    C1) get a response from the server (with all entries to enter) or read the fallback entries from the config_file
    2) construct DHCP entries into a ccnx message (with DHCP content name) and send to local ccnd (a new entry "CCN_DTAG_DHCPContent = 115" is added to enum ccn_dtag)
    C3)For each forwarding entry (with prefix, host and port):
        1) create a new face to the host and port (the new face uses UDP)
        2) bind the prefix to the face 
S3. The Server will respond with all the entries that is known to them.
C3. The Client will exit.

usage can be asked by passing -h
but typical usage will be:
#for primary server
#for everyone else

If you want to get rid of the entries you will have to kill ccndhcpnode that is running as the server (in the same subnet) and then wait for the data to become stale.
Multicast needs to be enabled. it is turned on by default by linux kernel.

Scheduled updates to update faces when the lease expires (leases now are forever)
Have a check that only allows certain signers entries to be used.