Searched refs:l3proto (Results 1 – 2 of 2) sorted by relevance
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | PacketBuilderTest.java | 517 @Nullable final MacAddress dstMac, final int l3proto, final int l4proto, in buildPacket() argument 520 if (l3proto != IPPROTO_IP && l3proto != IPPROTO_IPV6) { in buildPacket() 521 fail("Unsupported layer 3 protocol " + l3proto); in buildPacket() 530 final ByteBuffer buffer = PacketBuilder.allocate(hasEther, l3proto, l4proto, in buildPacket() 536 final int etherType = (l3proto == IPPROTO_IP) ? ETHER_TYPE_IPV4 : ETHER_TYPE_IPV6; in buildPacket() 541 if (l3proto == IPPROTO_IP) { in buildPacket() 544 } else if (l3proto == IPPROTO_IPV6) { in buildPacket() 575 private void checkEtherHeader(final int l3proto, final ByteBuffer actual) { in checkEtherHeader() argument 576 if (l3proto != IPPROTO_IP && l3proto != IPPROTO_IPV6) { in checkEtherHeader() 577 fail("Unsupported layer 3 protocol " + l3proto); in checkEtherHeader() [all …]
|
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/ |
D | PacketBuilder.java | 279 public static ByteBuffer allocate(boolean hasEther, int l3proto, int l4proto, int payloadLen) { in allocate() argument 280 if (l3proto != IPPROTO_IP && l3proto != IPPROTO_IPV6) { in allocate() 281 throw new IllegalArgumentException("Unsupported layer 3 protocol " + l3proto); in allocate() 294 packetLen += (l3proto == IPPROTO_IP) ? Struct.getSize(Ipv4Header.class) in allocate()
|