Implement missing candidate pair packets/bytes sent/received stats.

Specifically:
* packetsSent
* packetsReceived
* packetsDiscardedOnSend
* bytesDiscardedOnSend

Bug: webrtc:10569
Change-Id: Id92c20b93dea57637239a6321bd8aa644867f272
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232961
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35113}
diff --git a/stats/rtcstats_objects.cc b/stats/rtcstats_objects.cc
index 762011d..961d17c 100644
--- a/stats/rtcstats_objects.cc
+++ b/stats/rtcstats_objects.cc
@@ -173,6 +173,8 @@
     &nominated,
     &writable,
     &readable,
+    &packets_sent,
+    &packets_received,
     &bytes_sent,
     &bytes_received,
     &total_round_trip_time,
@@ -188,7 +190,9 @@
     &consent_requests_received,
     &consent_requests_sent,
     &consent_responses_received,
-    &consent_responses_sent)
+    &consent_responses_sent,
+    &packets_discarded_on_send,
+    &bytes_discarded_on_send)
 // clang-format on
 
 RTCIceCandidatePairStats::RTCIceCandidatePairStats(const std::string& id,
@@ -206,6 +210,8 @@
       nominated("nominated"),
       writable("writable"),
       readable("readable"),
+      packets_sent("packetsSent"),
+      packets_received("packetsReceived"),
       bytes_sent("bytesSent"),
       bytes_received("bytesReceived"),
       total_round_trip_time("totalRoundTripTime"),
@@ -221,7 +227,9 @@
       consent_requests_received("consentRequestsReceived"),
       consent_requests_sent("consentRequestsSent"),
       consent_responses_received("consentResponsesReceived"),
-      consent_responses_sent("consentResponsesSent") {}
+      consent_responses_sent("consentResponsesSent"),
+      packets_discarded_on_send("packetsDiscardedOnSend"),
+      bytes_discarded_on_send("bytesDiscardedOnSend") {}
 
 RTCIceCandidatePairStats::RTCIceCandidatePairStats(
     const RTCIceCandidatePairStats& other)
@@ -234,6 +242,8 @@
       nominated(other.nominated),
       writable(other.writable),
       readable(other.readable),
+      packets_sent(other.packets_sent),
+      packets_received(other.packets_received),
       bytes_sent(other.bytes_sent),
       bytes_received(other.bytes_received),
       total_round_trip_time(other.total_round_trip_time),
@@ -249,7 +259,9 @@
       consent_requests_received(other.consent_requests_received),
       consent_requests_sent(other.consent_requests_sent),
       consent_responses_received(other.consent_responses_received),
-      consent_responses_sent(other.consent_responses_sent) {}
+      consent_responses_sent(other.consent_responses_sent),
+      packets_discarded_on_send(other.packets_discarded_on_send),
+      bytes_discarded_on_send(other.bytes_discarded_on_send) {}
 
 RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {}