Research Article

Cyber-Internet Security Framework to Conquer Energy-Related Attacks on the Internet of Things with Machine Learning Techniques

Algorithm 2

Provider node response.
If IPREQ message received
{
Check allotment table for DA
If DA available in allotment table
{
Reply with MSNREQ message If MSNREP message received
{
Check allotment table for MSN If new MSN
{
Confirm malicious node Alert neighbours
Reply with DENY message
}
Else
{
Reply with OLD IP address
//Rejoining of genuine node
}
}
}
Else//new Device address
{
Reply with MSNREQ message If MSNREP message received
{
Check allotment table for MSN
If new MSN//new node joins MANET
{
IP_COMPUTE (Device address) Update allotment table
//store MSN, DA, and IP Reply with IPREP message
}
Else//MSN exists in allotment table
{
Mark as suspicious node Reply with OLD IP address
}
}
}
}