/packages/modules/IPsec/src/java/com/android/internal/net/eap/message/simaka/ |
D | EapSimAkaAttribute.java | 134 public abstract void encode(ByteBuffer byteBuffer); in encode() argument 194 protected void encodeAttributeHeader(ByteBuffer byteBuffer) { in encodeAttributeHeader() argument 195 byteBuffer.put((byte) attributeType); in encodeAttributeHeader() 196 byteBuffer.put((byte) (lengthInBytes / LENGTH_SCALING)); in encodeAttributeHeader() 199 void consumePadding(int bytesUsed, ByteBuffer byteBuffer) { in consumePadding() argument 201 byteBuffer.get(new byte[paddingRemaining]); in consumePadding() 204 void addPadding(int bytesUsed, ByteBuffer byteBuffer) { in addPadding() argument 206 byteBuffer.put(new byte[paddingNeeded]); in addPadding() 221 ByteBuffer byteBuffer) throws EapSimAkaInvalidAttributeException { in EapSimAkaUnsupportedAttribute() argument 227 byteBuffer.get(data); in EapSimAkaUnsupportedAttribute() [all …]
|
D | EapSimAkaAttributeFactory.java | 77 EapSimAkaAttribute getAttribute(int attributeType, int lengthInBytes, ByteBuffer byteBuffer) in getAttribute() argument 82 return new AtPermanentIdReq(lengthInBytes, byteBuffer); in getAttribute() 84 return new AtAnyIdReq(lengthInBytes, byteBuffer); in getAttribute() 86 return new AtFullauthIdReq(lengthInBytes, byteBuffer); in getAttribute() 88 return new AtIdentity(lengthInBytes, byteBuffer); in getAttribute() 90 return new AtPadding(lengthInBytes, byteBuffer); in getAttribute() 92 return new AtMac(lengthInBytes, byteBuffer); in getAttribute() 94 return new AtCounter(lengthInBytes, byteBuffer); in getAttribute() 96 return new AtCounterTooSmall(lengthInBytes, byteBuffer); in getAttribute() 98 return new AtNonceS(lengthInBytes, byteBuffer); in getAttribute() [all …]
|
D | EapAkaAttributeFactory.java | 66 public EapSimAkaAttribute getAttribute(ByteBuffer byteBuffer) in getAttribute() argument 68 int attributeType = Byte.toUnsignedInt(byteBuffer.get()); in getAttribute() 71 int lengthInBytes = Byte.toUnsignedInt(byteBuffer.get()) * LENGTH_SCALING; in getAttribute() 73 return getAttribute(attributeType, lengthInBytes, byteBuffer); in getAttribute() 78 int attributeType, int lengthInBytes, ByteBuffer byteBuffer) in getAttribute() argument 82 return new AtRandAka(lengthInBytes, byteBuffer); in getAttribute() 84 return new AtAutn(lengthInBytes, byteBuffer); in getAttribute() 86 return new AtRes(lengthInBytes, byteBuffer); in getAttribute() 88 return new AtAuts(lengthInBytes, byteBuffer); in getAttribute() 90 return new AtBidding(lengthInBytes, byteBuffer); in getAttribute() [all …]
|
D | EapSimAttributeFactory.java | 65 public EapSimAkaAttribute getAttribute(ByteBuffer byteBuffer) throws in getAttribute() argument 67 int attributeType = Byte.toUnsignedInt(byteBuffer.get()); in getAttribute() 70 int lengthInBytes = Byte.toUnsignedInt(byteBuffer.get()) * LENGTH_SCALING; in getAttribute() 75 return new AtVersionList(lengthInBytes, byteBuffer); in getAttribute() 77 int selectedVersion = Short.toUnsignedInt(byteBuffer.getShort()); in getAttribute() 80 return new AtNonceMt(lengthInBytes, byteBuffer); in getAttribute() 82 return new AtRandSim(lengthInBytes, byteBuffer); in getAttribute() 84 return super.getAttribute(attributeType, lengthInBytes, byteBuffer); in getAttribute()
|
D | EapAkaPrimeAttributeFactory.java | 61 public EapSimAkaAttribute getAttribute(ByteBuffer byteBuffer) in getAttribute() argument 63 int attributeType = Byte.toUnsignedInt(byteBuffer.get()); in getAttribute() 66 int lengthInBytes = Byte.toUnsignedInt(byteBuffer.get()) * LENGTH_SCALING; in getAttribute() 70 return new AtKdfInput(lengthInBytes, byteBuffer); in getAttribute() 72 return new AtKdf(lengthInBytes, byteBuffer); in getAttribute() 74 return super.getAttribute(attributeType, lengthInBytes, byteBuffer); in getAttribute()
|
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/ |
D | StructNlAttr.java | 47 public static StructNlAttr peek(ByteBuffer byteBuffer) { in peek() argument 48 if (byteBuffer == null || byteBuffer.remaining() < NLA_HEADERLEN) { in peek() 51 final int baseOffset = byteBuffer.position(); in peek() 54 final ByteOrder originalOrder = byteBuffer.order(); in peek() 55 byteBuffer.order(ByteOrder.nativeOrder()); in peek() 57 struct.nla_len = byteBuffer.getShort(); in peek() 58 struct.nla_type = byteBuffer.getShort(); in peek() 60 byteBuffer.order(originalOrder); in peek() 63 byteBuffer.position(baseOffset); in peek() 71 public static StructNlAttr parse(ByteBuffer byteBuffer) { in parse() argument [all …]
|
D | ConntrackMessage.java | 203 final ByteBuffer byteBuffer = ByteBuffer.wrap(bytes); in newIPv4TimeoutUpdateRequest() local 204 byteBuffer.order(ByteOrder.nativeOrder()); in newIPv4TimeoutUpdateRequest() 212 ctmsg.pack(byteBuffer); in newIPv4TimeoutUpdateRequest() 214 ctaTupleOrig.pack(byteBuffer); in newIPv4TimeoutUpdateRequest() 215 ctaTimeout.pack(byteBuffer); in newIPv4TimeoutUpdateRequest() 228 public static ConntrackMessage parse(StructNlMsgHdr header, ByteBuffer byteBuffer) { in parse() argument 232 final StructNfGenMsg nfGenMsg = StructNfGenMsg.parse(byteBuffer); in parse() 237 final int baseOffset = byteBuffer.position(); in parse() 238 StructNlAttr nlAttr = findNextAttrOfType(CTA_STATUS, byteBuffer); in parse() 244 byteBuffer.position(baseOffset); in parse() [all …]
|
D | RtNetlinkNeighborMessage.java | 51 public static RtNetlinkNeighborMessage parse(StructNlMsgHdr header, ByteBuffer byteBuffer) { in parse() argument 54 neighMsg.mNdmsg = StructNdMsg.parse(byteBuffer); in parse() 60 final int baseOffset = byteBuffer.position(); in parse() 61 StructNlAttr nlAttr = StructNlAttr.findNextAttrOfType(NDA_DST, byteBuffer); in parse() 66 byteBuffer.position(baseOffset); in parse() 67 nlAttr = StructNlAttr.findNextAttrOfType(NDA_LLADDR, byteBuffer); in parse() 72 byteBuffer.position(baseOffset); in parse() 73 nlAttr = StructNlAttr.findNextAttrOfType(NDA_PROBES, byteBuffer); in parse() 78 byteBuffer.position(baseOffset); in parse() 79 nlAttr = StructNlAttr.findNextAttrOfType(NDA_CACHEINFO, byteBuffer); in parse() [all …]
|
D | NetlinkMessage.java | 47 public static NetlinkMessage parse(@NonNull ByteBuffer byteBuffer, int nlFamily) { in parse() argument 48 final int startPosition = (byteBuffer != null) ? byteBuffer.position() : -1; in parse() 49 final StructNlMsgHdr nlmsghdr = StructNlMsgHdr.parse(byteBuffer); in parse() 56 if (payloadLength < 0 || payloadLength > byteBuffer.remaining()) { in parse() 58 byteBuffer.position(byteBuffer.limit()); in parse() 65 return parseCtlMessage(nlmsghdr, byteBuffer, payloadLength); in parse() 72 return parseRtMessage(nlmsghdr, byteBuffer); in parse() 74 return parseInetDiagMessage(nlmsghdr, byteBuffer); in parse() 76 return parseNfMessage(nlmsghdr, byteBuffer); in parse() 104 @NonNull ByteBuffer byteBuffer, int payloadLength) { in parseCtlMessage() argument [all …]
|
D | StructNfGenMsg.java | 51 public static StructNfGenMsg parse(@NonNull ByteBuffer byteBuffer) { in parse() argument 52 Objects.requireNonNull(byteBuffer); in parse() 54 if (!hasAvailableSpace(byteBuffer)) return null; in parse() 56 final byte nfgen_family = byteBuffer.get(); in parse() 57 final byte version = byteBuffer.get(); in parse() 59 final ByteOrder originalOrder = byteBuffer.order(); in parse() 60 byteBuffer.order(ByteOrder.BIG_ENDIAN); in parse() 61 final short res_id = byteBuffer.getShort(); in parse() 62 byteBuffer.order(originalOrder); in parse() 79 public void pack(ByteBuffer byteBuffer) { in pack() argument [all …]
|
D | StructNdMsg.java | 101 private static boolean hasAvailableSpace(ByteBuffer byteBuffer) { in hasAvailableSpace() argument 102 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE; in hasAvailableSpace() 105 public static StructNdMsg parse(ByteBuffer byteBuffer) { in parse() argument 106 if (!hasAvailableSpace(byteBuffer)) { return null; } in parse() 112 struct.ndm_family = byteBuffer.get(); in parse() 113 final byte pad1 = byteBuffer.get(); in parse() 114 final short pad2 = byteBuffer.getShort(); in parse() 115 struct.ndm_ifindex = byteBuffer.getInt(); in parse() 116 struct.ndm_state = byteBuffer.getShort(); in parse() 117 struct.ndm_flags = byteBuffer.get(); in parse() [all …]
|
D | StructNlMsgHdr.java | 80 public static boolean hasAvailableSpace(ByteBuffer byteBuffer) { in hasAvailableSpace() argument 81 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE; in hasAvailableSpace() 84 public static StructNlMsgHdr parse(ByteBuffer byteBuffer) { in parse() argument 85 if (!hasAvailableSpace(byteBuffer)) { return null; } in parse() 91 struct.nlmsg_len = byteBuffer.getInt(); in parse() 92 struct.nlmsg_type = byteBuffer.getShort(); in parse() 93 struct.nlmsg_flags = byteBuffer.getShort(); in parse() 94 struct.nlmsg_seq = byteBuffer.getInt(); in parse() 95 struct.nlmsg_pid = byteBuffer.getInt(); in parse() 118 public void pack(ByteBuffer byteBuffer) { in pack() argument [all …]
|
D | StructInetDiagSockId.java | 58 public void pack(ByteBuffer byteBuffer) { in pack() argument 59 byteBuffer.order(BIG_ENDIAN); in pack() 60 byteBuffer.putShort((short) mLocSocketAddress.getPort()); in pack() 61 byteBuffer.putShort((short) mRemSocketAddress.getPort()); in pack() 62 byteBuffer.put(mLocSocketAddress.getAddress().getAddress()); in pack() 64 byteBuffer.put(IPV4_PADDING); in pack() 66 byteBuffer.put(mRemSocketAddress.getAddress().getAddress()); in pack() 68 byteBuffer.put(IPV4_PADDING); in pack() 70 byteBuffer.order(ByteOrder.nativeOrder()); in pack() 71 byteBuffer.putInt(0); in pack() [all …]
|
D | StructNlMsgErr.java | 32 public static boolean hasAvailableSpace(ByteBuffer byteBuffer) { in hasAvailableSpace() argument 33 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE; in hasAvailableSpace() 36 public static StructNlMsgErr parse(ByteBuffer byteBuffer) { in parse() argument 37 if (!hasAvailableSpace(byteBuffer)) { return null; } in parse() 43 struct.error = byteBuffer.getInt(); in parse() 44 struct.msg = StructNlMsgHdr.parse(byteBuffer); in parse() 51 public void pack(ByteBuffer byteBuffer) { in pack() argument 55 byteBuffer.putInt(error); in pack() 57 msg.pack(byteBuffer); in pack()
|
D | StructNdaCacheInfo.java | 36 private static boolean hasAvailableSpace(ByteBuffer byteBuffer) { in hasAvailableSpace() argument 37 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE; in hasAvailableSpace() 40 public static StructNdaCacheInfo parse(ByteBuffer byteBuffer) { in parse() argument 41 if (!hasAvailableSpace(byteBuffer)) { return null; } in parse() 47 struct.ndm_used = byteBuffer.getInt(); in parse() 48 struct.ndm_confirmed = byteBuffer.getInt(); in parse() 49 struct.ndm_updated = byteBuffer.getInt(); in parse() 50 struct.ndm_refcnt = byteBuffer.getInt(); in parse()
|
D | StructInetDiagReqV2.java | 73 public void pack(ByteBuffer byteBuffer) { in pack() argument 75 byteBuffer.put((byte) mSdiagFamily); in pack() 76 byteBuffer.put((byte) mSdiagProtocol); in pack() 77 byteBuffer.put((byte) mIdiagExt); in pack() 78 byteBuffer.put((byte) mPad); in pack() 79 byteBuffer.putInt(mState); in pack() 80 if (mId != null) mId.pack(byteBuffer); in pack()
|
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
D | NinePatchChunk.java | 50 ByteBuffer byteBuffer = in deserialize() local 53 byte wasSerialized = byteBuffer.get(); in deserialize() 57 chunk.mDivX = new int[byteBuffer.get()]; in deserialize() 58 chunk.mDivY = new int[byteBuffer.get()]; in deserialize() 59 chunk.mColor = new int[byteBuffer.get()]; in deserialize() 65 byteBuffer.getInt(); in deserialize() 66 byteBuffer.getInt(); in deserialize() 68 chunk.mPaddings.left = byteBuffer.getInt(); in deserialize() 69 chunk.mPaddings.right = byteBuffer.getInt(); in deserialize() 70 chunk.mPaddings.top = byteBuffer.getInt(); in deserialize() [all …]
|
/packages/modules/NetworkStack/tests/unit/src/android/net/netlink/ |
D | ConntrackMessageTest.java | 149 final ByteBuffer byteBuffer = ByteBuffer.wrap(tcp); in testConntrackParseIPv4TcpTimeoutUpdate() local 150 byteBuffer.order(ByteOrder.nativeOrder()); in testConntrackParseIPv4TcpTimeoutUpdate() 151 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer, OsConstants.NETLINK_NETFILTER); in testConntrackParseIPv4TcpTimeoutUpdate() 198 final ByteBuffer byteBuffer = ByteBuffer.wrap(udp); in testConntrackParseIPv4UdpTimeoutUpdate() local 199 byteBuffer.order(ByteOrder.nativeOrder()); in testConntrackParseIPv4UdpTimeoutUpdate() 200 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer, OsConstants.NETLINK_NETFILTER); in testConntrackParseIPv4UdpTimeoutUpdate() 292 final ByteBuffer byteBuffer = ByteBuffer.wrap(CT_V4NEW_TCP_BYTES); in testParseCtNew() local 293 byteBuffer.order(ByteOrder.nativeOrder()); in testParseCtNew() 294 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer, OsConstants.NETLINK_NETFILTER); in testParseCtNew() 343 final ByteBuffer byteBuffer = ByteBuffer.wrap(truncated); in testParseTruncation() local [all …]
|
D | RtNetlinkNeighborMessageTest.java | 83 final ByteBuffer byteBuffer = ByteBuffer.wrap(RTM_DELNEIGH); in testParseRtmDelNeigh() local 84 byteBuffer.order(ByteOrder.LITTLE_ENDIAN); // For testing. in testParseRtmDelNeigh() 85 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer, NETLINK_ROUTE); in testParseRtmDelNeigh() 110 final ByteBuffer byteBuffer = ByteBuffer.wrap(RTM_NEWNEIGH); in testParseRtmNewNeigh() local 111 byteBuffer.order(ByteOrder.LITTLE_ENDIAN); // For testing. in testParseRtmNewNeigh() 112 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer, NETLINK_ROUTE); in testParseRtmNewNeigh() 137 final ByteBuffer byteBuffer = ByteBuffer.wrap(RTM_GETNEIGH_RESPONSE); in testParseRtmGetNeighResponse() local 138 byteBuffer.order(ByteOrder.LITTLE_ENDIAN); // For testing. in testParseRtmGetNeighResponse() 141 while (byteBuffer.remaining() > 0) { in testParseRtmGetNeighResponse() 142 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer, NETLINK_ROUTE); in testParseRtmGetNeighResponse()
|
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/ |
D | IkeSaPayload.java | 701 protected void encodeToByteBuffer(boolean isLast, ByteBuffer byteBuffer) { in encodeToByteBuffer() argument 705 byteBuffer in encodeToByteBuffer() 719 byteBuffer.putInt((int) spi); in encodeToByteBuffer() 722 byteBuffer.putLong((long) spi); in encodeToByteBuffer() 732 allTransforms[i].encodeToByteBuffer(i == allTransforms.length - 1, byteBuffer); in encodeToByteBuffer() 1091 protected abstract void encodeToByteBuffer(boolean isLast, ByteBuffer byteBuffer); in encodeToByteBuffer() argument 1096 protected void encodeBasicTransformToByteBuffer(boolean isLast, ByteBuffer byteBuffer) { in encodeBasicTransformToByteBuffer() argument 1098 byteBuffer in encodeBasicTransformToByteBuffer() 1297 protected void encodeToByteBuffer(boolean isLast, ByteBuffer byteBuffer) { in encodeToByteBuffer() argument 1298 encodeBasicTransformToByteBuffer(isLast, byteBuffer); in encodeToByteBuffer() [all …]
|
D | IkeIdPayload.java | 119 ByteBuffer byteBuffer = ByteBuffer.allocate(getPayloadLength() - GENERIC_HEADER_LENGTH); in getEncodedPayloadBody() local 121 byteBuffer in getEncodedPayloadBody() 125 return byteBuffer.array(); in getEncodedPayloadBody() 141 protected void encodeToByteBuffer(@PayloadType int nextPayload, ByteBuffer byteBuffer) { in encodeToByteBuffer() argument 142 encodePayloadHeaderToByteBuffer(nextPayload, getPayloadLength(), byteBuffer); in encodeToByteBuffer() 143 byteBuffer.put(getEncodedPayloadBody()); in encodeToByteBuffer()
|
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/exif/ |
D | CountedDataInputStream.java | 34 private final ByteBuffer byteBuffer = ByteBuffer.wrap(byteArray); field in CountedDataInputStream 97 byteBuffer.order(order); in setByteOrder() 101 return byteBuffer.order(); in getByteOrder() 106 byteBuffer.rewind(); in readShort() 107 return byteBuffer.getShort(); in readShort() 116 byteBuffer.rewind(); in readInt() 117 return byteBuffer.getInt(); in readInt()
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/ |
D | IkeSaPayloadTest.java | 279 ByteBuffer byteBuffer = ByteBuffer.allocate(mAttributeKeyLength128.getAttributeLength()); in testEncodeAttribute() local 280 mAttributeKeyLength128.encodeToByteBuffer(byteBuffer); in testEncodeAttribute() 284 assertArrayEquals(expectedBytes, byteBuffer.array()); in testEncodeAttribute() 323 ByteBuffer byteBuffer = ByteBuffer.allocate(mEncrAesCbc128Transform.getTransformLength()); in testEncodeEncryptionTransform() local 324 mEncrAesCbc128Transform.encodeToByteBuffer(false, byteBuffer); in testEncodeEncryptionTransform() 328 assertArrayEquals(expectedBytes, byteBuffer.array()); in testEncodeEncryptionTransform() 367 ByteBuffer byteBuffer = ByteBuffer.allocate(mPrfHmacSha1Transform.getTransformLength()); in testEncodePrfTransform() local 368 mPrfHmacSha1Transform.encodeToByteBuffer(true, byteBuffer); in testEncodePrfTransform() 372 assertArrayEquals(expectedBytes, byteBuffer.array()); in testEncodePrfTransform() 418 ByteBuffer byteBuffer = ByteBuffer.allocate(mIntegHmacSha1Transform.getTransformLength()); in testEncodeIntegrityTransform() local [all …]
|
/packages/modules/NetworkStack/common/moduleutils/src/android/net/ip/ |
D | NetlinkMonitor.java | 106 final ByteBuffer byteBuffer = ByteBuffer.wrap(recvbuf, 0, length); in handlePacket() local 107 byteBuffer.order(ByteOrder.nativeOrder()); in handlePacket() 109 while (byteBuffer.remaining() > 0) { in handlePacket() 111 final int position = byteBuffer.position(); in handlePacket() 112 final NetlinkMessage nlMsg = NetlinkMessage.parse(byteBuffer, mFamily); in handlePacket() 114 byteBuffer.position(position); in handlePacket() 115 mLog.e("unparsable netlink msg: " + hexify(byteBuffer)); in handlePacket()
|
/packages/apps/Camera2/src/com/android/camera/processing/memory/ |
D | ByteBufferDirectPool.java | 36 protected ByteBuffer recycle(Integer integer, ByteBuffer byteBuffer) { in recycle() argument 38 byteBuffer.rewind(); in recycle() 39 byteBuffer.limit(byteBuffer.capacity()); in recycle() 40 return byteBuffer; in recycle()
|