-
Notifications
You must be signed in to change notification settings - Fork 11
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
1 parent
e9c04d2
commit 28ba007
Showing
1 changed file
with
26 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package packet | ||
|
||
import ( | ||
"context" | ||
"sync" | ||
|
||
"github.com/google/gopacket" | ||
|
||
"waffle/internal/worker" | ||
) | ||
|
||
// Calculator is used in the packet serialization process. | ||
// Implements PacketSerializer tho this struct recalculates | ||
// the average size of the packets. | ||
// https://www.tandfonline.com/doi/full/10.1080/23742917.2017.1384213 | ||
// https://journals.vilniustech.lt/index.php/MLA/article/view/4481/3817 | ||
type Calculator struct { | ||
mu sync.Mutex | ||
} | ||
|
||
var _ worker.PacketSerializer = (*Calculator)(nil) | ||
|
||
func (c *Calculator) SerializePackets(ctx context.Context, packetsChan <-chan gopacket.Packet) error { | ||
//TODO implement me | ||
panic("implement me") | ||
} |