Commits

npe committed 6c718ea

getifc for all architectures

Comments (0)

Files changed (4)

bproc_darwin_amd64.go

 	return int(e1)
 
 }
+
+
+func getIfc() int {
+	return 0
+}

bproc_linux_386.go

 	_, _, e1 := syscall.Syscall(syscall.SYS_UMOUNT, uintptr(unsafe.Pointer(&path8[0])), 0, 0)
 	return int(e1)
 }
+
+func getIfc() int {
+	return 0
+}

bproc_linux_amd64.go

 	_, _, e1 := syscall.Syscall(/* barf! syscall.SYS_UMOUNT */166, uintptr(unsafe.Pointer(&path8[0])), 0, 0)
 	return int(e1)
 }
+
+func getIfc() int {
+	return 0
+}

bproc_linux_arm.go

 }
 
 func getIfc() int {
-	sock, e := syscall.Socket(syscall.AF_INET, syscall.SOCK_STREAM, syscall.IPPROTO_TCP)
-	if sock < 0 {
-		Dprintf(2, "getIfc: %v %v\n", sock, e)
-		return -1
-	}
-	ifc := make([]byte, 256)
-	_,_,e0 := syscall.Syscall(syscall.SYS_IOCTL, uintptr(sock), uintptr(syscall.SIOCGIFCONF), uintptr(unsafe.Pointer(&ifc)))
-	if e0 < 0 {
-		Dprintf(2, "getIfc: ioctl: %v %v\n", sock, e0)
-		return -1
-	}
-	log.Print(ifc)
-	return
+	return 0
 }