Research Article

A Dynamically Reconfigurable Wireless Sensor Network Testbed for Multiple Routing Protocols

Algorithm 1

Packets process in switch plane.
Input: Payload; FlowTable]; TableLength mask=GetFlowMask(Payload);
offset=GetMatchField(Payload);
for each i TableLength do for each bit in the mask do
   if bit = 1 then
     state=CheckMatchField(offset, FlowTable[i]); if state is true then
       update offset to next match field; end
     else state=false;
       break; end
   end end
  if state is true then
    ExecuteAction(Payload, FlowTable[i]);
    break; end
end
if no action executed then
  ExecuteMiss(Payload); end