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

Method ProcessEvent

internal/etw/processors/net_windows.go:40–58  ·  view source on GitHub ↗
(e *event.Event)

Source from the content-addressed store, hash-verified

38func (n netProcessor) Close() {}
39
40func (n *netProcessor) ProcessEvent(e *event.Event) (*event.Event, bool, error) {
41 if e.Category == event.Net {
42 if e.IsNetworkTCP() && !e.IsDNS() {
43 e.AppendEnum(params.NetL4Proto, uint32(network.TCP), network.ProtoNames)
44 }
45 if e.IsNetworkUDP() && !e.IsDNS() {
46 e.AppendEnum(params.NetL4Proto, uint32(network.UDP), network.ProtoNames)
47 }
48
49 if e.IsDNS() {
50 return e, false, nil
51 }
52
53 n.resolvePortName(e)
54
55 return e, false, nil
56 }
57 return e, true, nil
58}
59
60// resolvePortName resolves the IANA service name for the particular port and transport protocol as
61// per https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

Callers

nothing calls this directly

Calls 5

resolvePortNameMethod · 0.95
IsNetworkTCPMethod · 0.80
IsDNSMethod · 0.80
AppendEnumMethod · 0.80
IsNetworkUDPMethod · 0.80

Tested by

no test coverage detected