Skip to content

Commit e9329e2

Browse files
authored
Add spec links to public items (webrtc-rs#591)
* dtls: Add spec links to public items * ice: Add spec links to public items * rtcp: Add spec links to public items * rtp: Add spec links to public items * sctp: Add spec links to public items * sdp: Add spec links to public items * webrtc: Add spec links to public items
1 parent 19004ef commit e9329e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+420
-57
lines changed

dtls/src/alert/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ impl From<u8> for AlertDescription {
144144
// preventing the failed session from being used to establish new
145145
// connections. Like other messages, alert messages are encrypted and
146146
// compressed, as specified by the current connection state.
147-
// https://tools.ietf.org/html/rfc5246#section-7.2
147+
/// ## Specifications
148+
///
149+
/// * [RFC 5246 §7.2]
150+
///
151+
/// [RFC 5246 §7.2]: https://tools.ietf.org/html/rfc5246#section-7.2
148152
#[derive(Copy, Clone, PartialEq, Debug)]
149153
pub struct Alert {
150154
pub(crate) alert_level: AlertLevel,

dtls/src/application_data.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ use crate::error::Result;
77
// fragmented, compressed, and encrypted based on the current connection
88
// state. The messages are treated as transparent data to the record
99
// layer.
10-
// https://tools.ietf.org/html/rfc5246#section-10
10+
/// ## Specifications
11+
///
12+
/// * [RFC 5246 §10]
13+
///
14+
/// [RFC 5246 §10]: https://tools.ietf.org/html/rfc5246#section-10
1115
#[derive(Clone, PartialEq, Eq, Debug)]
1216
pub struct ApplicationData {
1317
pub data: Vec<u8>,

dtls/src/change_cipher_spec/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ use super::error::*;
1212
// ciphering strategies. The protocol consists of a single message,
1313
// which is encrypted and compressed under the current (not the pending)
1414
// connection state. The message consists of a single byte of value 1.
15-
// https://tools.ietf.org/html/rfc5246#section-7.1
15+
/// ## Specifications
16+
///
17+
/// * [RFC 5246 §7.1]
18+
///
19+
/// [RFC 5246 §7.1]: https://tools.ietf.org/html/rfc5246#section-7.1
1620
#[derive(Clone, PartialEq, Eq, Debug)]
1721
pub struct ChangeCipherSpec;
1822

dtls/src/content.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ use super::change_cipher_spec::*;
66
use super::handshake::*;
77
use crate::error::*;
88

9-
// https://tools.ietf.org/html/rfc4346#section-6.2.1
9+
/// ## Specifications
10+
///
11+
/// * [RFC 4346 §6.2.1]
12+
///
13+
/// [RFC 4346 §6.2.1]: https://tools.ietf.org/html/rfc4346#section-6.2.1
1014
#[derive(Default, Copy, Clone, PartialEq, Eq, Debug)]
1115
pub enum ContentType {
1216
ChangeCipherSpec = 20,

dtls/src/extension/extension_supported_elliptic_curves.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ use crate::curve::named_curve::*;
66

77
const EXTENSION_SUPPORTED_GROUPS_HEADER_SIZE: usize = 6;
88

9-
// https://tools.ietf.org/html/rfc8422#section-5.1.1
9+
/// ## Specifications
10+
///
11+
/// * [RFC 8422 §5.1.1]
12+
///
13+
/// [RFC 8422 §5.1.1]: https://tools.ietf.org/html/rfc8422#section-5.1.1
1014
#[derive(Clone, Debug, PartialEq, Eq)]
1115
pub struct ExtensionSupportedEllipticCurves {
1216
pub elliptic_curves: Vec<NamedCurve>,

dtls/src/extension/extension_supported_point_formats.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ pub type EllipticCurvePointFormat = u8;
99

1010
pub const ELLIPTIC_CURVE_POINT_FORMAT_UNCOMPRESSED: EllipticCurvePointFormat = 0;
1111

12-
// https://tools.ietf.org/html/rfc4492#section-5.1.2
12+
/// ## Specifications
13+
///
14+
/// * [RFC 4492 §5.1.2]
15+
///
16+
/// [RFC 4492 §5.1.2]: https://tools.ietf.org/html/rfc4492#section-5.1.2
1317
#[derive(Clone, Debug, PartialEq, Eq)]
1418
pub struct ExtensionSupportedPointFormats {
1519
pub(crate) point_formats: Vec<EllipticCurvePointFormat>,

dtls/src/extension/extension_supported_signature_algorithms.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ use crate::signature_hash_algorithm::*;
66

77
const EXTENSION_SUPPORTED_SIGNATURE_ALGORITHMS_HEADER_SIZE: usize = 6;
88

9-
// https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1
9+
/// ## Specifications
10+
///
11+
/// * [RFC 5246 §7.4.1.4.1]
12+
///
13+
/// [RFC 5246 §7.4.1.4.1]: https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1
1014
#[derive(Clone, Debug, PartialEq, Eq)]
1115
pub struct ExtensionSupportedSignatureAlgorithms {
1216
pub(crate) signature_hash_algorithms: Vec<SignatureHashAlgorithm>,

dtls/src/extension/extension_use_extended_master_secret.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ use super::*;
55

66
const EXTENSION_USE_EXTENDED_MASTER_SECRET_HEADER_SIZE: usize = 4;
77

8-
// https://tools.ietf.org/html/rfc8422
8+
/// ## Specifications
9+
///
10+
/// * [RFC 8422]
11+
///
12+
/// [RFC 8422]: https://tools.ietf.org/html/rfc8422
913
#[derive(Clone, Debug, PartialEq, Eq)]
1014
pub struct ExtensionUseExtendedMasterSecret {
1115
pub(crate) supported: bool,

dtls/src/extension/extension_use_srtp.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ mod extension_use_srtp_test;
44
use super::*;
55

66
// SRTPProtectionProfile defines the parameters and options that are in effect for the SRTP processing
7-
// https://tools.ietf.org/html/rfc5764#section-4.1.2
7+
/// ## Specifications
8+
///
9+
/// * [RFC 5764 §4.1.2]
10+
///
11+
/// [RFC 5764 §4.1.2]: https://tools.ietf.org/html/rfc5764#section-4.1.2
812
#[allow(non_camel_case_types)]
913
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
1014
pub enum SrtpProtectionProfile {
@@ -29,7 +33,11 @@ impl From<u16> for SrtpProtectionProfile {
2933

3034
const EXTENSION_USE_SRTPHEADER_SIZE: usize = 6;
3135

32-
// https://tools.ietf.org/html/rfc8422
36+
/// ## Specifications
37+
///
38+
/// * [RFC 8422]
39+
///
40+
/// [RFC 8422]: https://tools.ietf.org/html/rfc8422
3341
#[allow(non_camel_case_types)]
3442
#[derive(Clone, Debug, PartialEq, Eq)]
3543
pub struct ExtensionUseSrtp {

dtls/src/extension/renegotiation_info.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ const RENEGOTIATION_INFO_HEADER_SIZE: usize = 5;
88

99
/// RenegotiationInfo allows a Client/Server to
1010
/// communicate their renegotiation support
11-
/// https://tools.ietf.org/html/rfc5746
11+
///
12+
/// ## Specifications
13+
///
14+
/// * [RFC 5746]
15+
///
16+
/// [RFC 5746]: https://tools.ietf.org/html/rfc5746
1217
#[derive(Clone, Debug, PartialEq, Eq)]
1318
pub struct ExtensionRenegotiationInfo {
1419
pub(crate) renegotiated_connection: u8,

dtls/src/handshake/handshake_message_hello_verify_request.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ use crate::record_layer::record_layer_header::*;
2222
MAY respond with a HelloVerifyRequest message. This message contains
2323
a stateless cookie generated using the technique of [PHOTURIS]. The
2424
client MUST retransmit the ClientHello with the cookie added.
25-
26-
https://tools.ietf.org/html/rfc6347#section-4.2.1
2725
*/
26+
/// ## Specifications
27+
///
28+
/// * [RFC 6347 §4.2.1]
29+
///
30+
/// [RFC 6347 §4.2.1]: https://tools.ietf.org/html/rfc6347#section-4.2.1
2831
#[derive(Clone, Debug, PartialEq, Eq)]
2932
pub struct HandshakeMessageHelloVerifyRequest {
3033
pub(crate) version: ProtocolVersion,

dtls/src/handshake/handshake_random.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ use rand::Rng;
77
pub const RANDOM_BYTES_LENGTH: usize = 28;
88
pub const HANDSHAKE_RANDOM_LENGTH: usize = RANDOM_BYTES_LENGTH + 4;
99

10-
// https://tools.ietf.org/html/rfc4346#section-7.4.1.2
10+
/// ## Specifications
11+
///
12+
/// * [RFC 4346 §7.4.1.2]
13+
///
14+
/// [RFC 4346 §7.4.1.2]: https://tools.ietf.org/html/rfc4346#section-7.4.1.2
1115
#[derive(Clone, Debug, PartialEq, Eq)]
1216
pub struct HandshakeRandom {
1317
pub gmt_unix_time: SystemTime,

dtls/src/handshake/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ use handshake_message_server_key_exchange::*;
3333
use super::content::*;
3434
use super::error::*;
3535

36-
// https://tools.ietf.org/html/rfc5246#section-7.4
36+
/// ## Specifications
37+
///
38+
/// * [RFC 5246 §7.4]
39+
///
40+
/// [RFC 5246 §7.4]: https://tools.ietf.org/html/rfc5246#section-7.4
3741
#[derive(Default, Copy, Clone, Debug, PartialEq, Eq, Hash)]
3842
pub enum HandshakeType {
3943
HelloRequest = 0,

dtls/src/record_layer/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ use crate::handshake::Handshake;
2828
only change is the inclusion of an explicit sequence number in the
2929
record. This sequence number allows the recipient to correctly
3030
verify the TLS MAC.
31-
https://tools.ietf.org/html/rfc4347#section-4.1
3231
*/
32+
/// ## Specifications
33+
///
34+
/// * [RFC 4347 §4.1]
35+
///
36+
/// [RFC 4347 §4.1]: https://tools.ietf.org/html/rfc4347#section-4.1
3337
#[derive(Debug, Clone, PartialEq)]
3438
pub struct RecordLayer {
3539
pub record_layer_header: RecordLayerHeader,

dtls/src/record_layer/record_layer_header.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ pub const PROTOCOL_VERSION1_2: ProtocolVersion = ProtocolVersion {
2727
minor: DTLS1_2MINOR,
2828
};
2929

30-
// https://tools.ietf.org/html/rfc4346#section-6.2.1
30+
/// ## Specifications
31+
///
32+
/// * [RFC 4346 §6.2.1]
33+
///
34+
/// [RFC 4346 §6.2.1]: https://tools.ietf.org/html/rfc4346#section-6.2.1
3135
#[derive(Copy, Clone, PartialEq, Eq, Debug, Default)]
3236
pub struct ProtocolVersion {
3337
pub major: u8,

ice/src/tcp_type/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ mod tcp_type_test;
33

44
use std::fmt;
55

6-
// TCPType is the type of ICE TCP candidate as described in
7-
// ttps://tools.ietf.org/html/rfc6544#section-4.5
6+
/// TCPType is the type of ICE TCP candidate
7+
///
8+
/// ## Specifications
9+
///
10+
/// * [RFC 6544 §4.5]
11+
///
12+
/// [RFC 6544 §4.5]: https://tools.ietf.org/html/rfc6544#section-4.5
813
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
914
pub enum TcpType {
1015
/// The default value. For example UDP candidates do not need this field.

rtcp/src/payload_feedbacks/receiver_estimated_maximum_bitrate/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ use crate::util::*;
1515
type Result<T> = std::result::Result<T, util::Error>;
1616

1717
/// ReceiverEstimatedMaximumBitrate contains the receiver's estimated maximum bitrate.
18-
/// see: https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03
18+
///
19+
/// ## Specifications
20+
///
21+
/// * [draft-alvestrand-rmcat-remb-03]
22+
///
23+
/// [draft-alvestrand-rmcat-remb-03]: https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03
1924
#[derive(Debug, PartialEq, Default, Clone)]
2025
pub struct ReceiverEstimatedMaximumBitrate {
2126
/// SSRC of sender

rtcp/src/transport_feedbacks/transport_layer_cc/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use crate::util::*;
1414

1515
type Result<T> = std::result::Result<T, util::Error>;
1616

17-
/// https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#page-5
1817
/// 0 1 2 3
1918
/// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
2019
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -40,9 +39,14 @@ type Result<T> = std::result::Result<T, util::Error>;
4039
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4140
/// | recv delta | recv delta | zero padding |
4241
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
43-
4442
// for packet status chunk
4543
/// type of packet status chunk
44+
///
45+
/// ## Specifications
46+
///
47+
/// * [draft-holmer-rmcat-transport-wide-cc-extensions-01, page 5]
48+
///
49+
/// [draft-holmer-rmcat-transport-wide-cc-extensions-01, page 5]: https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#page-5
4650
#[derive(Default, PartialEq, Eq, Debug, Clone)]
4751
#[repr(u16)]
4852
pub enum StatusChunkTypeTcc {

rtcp/src/transport_feedbacks/transport_layer_nack/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ const TLN_LENGTH: usize = 2;
102102
const NACK_OFFSET: usize = 8;
103103

104104
// The TransportLayerNack packet informs the encoder about the loss of a transport packet
105-
// IETF RFC 4585, Section 6.2.1
106-
// https://tools.ietf.org/html/rfc4585#section-6.2.1
105+
/// ## Specifications
106+
///
107+
/// * [RFC 4585 §6.2.1]
108+
///
109+
/// [RFC 4585 §6.2.1]: https://tools.ietf.org/html/rfc4585#section-6.2.1
107110
#[derive(Debug, PartialEq, Eq, Default, Clone)]
108111
pub struct TransportLayerNack {
109112
/// SSRC of sender

rtp/src/codecs/h265/mod.rs

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,20 @@ const H265NALU_FRAGMENTATION_UNIT_TYPE: u8 = 49;
244244
const H265NALU_PACI_PACKET_TYPE: u8 = 50;
245245

246246
/// H265NALUHeader is a H265 NAL Unit Header
247-
/// <https://datatracker.ietf.org/doc/html/rfc7798#section-1.1.4>
247+
///
248+
/// ```text
248249
/// +---------------+---------------+
249-
/// |0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|
250-
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
251-
/// |F| Type | layer_id | tid |
252-
/// +-------------+-----------------+
250+
/// |0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|
251+
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
252+
/// |F| Type | layer_id | tid|
253+
/// +-------------+-----------------+
254+
/// ```
255+
///
256+
/// ## Specifications
257+
///
258+
/// * [RFC 7798 §1.1.4]
259+
///
260+
/// [RFC 7798 §1.1.4]: https://tools.ietf.org/html/rfc7798#section-1.1.4
253261
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
254262
pub struct H265NALUHeader(pub u16);
255263

@@ -322,7 +330,11 @@ impl H265NALUHeader {
322330
/// | :...OPTIONAL RTP padding |
323331
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
324332
///
325-
/// Reference: <https://datatracker.ietf.org/doc/html/rfc7798#section-4.4.1>
333+
/// ## Specifications
334+
///
335+
/// * [RFC 7798 §4.4.1]
336+
///
337+
/// [RFC 7798 §4.4.1]: https://tools.ietf.org/html/rfc7798#section-4.4.1
326338
#[derive(Default, Debug, Clone, PartialEq, Eq)]
327339
pub struct H265SingleNALUnitPacket {
328340
/// payload_header is the header of the H265 packet.
@@ -411,7 +423,11 @@ impl H265SingleNALUnitPacket {
411423
/// | :
412424
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
413425
///
414-
/// Reference: <https://datatracker.ietf.org/doc/html/rfc7798#section-4.4.2>
426+
/// ## Specifications
427+
///
428+
/// * [RFC 7798 §4.4.2]
429+
///
430+
/// [RFC 7798 §4.4.2]: https://tools.ietf.org/html/rfc7798#section-4.4.2
415431
#[derive(Default, Debug, Clone, PartialEq, Eq)]
416432
pub struct H265AggregationUnitFirst {
417433
donl: Option<u16>,
@@ -451,7 +467,11 @@ impl H265AggregationUnitFirst {
451467
/// | :
452468
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
453469
///
454-
/// Reference: <https://datatracker.ietf.org/doc/html/rfc7798#section-4.4.2>
470+
/// ## Specifications
471+
///
472+
/// * [RFC 7798 §4.4.2]
473+
///
474+
/// [RFC 7798 §4.4.2]: https://tools.ietf.org/html/rfc7798#section-4.4.2
455475
#[derive(Default, Debug, Clone, PartialEq, Eq)]
456476
pub struct H265AggregationUnit {
457477
dond: Option<u8>,
@@ -491,7 +511,11 @@ impl H265AggregationUnit {
491511
/// | :...OPTIONAL RTP padding |
492512
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
493513
///
494-
/// Reference: <https://datatracker.ietf.org/doc/html/rfc7798#section-4.4.2>
514+
/// ## Specifications
515+
///
516+
/// * [RFC 7798 §4.4.2]
517+
///
518+
/// [RFC 7798 §4.4.2]: https://tools.ietf.org/html/rfc7798#section-4.4.2
495519
#[derive(Default, Debug, Clone, PartialEq, Eq)]
496520
pub struct H265AggregationPacket {
497521
first_unit: Option<H265AggregationUnitFirst>,
@@ -650,7 +674,11 @@ impl H265FragmentationUnitHeader {
650674
/// | :...OPTIONAL RTP padding |
651675
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
652676
///
653-
/// Reference: <https://datatracker.ietf.org/doc/html/rfc7798#section-4.4.3>
677+
/// ## Specifications
678+
///
679+
/// * [RFC 7798 §4.4.3]
680+
///
681+
/// [RFC 7798 §4.4.3]: https://tools.ietf.org/html/rfc7798#section-4.4.3
654682
#[derive(Default, Debug, Clone, PartialEq, Eq)]
655683
pub struct H265FragmentationUnitPacket {
656684
/// payload_header is the header of the H265 packet.
@@ -749,7 +777,11 @@ impl H265FragmentationUnitPacket {
749777
/// | :...OPTIONAL RTP padding |
750778
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
751779
///
752-
/// Reference: <https://datatracker.ietf.org/doc/html/rfc7798#section-4.4.4>
780+
/// ## Specifications
781+
///
782+
/// * [RFC 7798 §4.4.4]
783+
///
784+
/// [RFC 7798 §4.4.4]: https://tools.ietf.org/html/rfc7798#section-4.4.4
753785
#[derive(Default, Debug, Clone, PartialEq, Eq)]
754786
pub struct H265PACIPacket {
755787
/// payload_header is the header of the H265 packet.
@@ -878,7 +910,12 @@ impl H265PACIPacket {
878910
///
879911
880912
/// H265TSCI is a Temporal Scalability Control Information header extension.
881-
/// Reference: <https://datatracker.ietf.org/doc/html/rfc7798#section-4.5>
913+
///
914+
/// ## Specifications
915+
///
916+
/// * [RFC 7798 §4.5]
917+
///
918+
/// [RFC 7798 §4.5]: https://tools.ietf.org/html/rfc7798#section-4.5
882919
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
883920
pub struct H265TSCI(pub u32);
884921

0 commit comments

Comments
 (0)