|
Algorithm 1 DPDK-based network scanner |
-
Require:
DPDK-compatible NIC, DPDK libraries, target IP address range
-
Ensure:
List of open ports for each target IP address
-
1:
Initialize DPDK
-
2:
Create packet buffer pools
-
3:
Initialize NIC with DPDK
-
4:
Create receive and transmit queues
-
5:
Create and configure packet filters
-
6:
Initialize memory pools for packet headers and data
-
7:
Allocate memory for the list of open ports for each target IP address
-
8:
Set up DPDK lcore affinity
-
9:
for each target IP address in the range do
-
10:
Create TCP SYN packet with target IP address and random source port
-
11:
Enqueue packet in transmit queue
-
12:
end for
-
13:
Start DPDK packet processing loop
-
14:
while packets are being received do
-
15:
Parse incoming packets
-
16:
if packet is a TCP SYN-ACK response then
-
17:
Update list of open ports for corresponding target IP address
-
18:
end if
-
19:
end while
-
20:
Stop DPDK packet processing loop
-
21:
Return list of open ports for each target IP address
|