chore: Refine process code
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user