Home
last modified time | relevance | path

Searched refs:dstMac (Results 1 – 25 of 35) sorted by relevance

12

/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/
DIpv6Utils.java87 public static ByteBuffer buildIcmpv6Packet(final MacAddress srcMac, final MacAddress dstMac, in buildIcmpv6Packet() argument
95 new EthernetHeader(dstMac, srcMac, (short) ETHER_TYPE_IPV6); in buildIcmpv6Packet()
118 public static ByteBuffer buildRaPacket(final MacAddress srcMac, final MacAddress dstMac, in buildRaPacket() argument
126 return buildIcmpv6Packet(srcMac, dstMac, srcIp, dstIp, in buildRaPacket()
133 public static ByteBuffer buildNaPacket(final MacAddress srcMac, final MacAddress dstMac, in buildNaPacket() argument
139 return buildIcmpv6Packet(srcMac, dstMac, srcIp, dstIp, in buildNaPacket()
146 public static ByteBuffer buildNsPacket(final MacAddress srcMac, final MacAddress dstMac, in buildNsPacket() argument
152 return buildIcmpv6Packet(srcMac, dstMac, srcIp, dstIp, in buildNsPacket()
159 public static ByteBuffer buildRsPacket(final MacAddress srcMac, final MacAddress dstMac, in buildRsPacket() argument
164 return buildIcmpv6Packet(srcMac, dstMac, srcIp, dstIp, in buildRsPacket()
[all …]
DPacketBuilder.java102 public void writeL2Header(MacAddress srcMac, MacAddress dstMac, short etherType) throws in writeL2Header() argument
104 final EthernetHeader ethHeader = new EthernetHeader(dstMac, srcMac, etherType); in writeL2Header()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DTetherDownstream6Key.java39 public final MacAddress dstMac; // Destination ethernet mac address (zeroed iff rawip ingress). field in TetherDownstream6Key
44 public TetherDownstream6Key(final int iif, @NonNull final MacAddress dstMac, in TetherDownstream6Key() argument
46 Objects.requireNonNull(dstMac); in TetherDownstream6Key()
55 this.dstMac = dstMac; in TetherDownstream6Key()
62 return String.format("iif: %d, dstMac: %s, neigh: %s", iif, dstMac, in toString()
DTetherUpstream6Key.java33 public final MacAddress dstMac; // Destination ethernet mac address (zeroed iff rawip ingress). field in TetherUpstream6Key
38 public TetherUpstream6Key(int iif, @NonNull final MacAddress dstMac, final byte[] src64) { in TetherUpstream6Key() argument
39 Objects.requireNonNull(dstMac); in TetherUpstream6Key()
42 this.dstMac = dstMac; in TetherUpstream6Key()
DBpfCoordinator.java1252 rule.srcMac, rule.dstMac)); in dumpIpv6ForwardingRulesByDownstream()
1281 key.iif, getIfName(key.iif), key.dstMac, bytesToPrefix(key.src64), value.oif, in ipv6UpstreamRuleToString()
1309 key.iif, getIfName(key.iif), key.dstMac, neigh6, value.oif, getIfName(value.oif), in ipv6DownstreamRuleToString()
1410 l4protoToString(key.l4proto), key.dstMac, key.iif, getIfName(key.iif), in ipv4RuleToString()
1651 public final MacAddress dstMac; field in BpfCoordinator.Ipv6DownstreamRule
1655 @NonNull MacAddress dstMac) { in Ipv6DownstreamRule() argument
1660 this.dstMac = dstMac; in Ipv6DownstreamRule()
1667 dstMac); in onNewUpstream()
1682 parcel.dstL2Address = dstMac.toByteArray(); in toTetherOffloadRuleParcel()
1700 return new Tether6Value(downstreamIfindex, dstMac, srcMac, ETH_P_IPV6, in makeTether6Value()
[all …]
/packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/
DTether4Key.java37 public final MacAddress dstMac; field in Tether4Key
54 public Tether4Key(final int iif, @NonNull final MacAddress dstMac, final short l4proto, in Tether4Key() argument
57 Objects.requireNonNull(dstMac); in Tether4Key()
60 this.dstMac = dstMac; in Tether4Key()
74 iif, dstMac, l4proto, in toString()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/structs/
DEthernetHeader.java48 public final MacAddress dstMac; field in EthernetHeader
54 public EthernetHeader(final MacAddress dstMac, final MacAddress srcMac, in EthernetHeader() argument
56 this.dstMac = dstMac; in EthernetHeader()
/packages/modules/Connectivity/bpf_progs/
Doffload.h99 uint8_t dstMac[ETH_ALEN]; // destination ethernet mac address (zeroed iff rawip ingress) member
114 uint8_t dstMac[ETH_ALEN]; // destination ethernet mac address (zeroed iff rawip ingress) member
137 uint8_t dstMac[ETH_ALEN]; // destination ethernet mac address (zeroed iff rawip ingress) member
145 uint8_t dstMac[ETH_ALEN]; // destination ethernet mac address (zeroed iff rawip ingress) member
Doffload.c204 if (is_ethernet) __builtin_memcpy(stream.down ? kd.dstMac : ku.dstMac, eth->h_dest, ETH_ALEN);
423 if (is_ethernet) __builtin_memcpy(k.dstMac, eth->h_dest, ETH_ALEN); in do_forward4_bottom()
Doffload@mainline.c204 if (is_ethernet) __builtin_memcpy(stream.down ? kd.dstMac : ku.dstMac, eth->h_dest, ETH_ALEN);
423 if (is_ethernet) __builtin_memcpy(k.dstMac, eth->h_dest, ETH_ALEN); in do_forward4_bottom()
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DRouterAdvertisementResponder.java144 private ByteBuffer buildRaPacket(MacAddress srcMac, MacAddress dstMac, Inet6Address srcIp) { in buildRaPacket() argument
145 return Ipv6Utils.buildRaPacket(srcMac, dstMac, srcIp, IPV6_ADDR_ALL_NODES_MULTICAST, in buildRaPacket()
161 private void replyToRouterSolicitation(TapPacketReader reader, MacAddress dstMac) { in replyToRouterSolicitation() argument
167 final ByteBuffer raResponse = buildRaPacket(it.getValue().first, dstMac, it.getKey()); in replyToRouterSolicitation()
172 private void replyToNeighborSolicitation(TapPacketReader reader, MacAddress dstMac, in replyToNeighborSolicitation() argument
187 final ByteBuffer naResponse = Ipv6Utils.buildNaPacket(srcMac, dstMac, targetIp, dstIp, in replyToNeighborSolicitation()
/packages/modules/Connectivity/Tethering/tests/integration/base/android/net/
DTetheringTester.java352 private Inet6Address runSlaac(MacAddress srcMac, MacAddress dstMac) throws Exception { in runSlaac() argument
353 sendRsPacket(srcMac, dstMac); in runSlaac()
379 private void sendRsPacket(MacAddress srcMac, MacAddress dstMac) throws Exception { in sendRsPacket() argument
382 ByteBuffer rs = Ipv6Utils.buildRsPacket(srcMac, dstMac, (Inet6Address) LINK_LOCAL, in sendRsPacket()
687 @Nullable final MacAddress srcMac, @Nullable final MacAddress dstMac,
692 final boolean hasEther = (srcMac != null && dstMac != null);
700 packetBuilder.writeL2Header(srcMac, dstMac, getEthType(srcIp, dstIp));
736 @Nullable final MacAddress srcMac, @Nullable final MacAddress dstMac,
741 final boolean hasEther = (srcMac != null && dstMac != null);
748 packetBuilder.writeL2Header(srcMac, dstMac, getEthType(srcIp, dstIp));
[all …]
DEthernetTetheringTestBase.java685 @NonNull final MacAddress dstMac, @NonNull final InetAddress srcIp, in sendUploadPacketUdp() argument
697 final ByteBuffer testPacket = buildUdpPacket(srcMac, dstMac, srcIp, dstIp, in sendUploadPacketUdp()
729 @NonNull final MacAddress dstMac, @NonNull final InetAddress srcIp, in sendUploadPacketTcp() argument
742 final ByteBuffer testPacket = buildTcpPacket(srcMac, dstMac, srcIp, dstIp, in sendUploadPacketTcp()
/packages/modules/Connectivity/Tethering/tests/mts/src/android/tethering/mts/
DMtsEthernetTetheringTest.java206 final MacAddress dstMac = tethered.routerMacAddr; in runUdp4Test() local
210 sendUploadPacketUdp(srcMac, dstMac, clientIp, remoteIp, tester, false /* is4To6 */); in runUdp4Test()
222 sendUploadPacketUdp(srcMac, dstMac, clientIp, remoteIp, tester, false /* is4To6 */); in runUdp4Test()
258 sendUploadPacketUdp(srcMac, dstMac, clientIp, remoteIp, tester, in runUdp4Test()
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DIpv6UtilsTest.java61 assertEquals(MAC2, eth.dstMac); in testBuildRsPacket()
90 assertEquals(MAC1, eth.dstMac); in testBuildRaPacket()
121 assertEquals(MAC1, eth.dstMac); in testBuildEchoRequestPacket()
DPacketBuilderTest.java517 @Nullable final MacAddress dstMac, final int l3proto, final int l4proto, in buildPacket() argument
528 final boolean hasEther = (srcMac != null && dstMac != null); in buildPacket()
537 packetBuilder.writeL2Header(srcMac, dstMac, (short) etherType); in buildPacket()
582 assertEquals(DST_MAC, eth.dstMac); in checkEtherHeader()
/packages/modules/Connectivity/Tethering/tests/integration/src/android/net/
DEthernetTetheringTest.java536 final MacAddress dstMac = tethered.routerMacAddr; in runUdp4Test() local
540 sendUploadPacketUdp(srcMac, dstMac, clientIp, remoteIp, tester, false /* is4To6 */); in runUdp4Test()
690 @NonNull final MacAddress dstMac, @NonNull final Inet4Address srcIp, in sendUploadPacketDnsV4() argument
693 final ByteBuffer testPacket = buildUdpPacket(srcMac, dstMac, srcIp, dstIp, in sendUploadPacketDnsV4()
723 final MacAddress dstMac = tethered.routerMacAddr; in testTetherUdpV4Dns() local
726 final byte[] forwardedQueryPacket = sendUploadPacketDnsV4(srcMac, dstMac, clientIp, in testTetherUdpV4Dns()
/packages/modules/NetworkStack/src/com/android/networkstack/packets/
DNeighborAdvertisement.java95 @NonNull final MacAddress dstMac, @NonNull final Inet6Address srcIp, in build() argument
98 return Ipv6Utils.buildNaPacket(srcMac, dstMac, srcIp, dstIp, flags, target, tlla); in build()
DNeighborSolicitation.java95 @NonNull final MacAddress dstMac, @NonNull final Inet6Address srcIp, in build() argument
98 return Ipv6Utils.buildNsPacket(srcMac, dstMac, srcIp, dstIp, target, slla); in build()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/arp/
DArpPacket.java71 public static ByteBuffer buildArpPacket(final byte[] dstMac, final byte[] srcMac, in buildArpPacket() argument
77 buf.put(dstMac); in buildArpPacket()
/packages/modules/Connectivity/Tethering/tests/privileged/src/com/android/networkstack/tethering/
DBpfMapTest.java136 final MacAddress dstMac = MacAddress.fromString(mac); in createTetherDownstream6Key() local
139 return new TetherDownstream6Key(iif, dstMac, ipv6Address.getAddress()); in createTetherDownstream6Key()
144 final MacAddress dstMac = MacAddress.fromString(dst); in createTether6Value() local
146 return new Tether6Value(oif, dstMac, srcMac, proto, pmtu); in createTether6Value()
/packages/modules/Connectivity/Tethering/tests/privileged/src/android/net/ip/
DDadProxyTest.java159 final MacAddress dstMac = MacAddress.fromString("01:02:03:04:05:06"); in createDadPacket() local
160 buf.put(dstMac.toByteArray()); in createDadPacket()
DRouterAdvertisementDaemonTest.java296 final MacAddress dstMac = MacAddress.fromString("33:33:03:04:05:06"); in createRsPacket() local
300 return Ipv6Utils.buildRsPacket(srcMac, dstMac, (Inet6Address) InetAddress.getByName(srcIp), in createRsPacket()
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/packets/
DNeighborSolicitationTest.java212 assertArrayEquals(TEST_DST_MAC_ADDR, ns.ethHdr.dstMac.toByteArray()); in assertNeighborSolicitation()
DNeighborAdvertisementTest.java211 assertArrayEquals(TEST_DST_MAC_ADDR, na.ethHdr.dstMac.toByteArray()); in assertNeighborAdvertisement()

12