Skip to content

Commit 2d31ef9

Browse files
committedSep 24, 2017
Add some docs.
1 parent 0454c3f commit 2d31ef9

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed
 

Diff for: ‎src/wire/ethernet.rs

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ impl fmt::Display for EtherType {
2828
pub struct Address(pub [u8; 6]);
2929

3030
impl Address {
31+
/// The broadcast address.
3132
pub const BROADCAST: Address = Address([0xff; 6]);
3233

3334
/// Construct an Ethernet address from a sequence of octets, in big-endian.

Diff for: ‎src/wire/ip.rs

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ pub struct Endpoint {
135135
}
136136

137137
impl Endpoint {
138+
/// An endpoint with unspecified address and port.
138139
pub const UNSPECIFIED: Endpoint = Endpoint { addr: Address::Unspecified, port: 0 };
139140

140141
/// Create an endpoint address from given address and port.

Diff for: ‎src/wire/ipv4.rs

+3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ pub use super::IpProtocol as Protocol;
1212
pub struct Address(pub [u8; 4]);
1313

1414
impl Address {
15+
/// An unspecified address.
1516
pub const UNSPECIFIED: Address = Address([0x00; 4]);
17+
18+
/// The broadcast address.
1619
pub const BROADCAST: Address = Address([0xff; 4]);
1720

1821
/// Construct an IPv4 address from parts.

0 commit comments

Comments
 (0)