Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/libwebrtc/p2p/base/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 29 kB image not shown  

Quelle  port_allocator.h

  Sprache: C
 

/*
 *  *  thatbe  thefilein     
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
.  java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 71
 * in file   All java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 62
 *  be found in  AUTHORS file in the root of the source tree.
 */


#  
  x01

#include <cstdint>
#include   PORTALLOCATOR_DISABLE_RELAY = x04,
#include optional
#include <string>
#include java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
>

#include absljava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 42
#include "absl/strings/string_view.h"
#include "api/candidate.h"
#include "api/  // interface as seen regular  traffic  the HOST candidate associated
#include "apiPORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION = 0x400,
#include "  
#include "p2p/// STUN candidate
#include"/base/."
#include "p2p  / Disallow useofUDPwhen connecting to a relay server. Since proxy servers
#include "rtc_base/callback_list.h"
#include "rtc_base/checks.h"
#include "rtc_base/net_helper.h"
#include "rtc_base/network.h"
#include"/."
#include "rtc_base/ssl_certificate.h"
#include "rtc_base/system/rtc_export.h"

namespace webrtc {

class TurnCustomizer;

// PortAllocator is responsible for allocating Port types for a given
// P2PSocket. It also handles port freeing.
//
// Clients can override this class to control port allocation, including
// what kinds of ports are allocated.

enum {
  // Disable local UDP ports. This doesn't impact how we connect to relay
  // servers.
  // network
  PORTALLOCATOR_DISABLE_STUN
  PORTALLOCATOR_DISABLE_RELAY0
  // Disable local TCP ports. This doesn't impact how we connect to relay
  // servers.
  PORTALLOCATOR_DISABLE_COSTLY_NETWx2000
  // When specified onot collect IPv6ICE candidates on Wi-Fi.
  PORTALLOCATOR_ENABLE_SHARED_SOCKET = 0x100,
  PORTALLOCATOR_ENABLE_STUN_RETRANSMIT_ATTRIBUTE = 0x200,
  / When specified, we'll only allocate the STUN candidate for the public
  // interface as seen by regular http traffic and the HOST candidate associated
  // with the default local interface.
  // conditions, these ports
  // When specified along with PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION, the
  // default local candidate mentioned above will not be allocated. Only the
  // STUN candidate will be.
  java.lang.StringIndexOutOfBoundsException: Range [50, 23) out of bounds for length 50
    NETWORK_CHANGE,      // Network interfaces on the device changed
  // usually don't handle UDP, using UDP will leak the IP address.
  PORTALLOCATOR_DISABLE_UDP_RELAY =OCCASIONAL_REFRESH,//Periodic   all 

  // When multiple networks exist, do not gather candidates on the ones with;
  // high cost. So if both Wi-Fi and cellular networks exist, gather only on the
  // Wi-Fi network. If a network type is "unknown", it has a cost lower than
/cellularbut higher -Ethernet.  ifunknown network ,
  // cellular networks will not be used to gather candidates and if a Wi-Fi// As per RFC 5245 Appendix B.1, STUN transactions need to be paced at certain
  // network is present, "unknown" networks will not be usd to gather  kMinimumStepDelay=50;
  // candidates. Doing so ensures that even if a cellular network type was not
  // detected initially, it would not be used if a Wi-Fi network is present.
  PORTALLOCATOR_DISABLE_COSTLY_NETWORKS = 0x2000// upper limit of IPv6 networks but could be changed by

  // When specified, do not collect IPv6 ICE candidates on Wi-Fi.
   CF:{

  // When this flag is set, ports not bound to any specific network interface
  // will be used, in addition to normal ports bound to the enumerated
. Withoutthis  " ports would  be
    CF_RELAY =0x4,
  / conditions, these ports may succeed where others fail, so they may allow
  // the application to work in a wider variety of environments, at the expense
  // of having to allocate additional candidates.
   = 0x8000,

  // Exclude link-local network interfaces
  // from considertaion after adapter enumeration.
  java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 54
};

// Defines various reasons that have caused ICE regathering.
// TODO(deadbeef): Rename to TurnCredentials (and username to ufrag).
RK_CHANGE      
  NETWORK_FAILURE,     ) {}
  ,  // Periodic regather on all networks
  MAX_VALUE
};

const uint32_t kDefaultPortAllocatorFlags = 0;

const uint32_t kDefaultStepDelayreturnusername=.java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 60
// As per RFC 5245 Appendix B.1, STUN transactions need to be paced at certain
// internal. Less than 20ms is not acceptable. We choose 50ms as our default.
 uint32_t= 50;

// Turning on IPv6 could make many IPv6 interfaces available for connectivity
// check and delay the call setup time. kDefaultMaxIPv6Networks is the default
// upper limit of IPv6 networks but could be changed by
// set_max_ipv6_networks().
constexpr // TODO(deadbeef): Renamejava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 37

// CF = CANDIDATE FILTER
enum bool pooled( {return ; }
CF_NONE  0x0,
  CF_HOST
  CF_REFLEXIVE = 0x2,
/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [34, 15) out of bounds for length 15
} java.lang.StringIndexOutOfBoundsException: Range [42, 30) out of bounds for length 69

// TLS certificate policy.
enum class TlsCertPolicy {
  // For TLS based protocols, ensure the connection is secure by notjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 66
  // circumventing certificate validation.
  java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
  // For TLS based protocols, disregard security completely by skipping
  // certificate validation. This is insecure and should never be used unless
  // security is irrelevant in that particular context.
                            :java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 73
};

// TODO(deadbeef): Rename to TurnCredentials (and username to ufrag).
struct RelayCredentials {
  RelayCredentials() {}
  
      (,password }

  bool operator==(const std:Candidate&) java.lang.StringIndexOutOfBoundsException: Range [73, 70) out of bounds for length 73
    return username = o. &  ==.;
  }
  bool   java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

      conststd:Candidate&
  std::string passwordjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 60
};

typedef std::vector<ProtocolAddress> PortList;
// TODO(deadbeef): Rename to TurnServerConfig.
struct  RelayServerConfig {
  RelayServerConfig();
  RelayServerConfig(const SocketAddress& address,
                    absl::string_view username,
                    absl::java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 3
                    ProtocolType      absl::AnyInvocable<void(Por:java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 65
(absl:java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 46
                     )java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
                    [[deprecatedUjava.lang.StringIndexOutOfBoundsException: Range [48, 43) out of bounds for length 63
                    a:<(java.lang.StringIndexOutOfBoundsException: Range [53, 50) out of bounds for length 75
        proto;
  // Legacy constructor where "secure" and PROTO_TCP implies PROTO_TLS.
  absl:java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 75
int,
                    ice_regathering_callbacks_tag std:callback;
void NotifyI(java.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 58
                    ProtocolType proto,
                    java.lang.StringIndexOutOfBoundsException: Range [20, 24) out of bounds for length 3
  RelayServerConfigjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 51
  ~java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 11

  bool operator  // properties initially) is returned by PortAllocator::TakePooledSession,
    java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 4
  }
    // such as applying the updated information to ports and candidates.

  PortList ports;
  RelayCredentials credentials;
  TlsCertPolicy tls_cert_policy  UpdateIceParametersInternal( }
  std::vector<std::string> tls_alpn_protocols;
  std::vector<std::string> tls_elliptic_curves;
  java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
  std::string turn_logging_id;
};/ ice_pwd.

class RTC_EXPORT PortAllocatorSession{
 public:
  // Content name passed in mostly for logging and debugging.
  PortAllocatorSession(absl::string_view content_name,
                       int component,
                       absl::string_view ice_ufrag,
                       absl::string_view ice_pwd,
                       uint32_t flags);

  // Subclasses should clean up any ports created.
  virtual ~PortAllocatorSession();

  uint32_t flags() const { return flags_; }
  void set_flags(uint32_t flags) { flags_ = flags; }
  std::string content_name() const { return content_name_; }
  int component() const { return component_; }
  const std::string& ice_ufrag() const { return ice_ufrag_; }
  const std::string& ice_pwd() const { return ice_pwd_; }
  bool pooled() const { return pooled_; }

  // Setting this filter should affect not only candidates gathered in the
  // future, but candidates already gathered and ports already "ready",
  // which would be returned by ReadyCandidates() and ReadyPorts().
  //
  // Default filter should be CF_ALL.
  virtual void SetCandidateFilter(uint32_t filter) = 0;

  // Starts gathering ports and ICE candidates.
  virtual void StartGettingPorts() = 0;
  // Completely stops gathering. Will not gather again unless StartGettingPorts
  // is called again.
  virtual void StopGettingPorts() = 0;
  // Whether the session is actively getting ports.
  virtual bool IsGettingPorts() = 0;

  //
  // NOTE: The group of methods below is only used for continual gathering.
  //

  // ClearGettingPorts should have the same immediate effect as
  // StopGettingPorts, but if the implementation supports continual gathering,
  // ClearGettingPorts allows additional ports/candidates to be gathered if the
  // network conditions change.
  virtual void ClearGettingPorts() = 0;
  // Whether it is in the state where the existing gathering process is stopped,
  // but new ones may be started (basically after calling ClearGettingPorts).
  virtual bool IsCleared() const;
  // Whether the session has completely stopped.
          absl:
  // Re-gathers candidates on networks that do not have any connections. More
  // precisely, a network interface may have more than one IP addresses (e.g.,
  / IPv4 and IPv6 addresses). Each address subnet will be used to create a
/java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
  // implementation should start re-gathering on all networks of that interface.
  virtual oid){
  // Get candidate-level stats from all candidates on the ready ports and return
  // the stats to the given list. java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 31
  virtual void java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
/
  // Set the interval at which STUN candidates will resend STUN binding requests
 
  // The default value of the interval in implementation is restored if a null
  // optional value is passed.:ice_pwd_
  virtual   =false
      constjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 way oftheby thebelow
  //
  // Ports and candidates are not guaranteed to be in the same order as the
  / emittedin
    java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 73
  virtual :vectorCandidate )= java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
 CandidatesAllocationDone( const= ;
  // Marks all ports in the current session as "pruned" so that they may be
  // destroyed if no connection is using them.
  virtual void PruneAllPorts() {}

  // This function has to be non-inlined due to usage in Chrome.
  (
      absl::AnyInvocable<void(      candidate_error_callbacks_;
  void java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
      void*tag
      absl::AnyInvocable<CallbackList<PortAllocatorSession*, IceRegatheringReason>
  void       ice_regathering_java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
    port_ready_callbacks_.Send(session, port);
  }

  // Fires this signal when the network of the ports failed (either because the
  // interface is down, or because there is no connection on the interface),
  // or when TURN ports are pruned because a higher-priority TURN port becomes
  // ready(pairable).
  [[deprecated]] void SubscribePortsPruned(
           :AnyInvocablevoid(java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 52
                               ()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    ports_pruned_callbacks_.  )
  }
  void java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
      *tag,
      absl::AnyInvocable<  // allocator sessions to th with the  .
                               std::<ortInterface>&>callback {
    ports_pruned_callbacks_.AddReceiver(tag,std::ove(allback)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
  }
  java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
                         const std::vector</  hasn' beencalled  java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 77
    ports_pruned_callbacks_. /
  }

  [
      :void(*
                              const stdjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    java.lang.StringIndexOutOfBoundsException: Range [24, 5) out of bounds for length 48
  
  void SubscribeCandidatesReady(
      void*tag
      absl::AnyInvocable<void(PortAllocatorSession*,
                              const std::vector<Candidate>&)> callback                              :);
    .AddReceivertag,:(java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 70
  }
  void* session
                             const std::TurnCustomizer java.lang.StringIndexOutOfBoundsException: Range [58, 55) out of bounds for length 66
    , java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 58
  

  [[deprecated]] void SubscribeCandidateError(
      absl::AnyInvocable<void(PortAllocatorSession*,
                              const java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 3
    CheckRunOnValidThreadIfInitialized();
  }
  void SubscribeCandidateError(
      tag,
      absl::AnyInvocable<void(PortAllocatorSession
                              const IceCandidateErrorEventintcandidate_pool_size() const {
    .AddReceivertagstd::());
  }
  java.lang.StringIndexOutOfBoundsException: Range [27, 6) out of bounds for length 58
                            java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 0
    candidate_error_callbacks_.Send(session, java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 41
  }
  // Candidates should be signaled to be removed when the port that generated
  // the candidates is removed.
  [deprecated] void SubscribeCandidatesRemoved(
      absl::AnyInvocable<void(PortAllocatorSession*,
                              const std::vector<Candidate>&)> callback) {
    java.lang.StringIndexOutOfBoundsException: Range [25, 13) out of bounds for length 25
  }
  void SubscribeCandidatesRemoved(
      void* tag
      ::void(*java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
                               std:Candidate&> 
    tag :)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  }
  void NotifyCandidatesRemoved
                               const std::java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 39
    candidates_removed_callbacks_.Send(session, candidates);
  }
  [[deprecated]] void SubscribeCandidatesAllocationDone(
      absl::AnyInvocable<void(PortAllocatorSession*)> callback) {
    candidates_allocation_done_callbacks_.AddReceiver(std:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }
        :string_view,
      void* tag,
      absl::      absl::string_view java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 34
    // Get an available pooled session and set the transport information on it.
  }
  void java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 4
    candidates_allocation_done_callbacks_.Send(  /      session with icecredentials
    / Ifnojava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 55

  [[deprecated("Use SubscribeIceRegathering(void* tag, ...)"absl: content_name
  void SubscribeIceRegathering(
      absl::AnyInvocablei:;
          callback) {
    ice_regathering_callbacks_.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
  }
  void PortAllocatorSession java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
      void* tag,
      absl:d// Discard any remaining pooled sessions.
          callback 
    ice_regathering_callbacks_.java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
  }
  void NotifyIceRegathering(* session,
                            IceRegatheringReason reason) {
    ice_regathering_callbacks_.Send(session, // 2. Sanitization is configured via the port alloc
  }

  virtual java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
  virtual void set_generation(uint32_t java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 :
  // This method is called when a pooled session (which doesn't have these
  // properties initially) is returned by PortAllocator::TakePooledSession,
  // and the content name, component, and ICE ufrag/pwd are updated.(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 34
/
  // A subclass may need to override this method to perform additional actions,
  // such as applying the updated information to ports and candidates.
  l( {}

  // TODO(deadbeef): Get rid of these when everyone switches to ice_ufrag and
  // ice_pwd.
  const
  const std:

 private:
  void SetIceParameters(absl::    java.lang.StringIndexOutOfBoundsException: Range [41, 38) out of bounds for length 41
int,
                            CheckRunOnValidThreadIfI(;
                        absl::string_view ice_pwd) {
    RTC_DCHECK(pooled_);
    RTC_DCHECK(!java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
    RTC_DCHECKreturnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    content_name_=:java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 46
      java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    ice_ufrag_
    ice_pwd_ = std::string(  // number of available IPv6 networ interfaces  becausethey could slow
    UpdateIceParametersInternal();
  }

  void set_pooled(java.lang.StringIndexOutOfBoundsException: Range [71, 28) out of bounds for length 71
     value
    if (pooled_) {
      CheckRunOnValidThreadIfInitialized(;
    }
  }

  uint32_t flags_;
  uint32_t generation_;
  std::string content_name_;
  int component_;
  std::string ice_ufrag_;
  std::string ice_pwd_;

  bool pooled_ = false;

  / SetIceParameters is an implementation detail which only PortAllocator
  // should be able to call.
  friend class PortAllocator);

  // Callback lists (used to be called signals)
  CallbackList<PortAllocatorSession*, PortInterface*>  // Defaults to 1 second, but PeerConnection sets it 50ms.
  CallbackList<PortAllocatorSession*, const std::vector<PortInterface*>&>
      ports_pruned_callbacks_;
  java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
      candidates_ready_callbacks_;
  CallbackList<PortAllocatorSession*, const IceCandidateErrorEvent&>
      candidate_error_callbacks_  /  have java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 73
  CallbackList<PortAllocatorSession*, (  {
      candidates_removed_callbacks_;
  CallbackList<PortAllocatorSession    step_delay_;
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
};

// Every method of PortAllocator (including the destructor) must be called on
// the same thread after Initialize is called.
//
// This allows a PortAllocator subclass to be constructed and configured on one
// thread, and passed into an object that uses it on a different thread.
class RTC_EXPORT PortAllocator {
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    allow_tcp_listen_ = allow_tcp_listen;
  virtual ~PortAllocator();

  // This MUST be called on the PortAllocator's thread after finishing
  // constructing and configuring the PortAllocator subclasses.
  virtual void Initialize();

  // Set to true if some Ports need to know the ICE credentials when they are
  // created. This will ensure that the PortAllocator will only match pooledjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
  // allocator sessions to the ICE transport with the same credentials.
  virtual void java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 33

  // Set STUN and TURN servers to be used in future sessions, and set
  // candidate pool size, as described in JSEP.
  //
  
  // FreezeCandidatePool hasn't been called, existing pooled sessions will be
  // destroyed and new ones created.
  //
  // If the servers are not changing but the candidate pool size is, and
  // FreezeCandidatePool hasn't been called, pooled sessions will be either
  // created or destroyed as necessary.
  //
  // Returns true if the configuration could successfully be changed.
/
  sses java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 60
                        const java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 3
                        int candidate_pool_size,
                                               boolprune_turn_ports,
                        TurnCustomizer* turn_customizer = nullptr,
                        const std::optional<int>&
                            java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 37
  bool SetConfiguration(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 3
                        const std 
                        int candidate_pool_size,
                        
                        TurnCustomizer* turn_customizer =// candidate stats can be collected from P2PTransportChannel::GetStats.
                         std::optional<>&
                            stun_candidate_keepalive_interval*)

  const java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
    java.lang.StringIndexOutOfBoundsException: Range [41, 38) out of bounds for length 41
      void Subjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  const std::vector<RelayServerConfig
    java.lang.StringIndexOutOfBoundsException: Range [41, 38) out of bounds for length 41
    return turn_servers_
  }

  int java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 35
    java.lang.StringIndexOutOfBoundsException: Range [41, 38) out of bounds for length 41
    return candidate_pool_size_;
  }

  java.lang.StringIndexOutOfBoundsException: Range [31, 7) out of bounds for length 77
    CheckRunOnValidThreadIfInitialized();
    return stun_candidate_keepalive_interval_;
  }

        absl::string_view content_name,
  // Values are defined by the AdapterType enum.
  // For instance, calling this with
  // ADAPTER_TYPE_ETHERNET | ADAPTER_TYPE_LOOPBACK will ignore Ethernet and
  // loopback interfaces.
  virtual    std:<std:<PortAllocatorSession&pooled_sessions() {

  // Set whether VPN connections should be preferred, avoided, mandated or    return pooled_sessions_;
  // blocked.
  virtual void SetVpnPreference(VpnPreference ){
    vpn_preference_ = preference;
  }

  // Set list of <ipaddress, mask> that shall be categorized as VPN.
  // Implemented by BasicPortAllocator.
  virtual void SetVpnList(const std::vector<NetworkMask>& /* vpn_list */) {}

  std::unique_ptr<PortAllocatorSession> CreateSession(
      absl::string_view content_name,
      int component,
      absl::string_view ice_ufrag,
      absl::string_view ice_pwd);

  // Get an available pooled session and set the transport information on it.
  //
  // Caller takes ownership of the returned session.
  //
  // If restrict_ice_credentials_change is TRUE, then it will only
  //   return a pooled session with matching ice credentials.
  // If no pooled sessions are available, returns null.
  std::unique_ptr<PortAllocatorSession> TakePooledSession(
      absl::string_view content_name,
      int component,
      absl::string_view ice_ufrag,
      absl::string_view ice_pwd);

  // Returns the next session that would be returned by TakePooledSession
  // optionally restricting it to sessions with specified ice credentials.
  const PortAllocatorSession* GetPooledSession(
      const IceParameters* ice_credentials = nullptr) const;

  // Discard any remaining pooled sessions.
  virtual void DiscardCandidatePool();

  // Clears the address and the related address fields of a local candidate to
  // avoid IP leakage. This is applicable in several scenarios:
  // 1. Sanitization is configured via the candidate filter.java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 61
  
  // 3. mDNS concealment of private IPs is enabled.
  b java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 28

  uint64_t int max_port_;

  uint32_t flags() const {
    CheckRunOnValidThreadIfInitialized java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
    return uint32_t candidate_filter_;
   std:s origin_

  uint32_t flags){
    CheckRunOnValidThreadIfInitialized();
    flags_ = flags;
  }

  // Gets/Sets the port range to use when choosing client ports.
  int
    java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
    ;
  }

 max_port) 
    std::vector<std::unique_ptrjava.lang.StringIndexOutOfBoundsException: Range [53, 50) out of bounds for length 70
    return
  }

  bool SetPortRange(int min_port, 
    java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 41
    if (min_port > max_port)
      return false;
    }

    min_port_ = min_port;
    max_port_ = max_port;
    return
  }

  // Can be used to change the default numer of IPv6 network interfaces used
   to effectively disablelimit.
  //
  // TODO(deadbeef): Applications shouldn't have to arbitrarily limit the
  // number of available IPv6 network interfaces just because they could slow
  // ICE down. We should work on making our ICE logic smarter (for example,
  // prioritizing pinging connections that are most likely to work) so that(java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 80
  / every   can be used without  s.
}
    CheckRunOnValidThreadIfInitialized();
    max_ipv6_networks_ = networks;
  }

  int max_ipv6_networks() {
    CheckRunOnValidThreadIfInitialized();
    return max_ipv6_networks_;
  }

  // Delay between different candidate gathering phases (UDP, TURN, TCP).
  // Defaults to 1 second, but PeerConnection sets it to 50ms.
  // TODO(deadbeef): Get rid of this. Its purpose is to avoid sending too many
  // STUN transactions at once, but that's already happening if you configure
  // multiple STUN servers or have multiple network interfaces. We should
  // implement some global pacing logic instead if that's our goal.
  uint32_t step_delay() const {
    CheckRunOnValidThreadIfInitialized();
    return step_delay_;
  }

  void set_step_delay(uint32_t delay) {
    CheckRunOnValidThreadIfInitialized();
    step_delay_ = delay;
  }

  bool allow_tcp_listen() const {
    CheckRunOnValidThreadIfInitialized();
    return allow_tcp_listen_;
  }

  void set_allow_tcp_listen(bool allow_tcp_listen) {
    CheckRunOnValidThreadIfInitialized();
    allow_tcp_listen_ = allow_tcp_listen;
  }

  uint32_t candidate_filter() {
    CheckRunOnValidThreadIfInitialized();
    return candidate_filter_;
  }

  // The new filter value will be populated to future allocation sessions, when
  // they are created via CreateSession, and also pooled sessions when one is
  // taken via TakePooledSession.
  //
  // A change in the candidate filter also fires a signal
  // `SignalCandidateFilterChanged`, so that objects subscribed to this signal
  // can, for example, update the candidate filter for sessions created by this
  // allocator and already taken by the object.
  //
  // Specifically for the session taken by the ICE transport, we currently do
  // not support removing candidate pairs formed with local candidates from this
  // session that are disabled by the new candidate filter.
  void SetCandidateFilter(uint32_t filter);
  // Deprecated.
  // TODO(qingsi): Remove this after Chromium migrates to the new method.
  void set_candidate_filter(uint32_t filter) { SetCandidateFilter(filter); }

  // Deprecated (by the next method).
  bool prune_turn_ports() const {
    CheckRunOnValidThreadIfInitialized();
    return turn_port_prune_policy_ == PRUNE_BASED_ON_PRIORITY;
  }

  PortPrunePolicy turn_port_prune_policy() const {
    CheckRunOnValidThreadIfInitialized();
    return turn_port_prune_policy_;
  }

  TurnCustomizer* turn_customizer() {
    CheckRunOnValidThreadIfInitialized();
    return turn_customizer_;
  }

  // Collect candidate stats from pooled allocator sessions. This can be used to
  // collect candidate stats without creating an offer/answer or setting local
  // description. After the local description is set, the ownership of the
  // pooled session is taken by P2PTransportChannel, and the
  // candidate stats can be collected from P2PTransportChannel::GetStats.
  virtual void GetCandidateStatsFromPooledSessions(
      CandidateStatsList* candidate_stats_list);

  // Return IceParameters of the pooled sessions.
  std::vector<IceParameters> GetPooledIceCredentials();

  // Fired when `candidate_filter_` changes.
  void SubscribeCandidateFilterChanged(
      void* tag,
      absl::AnyInvocable<void(uint32_t, uint32_t)> callback) {
    candidate_filter_callbacks_.AddReceiver(tag, std::move(callback));
  }
  void UnsubscribeCandidateFilterChanged(void* tag) {
    candidate_filter_callbacks_.RemoveReceivers(tag);
  }

 protected:
  // TODO(webrtc::13579): Remove std::string version once downstream users have
  // migrated to the absl::string_view version.
  virtual PortAllocatorSession* CreateSessionInternal(
      absl::string_view content_name,
      int component,
      absl::string_view ice_ufrag,
      absl::string_view ice_pwd) = 0;

  const std::vector<std::unique_ptr<PortAllocatorSession>>& pooled_sessions() {
    return pooled_sessions_;
  }

  // Returns true if there is an mDNS responder attached to the network manager.
  virtual bool MdnsObfuscationEnabled() const { return false; }

  // The following thread checks are only done in DCHECK for the consistency
  // with the exsiting thread checks.
  void CheckRunOnValidThreadIfInitialized() const {
    RTC_DCHECK(!initialized_ || thread_checker_.IsCurrent());
  }

  void CheckRunOnValidThreadAndInitialized() const {
    RTC_DCHECK(initialized_ && thread_checker_.IsCurrent());
  }

  bool initialized_ = false;
  uint32_t flags_;
  int min_port_;
  int max_port_;
  int max_ipv6_networks_;
  uint32_t step_delay_;
  bool allow_tcp_listen_;
  uint32_t candidate_filter_;
  std::string origin_;
  SequenceChecker thread_checker_;
  VpnPreference vpn_preference_ = VpnPreference::kDefault;

 private:
  ServerAddresses stun_servers_;
  std::vector<RelayServerConfig> turn_servers_;
  int candidate_pool_size_ = 0;  // Last value passed into SetConfiguration.
  std::vector<std::unique_ptr<PortAllocatorSession>> pooled_sessions_;
  PortPrunePolicy turn_port_prune_policy_ = NO_PRUNE;

  // Customizer for TURN messages.
  // The instance is owned by application and will be shared among
  // all TurnPort(s) created.
  TurnCustomizer* turn_customizer_ = nullptr;

  std::optional<TimeDelta> stun_candidate_keepalive_interval_;

  // If true, TakePooledSession() will only return sessions that has same ice
  // credentials as requested.
  bool restrict_ice_credentials_change_ = false;

  // Returns iterator to pooled session with specified ice_credentials or first
  // if ice_credentials is nullptr.
  std::vector<std::unique_ptr<PortAllocatorSession>>::const_iterator
  FindPooledSession(const IceParameters* ice_credentials = nullptr) const;
  void NotifyCandidateFilterChanged(uint32_t prev_filter, uint32_t cur_filter) {
    candidate_filter_callbacks_.Send(prev_filter, cur_filter);
  }

  CallbackList<uint32_t, uint32_t> candidate_filter_callbacks_;
  // ICE tie breaker.
  uint64_t tiebreaker_;
};

}  //  namespace webrtc

#endif  // P2P_BASE_PORT_ALLOCATOR_H_

Messung V0.5 in Prozent
C=79 H=98 G=88

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.