/packages/modules/Connectivity/framework/src/android/net/ |
D | NattKeepalivePacketData.java | 70 buf.putShort((short) 0x4500); // IP version and TOS in nattKeepalivePacket() 71 buf.putShort((short) length); in nattKeepalivePacket() 76 buf.putShort((short) 0); // IP checksum in nattKeepalivePacket() 79 buf.putShort((short) srcPort); in nattKeepalivePacket() 80 buf.putShort((short) dstPort); in nattKeepalivePacket() 81 buf.putShort((short) (length - 20)); // UDP length in nattKeepalivePacket() 83 buf.putShort((short) 0); // UDP checksum in nattKeepalivePacket() 85 buf.putShort(ipChecksumOffset, IpUtils.ipChecksum(buf, 0)); in nattKeepalivePacket() 86 buf.putShort(udpChecksumOffset, IpUtils.udpChecksum(buf, 0, IPV4_HEADER_LENGTH)); in nattKeepalivePacket()
|
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/ |
D | KeepalivePacketDataUtil.java | 133 buf.putShort((short) length); in buildV4Packet() 138 buf.putShort((short) 0); // IP checksum in buildV4Packet() 141 buf.putShort((short) tcpDetails.srcPort); in buildV4Packet() 142 buf.putShort((short) tcpDetails.dstPort); in buildV4Packet() 145 buf.putShort((short) 0x5010); // TCP length=5, flags=ACK in buildV4Packet() 146 buf.putShort((short) (tcpDetails.rcvWnd >> tcpDetails.rcvWndScale)); // Window size in buildV4Packet() 148 buf.putShort((short) 0); // TCP checksum in buildV4Packet() 150 buf.putShort((short) 0); // Urgent pointer in buildV4Packet() 152 buf.putShort(ipChecksumOffset, com.android.net.module.util.IpUtils.ipChecksum(buf, 0)); in buildV4Packet() 153 buf.putShort(tcpChecksumOffset, IpUtils.tcpChecksum( in buildV4Packet()
|
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/ |
D | PacketUtils.java | 121 bb.putShort((short) (IP4_HDRLEN + payload.length())); in buildHeader() 124 bb.putShort((short) 0); in buildHeader() 136 bb.putShort((short) 0); in buildHeader() 142 bb.putShort(ipChecksumOffset, calculateChecksum(bb)); in buildHeader() 185 bb.putShort((short) payload.length()); in getPacketBytes() 264 resultBuffer.putShort(srcPort); in addPacketBytes() 265 resultBuffer.putShort(dstPort); in addPacketBytes() 268 resultBuffer.putShort(length()); in addPacketBytes() 276 resultBuffer.putShort(calculateChecksum(header, payloadBytes)); in addPacketBytes()
|
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/ |
D | ApfTest.java | 1145 packet.putShort(ETH_ETHERTYPE_OFFSET, (short) ETH_P_IP); in setIpv4VersionFields() 1150 packet.putShort(ETH_ETHERTYPE_OFFSET, (short) ETH_P_IPV6); in setIpv6VersionFields() 1188 packet.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_IP); in testApfFilterIPv4() 1205 packet.putShort(UDP_DESTINATION_PORT_OFFSET, (short)DHCP_CLIENT_PORT); in testApfFilterIPv4() 1294 bcastv4packet1.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_IP); in testApfFilterMulticast() 1299 bcastv4packet2.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_IP); in testApfFilterMulticast() 1305 bcastv4unicastl2packet.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_IP); in testApfFilterMulticast() 1421 packet.putShort(ETH_ETHERTYPE_OFFSET, (short)(100 - 14)); in testApfFilter802_3() 1544 packet.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_ARP); in arpReply() 1553 packet.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_ARP); in arpRequestBroadcast() [all …]
|
/packages/modules/NetworkStack/src/android/net/dhcp/ |
D | DhcpPacket.java | 512 buf.putShort((short) OsConstants.ETH_P_IP); in fillInPacket() 523 buf.putShort((short)0); // length in fillInPacket() 524 buf.putShort((short)0); // id in fillInPacket() 525 buf.putShort(IP_FLAGS_OFFSET); // ip offset: don't fragment in fillInPacket() 529 buf.putShort((short) 0); // checksum in fillInPacket() 537 buf.putShort(srcUdp); in fillInPacket() 538 buf.putShort(destUdp); in fillInPacket() 540 buf.putShort((short) 0); // length in fillInPacket() 542 buf.putShort((short) 0); // UDP checksum -- initially zero in fillInPacket() 551 buf.putShort(mSecs); // Elapsed Seconds in fillInPacket() [all …]
|
/packages/modules/IPsec/src/java/com/android/internal/net/eap/message/simaka/ |
D | EapSimAkaAttribute.java | 285 byteBuffer.putShort((short) (versions.size() * BYTES_PER_VERSION)); in encode() 287 byteBuffer.putShort((short) i); in encode() 325 byteBuffer.putShort((short) selectedVersion); in encode() 476 byteBuffer.putShort((short) identity.length); in encode() 723 byteBuffer.putShort((short) counter); in encode() 860 byteBuffer.putShort((short) notificationCode); in encode() 919 byteBuffer.putShort((short) errorCode); in encode() 1021 byteBuffer.putShort((short) resLenBits); in encode() 1123 byteBuffer.putShort((short) networkName.length); in encode() 1161 byteBuffer.putShort((short) kdf); in encode() [all …]
|
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/ |
D | IkeSkfPayload.java | 137 buffer.putShort((short) fragNum).putShort((short) totalFrags); in encodeSkfHeader() 151 .putShort((short) fragmentNum) in encodeToByteBuffer() 152 .putShort((short) totalFragments) in encodeToByteBuffer()
|
D | IkeSaPayload.java | 708 .putShort((short) getProposalLength()) in encodeToByteBuffer() 1101 .putShort((short) getTransformLength()) in encodeBasicTransformToByteBuffer() 1104 .putShort((short) id); in encodeBasicTransformToByteBuffer() 1805 .putShort((short) (ATTRIBUTE_FORMAT_TV | ATTRIBUTE_TYPE_KEY_LENGTH)) in encodeToByteBuffer() 1806 .putShort((short) keyLength); in encodeToByteBuffer()
|
D | IkeKePayload.java | 292 .putShort((short) dhGroup) in encodeToByteBuffer() 293 .putShort((short) KE_HEADER_RESERVED) in encodeToByteBuffer()
|
D | IkeNotifyPayload.java | 348 .putShort((short) port); in generateNatDetectionData() 398 byteBuffer.put((byte) protocolId).put(spiSize).putShort((short) notifyType); in encodeToByteBuffer()
|
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | PacketUtils.java | 161 bb.putShort((short) (IP4_HDRLEN + payload.length())); in buildHeader() 164 bb.putShort((short) 0); in buildHeader() 176 bb.putShort((short) 0); in buildHeader() 182 bb.putShort(ipChecksumOffset, calculateChecksum(bb)); in buildHeader() 225 bb.putShort((short) payload.length()); in getPacketBytes() 304 resultBuffer.putShort(srcPort); in addPacketBytes() 305 resultBuffer.putShort(dstPort); in addPacketBytes() 308 resultBuffer.putShort(length()); in addPacketBytes() 316 resultBuffer.putShort(calculateChecksum(header, payloadBytes)); in addPacketBytes()
|
/packages/modules/NetworkStack/src/com/android/networkstack/arp/ |
D | ArpPacket.java | 75 buf.putShort((short) ETH_P_ARP); in buildArpPacket() 78 buf.putShort((short) ARP_HWTYPE_ETHER); // hrd in buildArpPacket() 79 buf.putShort((short) ETH_P_IP); // pro in buildArpPacket() 82 buf.putShort(opCode); // op in buildArpPacket()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/map/ |
D | BluetoothMapAppParams.java | 612 appParamBuf.putShort((short) getMaxListCount()); in encodeParams() 617 appParamBuf.putShort((short) getStartOffset()); in encodeParams() 677 appParamBuf.putShort((short) getNotificationStatus()); in encodeParams() 697 appParamBuf.putShort((short) getFolderListingSize()); in encodeParams() 702 appParamBuf.putShort((short) getMessageListingSize()); in encodeParams() 768 appParamBuf.putShort((short) getChatState()); in encodeParams() 779 appParamBuf.putShort((short) getConvoListingSize()); in encodeParams() 784 appParamBuf.putShort((short) getFilterPresence()); in encodeParams() 789 appParamBuf.putShort((short) getFilterUidPresent()); in encodeParams()
|
/packages/modules/Connectivity/Tethering/tests/privileged/src/android/net/ip/ |
D | DadProxyTest.java | 157 buf.putShort((short) ETHER_TYPE_IPV6); in createDadPacket() 162 buf.putShort((byte) icmpLen); // Length in createDadPacket() 183 buf.putShort((short) 0); // Checksum in createDadPacket() 199 buf.putShort(transportOffset + ICMPV6_CHECKSUM_OFFSET, checksum); in createDadPacket()
|
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/ |
D | StructInetDiagSockId.java | 60 byteBuffer.putShort((short) mLocSocketAddress.getPort()); in pack() 61 byteBuffer.putShort((short) mRemSocketAddress.getPort()); in pack()
|
D | StructNlAttr.java | 140 buf.putShort(value); in StructNlAttr() 262 byteBuffer.putShort(nla_len); in pack() 263 byteBuffer.putShort(nla_type); in pack()
|
D | StructNlMsgHdr.java | 123 byteBuffer.putShort(nlmsg_type); in pack() 124 byteBuffer.putShort(nlmsg_flags); in pack()
|
D | StructNdMsg.java | 138 byteBuffer.putShort((short) 0); // pad2 in pack() 140 byteBuffer.putShort(ndm_state); in pack()
|
/packages/modules/IPsec/src/java/android/net/ipsec/ike/ |
D | IkeTrafficSelector.java | 481 .putShort((short) selectorLength) in encodeToByteBuffer() 482 .putShort((short) startPort) in encodeToByteBuffer() 483 .putShort((short) endPort) in encodeToByteBuffer()
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/hdhomerun/ |
D | HdHomeRunUtils.java | 149 buffer.putShort(frameType); in sealFrame() 150 buffer.putShort((short) data.length); in sealFrame()
|
/packages/modules/IPsec/src/java/com/android/internal/net/eap/statemachine/ |
D | EapAkaPrimeMethodStateMachine.java | 323 dataToSign.putShort((short) atKdfInput.networkName.length); in deriveCkIkPrime() 325 dataToSign.putShort((short) SQN_XOR_AK_LEN); in deriveCkIkPrime()
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/ |
D | OrderedDataOutputStream.java | 39 mByteBuffer.putShort(value); in writeShort()
|
/packages/apps/Messaging/src/com/android/messaging/util/exif/ |
D | OrderedDataOutputStream.java | 39 mByteBuffer.putShort(value); in writeShort()
|
/packages/apps/Camera2/src/com/android/camera/exif/ |
D | OrderedDataOutputStream.java | 39 mByteBuffer.putShort(value); in writeShort()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ |
D | ProtocolPortTupleTest.java | 52 buffer.putShort((short) port); in getTestBuffer()
|