Skip to content

Commit 73e9492

Browse files
committed
build: commit missing files
1 parent e320c74 commit 73e9492

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

tunnel/sink.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,13 @@ func (p *pcapsink) file(f io.WriteCloser) (err error) {
105105
}
106106

107107
func (p *pcapsink) log(y bool) bool {
108-
return netstack.LogPcap(y)
108+
return netstack.Pcap2Stdout(y)
109109
}
110110

111111
func (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
}

tunnel/tunnel.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ func (t *gtunnel) SetRoute(engine int) error {
289289

290290
func (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()

0 commit comments

Comments
 (0)