Lines Matching refs:res
437 int res = parsePrefix(nat64Prefix.c_str(), &family, &pfx96, sizeof(pfx96), &prefixLen); in init() local
439 if (res != sizeof(pfx96)) return res; in init()
486 int res = open("/dev/net/tun", O_RDWR | O_NONBLOCK | O_CLOEXEC); in startClatd() local
487 if (res == -1) { in startClatd()
488 res = errno; in startClatd()
489 ALOGE("open of tun device failed (%s)", strerror(res)); in startClatd()
490 return -res; in startClatd()
492 unique_fd tmpTunFd(res); in startClatd()
503 res = ioctl(tmpTunFd, TUNSETIFF, &ifr, sizeof(ifr)); in startClatd()
504 if (res == -1) { in startClatd()
505 res = errno; in startClatd()
506 ALOGE("ioctl(TUNSETIFF) failed (%s)", strerror(res)); in startClatd()
507 return -res; in startClatd()
511 res = InterfaceController::setEnableIPv6(v4interface.c_str(), 0); in startClatd()
512 if (res) ALOGE("setEnableIPv6 %s failed (%s)", v4interface.c_str(), strerror(res)); in startClatd()
520 res = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0); in startClatd()
521 if (res == -1) { in startClatd()
522 res = errno; in startClatd()
523 ALOGE("socket(ipv6/udp) failed (%s)", strerror(res)); in startClatd()
524 return -res; in startClatd()
526 unique_fd passedTunFd(res); in startClatd()
549 res = posix_spawnattr_init(&attr); in startClatd()
550 if (res) { in startClatd()
551 ALOGE("posix_spawnattr_init failed (%s)", strerror(res)); in startClatd()
552 return -res; in startClatd()
555 res = posix_spawnattr_setflags(&attr, POSIX_SPAWN_USEVFORK); in startClatd()
556 if (res) { in startClatd()
557 ALOGE("posix_spawnattr_setflags failed (%s)", strerror(res)); in startClatd()
558 return -res; in startClatd()
565 res = posix_spawn_file_actions_init(&fa); in startClatd()
566 if (res) { in startClatd()
567 ALOGE("posix_spawn_file_actions_init failed (%s)", strerror(res)); in startClatd()
568 return -res; in startClatd()
571 res = posix_spawn_file_actions_adddup2(&fa, tmpTunFd, passedTunFd); in startClatd()
572 if (res) { in startClatd()
573 ALOGE("posix_spawn_file_actions_adddup2 failed (%s)", strerror(res)); in startClatd()
574 return -res; in startClatd()
581 res = posix_spawn(&tracker.pid, kClatdPath, &fa, &attr, (char* const*)args, nullptr); in startClatd()
582 if (res) { in startClatd()
583 ALOGE("posix_spawn failed (%s)", strerror(res)); in startClatd()
584 return -res; in startClatd()
646 auto res = mClatEgressMap.iterateWithValue(printClatMap); in dumpEgress() local
647 if (!res.ok()) { in dumpEgress()
648 dw.println("Error printing BPF map: %s", res.error().message().c_str()); in dumpEgress()
677 auto res = mClatIngressMap.iterateWithValue(printClatMap); in dumpIngress() local
678 if (!res.ok()) { in dumpIngress()
679 dw.println("Error printing BPF map: %s", res.error().message().c_str()); in dumpIngress()