-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
32 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Duplicate Packet Detection | ||
|
||
The application uses BloomFilter datatype to detect | ||
duplicate packets. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
## Socket Options | ||
|
||
` int sockfd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_IP));` | ||
` int sockfd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_IP))` | ||
|
||
We use a socket of type AF_PACKET. The term AF_PACKET allows us to send or | ||
receive packets at layer 2 level. We analyse only IP Protocolsand hence we | ||
have set the protocol level as `ETH_P_IP`. The SOCK_RAW keyword provides | ||
access to raw network protocol. | ||
|
||
PACKET_FANOUT | ||
### Packet Fanout | ||
|
||
We use Packet_fanout_lb for load balancing of traffic across | ||
all sockets. | ||
The application uses `PACKET_FANOUT_FLAG_ROLLOVER` as fanout configuration. | ||
In this mode, if one socket is full, packets are rolled over to another group. | ||
This helps in capture at high speed. Each thread of the application handles | ||
a single socket and each socket is associated with a ring buffer. When one socket gets | ||
full, this options helps in loading other sockets. It gets more time for the threads to | ||
finish processing of packets in a thread. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters