Commit graph

18 commits

Author SHA1 Message Date
Harald Alvestrand
974044efca Remove code for supporting SDES
Rework transport_description_factory to only have non-DTLS mode for
testing, and rewrite tests accordingly.

Bug: webrtc:11066, chromium:804275
Change-Id: Ie7d477c4331c975e4e0a3034fbbb749ed9009446
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336880
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41697}
2024-02-08 14:34:04 +00:00
Ali Tofigh
de2ac5a6f3 Adopt absl::string_view in p2p/
Bug: webrtc:13579
Change-Id: Ia33afa2a9ad12d1a586087d49f581a93fddb565d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262766
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37381}
2022-06-30 13:19:18 +00:00
Jonas Oreland
ed99dae422 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 1
This cl/
1) move WebRtcKeyValueConfig from api/transport to api/ directory.
2) add a test/ScopedKeyValueConfig (compare ScopedFieldTrials).
3) removes usage of webrtc::field_trial:: from the pc/ directory.
4) removes a few unused includes of system_wrappers/field_trial.h.

Bug: webrtc:10335
Change-Id: If29c07900dbe791050b0a5ad05332bedfad035f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253903
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36160}
2022-03-09 13:23:21 +00:00
Harald Alvestrand
0d018415d5 Revert "Remove code supporting the SDES crypto mode in SDP"
This reverts commit ee212a72f2.

Reason for revert: Don't remove until downstream issues resolved

Original change's description:
> Remove code supporting the SDES crypto mode in SDP
>
> Removes the ability to accept nonencrypted answers to encrypted offers.
> Fixes some logic around bundled sessions and requirement for
> transport parameters.
>
> Bug: webrtc:11066
> Change-Id: I56d8628d223614918a1e5260fdb8a117c8c02dbd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236344
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35298}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:11066
Change-Id: I0c400ceffe1b08e0be7b44abbb54c8a032128f05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237223
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35312}
2021-11-04 14:46:27 +00:00
Harald Alvestrand
ee212a72f2 Remove code supporting the SDES crypto mode in SDP
Removes the ability to accept nonencrypted answers to encrypted offers.
Fixes some logic around bundled sessions and requirement for
transport parameters.

Bug: webrtc:11066
Change-Id: I56d8628d223614918a1e5260fdb8a117c8c02dbd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236344
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35298}
2021-11-02 12:58:50 +00:00
Harald Alvestrand
efece42aa5 Allow remote SDP offers to be "active" or "passive"
Bug: webrtc:12933
Change-Id: I75f148a1700143571e0ef8bce8a99123bae9c918
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229181
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34812}
2021-08-19 20:05:21 +00:00
Artem Titov
cfea2182f8 Use backticks not vertical bars to denote variables in comments
Bug: webrtc:12338
Change-Id: I89c8b3a328d04203177522cbdfd9e606fd4bce4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228246
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34696}
2021-08-10 10:40:03 +00:00
Artem Titov
2dbb4c9775 Use backticks not vertical bars to denote variables in comments for /p2p
Bug: webrtc:12338
Change-Id: Ie047b750cdf7ea2efe7a4632d18d5ed719c5ea83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226952
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34570}
2021-07-27 18:51:02 +00:00
Niels Möller
c6d6e06a5c Delete OpaqueTransportParameters and SDP attribute x-otp
It was used only to provide parameters for MediaTransport.

Bug: webrtc:9719
Change-Id: I42e451ef84251ecf2b15010c7a3923b6fa2436be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177350
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31541}
2020-06-18 06:58:42 +00:00
Bjorn A Mellem
0cda7b832a Allow non-identical datagram transport parameters.
Currently, datagram transports must report identical transport
parameters in order to negotiate use of the datagram transport.  This is
not strictly necessary, they just need parameters that fit some notion
of "compatability" (eg. both ends share some mutually-supported version
of the datagram protocol).

This change allows datagram transports to implement their own notion of
compatible transport parameters, by adding a
SetRemoteTransportParameters method to DatagramTransportInterface which
checks if the remote parameters are compatible with the local endpoint
and returns an error if they are not.

Bug: webrtc:9719
Change-Id: I166c787b468b89d9082d7e3c9995a6ed50a1650a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167741
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30412}
2020-01-29 18:14:24 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Bjorn A Mellem
c85ebbe766 Reland: Implement true negotiation for DatagramTransport with fallback to RTP.
In short, the caller places a x-opaque line in SDP for each m= section that
uses datagram transport.  If the answerer supports datagram transport, it will
parse this line and create a datagram transport.  It will then echo the x-opaque
line into the answer (to indicate that it accepted use of datagram transport).

If the offer and answer contain exactly the same x-opaque line, both peers will
use datagram transport.  If the x-opaque line is omitted from the answer (or is
different in the answer) they will fall back to RTP.

Note that a different x-opaque line in the answer means the answerer did not
understand something in the negotiation proto.  Since WebRTC cannot know what
was misunderstood, or whether it's still possible to use the datagram transport,
it must fall back to RTP.  This may change in the future, possibly by passing
the answer to the datagram transport, but it's good enough for now.

Negotiation consists of four parts:
 1. DatagramTransport exposes transport parameters for both client and server
 perspectives.  The client just echoes what it received from the server (modulo
 any fields it might not have understood).

 2. SDP adds a x-opaque line for opaque transport parameters.  Identical to
 x-mt, but this is specific to datagram transport and goes in each m= section,
 and appears in the answer as well as the offer.
  - This is propagated to Jsep as part of the TransportDescription.
  - SDP files: transport_description.h,cc, transport_description_factory.h,cc,
    media_session.cc, webrtc_sdp.cc

 3. JsepTransport/Controller:
  - Exposes opaque parameters for each mid (m= section).  On offerer, this means
    pre-allocating a datagram transport and getting its parameters.  On the
    answerer, this means echoing the offerer's parameters.
  - Uses a composite RTP transport to receive from either default RTP or
    datagram transport until both offer and answer arrive.
  - If a provisional answer arrives, sets the composite to send on the
    provisionally selected transport.
  - Once both offer and answer are set, deletes the unneeded transports and
    keeps whichever transport is selected.

 4. PeerConnection pulls transport parameters out of Jsep and adds them to SDP.

Bug: webrtc:9719
Change-Id: Ifcc428c8d76fb77dcc8abaa79507c620bcfb31b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140920
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28198}
2019-06-07 20:14:36 +00:00
Bjorn Mellem
7e8de0bf2d Revert "Implement true negotiation for DatagramTransport with fallback to RTP."
This reverts commit 71c6482baf.

Reason for revert: Lands too much at once and breaks downstream tests that need to implement new interfaces first.

Original change's description:
> Implement true negotiation for DatagramTransport with fallback to RTP.
> 
> In short, the caller places a x-opaque line in SDP for each m= section that
> uses datagram transport.  If the answerer supports datagram transport, it will
> parse this line and create a datagram transport.  It will then echo the x-opaque
> line into the answer (to indicate that it accepted use of datagram transport).
> 
> If the offer and answer contain exactly the same x-opaque line, both peers will
> use datagram transport.  If the x-opaque line is omitted from the answer (or is
> different in the answer) they will fall back to RTP.
> 
> Note that a different x-opaque line in the answer means the answerer did not
> understand something in the negotiation proto.  Since WebRTC cannot know what
> was misunderstood, or whether it's still possible to use the datagram transport,
> it must fall back to RTP.  This may change in the future, possibly by passing
> the answer to the datagram transport, but it's good enough for now.
> 
> Negotiation consists of four parts:
>  1. DatagramTransport exposes transport parameters for both client and server
>  perspectives.  The client just echoes what it received from the server (modulo
>  any fields it might not have understood).
> 
>  2. SDP adds a x-opaque line for opaque transport parameters.  Identical to
>  x-mt, but this is specific to datagram transport and goes in each m= section,
>  and appears in the answer as well as the offer.
>   - This is propagated to Jsep as part of the TransportDescription.
>   - SDP files: transport_description.h,cc, transport_description_factory.h,cc,
>     media_session.cc, webrtc_sdp.cc
> 
>  3. JsepTransport/Controller:
>   - Exposes opaque parameters for each mid (m= section).  On offerer, this means
>     pre-allocating a datagram transport and getting its parameters.  On the
>     answerer, this means echoing the offerer's parameters.
>   - Uses a composite RTP transport to receive from either default RTP or
>     datagram transport until both offer and answer arrive.
>   - If a provisional answer arrives, sets the composite to send on the
>     provisionally selected transport.
>   - Once both offer and answer are set, deletes the unneeded transports and
>     keeps whichever transport is selected.
> 
>  4. PeerConnection pulls transport parameters out of Jsep and adds them to SDP.
> 
> Bug: webrtc:9719
> Change-Id: Id8996eb1871e79d93b7923a5d7eb3431548c798d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140700
> Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28182}

TBR=steveanton@webrtc.org,mellem@webrtc.org,sukhanov@webrtc.org

Change-Id: I0d502c4a6d27516c35ed85154f3fa5869f88b3b7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9719
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140822
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28188}
2019-06-07 06:17:50 +00:00
Bjorn A Mellem
71c6482baf Implement true negotiation for DatagramTransport with fallback to RTP.
In short, the caller places a x-opaque line in SDP for each m= section that
uses datagram transport.  If the answerer supports datagram transport, it will
parse this line and create a datagram transport.  It will then echo the x-opaque
line into the answer (to indicate that it accepted use of datagram transport).

If the offer and answer contain exactly the same x-opaque line, both peers will
use datagram transport.  If the x-opaque line is omitted from the answer (or is
different in the answer) they will fall back to RTP.

Note that a different x-opaque line in the answer means the answerer did not
understand something in the negotiation proto.  Since WebRTC cannot know what
was misunderstood, or whether it's still possible to use the datagram transport,
it must fall back to RTP.  This may change in the future, possibly by passing
the answer to the datagram transport, but it's good enough for now.

Negotiation consists of four parts:
 1. DatagramTransport exposes transport parameters for both client and server
 perspectives.  The client just echoes what it received from the server (modulo
 any fields it might not have understood).

 2. SDP adds a x-opaque line for opaque transport parameters.  Identical to
 x-mt, but this is specific to datagram transport and goes in each m= section,
 and appears in the answer as well as the offer.
  - This is propagated to Jsep as part of the TransportDescription.
  - SDP files: transport_description.h,cc, transport_description_factory.h,cc,
    media_session.cc, webrtc_sdp.cc

 3. JsepTransport/Controller:
  - Exposes opaque parameters for each mid (m= section).  On offerer, this means
    pre-allocating a datagram transport and getting its parameters.  On the
    answerer, this means echoing the offerer's parameters.
  - Uses a composite RTP transport to receive from either default RTP or
    datagram transport until both offer and answer arrive.
  - If a provisional answer arrives, sets the composite to send on the
    provisionally selected transport.
  - Once both offer and answer are set, deletes the unneeded transports and
    keeps whichever transport is selected.

 4. PeerConnection pulls transport parameters out of Jsep and adds them to SDP.

Bug: webrtc:9719
Change-Id: Id8996eb1871e79d93b7923a5d7eb3431548c798d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140700
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28182}
2019-06-07 01:09:04 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Steve Anton
ae226f65c8 Use Abseil container algorithms in p2p/
Bug: None
Change-Id: I02dd19efa201bd9d55d0f7c2e1496693017a6848
Reviewed-on: https://webrtc-review.googlesource.com/c/120001
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26455}
2019-01-29 21:52:18 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Renamed from p2p/base/transportdescriptionfactory_unittest.cc (Browse further)