Split unattributed connections into to Unidentified App and Network Noise

This commit is contained in:
Daniel
2022-03-09 15:44:54 +01:00
parent 014ac058ce
commit 7a9001b7de
11 changed files with 78 additions and 24 deletions

View File

@@ -23,7 +23,7 @@ func GetPID(socketInfo socket.Info) (pid int) {
currentPid := socketInfo.GetPID()
// If the current PID already is valid (ie. not unidentified), return it immediately.
if currentPid != socket.UnidentifiedProcessID {
if currentPid != socket.UndefinedProcessID {
return currentPid
}
@@ -91,7 +91,7 @@ func findPID(uid, inode int) (pid int) {
}
}
return socket.UnidentifiedProcessID
return socket.UndefinedProcessID
}
func findSocketFromPid(pid int, socketName string) bool {

View File

@@ -149,7 +149,7 @@ func getTableFromSource(stack uint8, procFile string) (connections []*socket.Con
IP: localIP,
Port: uint16(localPort),
},
PID: socket.UnidentifiedProcessID,
PID: socket.UndefinedProcessID,
UID: int(uid),
Inode: int(inode),
})
@@ -164,7 +164,7 @@ func getTableFromSource(stack uint8, procFile string) (connections []*socket.Con
IP: localIP,
Port: uint16(localPort),
},
PID: socket.UnidentifiedProcessID,
PID: socket.UndefinedProcessID,
UID: int(uid),
Inode: int(inode),
})
@@ -191,7 +191,7 @@ func getTableFromSource(stack uint8, procFile string) (connections []*socket.Con
IP: remoteIP,
Port: uint16(remotePort),
},
PID: socket.UnidentifiedProcessID,
PID: socket.UndefinedProcessID,
UID: int(uid),
Inode: int(inode),
})