You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comm layer will only send data. It is responsibility of higher layer to format the payload.
Receiving Data (Socket -> Node )
callbacks to the Node layer
Comm layer will check which component is required to process the packet and passes the packet to respective callback. For eg: Interest and Data packets go to handle_data and handle_interest callbacks in DataPlane while Hello packets will go to handle_hello callback in ControlPlane.
Table Structure
All can be be represented as dictionaries with first column as the key.
FIB (neighbor_table)
Neighbor Label
TCP IP
TCP Port
Hello Count
Certificate
PIT (Pending Interest Table)
(Data address, Neighbor Label)
Index
Cache
Data address
Data
Packet Structure
[PACKET_ID][PAYLOAD]
Packet
Structure
Hello
"[0][NEIGHBOR_LABEL][IP][PORT][CERT]"
Data
"[1][DATA ADDRESS][DATA][SIGN]"
Interest
"[2][DATA ADDRESS][NEIGHBOR_LABEL][Index][SIGN]"
Components
1. SocketCommunication
Server:
Listens on a separate thread for incoming TCP sessions.
When a packet comes, check the type (0, 1, 2) and execute the respective callback.
Client:
Sends packet to destination based on IP and port. The payload has to be preformatted in higher layers.
2. Node
Integrates Data plane and control layers while also interfacing with Cache and Sensor/Actuator core logic.
Architecture is callback driven. The callbacks are registered in Comm object and are called when a their associated packet is received.
handle_hello
Use crypto object to verify certificate
Parse Neighbor Label, IP, Port and Certificate.
If Neighbor Label is in FIB
increment Hello Count (till max value as specified in constants file)
If Neighbor Label is not in FIB
add new entry with count 1
This will establish neighborship.
handle_data
Use crypto object to verify signature
Parse Data address and Data
For entries in PIT that match data address
Send data
Remove PIT entry
handle_interest
Use crypto object to verify signature
Parse data address, neighbor label and index.
If (data address, neighbor label) exists in PIT:
If received packet index <= table index, drop packet as it is a duplicate and can cause network loop
If received packet index > table index, change packet index and forward to all nodes in FIB. (packet is a retry)