func (n *Netns) inode() string { var stat unix.Stat_t err := unix.Fstat(int(n.Fd()), &stat) if err != nil { return "unknown" } return fmt.Sprintf("%d", stat.Ino) }
func getInodeFd(fd int) (uint64, error) { stat := &unix.Stat_t{} err := unix.Fstat(fd, stat) return stat.Ino, err }
func GetInodeF(file *os.File) (uint64, error) { stat := &unix.Stat_t{} err := unix.Fstat(int(file.Fd()), stat) return stat.Ino, err }