CLI handles the user input event in ONOS framework. It accepts different user inputs and show the coresponding data or results.
details see here
Our accepted command lines (app stands for our application name):
app add-block [host-name] # add host into block list
app del-block [host-name] # remove host from block list
app block show # show block list
Controller was called by Processor and CLI to maintain the block list and delegate the packet processing.
It must maintain a ConcurrentHashMap in memory as blocking list
Controller needs following functions to be called by CLI & Processor
boolean parsePakcet(UDP udpPacket);
void addBlockHost(String host);
void removeBlockHost(String host);
Set<Map.Entry> showBlockList();
Processor implements ONOS's processor interface, in ONEPINGPING demo app has the details
DNS parser's responsibility is to parse the UDP payload to check whether this packet is a DNS request. If it is, parse the packet and get the information.
Jetty has an implementation of DNS parser