add scaffolding for configuration file

This commit is contained in:
2024-04-17 19:12:01 -06:00
parent a0d118b987
commit e95b4972da
4 changed files with 111 additions and 19 deletions

View File

@ -15,6 +15,7 @@ import (
"os/exec"
"time"
"deadbeef.codes/steven/hyp/hypd/configuration"
"deadbeef.codes/steven/hyp/otphyp"
"github.com/cilium/ebpf/link"
"github.com/cilium/ebpf/ringbuf"
@ -48,7 +49,7 @@ var (
// PacketServer is the main function when operating in server mode
// it sets up the pcap on the capture device and starts a goroutine
// to rotate the knock sequence
func PacketServer(captureDevice string) error {
func PacketServer(captureDevice string, config *configuration.HypdConfiguration) error {
iface, err := net.InterfaceByName(captureDevice)
if err != nil {