File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,9 +105,13 @@ func (p *pcapsink) file(f io.WriteCloser) (err error) {
105105}
106106
107107func (p * pcapsink ) log (y bool ) bool {
108- return netstack .LogPcap (y )
108+ return netstack .Pcap2Stdout (y )
109109}
110110
111111func (p * pcapsink ) fout (y bool ) bool {
112- return netstack .LogFile (y )
112+ return netstack .Pcap2File (y )
113+ }
114+
115+ func (p * pcapsink ) mode () string {
116+ return netstack .PcapModes ()
113117}
Original file line number Diff line number Diff line change @@ -289,6 +289,11 @@ func (t *gtunnel) SetRoute(engine int) error {
289289
290290func (t * gtunnel ) Stat () (* x.NetStat , error ) {
291291 st , err := netstack .Stat (t .stack )
292+ st .TUNSt .Open = ! t .closed .Load ()
293+ st .TUNSt .Up = t .ep .IsAttached ()
294+ st .TUNSt .Fd = t .ep .Cur ()
295+ st .TUNSt .Mtu = int32 (t .ep .MTU ())
296+ st .TUNSt .PcapMode = t .pcapio .mode ()
292297 if err == nil && st != nil {
293298 if t := t .hdl .TCP (); t != nil {
294299 st .RDNSIn .OpenConnsTCP = t .OpenConns ()
You can’t perform that action at this time.
0 commit comments