Lines Matching refs:addrs

389 	} addrs;  in do_getsockopt_subflow_addrs()  local
391 memset(&addrs, 0, sizeof(addrs)); in do_getsockopt_subflow_addrs()
395 addrs.d.size_subflow_data = sizeof(struct mptcp_subflow_data); in do_getsockopt_subflow_addrs()
396 addrs.d.size_user = sizeof(struct mptcp_subflow_addrs); in do_getsockopt_subflow_addrs()
397 olen = sizeof(addrs); in do_getsockopt_subflow_addrs()
399 ret = getsockopt(fd, SOL_MPTCP, MPTCP_SUBFLOW_ADDRS, &addrs, &olen); in do_getsockopt_subflow_addrs()
403 assert(olen <= sizeof(addrs)); in do_getsockopt_subflow_addrs()
404 assert(addrs.d.size_user == addrs.d.size_kernel); in do_getsockopt_subflow_addrs()
405 assert(addrs.d.size_user == sizeof(struct mptcp_subflow_addrs)); in do_getsockopt_subflow_addrs()
406 assert(addrs.d.num_subflows == 1); in do_getsockopt_subflow_addrs()
426 assert(memcmp(&local, &addrs.addr[0].ss_local, sizeof(local)) == 0); in do_getsockopt_subflow_addrs()
427 assert(memcmp(&remote, &addrs.addr[0].ss_remote, sizeof(remote)) == 0); in do_getsockopt_subflow_addrs()
429 memset(&addrs, 0, sizeof(addrs)); in do_getsockopt_subflow_addrs()
431 addrs.d.size_subflow_data = sizeof(struct mptcp_subflow_data); in do_getsockopt_subflow_addrs()
432 addrs.d.size_user = sizeof(sa_family_t); in do_getsockopt_subflow_addrs()
433 olen = sizeof(addrs.d) + sizeof(sa_family_t); in do_getsockopt_subflow_addrs()
435 ret = getsockopt(fd, SOL_MPTCP, MPTCP_SUBFLOW_ADDRS, &addrs, &olen); in do_getsockopt_subflow_addrs()
437 assert(olen == sizeof(addrs.d) + sizeof(sa_family_t)); in do_getsockopt_subflow_addrs()
439 assert(addrs.addr[0].sa_family == pf); in do_getsockopt_subflow_addrs()
440 assert(addrs.addr[0].sa_family == local.ss_family); in do_getsockopt_subflow_addrs()
442 assert(memcmp(&local, &addrs.addr[0].ss_local, sizeof(local)) != 0); in do_getsockopt_subflow_addrs()
443 assert(memcmp(&remote, &addrs.addr[0].ss_remote, sizeof(remote)) != 0); in do_getsockopt_subflow_addrs()