This is an automated email from the ASF dual-hosted git repository. liuhan pushed a commit to branch tmp_disable_reading in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git
commit 1d8bdec6a7d318e125cd027364a7d07c0cc62f8f Author: mrproliu <[email protected]> AuthorDate: Tue Dec 17 16:07:42 2024 +0800 tmp disable read from --- pkg/accesslog/events/close.go | 19 +++++++++-------- pkg/accesslog/events/connect.go | 45 ++++++++++++++++++++--------------------- pkg/accesslog/events/data.go | 31 ++++++++++++++-------------- 3 files changed, 46 insertions(+), 49 deletions(-) diff --git a/pkg/accesslog/events/close.go b/pkg/accesslog/events/close.go index acd0d61..8e2a8fa 100644 --- a/pkg/accesslog/events/close.go +++ b/pkg/accesslog/events/close.go @@ -20,7 +20,6 @@ package events import ( "time" - "github.com/apache/skywalking-rover/pkg/tools/btf/reader" "github.com/apache/skywalking-rover/pkg/tools/host" ) @@ -35,15 +34,15 @@ type SocketCloseEvent struct { Success uint32 } -func (c *SocketCloseEvent) ReadFrom(r *reader.Reader) { - c.ConnectionID = r.ReadUint64() - c.RandomID = r.ReadUint64() - c.StartTime = r.ReadUint64() - c.EndTime = r.ReadUint64() - c.PID = r.ReadUint32() - c.SocketFD = r.ReadUint32() - c.Success = r.ReadUint32() -} +//func (c *SocketCloseEvent) ReadFrom(r *reader.Reader) { +// c.ConnectionID = r.ReadUint64() +// c.RandomID = r.ReadUint64() +// c.StartTime = r.ReadUint64() +// c.EndTime = r.ReadUint64() +// c.PID = r.ReadUint32() +// c.SocketFD = r.ReadUint32() +// c.Success = r.ReadUint32() +//} func (c *SocketCloseEvent) GetConnectionID() uint64 { return c.ConnectionID diff --git a/pkg/accesslog/events/connect.go b/pkg/accesslog/events/connect.go index 9433168..f41587f 100644 --- a/pkg/accesslog/events/connect.go +++ b/pkg/accesslog/events/connect.go @@ -20,7 +20,6 @@ package events import ( "time" - "github.com/apache/skywalking-rover/pkg/tools/btf/reader" "github.com/apache/skywalking-rover/pkg/tools/host" ) @@ -47,28 +46,28 @@ type SocketConnectEvent struct { ConnTrackUpstreamPort uint32 } -func (c *SocketConnectEvent) ReadFrom(r *reader.Reader) { - c.ConID = r.ReadUint64() - c.RandomID = r.ReadUint64() - c.StartTime = r.ReadUint64() - c.EndTime = r.ReadUint64() - c.PID = r.ReadUint32() - c.SocketFD = r.ReadUint32() - c.FuncName = r.ReadUint8() - c.Role = r.ReadUint8() - c.SocketFamily = r.ReadUint8() - c.ConnectSuccess = r.ReadUint8() - c.Pad0 = r.ReadUint32() - c.RemoteAddrV4 = r.ReadUint32() - c.RemoteAddrPort = r.ReadUint32() - r.ReadUint8Array(c.RemoteAddrV6[:], 16) - c.LocalAddrV4 = r.ReadUint32() - c.LocalAddrPort = r.ReadUint32() - r.ReadUint8Array(c.LocalAddrV6[:], 16) - c.ConnTrackUpstreamIPl = r.ReadUint64() - c.ConnTrackUpstreamIPh = r.ReadUint64() - c.ConnTrackUpstreamPort = r.ReadUint32() -} +//func (c *SocketConnectEvent) ReadFrom(r *reader.Reader) { +// c.ConID = r.ReadUint64() +// c.RandomID = r.ReadUint64() +// c.StartTime = r.ReadUint64() +// c.EndTime = r.ReadUint64() +// c.PID = r.ReadUint32() +// c.SocketFD = r.ReadUint32() +// c.FuncName = r.ReadUint8() +// c.Role = r.ReadUint8() +// c.SocketFamily = r.ReadUint8() +// c.ConnectSuccess = r.ReadUint8() +// c.Pad0 = r.ReadUint32() +// c.RemoteAddrV4 = r.ReadUint32() +// c.RemoteAddrPort = r.ReadUint32() +// r.ReadUint8Array(c.RemoteAddrV6[:], 16) +// c.LocalAddrV4 = r.ReadUint32() +// c.LocalAddrPort = r.ReadUint32() +// r.ReadUint8Array(c.LocalAddrV6[:], 16) +// c.ConnTrackUpstreamIPl = r.ReadUint64() +// c.ConnTrackUpstreamIPh = r.ReadUint64() +// c.ConnTrackUpstreamPort = r.ReadUint32() +//} func (c *SocketConnectEvent) GetConnectionID() uint64 { return c.ConID diff --git a/pkg/accesslog/events/data.go b/pkg/accesslog/events/data.go index 83e4ba4..dc55fc2 100644 --- a/pkg/accesslog/events/data.go +++ b/pkg/accesslog/events/data.go @@ -20,7 +20,6 @@ package events import ( "fmt" - "github.com/apache/skywalking-rover/pkg/tools/btf/reader" "github.com/apache/skywalking-rover/pkg/tools/enums" ) @@ -40,21 +39,21 @@ type SocketDataUploadEvent struct { Buffer [2048]byte } -func (s *SocketDataUploadEvent) ReadFrom(r *reader.Reader) { - s.Protocol0 = enums.ConnectionProtocol(r.ReadUint8()) - s.HaveReduce = r.ReadUint8() - s.Direction0 = enums.SocketDataDirection(r.ReadUint8()) - s.Finished = r.ReadUint8() - s.Sequence0 = r.ReadUint16() - s.DataLen = r.ReadUint16() - s.StartTime0 = r.ReadUint64() - s.EndTime0 = r.ReadUint64() - s.ConnectionID = r.ReadUint64() - s.RandomID = r.ReadUint64() - s.DataID0 = r.ReadUint64() - s.TotalSize0 = r.ReadUint64() - r.ReadUint8Array(s.Buffer[:], 2048) -} +//func (s *SocketDataUploadEvent) ReadFrom(r *reader.Reader) { +// s.Protocol0 = enums.ConnectionProtocol(r.ReadUint8()) +// s.HaveReduce = r.ReadUint8() +// s.Direction0 = enums.SocketDataDirection(r.ReadUint8()) +// s.Finished = r.ReadUint8() +// s.Sequence0 = r.ReadUint16() +// s.DataLen = r.ReadUint16() +// s.StartTime0 = r.ReadUint64() +// s.EndTime0 = r.ReadUint64() +// s.ConnectionID = r.ReadUint64() +// s.RandomID = r.ReadUint64() +// s.DataID0 = r.ReadUint64() +// s.TotalSize0 = r.ReadUint64() +// r.ReadUint8Array(s.Buffer[:], 2048) +//} func (s *SocketDataUploadEvent) Protocol() enums.ConnectionProtocol { return s.Protocol0
