This is a follow-up of
https://webrtc-review.googlesource.com/c/src/+/168403, removing code
that was only used from the now-deleted code.
The if.h include is still needed for some IFF_xxx flags, but can be
simplified to use the POSIX version as route.h isn't needed anymore.
Bug: None
Change-Id: Ic2def8b54a9d3aa1a0e3eabf6f1a837a0cf8a5a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168483
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Xavier Lepaul <xalep@google.com>
Cr-Commit-Position: refs/heads/master@{#30523}
This CL was generated by running:
git ls-files | grep ".cc" | xargs perl -i -ne 'BEGIN {undef $/}; s/("[\s\n]*<<[\s\n]*")/" "/g; print;'; git cl format
After that I manually edited modules/audio_processing/gain_controller2.cc to preserve its original
formatting.
This primary benefit of this change is a small reduction in binary size.
Bug: None
Change-Id: I689fa7ba9c717c314bb167e5d592c3c4e0871e29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165961
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30251}
wlan was previously classified as WiFi only on Android, while some
non-Android platforms may use the same name for a WiFi adapter. This
causes a WiFi interface to be assigned a higher network cost than
designed when we rely on the name matching to identify the network
type, which has further implication in the ICE candidate pair selection.
Bug: webrtc:10992
Change-Id: I8d2bb18cf9a0e3a06a104f359a85f802526a2ff9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154464
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Alex Drake <alexdrake@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29309}
This methods were only used in test code, it should be safe to remove
them.
Bug: webrtc:10198
Change-Id: If2da1695f0efbff3aa9b6ebb4eebf4fdfe128593
Reviewed-on: https://webrtc-review.googlesource.com/c/118601
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26352}
to Mdns.*.
MdnsResponderInterface now explicitly requires the reference counting
of created names to allow the coexistence of multiple users of the same
responder where one user would not remove identical names created by
others.
MDns.* is also renamed to Mdns.* per the style guide.
TBR=aleloi@webrtc.org
Bug: webrtc:9605
Change-Id: I047fc41f34de8d4e97c980409a7f373769c4c252
Reviewed-on: https://webrtc-review.googlesource.com/c/101921
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25458}
Refactor only remaining user, IsDefaultRoute (helper function
called from BasicNetworkManager::IsIgnoredNetwork) to use a
FILE* and fgets instead.
Bug: webrtc:6424
Change-Id: I57652f664b9a6965c19575c1b5d7f7de24f2ed44
Reviewed-on: https://webrtc-review.googlesource.com/c/108089
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25433}
Replace calls to .str() which copies with .Release which moves in cases where that's safe.
This CL was generated by this command:
git grep -l 'StringBuilder' |
xargs perl -i -0 -pe "s/(rtc::StringBuilder (\S+);.*?return )\\g2.str\(\)/\$1\$2.Release\(\)/sg"
Bug: webrtc:8982
Change-Id: If4dadbeb039df010aaaa9e58da81c1971a84fe8f
Reviewed-on: https://webrtc-review.googlesource.com/100307
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24790}
MDnsResponderInterface can be accessed by rtc::NetworkManager to
generate mDNS hostnames for local IP addresses, so that the addresses of
ICE host candidates are obfuscated in gathering whenever an mDNS
responder is present. The mDNS responder will handle incoming mDNS
queries about the generated mDNS hostnames, e.g. queries received from
the AsyncResolverInterface of the remote ICE endpoint.
Bug: webrtc:9605
Change-Id: Ib9e77427327b3d1fabdb1f3854d5e8457db40375
Reviewed-on: https://webrtc-review.googlesource.com/97881
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#24714}
This CL replaces std::o?stringstream with rtc::StringBuilder where that's possible to do without changing any of the surrounding code. It also updates includes and build files as appropriate.
The CL was generated by running 'git grep -l -P std::o?stringstream | xargs perl -pi -e "s/std::o?stringstream/rtc::StringBuilder/g"'. Then I've manually updated the #includes and BUILD files, run 'git cl format' and unstaged any file that would need more complex fixes.
Bug: webrtc:8982
Change-Id: Ibc32153f4a3fd177e260b6ad05ce393972549357
Reviewed-on: https://webrtc-review.googlesource.com/98460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24605}
ADAPTER_TYPE_ANY can be used to set the network ignore mask if an
application does not want candidates from the any address ports, the
underlying network interface types of which are not determined in
gathering. The ADAPTER_TYPE_ANY is also given the maximum network cost
so that when there are candidates from explicit network interfaces,
these candidates from the any address ports as backups, if they ever
surface, are not preferred if the other candidates have at least the
same network condition.
Bug: webrtc:9468
Change-Id: I20c3a40e9a75b8fb34fad741ba5f835ecc3b0d92
Reviewed-on: https://webrtc-review.googlesource.com/85880
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23807}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
1) Network info is appended with its network ID assigned by the network
manager so that we can cross-reference networks by IDs in the log.
2) The local network info is added to the candidate pair string
representation so that we do not need the cross reference to the
logs of candidate gathering to find out the network where the local
candidate is from.
3) A flag is added to the candidate pair string representation to
indicate if this pair is the selected one.
4) Sorting of candidate pairs is logged with the reason of sorting
request.
5) Network filtering that takes place in the port allocator is
explicitly logged.
Bug: None
Change-Id: Iaa337394cad803515e26e254814aa04ed2213eab
Reviewed-on: https://webrtc-review.googlesource.com/72522
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23266}
GetAdapterTypeFromName determines the adapter type of a network
interface based on the string matching of the interface name. It however
does not have an entry to map the well-known "eth" name to the common
Ethernet type. This introduces subtle bugs when GetAdapterTypeFromName
is used as the only method to determine a network type and Ethernet is
thus identified as an unknown network, which affects the network
filtering and network path selection that rely on the network type.
Bug: webrtc:9235
Change-Id: Ifc3269d191382f3b3a041de1c9755c09994b31b2
Reviewed-on: https://webrtc-review.googlesource.com/74263
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23195}
The VPN adapter type is not effectively supported in WebRTC Android for
1) the network monitor may not obtain the VPN adapter type from the OS,
e.g. via NetworkInfo.getType, 2) and VPN adapter type is replaced
by the adapter type of an underlying network by the network monitor in
the current implementation. Specifically, WebRTC Android would
previously classify VPNs as either type ADAPTER_TYPE_UNKNOWN, or the
type of the currently active network (which we assume the VPN is
using).
In this CL, VPNs are classified as ADAPTER_TYPE_VPN whenever possible,
and the underlying network type, if available from the VPN, is
separately stored and used to prioritize ICE candidates in network path
selection.
This allows ADAPTER_TYPE_VPN to be used in networkIgnoreMask to ignore
VPNs when gathering ICE candidates.
Bug: webrtc:9168
Change-Id: I9513c76a114ba967437b699e71223a4a2f13f34a
Reviewed-on: https://webrtc-review.googlesource.com/70960
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23061}
Also removing the implicit InterfaceAddress constructor that takes an
IPAddress, so that issues like this won't happen in the future.
And adding a convenience "Network::AddIP" method that takes an
IPAddress, so that code doing that (previously relying on the implicit
constructor) will continue to work.
Bug: webrtc:8972
Change-Id: Id5cf0fca481cfee3f8ab83412fcb41886535bba2
Reviewed-on: https://webrtc-review.googlesource.com/59461
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22504}
"tun", "utun" and "tap" interfaces will now be assumed to be VPNs, if
the type is otherwise unknown.
This CL also moves GetAdapterTypeFromName out of BasicNetworkManager,
so that other network manager classes (e.g., the one in Chromium) can
use it too.
Bug: chromium:805759
Change-Id: I9988619666e2a9449cf5c089d24cf7d3afde8239
Reviewed-on: https://webrtc-review.googlesource.com/43580
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21767}
This is a reland of Id63f0deb7b335690157ab157c35177b7836688da.
Original change's description:
> Enable the clang style plugin in rtc_base/
>
> Enabled the plugin and cleaned up all issues it found.
>
> Bug: webrtc:163
> Change-Id: Id63f0deb7b335690157ab157c35177b7836688da
> Reviewed-on: https://webrtc-review.googlesource.com/14660
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20401}
Bug: webrtc:163
Change-Id: I861a5fe741215115b0e7a2be9c0786836ff5376e
Reviewed-on: https://webrtc-review.googlesource.com/15040
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20416}
This reverts commit af551a1956.
Reason for revert: Fails to compile on Chromium FYI bot: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/21375
Original change's description:
> Enable the clang style plugin in rtc_base/
>
> Enabled the plugin and cleaned up all issues it found.
>
> Bug: webrtc:163
> Change-Id: Id63f0deb7b335690157ab157c35177b7836688da
> Reviewed-on: https://webrtc-review.googlesource.com/14660
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20401}
TBR=steveanton@webrtc.org,kwiberg@webrtc.org
Change-Id: Iafdf4bc1744a981b5d7d38e4a0c5b2d88753f00a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:163
Reviewed-on: https://webrtc-review.googlesource.com/14740
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20402}
Enabled the plugin and cleaned up all issues it found.
Bug: webrtc:163
Change-Id: Id63f0deb7b335690157ab157c35177b7836688da
Reviewed-on: https://webrtc-review.googlesource.com/14660
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20401}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}