From ccc0d836e8331d11fd017d553f3b32e4bf0c3efa Mon Sep 17 00:00:00 2001 From: Dhel Date: Thu, 18 Jul 2024 11:57:29 -0600 Subject: [PATCH] Update server.go --- ppp/pptp/server.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ppp/pptp/server.go b/ppp/pptp/server.go index 3974b96..4197a7a 100644 --- a/ppp/pptp/server.go +++ b/ppp/pptp/server.go @@ -13,8 +13,7 @@ import ( "github.com/skadarnold/ipxbox/network" "github.com/skadarnold/ipxbox/ppp" - "github.com/skadarnold/ipxbox/ipxbox" - + "github.com/skadarnold/ipxbox/ipx" "github.com/skadarnold/ipxbox/ipxpkt" "github.com/skadarnold/ipxbox/network/addressable" @@ -121,6 +120,16 @@ func (c *Connection) Close() error { } } +func makePcapWriter() *pcapgo.Writer { + f, err := os.Create(*dumpPackets) + if err != nil { + log.Fatalf("failed to open pcap file for write: %v", err) + } + w := pcapgo.NewWriter(f) + w.WriteFileHeader(1500, layers.LinkTypeEthernet) + return w +} + func (c *Connection) startPPPSession(ctx context.Context, sendCallID uint16) { if c.ppp != nil { return