MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / Get

Method Get

pkg/filter/accessor_windows.go:950–975  ·  view source on GitHub ↗
(f Field, e *event.Event)

Source from the content-addressed store, hash-verified

948func newNetworkAccessor() Accessor { return &networkAccessor{} }
949
950func (n *networkAccessor) Get(f Field, e *event.Event) (params.Value, error) {
951 switch f.Name {
952 case fields.NetDIP:
953 return e.Params.GetIP(params.NetDIP)
954 case fields.NetSIP:
955 return e.Params.GetIP(params.NetSIP)
956 case fields.NetDport:
957 return e.Params.GetUint16(params.NetDport)
958 case fields.NetSport:
959 return e.Params.GetUint16(params.NetSport)
960 case fields.NetDportName:
961 return e.Params.GetString(params.NetDportName)
962 case fields.NetSportName:
963 return e.Params.GetString(params.NetSportName)
964 case fields.NetL4Proto:
965 return e.GetParamAsString(params.NetL4Proto), nil
966 case fields.NetPacketSize:
967 return e.Params.GetUint32(params.NetSize)
968 case fields.NetDIPNames:
969 return n.resolveNamesForIP(e.Params.MustGetIP(params.NetDIP))
970 case fields.NetSIPNames:
971 return n.resolveNamesForIP(e.Params.MustGetIP(params.NetSIP))
972 }
973
974 return nil, nil
975}
976
977func (n *networkAccessor) resolveNamesForIP(ip net.IP) ([]string, error) {
978 if n.reverseDNS == nil {

Callers

nothing calls this directly

Calls 7

resolveNamesForIPMethod · 0.95
GetIPMethod · 0.80
GetUint16Method · 0.80
GetParamAsStringMethod · 0.80
GetUint32Method · 0.80
MustGetIPMethod · 0.80
GetStringMethod · 0.45

Tested by

no test coverage detected