chore: Refine process code

This commit is contained in:
metacubex committed 2023-01-14 16:16:59 +08:00
1 parent 804cff8c55
commit f96bf65557
8 files changed
+41 -66

No files matched your search

+1 -9
View File
@@ -16,14 +16,6 @@ const (
UDP = "udp"
)
func FindProcessName(network string, srcIP netip.Addr, srcPort int) (*uint32, string, error) {
func FindProcessName(network string, srcIP netip.Addr, srcPort int) (uint32, string, error) {
return findProcessName(network, srcIP, srcPort)
}
func FindUid(network string, srcIP netip.Addr, srcPort int) (*uint32, error) {
_, uid, err := resolveSocketByNetlink(network, srcIP, srcPort)
if err != nil {
return nil, err
}
return &uid, nil
}