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