Home
last modified time | relevance | path

Searched refs:GetLength (Results 1 – 25 of 51) sorted by relevance

123

/system/connectivity/shill/net/
Dbyte_string.cc42 return (GetLength() == 0) ? nullptr : &data_.front(); in GetData()
46 return (GetLength() == 0) ? nullptr : &data_.front(); in GetConstData()
49 size_t ByteString::GetLength() const { in GetLength() function in shill::ByteString
54 if (offset > GetLength()) { in GetSubstring()
55 offset = GetLength(); in GetSubstring()
57 if (length > GetLength() - offset) { in GetSubstring()
58 length = GetLength() - offset; in GetSubstring()
83 if (val == nullptr || GetLength() != sizeof(*val)) { in ConvertToCPUUInt32()
101 size_t length = GetLength(); in ConvertByteOrderAsUIntArray()
133 if (GetLength() != b.GetLength()) { in BitwiseAnd()
[all …]
Dbyte_string_unittest.cc58 EXPECT_EQ(0, bs1.GetLength()); in TEST_F()
70 EXPECT_EQ(sizeof(kTest1), bs1.GetLength()); in TEST_F()
81 EXPECT_EQ(sizeof(kTest2), bs2.GetLength()); in TEST_F()
93 EXPECT_EQ(sizeof(kTest3), bs3.GetLength()); in TEST_F()
108 EXPECT_EQ(strlen(kTest4), bs4.GetLength()); in TEST_F()
109 EXPECT_EQ(0, memcmp(kTest4, bs4.GetData(), bs4.GetLength())); in TEST_F()
112 EXPECT_EQ(strlen(kTest4) + 1, bs5.GetLength()); in TEST_F()
113 EXPECT_EQ(0, memcmp(kTest4, bs5.GetData(), bs5.GetLength())); in TEST_F()
134 EXPECT_EQ(4, bs1.GetLength()); in TEST_F()
146 EXPECT_EQ(4, bs1.GetLength()); in TEST_F()
[all …]
Dnetlink_socket.cc98 dummy_read.GetLength(), in RecvMessage()
112 message->GetLength(), in RecvMessage()
125 out_msg.GetLength(), 0); in SendMessage()
130 if (result != static_cast<ssize_t>(out_msg.GetLength())) { in SendMessage()
132 << out_msg.GetLength() << "."; in SendMessage()
Dnetlink_packet.cc51 size_t NetlinkPacket::GetLength() const { in GetLength() function in shill::NetlinkPacket
64 return GetPayload().GetLength() - consumed_bytes_; in GetRemainingLength()
76 consumed_bytes_ = GetPayload().GetLength(); in ConsumeAttributes()
87 consumed_bytes_ = std::min(payload_->GetLength(), in ConsumeData()
99 if (GetPayload().GetLength() < sizeof(*header)) { in GetGenlMsgHdr()
Dnetlink_attribute_unittest.cc49 EXPECT_EQ(5, unterminated.GetLength()); in TEST_F()
57 EXPECT_EQ(6, terminated.GetLength()); in TEST_F()
65 EXPECT_EQ(9, terminated.GetLength()); in TEST_F()
Dnetlink_socket_unittest.cc81 int read_bytes = min(len, next_read_string_.GetLength()); in FakeSuccessfulRead()
145 Send(kFakeFd, message.GetConstData(), message.GetLength(), 0)) in TEST_F()
146 .WillOnce(Return(message.GetLength())); in TEST_F()
151 Send(kFakeFd, message.GetConstData(), message.GetLength(), 0)) in TEST_F()
152 .WillOnce(Return(message.GetLength() - 3)); in TEST_F()
157 Send(kFakeFd, message.GetConstData(), message.GetLength(), 0)) in TEST_F()
Dip_address.h102 size_t GetLength() const { return address_.GetLength(); } in GetLength() function
106 GetLength() == GetAddressLength(family_); in IsValid()
Dattribute_list_unittest.cc62 ByteString padding(NLA_ALIGN(data.GetLength()) - data.GetLength()); in MakePaddedNetlinkAttribute()
85 ASSERT_EQ(kLength1, payload.GetLength()); in TEST_F()
88 ASSERT_EQ(kLength2, payload.GetLength()); in TEST_F()
92 ASSERT_EQ(kLength3, payload.GetLength()); in TEST_F()
Dgeneric_netlink_message.cc34 if (result.GetLength() == 0) { in EncodeHeader()
58 if (result.GetLength() == 0) { in Encode()
69 pheader->nlmsg_len += attribute_string.GetLength(); in Encode()
Dnetlink_attribute.cc402 uint16_t length = data_.GetLength(); in RawToString()
437 result.Resize(NLA_ALIGN(result.GetLength())); // Add padding. in EncodeGeneric()
453 << " bytes but only had " << input.GetLength() << "."; in InitFromValue()
506 << " bytes but only had " << input.GetLength() << "."; in InitFromValue()
560 << " bytes but only had " << input.GetLength() << "."; in InitFromValue()
614 << " bytes but only had " << input.GetLength() << "."; in InitFromValue()
709 if (!input.GetLength()) { in InitFromValue()
716 memchr(string_ptr, '\0', input.GetLength())); in InitFromValue()
717 if (first_null_pos == string_ptr + input.GetLength() - 1) { in InitFromValue()
721 << (input.GetLength() - 1) - (first_null_pos - string_ptr) in InitFromValue()
[all …]
Drtnl_message_unittest.cc409 EXPECT_EQ(address.GetLength(), msg.GetAttribute(IFLA_ADDRESS).GetLength()); in TestParseLink()
413 EXPECT_EQ(name.GetLength(), msg.GetAttribute(IFLA_IFNAME).GetLength()); in TestParseLink()
422 EXPECT_EQ(qdisc.GetLength(), msg.GetAttribute(IFLA_QDISC).GetLength()); in TestParseLink()
446 EXPECT_EQ(address.GetLength(), msg.GetAttribute(IFA_ADDRESS).GetLength()); in TestParseAddress()
Dbyte_string.h59 size_t GetLength() const;
96 bool IsEmpty() const { return GetLength() == 0; } in IsEmpty()
Dnetlink_packet_unittest.cc57 EXPECT_EQ(sizeof(nlmsghdr), empty_packet.GetLength()); in TEST_F()
75 EXPECT_EQ(sizeof(nlmsghdr) + 1, complete_packet.GetLength()); in TEST_F()
Drtnl_message.cc81 if (msg.GetLength() < sizeof(hdr->hdr) || in DecodeInternal()
82 msg.GetLength() < hdr->hdr.nlmsg_len) in DecodeInternal()
390 size_t len = RTA_LENGTH(attr->second.GetLength()); in Encode()
399 attr_header.Resize(RTA_ALIGN(attr_header.GetLength())); in Encode()
403 attr_data.Resize(RTA_ALIGN(attr_data.GetLength())); in Encode()
/system/connectivity/shill/
Darp_packet.cc69 if (packet.GetLength() < sizeof(header)) { in Parse()
70 LOG(ERROR) << "Packet size " << packet.GetLength() in Parse()
114 if (packet.GetLength() < min_packet_size) { in Parse()
116 << packet.GetLength() in Parse()
157 if (local_mac_address_.GetLength() != ETH_ALEN || in FormatRequest()
158 remote_mac_address_.GetLength() != ETH_ALEN) { in FormatRequest()
178 if (packet->GetLength() < kMinPayloadSize) { in FormatRequest()
179 packet->Append(ByteString(kMinPayloadSize - packet->GetLength())); in FormatRequest()
Darp_client.cc125 payload.GetLength(), in ReceivePacket()
166 CHECK(sizeof(socket_address.sll_addr) >= remote_address.GetLength()); in TransmitRequest()
173 remote_address.GetLength()); in TransmitRequest()
178 payload.GetLength(), in TransmitRequest()
182 const int expected_result = static_cast<int>(payload.GetLength()); in TransmitRequest()
186 } else if (result < static_cast<int>(payload.GetLength())) { in TransmitRequest()
Darp_client_unittest.cc104 destination_mac.GetLength());
113 byte_data.GetLength()).Equals(byte_data);
133 recvfrom_reply_data_.GetLength()); in SimulateRecvFrom()
135 return recvfrom_reply_data_.GetLength(); in SimulateRecvFrom()
271 packet_bytes.GetLength(), in TEST_F()
277 .WillOnce(Return(packet_bytes.GetLength() - 1)) in TEST_F()
278 .WillOnce(Return(packet_bytes.GetLength())); in TEST_F()
305 packet_bytes.GetLength(), in TEST_F()
309 .WillOnce(Return(packet_bytes.GetLength())); in TEST_F()
Dhttp_request_unittest.cc151 request_->request_data_.GetLength()); in FindInRequestData()
208 request_->response_data_.GetLength()); in ExpectInResponse()
444 EXPECT_CALL(sockets(), Send(kServerFD, _, request_data.GetLength(), 0)) in TEST_F()
445 .WillOnce(Return(request_data.GetLength() - 1)); in TEST_F()
457 EXPECT_CALL(sockets(), Send(kServerFD, _, request_data.GetLength(), 0)) in TEST_F()
458 .WillOnce(Return(request_data.GetLength())); in TEST_F()
469 EXPECT_CALL(sockets(), Send(kServerFD, _, request_data.GetLength(), 0)) in TEST_F()
470 .WillOnce(Return(request_data.GetLength())); in TEST_F()
Dhttp_request.cc277 request_data_.GetLength(), 0); in WriteToServer()
278 CHECK(ret < 0 || static_cast<size_t>(ret) <= request_data_.GetLength()); in WriteToServer()
281 << request_data_.GetLength(); in WriteToServer()
291 request_data_.GetLength() - ret); in WriteToServer()
Dconnectivity_trial.cc149 if (response_data.GetLength() < response_expected.length()) { in RequestReadCallback()
153 compare_length = response_data.GetLength(); in RequestReadCallback()
202 if (request_->response_data().GetLength()) { in TimeoutTrialTask()
Dasync_connection.cc132 CHECK_EQ(sizeof(iaddr.sin_addr.s_addr), address.GetLength()); in ConnectTo()
143 CHECK_EQ(sizeof(iaddr6.sin6_addr.s6_addr), address.GetLength()); in ConnectTo()
Dactive_link_monitor.cc146 gateway_mac_address_ = ByteString(local_mac_address_.GetLength()); in StartInternal()
181 for (size_t i = 0; i < address.GetLength(); ++i) { in HardwareAddressToString()
316 ByteString destination_mac_address(gateway_mac_address_.GetLength()); in SendRequest()
Dhttp_proxy.cc685 server_data_.GetLength(), 0); in WriteToClient()
687 << server_data_.GetLength(); in WriteToClient()
695 server_data_.GetLength() - ret); in WriteToClient()
709 client_data_.GetLength(), 0); in WriteToServer()
711 << client_data_.GetLength(); in WriteToServer()
720 client_data_.GetLength() - ret); in WriteToServer()
/system/connectivity/dhcp_client/
Ddhcpv4.cc232 const size_t payload_len = payload.GetLength(); in MakeRawPacket()
246 htons(static_cast<uint16_t>(sizeof(*udp) + payload.GetLength())); in MakeRawPacket()
278 ip->tot_len = htons(static_cast<uint16_t>(header_len+ payload.GetLength())); in MakeRawPacket()
301 packet.GetLength(), in SendRawPacket()
306 if (result != packet.GetLength()) { in SendRawPacket()
Ddhcp_message_unittest.cc196 msg.client_hardware_address().GetLength())); in TEST_F()
215 msg.client_hardware_address().GetLength())); in TEST_F()
230 msg.client_hardware_address().GetLength())); in TEST_F()

123