Home
last modified time | relevance | path

Searched refs:MdnsConstants (Results 1 – 25 of 33) sorted by relevance

12

/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsConstants.java27 public final class MdnsConstants { class
51 private MdnsConstants() { in MdnsConstants() method in MdnsConstants
55 synchronized (MdnsConstants.class) { in getMdnsIPv4Address()
68 synchronized (MdnsConstants.class) { in getMdnsIPv6Address()
DMdnsPointerRecord.java44 MdnsConstants.QCLASS_INTERNET | (isUnicast ? MdnsConstants.QCLASS_UNICAST : 0), in MdnsPointerRecord()
50 super(name, TYPE_PTR, MdnsConstants.QCLASS_INTERNET, receiptTimeMillis, cacheFlush, in MdnsPointerRecord()
72 MdnsConstants.SUBTYPE_LABEL); in hasSubtype()
DMdnsSocket.java42 new InetSocketAddress(MdnsConstants.getMdnsIPv4Address(), MdnsConstants.MDNS_PORT);
44 new InetSocketAddress(MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT);
DEnqueueMdnsQueryCallable.java142 labels[0] = MdnsConstants.SUBTYPE_PREFIX + subtype; in call()
143 labels[1] = MdnsConstants.SUBTYPE_LABEL; in call()
213 MdnsConstants.FLAGS_QUERY, in call()
218 sendPacketToIpv4AndIpv6(requestSender, MdnsConstants.MDNS_PORT, queryPacket); in call()
261 new InetSocketAddress(MdnsConstants.getMdnsIPv4Address(), port), mdnsPacket); in sendPacketToIpv4AndIpv6()
267 new InetSocketAddress(MdnsConstants.getMdnsIPv6Address(), port), mdnsPacket); in sendPacketToIpv4AndIpv6()
DMdnsKeyRecord.java46 MdnsConstants.QCLASS_INTERNET | (isUnicast ? MdnsConstants.QCLASS_UNICAST : 0), in MdnsKeyRecord()
52 super(name, TYPE_KEY, MdnsConstants.QCLASS_INTERNET, receiptTimeMillis, cacheFlush, in MdnsKeyRecord()
DMdnsTextRecord.java47 MdnsConstants.QCLASS_INTERNET | (isUnicast ? MdnsConstants.QCLASS_UNICAST : 0), in MdnsTextRecord()
53 super(name, TYPE_TXT, MdnsConstants.QCLASS_INTERNET, receiptTimeMillis, cacheFlush, in MdnsTextRecord()
DMdnsInetAddressRecord.java65 MdnsConstants.QCLASS_INTERNET | (isUnicast ? MdnsConstants.QCLASS_UNICAST : 0), in MdnsInetAddressRecord()
72 MdnsConstants.QCLASS_INTERNET, receiptTimeMillis, cacheFlush, ttlMillis); in MdnsInetAddressRecord()
DMdnsServiceRecord.java54 MdnsConstants.QCLASS_INTERNET | (isUnicast ? MdnsConstants.QCLASS_UNICAST : 0), in MdnsServiceRecord()
61 super(name, TYPE_SRV, MdnsConstants.QCLASS_INTERNET, receiptTimeMillis, cacheFlush, in MdnsServiceRecord()
DMdnsPacketRepeater.java19 import static com.android.server.connectivity.mdns.MdnsConstants.IPV4_SOCKET_ADDR;
20 import static com.android.server.connectivity.mdns.MdnsConstants.IPV6_SOCKET_ADDR;
DMdnsReplySender.java19 import static com.android.server.connectivity.mdns.MdnsConstants.IPV4_SOCKET_ADDR;
20 import static com.android.server.connectivity.mdns.MdnsConstants.IPV6_SOCKET_ADDR;
DMdnsResponseDecoder.java95 if ((flags & MdnsConstants.FLAGS_RESPONSE_MASK) != MdnsConstants.FLAGS_RESPONSE) { in parseResponse()
DMdnsRecordRepository.java19 import static com.android.server.connectivity.mdns.MdnsConstants.IPV4_SOCKET_ADDR;
20 import static com.android.server.connectivity.mdns.MdnsConstants.IPV6_SOCKET_ADDR;
21 import static com.android.server.connectivity.mdns.MdnsConstants.NO_PACKET;
638 || (packet.flags & MdnsConstants.FLAGS_RESPONSE) != 0) { in isTruncatedKnownAnswerPacket()
736 if ((packet.flags & MdnsConstants.FLAG_TRUNCATED) != 0) { in getReply()
DMdnsProber.java104 MdnsConstants.FLAGS_QUERY, in makePacket()
DMdnsPacketWriter.java155 byte[] utf8 = value.getBytes(MdnsConstants.getUtf8Charset()); in writeString()
DMdnsPacketReader.java215 String val = new String(buf, pos, len, MdnsConstants.getUtf8Charset()); in readString()
DMdnsRecord.java187 return (cls & MdnsConstants.QCLASS_UNICAST) != 0; in isUnicastReplyRequested()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/
DMdnsRecordRepositoryTest.kt198 assertEquals(MdnsConstants.FLAGS_QUERY, packet.flags) in makeFlags()
1165 assertEquals(MdnsConstants.getMdnsIPv4Address(), replyIpv4.destination.address) in testGetReply_queryWithIpv4Address_replyWithIpv4Address()
1166 assertEquals(MdnsConstants.MDNS_PORT, replyIpv4.destination.port) in testGetReply_queryWithIpv4Address_replyWithIpv4Address()
1179 assertEquals(MdnsConstants.getMdnsIPv6Address(), replyIpv6.destination.address) in testGetReply_queryWithIpv6Address_replyWithIpv6Address()
1180 assertEquals(MdnsConstants.MDNS_PORT, replyIpv6.destination.port) in testGetReply_queryWithIpv6Address_replyWithIpv6Address()
1195 assertEquals(MdnsConstants.getMdnsIPv4Address(), replyIpv4.destination.address) in testGetReply_ipv4AndIpv6Queries_ipv4AndIpv6Replies()
1196 assertEquals(MdnsConstants.MDNS_PORT, replyIpv4.destination.port) in testGetReply_ipv4AndIpv6Queries_ipv4AndIpv6Replies()
1198 assertEquals(MdnsConstants.getMdnsIPv6Address(), replyIpv6.destination.address) in testGetReply_ipv4AndIpv6Queries_ipv4AndIpv6Replies()
1199 assertEquals(MdnsConstants.MDNS_PORT, replyIpv6.destination.port) in testGetReply_ipv4AndIpv6Queries_ipv4AndIpv6Replies()
1214 assertEquals(MdnsConstants.getMdnsIPv4Address(), firstReplyIpv4.destination.address) in testGetReply_twoIpv4QueriesInOneSecond_theSecondReplyIsThrottled()
[all …]
DMdnsRecordTests.java19 import static com.android.server.connectivity.mdns.MdnsConstants.QCLASS_INTERNET;
57 new InetSocketAddress(MdnsConstants.getMdnsIPv4Address(), MdnsConstants.MDNS_PORT);
59 new InetSocketAddress(MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT);
105 new InetSocketAddress(MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT)); in testTypeAAAInet6AddressRecord()
142 new InetSocketAddress(MdnsConstants.getMdnsIPv4Address(), MdnsConstants.MDNS_PORT)); in testTypeAAAInet4AddressRecord()
DMdnsInterfaceAdvertiserTest.kt314 val src = InetSocketAddress(parseNumericAddress("2001:db8::456"), MdnsConstants.MDNS_PORT) in testReplyToQuery()
341 val src = InetSocketAddress(parseNumericAddress("2001:db8::456"), MdnsConstants.MDNS_PORT) in testReplyToQuery_TruncatedBitSet()
350 (pkg.flags and MdnsConstants.FLAG_TRUNCATED) != 0}, in testReplyToQuery_TruncatedBitSet()
354 (pkg.flags and MdnsConstants.FLAG_TRUNCATED) != 0}, in testReplyToQuery_TruncatedBitSet()
358 (pkg.flags and MdnsConstants.FLAG_TRUNCATED) == 0}, in testReplyToQuery_TruncatedBitSet()
375 assertTrue((it.flags and MdnsConstants.FLAG_TRUNCATED) != 0) in testReplyToQuery_TruncatedBitSet()
403 assertTrue((it.flags and MdnsConstants.FLAG_TRUNCATED) != 0) in testReplyToQuery_TruncatedBitSet()
431 assertTrue((it.flags and MdnsConstants.FLAG_TRUNCATED) == 0) in testReplyToQuery_TruncatedBitSet()
457 val src = InetSocketAddress(parseNumericAddress("2001:db8::456"), MdnsConstants.MDNS_PORT) in testConflict()
DMdnsSocketClientTests.java105 if (port == MdnsConstants.MDNS_PORT) { in setup()
540 if (port == MdnsConstants.MDNS_PORT) { in startDiscovery_andPropagateInterfaceIndex_includesInterfaceIndex()
563 if (port == MdnsConstants.MDNS_PORT) { in startDiscovery_andDoNotPropagateInterfaceIndex_doesNotIncludeInterfaceIndex()
583 10 + i /* length */, MdnsConstants.IPV4_SOCKET_ADDR)); in testSendPacketWithMultipleDatagramPacket()
599 new InetSocketAddress(MdnsConstants.getMdnsIPv4Address(), 5353 /* port */)); in getTestDatagramPacket()
DMdnsSocketTests.java73 InetAddress.getByName("224.0.0.251"), MdnsConstants.MDNS_PORT); in setUp()
75 InetAddress.getByName("FF02::FB"), MdnsConstants.MDNS_PORT); in setUp()
DMdnsReplySenderTest.kt26 import com.android.server.connectivity.mdns.MdnsConstants.IPV4_SOCKET_ADDR
27 import com.android.server.connectivity.mdns.MdnsConstants.IPV6_SOCKET_ADDR
DMdnsServiceTypeClientTests.java108 MdnsConstants.getMdnsIPv4Address(), MdnsConstants.MDNS_PORT);
110 MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT);
161 MdnsConstants.getMdnsIPv4Address(), MdnsConstants.MDNS_PORT); in setUp()
163 MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT); in setUp()
2203 type.add(MdnsConstants.SUBTYPE_LABEL); in createResponse()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/util/
DMdnsUtilsTest.kt20 import com.android.server.connectivity.mdns.MdnsConstants in <lambda>()
21 import com.android.server.connectivity.mdns.MdnsConstants.FLAG_TRUNCATED in <lambda>()
157 MdnsConstants.FLAGS_QUERY, in <lambda>()
168 MdnsConstants.IPV4_SOCKET_ADDR in <lambda>()
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/util/
DMdnsUtils.java19 import static com.android.server.connectivity.mdns.MdnsConstants.FLAG_TRUNCATED;
30 import com.android.server.connectivity.mdns.MdnsConstants;
139 && MdnsUtils.equalsIgnoreDnsCase(b[1], MdnsConstants.SUBTYPE_LABEL) in typeEqualsOrIsSubtype()
350 fullSubtype[1] = MdnsConstants.SUBTYPE_LABEL; in constructFullSubtype()

12