Lines Matching defs:packet
82 // This alarm will be scheduled any time a data-bearing packet is sent out.
103 // a delay before sending packets and fires when the packet may be sent.
172 QuicConnection::QueuedPacket::QueuedPacket(SerializedPacket packet,
175 : sequence_number(packet.sequence_number),
176 packet(packet.packet),
180 packet.retransmittable_frames != NULL) ?
182 handshake(packet.retransmittable_frames == NULL ?
183 NOT_HANDSHAKE : packet.retransmittable_frames->HasCryptoHandshake()),
184 type(GetPacketType(packet.retransmittable_frames)),
185 length(packet.packet->length()) {
256 delete it->packet;
305 const QuicPublicResetPacket& packet) {
307 debug_visitor_->OnPublicResetPacket(packet);
313 DVLOG(1) << ENDPOINT << "Received packet with mismatched version "
360 // TODO(satyamshekhar): Store the sequence number of this packet and close the
361 // connection if we ever received a packet with incorrect version and whose
368 const QuicVersionNegotiationPacket& packet) {
376 debug_visitor_->OnVersionNegotiationPacket(packet);
380 // Possibly a duplicate version negotiation packet.
384 if (std::find(packet.versions.begin(),
385 packet.versions.end(), version()) !=
386 packet.versions.end()) {
394 if (!SelectMutualVersion(packet.versions)) {
401 server_supported_versions_ = packet.versions;
435 DVLOG(1) << ENDPOINT << "Ignoring packet from unexpected ConnectionId: "
443 DVLOG(1) << ENDPOINT << "Packet " << header.packet_sequence_number
446 "Packet sequence number out of bounds");
450 // If this packet has already been seen, or that the sender
451 // has told us will not be retransmitted, then stop processing the packet.
454 DVLOG(1) << ENDPOINT << "Packet " << header.packet_sequence_number
464 DLOG(WARNING) << ENDPOINT << "Packet " << header.packet_sequence_number
478 // If the client gets a packet without the version flag from the server
489 DVLOG(1) << ENDPOINT << "Received packet header: " << header;
619 DLOG(ERROR) << ENDPOINT << "Peer's observed unsent packet:"
628 DLOG(ERROR) << ENDPOINT << "Peer's largest_observed packet decreased:"
632 // If this was an old packet, we wouldn't even have checked.
645 DLOG(ERROR) << ENDPOINT << "Peer sent missing packet: "
655 DLOG(ERROR) << ENDPOINT << "Peer sent missing packet: "
675 << "Peer specified revived packet which was not missing.";
697 << " greater than the enclosing packet sequence number:"
775 // Don't do anything if this packet closed the connection.
782 << " packet " << last_header_.packet_sequence_number
795 // Call MaybeQueueAck() before recording the received packet, since we want
796 // to trigger an ack if the newly received packet was previously missing.
799 // Record received or revived packet to populate ack info correctly before
801 // packet with a bundled ack.
860 // If the incoming packet was missing, send an ack immediately.
875 DVLOG(1) << "Ack timer set; next packet or timer will trigger ACK.";
935 // If the peer is still waiting for a packet that we are no longer planning to
1013 // Opportunistically bundle an ack with every outgoing packet.
1015 // which decrypter will be used on an ack packet following a handshake
1016 // packet (a handshake packet from client to server could result in a REJ or a
1019 // TODO(jri): Note that ConsumeData may cause a response packet to be sent.
1022 // handled after this packet is sent. Change ScopedPacketBundler to do the
1043 // Opportunistically bundle an ack with this outgoing packet.
1051 // Opportunistically bundle an ack with this outgoing packet.
1058 // Opportunistically bundle an ack with this outgoing packet.
1078 const QuicEncryptedPacket& packet) {
1083 debug_visitor_->OnPacketReceived(self_address, peer_address, packet);
1086 last_size_ = packet.length();
1090 stats_.bytes_received += packet.length();
1093 if (!framer_.ProcessPacket(packet)) {
1094 // If we are unable to decrypt this packet, it might be
1095 // because the CHLO or SHLO packet was lost.
1099 QueueUndecryptablePacket(packet);
1101 DVLOG(1) << ENDPOINT << "Unable to process packet. Last packet processed: "
1198 DVLOG(1) << ENDPOINT << "time of last received packet: "
1219 delete packet_iterator->packet;
1244 // Flush the packet generator before making a new packet.
1312 // If the scheduler requires a delay, then we can not send this packet now.
1321 bool QuicConnection::WritePacket(QueuedPacket packet) {
1322 QuicPacketSequenceNumber sequence_number = packet.sequence_number;
1323 if (ShouldDiscardPacket(packet.encryption_level,
1325 packet.retransmittable)) {
1330 // If the packet is CONNECTION_CLOSE, we need to try to send it immediately
1332 // If the packet is QUEUED, we don't re-consult the congestion control.
1335 // serializing the packet, so this could be turned into a LOG_IF(DFATAL).
1336 if (packet.type == NORMAL && !CanWrite(packet.retransmittable)) {
1340 // Some encryption algorithms require the packet sequence numbers not be
1346 packet.encryption_level, sequence_number, *packet.packet);
1348 LOG(DFATAL) << ENDPOINT << "Failed to encrypt packet number "
1350 // CloseConnection does not send close packet, so no infinite loop here.
1358 if (packet.type == CONNECTION_CLOSE) {
1373 << "Writing an encrypted packet larger than max_packet_length:"
1376 DVLOG(1) << ENDPOINT << "Sending packet " << sequence_number
1377 << " : " << (packet.packet->is_fec_packet() ? "FEC " :
1378 (packet.retransmittable == HAS_RETRANSMITTABLE_DATA
1381 << QuicUtils::EncryptionLevelToString(packet.encryption_level)
1382 << ", length:" << packet.packet->length() << ", encrypted length:"
1384 DVLOG(2) << ENDPOINT << "packet(" << sequence_number << "): " << std::endl
1385 << QuicUtils::StringToHexASCIIDump(packet.packet->AsStringPiece());
1389 << "Packet " << sequence_number << " will not be read; too large: "
1390 << packet.packet->length() << " " << encrypted->length() << " "
1391 << " close: " << (packet.type == CONNECTION_CLOSE ? "yes" : "no");
1394 pending_write_.reset(new QueuedPacket(packet));
1406 packet.encryption_level,
1407 packet.transmission_type,
1413 // If the socket buffers the the data, then the packet should not
1415 // duplicate packet being sent. The helper must call OnPacketSent
1416 // when the packet is actually sent.
1436 << "Not sending packet as connection is disconnected.";
1440 // If the packet has been discarded before sending, don't send it.
1441 // This occurs if a packet gets serialized, queued, then discarded.
1443 DVLOG(1) << ENDPOINT << "Dropping packet before sending: "
1452 DVLOG(1) << ENDPOINT << "Dropping NULL encrypted packet: "
1463 DVLOG(1) << ENDPOINT << "Dropping unacked packet: " << sequence_number
1497 DVLOG(1) << ENDPOINT << "time of last sent packet: "
1500 // TODO(ianswett): Change the sequence number length and other packet creator
1544 const SerializedPacket& packet,
1546 if (packet.packet == NULL) {
1547 LOG(DFATAL) << "NULL packet passed in to SendOrQueuePacket";
1551 sent_entropy_manager_.RecordPacketEntropyHash(packet.sequence_number,
1552 packet.entropy_hash);
1553 QueuedPacket queued_packet(packet, level, transmission_type);
1558 delete packet.packet;
1669 const QuicEncryptedPacket& packet) {
1670 DVLOG(1) << ENDPOINT << "Queueing undecryptable packet.";
1671 undecryptable_packets_.push_back(packet.Clone());
1680 DVLOG(1) << ENDPOINT << "Attempting to process undecryptable packet";
1681 QuicEncryptedPacket* packet = undecryptable_packets_.front();
1682 if (!framer_.ProcessPacket(*packet) &&
1684 DVLOG(1) << ENDPOINT << "Unable to process undecryptable packet...";
1687 DVLOG(1) << ENDPOINT << "Processed undecryptable packet!";
1689 delete packet;
1763 // serialized packet.
1766 // It's possible that while sending the connection close packet, we get a
1810 // Opportunistically bundle an ack with this outgoing packet.
1820 // If this is the current group or the group doesn't protect this packet
1894 DVLOG(1) << ENDPOINT << "last packet "
1963 // Bundle an ack if the alarm is set or with every second packet if we need to
1968 DVLOG(1) << "Bundling ack with outgoing packet.";