Home
last modified time | relevance | path

Searched refs:family (Results 1 – 25 of 79) sorted by relevance

1234

/system/connectivity/shill/net/
Dip_address.cc54 IPAddress::IPAddress(Family family, const ByteString& address) in IPAddress() argument
55 : family_(family) , in IPAddress()
59 IPAddress::IPAddress(Family family, in IPAddress() argument
62 : family_(family) , in IPAddress()
66 IPAddress::IPAddress(Family family) in IPAddress() argument
67 : family_(family), in IPAddress()
102 size_t IPAddress::GetAddressLength(Family family) { in GetAddressLength() argument
103 switch (family) { in GetAddressLength()
114 size_t IPAddress::GetMaxPrefixLength(Family family) { in GetMaxPrefixLength() argument
115 return GetAddressLength(family) * kBitsPerByte; in GetMaxPrefixLength()
[all …]
Dip_address_unittest.cc49 void TestAddress(IPAddress::Family family, in TestAddress() argument
54 IPAddress good_addr(family); in TestAddress()
57 EXPECT_EQ(IPAddress::GetAddressLength(family), good_addr.GetLength()); in TestAddress()
58 EXPECT_EQ(family, good_addr.family()); in TestAddress()
67 IPAddress good_addr_from_bytes(family, good_bytes); in TestAddress()
71 EXPECT_EQ(family, good_addr_from_string.family()); in TestAddress()
73 IPAddress bad_addr(family); in TestAddress()
79 IPAddress bad_addr_from_bytes(family, bad_bytes); in TestAddress()
80 EXPECT_EQ(family, bad_addr_from_bytes.family()); in TestAddress()
84 EXPECT_EQ(IPAddress::kFamilyUnknown, bad_addr_from_string.family()); in TestAddress()
[all …]
Dip_address.h39 explicit IPAddress(Family family);
49 IPAddress(Family family, const ByteString& address);
50 IPAddress(Family family, const ByteString& address, unsigned int prefix);
67 static size_t GetAddressLength(Family family);
71 static size_t GetMaxPrefixLength(Family family);
86 static size_t GetPrefixLengthFromMask(Family family, const std::string& mask);
90 static IPAddress GetAddressMaskFromPrefix(Family family, size_t prefix);
93 static std::string GetAddressFamilyName(Family family);
96 Family family() const { return family_; } in family() function
97 void set_family(Family family) { family_ = family; } in set_family() argument
Drtnl_message_unittest.cc440 EXPECT_EQ(address.family(), msg.family()); in TestParseAddress()
448 IPAddress(address.family(), in TestParseAddress()
455 IPAddress::Family family, in TestParseRoute() argument
470 EXPECT_EQ(family, msg.family()); in TestParseRoute()
480 EXPECT_TRUE(IPAddress(family, in TestParseRoute()
487 EXPECT_TRUE(IPAddress(family, in TestParseRoute()
494 EXPECT_TRUE(IPAddress(family, in TestParseRoute()
550 IPAddress::Family family, in TestParseNeighbor() argument
560 EXPECT_EQ(family, msg.family()); in TestParseNeighbor()
Drtnl_handler.cc234 IPAddress::Family family = IPAddress::kFamilyUnknown; in NextRequest() local
250 family = AF_BRIDGE; in NextRequest()
264 family); in NextRequest()
355 CHECK(local.family() == broadcast.family()); in AddressRequest()
356 CHECK(local.family() == peer.family()); in AddressRequest()
365 local.family()); in AddressRequest()
401 IPAddress(local.family()), in RemoveInterfaceAddress()
402 IPAddress(local.family())); in RemoveInterfaceAddress()
/system/connectivity/shill/
Darp_packet.cc84 IPAddress::Family family = IPAddress::kFamilyUnknown; in Parse() local
86 family = IPAddress::kFamilyIPv4; in Parse()
88 family = IPAddress::kFamilyIPv6; in Parse()
99 size_t ip_address_length = IPAddress::GetAddressLength(family); in Parse()
124 local_ip_address_ = IPAddress(family, packet.GetSubstring( in Parse()
128 remote_ip_address_ = IPAddress(family, packet.GetSubstring( in Parse()
139 if (local_ip_address_.family() != remote_ip_address_.family()) { in FormatRequest()
144 IPAddress::Family family = local_ip_address_.family(); in FormatRequest() local
145 if (family == IPAddress::kFamilyIPv4) { in FormatRequest()
147 } else if (family == IPAddress::kFamilyIPv6) { in FormatRequest()
[all …]
Drouting_table.cc117 IPAddress::Family family, in GetDefaultRoute() argument
120 bool ret = GetDefaultRouteInternal(interface_index, family, &found_entry); in GetDefaultRoute()
128 IPAddress::Family family, in GetDefaultRouteInternal() argument
131 << " family " << IPAddress::GetAddressFamilyName(family); in GetDefaultRouteInternal()
140 if (nent.dst.IsDefault() && nent.dst.family() == family) { in GetDefaultRouteInternal()
163 gateway_address.family(), in SetDefaultRoute()
179 IPAddress default_address(gateway_address.family()); in SetDefaultRoute()
295 message.family() == IPAddress::kFamilyUnknown || in ParseRoutingTableMessage()
317 IPAddress default_addr(message.family()); in ParseRoutingTableMessage()
333 entry->dst = IPAddress(message.family(), dst_bytes, route_status.dst_prefix); in ParseRoutingTableMessage()
[all …]
Dasync_connection.cc55 int family = PF_INET; in Start() local
56 if (address.family() == IPAddress::kFamilyIPv6) { in Start()
57 family = PF_INET6; in Start()
59 fd_ = sockets_->Socket(family, SOCK_STREAM, 0); in Start()
131 if (address.family() == IPAddress::kFamilyIPv4) { in ConnectTo()
142 } else if (address.family() == IPAddress::kFamilyIPv6) { in ConnectTo()
Ddns_client_factory.cc39 IPAddress::Family family, in CreateDNSClient() argument
45 return new DNSClient(family, in CreateDNSClient()
Dsocket_info_reader.cc153 IPAddress::Family family; in ParseIPAddress() local
156 family = IPAddress::kFamilyIPv4; in ParseIPAddress()
159 family = IPAddress::kFamilyIPv6; in ParseIPAddress()
168 *ip_address = IPAddress(family, byte_string); in ParseIPAddress()
Drouting_table.h82 IPAddress::Family family,
103 IPAddress::Family family,
163 IPAddress::Family family,
Dmock_routing_table.h37 IPAddress::Family family,
48 IPAddress::Family family,
Dshill_ares.cc39 int family, in GetHostByName() argument
42 ares_gethostbyname(channel, hostname, family, callback, arg); in GetHostByName()
Ddns_client.cc76 DNSClient::DNSClient(IPAddress::Family family, in DNSClient() argument
82 : address_(IPAddress(family)), in DNSClient()
163 address_.family(), ReceiveDNSReplyCB, this); in Start()
243 hostent->h_addrtype == address_.family() && in ReceiveDNSReply()
245 IPAddress::GetAddressLength(address_.family()) && in ReceiveDNSReply()
248 address_ = IPAddress(address_.family(), in ReceiveDNSReply()
/system/extras/tests/net_test/
Dsock_diag.py108 if msg.family == AF_INET or msg.family == AF_INET6:
196 family = AF_INET6 if ":" in addr else AF_INET
197 addr = inet_pton(family, addr)
198 arg = InetDiagHostcond((family, prefixlen, port)).Pack() + addr
240 for family in [AF_INET, AF_INET6]:
241 diag_req = InetDiagReqV2((family, protocol, ext, states, sock_id))
247 def GetRawAddress(family, addr): argument
249 addrlen = {AF_INET:4, AF_INET6: 16}[family]
250 return inet_ntop(family, addr[:addrlen])
255 return SockDiag.GetRawAddress(diag_msg.family, diag_msg.id.src)
[all …]
Dnet_test.py103 level = {AF_INET: SOL_IP, AF_INET6: SOL_IPV6}[s.family]
104 option = {AF_INET: IP_TOS, AF_INET6: IPV6_TCLASS}[s.family]
114 def Socket(family, sock_type, protocol): argument
115 s = socket(family, sock_type, protocol)
120 def PingSocket(family): argument
121 proto = {AF_INET: IPPROTO_ICMP, AF_INET6: IPPROTO_ICMPV6}[family]
122 return Socket(family, SOCK_DGRAM, proto)
133 def TCPSocket(family): argument
134 s = Socket(family, SOCK_STREAM, IPPROTO_TCP)
147 def UDPSocket(family): argument
[all …]
Diproute.py213 def _NlAttrIPAddress(self, nla_type, family, address): argument
214 return self._NlAttr(nla_type, socket.inet_pton(family, address))
282 data = socket.inet_ntop(msg.family, nla_data)
286 data = self._ParseAttributes(-RTA_METRICS, msg.family, None, nla_data)
335 family = self._AddressFamily(version)
336 rtmsg = RTMsg((family, 0, 0, 0, RT_TABLE_UNSPEC,
349 family = self._AddressFamily(version)
350 rtmsg = RTMsg((family, 0, 0, 0, RT_TABLE_UNSPEC,
419 family = self._AddressFamily(version)
420 rtmsg = RTMsg((family, 0, 0, 0, 0, 0, 0, 0, 0))
[all …]
Dcsocket.py56 family = socket.AF_INET6
61 addr = socket.inet_pton(family, addr)
62 return SockaddrIn6((family, socket.ntohs(port), socket.ntohl(flowinfo),
65 family = socket.AF_INET
67 addr = socket.inet_pton(family, addr)
68 return SockaddrIn((family, socket.ntohs(port), addr))
Dtcp_nuke_addr_test.py108 family, _, _, _, _ = getaddrinfo(addr, None, AF_UNSPEC, SOCK_DGRAM, 0,
110 if family == AF_INET6:
113 elif family == AF_INET:
118 raise ValueError('Address family %r not supported.' % family)
119 datagram_socket = socket(family, SOCK_DGRAM)
/system/netd/server/
DSockDiag.cpp94 int SockDiag::sendDumpRequest(uint8_t proto, uint8_t family, uint32_t states, in sendDumpRequest() argument
105 .sdiag_family = family, in sendDumpRequest()
126 int SockDiag::sendDumpRequest(uint8_t proto, uint8_t family, uint32_t states) { in sendDumpRequest() argument
130 return sendDumpRequest(proto, family, states, iov, ARRAY_SIZE(iov)); in sendDumpRequest()
133 int SockDiag::sendDumpRequest(uint8_t proto, uint8_t family, const char *addrstr) { in sendDumpRequest() argument
150 if (res->ai_family == AF_INET && family == AF_INET) { in sendDumpRequest()
154 } else if (res->ai_family == AF_INET && family == AF_INET6) { in sendDumpRequest()
159 } else if (res->ai_family == AF_INET6 && family == AF_INET6) { in sendDumpRequest()
185 family, in sendDumpRequest()
201 return sendDumpRequest(proto, family, states, iov, ARRAY_SIZE(iov)); in sendDumpRequest()
[all …]
DSockDiag.h50 int sendDumpRequest(uint8_t proto, uint8_t family, uint32_t states);
51 int sendDumpRequest(uint8_t proto, uint8_t family, const char *addrstr);
62 int sendDumpRequest(uint8_t proto, uint8_t family, uint32_t states, iovec *iov, int iovcnt);
63 int destroySockets(uint8_t proto, int family, const char *addrstr);
/system/netd/client/
DFwmarkClient.cpp34 bool FwmarkClient::shouldSetFwmark(int family) { in shouldSetFwmark() argument
35 return (family == AF_INET || family == AF_INET6) && !getenv("ANDROID_NO_USE_FWMARK_CLIENT"); in shouldSetFwmark()
DNetdClient.cpp57 int family; in netdClientAccept4() local
59 family = addr->sa_family; in netdClientAccept4()
61 socklen_t familyLen = sizeof(family); in netdClientAccept4()
62 if (getsockopt(acceptedSocket, SOL_SOCKET, SO_DOMAIN, &family, &familyLen) == -1) { in netdClientAccept4()
66 if (FwmarkClient::shouldSetFwmark(family)) { in netdClientAccept4()
/system/extras/multinetwork/
Dcommon.h36 family(AF_UNSPEC), in Arguments()
44 sa_family_t family; member
Dcommon.cpp87 family = AF_UNSPEC; in parseArguments()
89 family = AF_INET; in parseArguments()
91 family = AF_INET6; in parseArguments()

1234