Research Article

An SDN-Based Authentication Mechanism for Securing Neighbor Discovery Protocol in IPv6

Algorithm 2

procedure forwarding (packet-in,comb,flag,re-table)
sMAC≔comb.sMAC
sIPv6≔comb.sIPv6
dMAC≔comb.dMAC
dIPv6≔comb.dIPv6
DPID≔comb.DPID
port≔comb.port
if () authentication failed}
  send packet-out with drop action
else if ()
  path≔collector_find_path ([sMAC,sIPv6,dMAC,dIPv6])
  add ([sMAC,sIPv6],([dMAC,dIPv6],path)) to re-table
  determine action based on path
  send packet-out with the action
else if ()
  if ([dMAC,dIPv6] exists in re-table.([sMAC,sIPv6])
  && [DPID,port] exists in path)
   determine action based on stored path
  else
   path≔collector_find_path ([sMAC,sIPv6,dMAC,dIPv6])
   add ([dMAC,dIPv6],path) to re-table.([sMAC,sIPv6])
   determine action based on path
   send packet-out with the action
else
  error value of flag