Lines Matching full:ids
194 /// An iterator over QUIC Connection IDs.
217 /// All the Destination Connection IDs provided by our peer.
220 /// All the Source Connection IDs we provide to our peer.
223 /// Source Connection IDs that should be announced to the peer.
226 /// Retired Destination Connection IDs that should be announced to the peer.
229 /// Retired Source Connection IDs that should be notified to the
245 /// The maximum number of source Connection IDs our peer allows us.
268 // Initially, the limit of active source connection IDs is 2. in new()
278 // Connection IDs when the host wants to force their renewal. in new()
312 /// Sets the maximum number of source connection IDs our peer allows us.
321 // Connection IDs when the host wants to force their renewal. in set_source_conn_id_limit()
343 /// At any time, the peer cannot have more Destination Connection IDs than
344 /// the maximum number of active Connection IDs it negotiated. In such case
346 /// if the caller agrees to request the removal of previous connection IDs,
352 /// unannounced Connection IDs.
376 // Check whether the number of source Connection IDs does not exceed the in new_scid()
452 // sequence number is used for different connection IDs, the endpoint in new_dcid()
501 // active connection IDs, if the number of active connection IDs exceeds in new_dcid()
656 /// Returns the number of Source Connection IDs that have not been
660 /// length Source Connection IDs.
666 /// Returns the number of Destination Connection IDs that have not been
670 /// Destination Connection IDs.
738 /// Gets a destination Connection IDs's sequence number that need to send
748 /// Returns true if there are new source Connection IDs to advertise.
754 /// Returns true if there are retired destination Connection IDs to\
787 /// Returns the number of source Connection IDs that are active. This is
788 /// only meaningful if the host uses non-zero length Source Connection IDs.
809 let mut ids = ConnectionIdentifiers::new(2, &scid, 0, None); in ids_new_scids() localVariable
810 ids.set_source_conn_id_limit(3); in ids_new_scids()
811 ids.set_initial_dcid(dcid, None, Some(0)); in ids_new_scids()
813 assert_eq!(ids.available_dcids(), 0); in ids_new_scids()
814 assert_eq!(ids.available_scids(), 0); in ids_new_scids()
815 assert_eq!(ids.has_new_scids(), false); in ids_new_scids()
816 assert_eq!(ids.next_advertise_new_scid_seq(), None); in ids_new_scids()
820 assert_eq!(ids.new_scid(scid2, Some(rt2), true, None, false), Ok(1)); in ids_new_scids()
821 assert_eq!(ids.available_dcids(), 0); in ids_new_scids()
822 assert_eq!(ids.available_scids(), 1); in ids_new_scids()
823 assert_eq!(ids.has_new_scids(), true); in ids_new_scids()
824 assert_eq!(ids.next_advertise_new_scid_seq(), Some(1)); in ids_new_scids()
828 assert_eq!(ids.new_scid(scid3, Some(rt3), true, None, false), Ok(2)); in ids_new_scids()
829 assert_eq!(ids.available_dcids(), 0); in ids_new_scids()
830 assert_eq!(ids.available_scids(), 2); in ids_new_scids()
831 assert_eq!(ids.has_new_scids(), true); in ids_new_scids()
832 assert_eq!(ids.next_advertise_new_scid_seq(), Some(1)); in ids_new_scids()
839 ids.new_scid(scid4, Some(rt4), true, None, false), in ids_new_scids()
842 assert_eq!(ids.available_dcids(), 0); in ids_new_scids()
843 assert_eq!(ids.available_scids(), 2); in ids_new_scids()
844 assert_eq!(ids.has_new_scids(), true); in ids_new_scids()
845 assert_eq!(ids.next_advertise_new_scid_seq(), Some(1)); in ids_new_scids()
848 ids.mark_advertise_new_scid_seq(1, false); in ids_new_scids()
849 assert_eq!(ids.available_dcids(), 0); in ids_new_scids()
850 assert_eq!(ids.available_scids(), 2); in ids_new_scids()
851 assert_eq!(ids.has_new_scids(), true); in ids_new_scids()
852 assert_eq!(ids.next_advertise_new_scid_seq(), Some(2)); in ids_new_scids()
855 ids.mark_advertise_new_scid_seq(2, false); in ids_new_scids()
857 assert_eq!(ids.available_dcids(), 0); in ids_new_scids()
858 assert_eq!(ids.available_scids(), 2); in ids_new_scids()
859 assert_eq!(ids.has_new_scids(), false); in ids_new_scids()
860 assert_eq!(ids.next_advertise_new_scid_seq(), None); in ids_new_scids()
868 let mut ids = ConnectionIdentifiers::new(2, &scid, 0, None); in new_dcid_event() localVariable
869 ids.set_initial_dcid(dcid, None, Some(0)); in new_dcid_event()
871 assert_eq!(ids.available_dcids(), 0); in new_dcid_event()
872 assert_eq!(ids.dcids.len(), 1); in new_dcid_event()
877 ids.new_dcid(dcid2.clone(), 1, rt2, 0), in new_dcid_event()
880 assert_eq!(ids.available_dcids(), 1); in new_dcid_event()
881 assert_eq!(ids.dcids.len(), 2); in new_dcid_event()
884 // Connection IDs than the advertised limit. This is valid if it in new_dcid_event()
885 // requests its peer to retire enough Connection IDs to fit within the in new_dcid_event()
888 assert_eq!(ids.new_dcid(dcid3.clone(), 2, rt3, 1), Ok(vec![(0, 0)])); in new_dcid_event()
890 ids.link_dcid_to_path_id(1, 0).unwrap(); in new_dcid_event()
891 assert_eq!(ids.available_dcids(), 1); in new_dcid_event()
892 assert_eq!(ids.dcids.len(), 2); in new_dcid_event()
893 assert_eq!(ids.has_retire_dcids(), true); in new_dcid_event()
894 assert_eq!(ids.next_retire_dcid_seq(), Some(0)); in new_dcid_event()
897 ids.mark_retire_dcid_seq(0, false); in new_dcid_event()
898 assert_eq!(ids.has_retire_dcids(), false); in new_dcid_event()
899 assert_eq!(ids.next_retire_dcid_seq(), None); in new_dcid_event()
903 assert_eq!(ids.retire_dcid(0), Err(Error::InvalidState)); in new_dcid_event()
904 assert_eq!(ids.retire_dcid(3), Err(Error::InvalidState)); in new_dcid_event()
905 assert_eq!(ids.has_retire_dcids(), false); in new_dcid_event()
906 assert_eq!(ids.dcids.len(), 2); in new_dcid_event()
909 assert_eq!(ids.retire_dcid(1), Ok(Some(0))); in new_dcid_event()
911 ids.link_dcid_to_path_id(2, 0).unwrap(); in new_dcid_event()
912 assert_eq!(ids.available_dcids(), 0); in new_dcid_event()
913 assert_eq!(ids.has_retire_dcids(), true); in new_dcid_event()
914 assert_eq!(ids.next_retire_dcid_seq(), Some(1)); in new_dcid_event()
915 assert_eq!(ids.dcids.len(), 1); in new_dcid_event()
918 ids.mark_retire_dcid_seq(1, false); in new_dcid_event()
919 assert_eq!(ids.has_retire_dcids(), false); in new_dcid_event()
920 assert_eq!(ids.next_retire_dcid_seq(), None); in new_dcid_event()
923 assert_eq!(ids.retire_dcid(2), Err(Error::OutOfIdentifiers)); in new_dcid_event()
924 assert_eq!(ids.available_dcids(), 0); in new_dcid_event()
925 assert_eq!(ids.has_retire_dcids(), false); in new_dcid_event()
926 assert_eq!(ids.dcids.len(), 1); in new_dcid_event()
934 let mut ids = ConnectionIdentifiers::new(3, &scid, 0, None); in retire_scids() localVariable
935 ids.set_initial_dcid(dcid, None, Some(0)); in retire_scids()
936 ids.set_source_conn_id_limit(3); in retire_scids()
942 ids.new_scid(scid2.clone(), Some(rt2), true, None, false), in retire_scids()
945 assert_eq!(ids.scids.len(), 2); in retire_scids()
947 ids.new_scid(scid3.clone(), Some(rt3), true, None, false), in retire_scids()
950 assert_eq!(ids.scids.len(), 3); in retire_scids()
952 assert_eq!(ids.pop_retired_scid(), None); in retire_scids()
954 assert_eq!(ids.retire_scid(0, &scid2), Ok(Some(0))); in retire_scids()
956 assert_eq!(ids.pop_retired_scid(), Some(scid)); in retire_scids()
957 assert_eq!(ids.pop_retired_scid(), None); in retire_scids()
959 assert_eq!(ids.retire_scid(1, &scid3), Ok(None)); in retire_scids()
961 assert_eq!(ids.pop_retired_scid(), Some(scid2)); in retire_scids()
962 assert_eq!(ids.pop_retired_scid(), None); in retire_scids()