Skip to content

Commit ab3605b

Browse files
committed
Fix broken links in doc (use intra-doc links)
1 parent 0ef4d90 commit ab3605b

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ section, in order of appearance.*
5858
## Example: streaming parsers
5959

6060
The following code shows how to parse a file in the pcap-ng format, using a
61-
[`PcapNGReader`](https://docs.rs/pcap-parser/latest/pcap_parser/struct.PcapNGReader.html) streaming parser.
61+
[`PcapNGReader`] streaming parser.
6262
This reader provides a convenient abstraction over the file format, and takes
6363
care of the endianness.
6464

@@ -86,13 +86,13 @@ loop {
8686
}
8787
println!("num_blocks: {}", num_blocks);
8888
```
89-
See [`PcapNGReader`](https://docs.rs/pcap-parser/latest/pcap_parser/struct.PcapNGReader.html) for a complete example,
89+
See [`PcapNGReader`] for a complete example,
9090
including handling of linktype and accessing packet data.
9191

92-
See also the [`pcapng`](https://docs.rs/pcap-parser/latest/pcap_parser/pcapng/index.html) module for more details about the new capture file format.
92+
See also the [`pcapng`] module for more details about the new capture file format.
9393

9494
For legacy pcap files, use similar code with the
95-
[`LegacyPcapReader`](https://docs.rs/pcap-parser/latest/pcap_parser/struct.LegacyPcapReader.html) streaming parser.
95+
[`LegacyPcapReader`] streaming parser.
9696

9797
See [pcap-analyzer](https://github.com/rusticata/pcap-analyzer), in particular the
9898
[libpcap-tools](https://github.com/rusticata/pcap-analyzer/tree/master/libpcap-tools) and
@@ -102,7 +102,7 @@ for more examples.
102102
## Example: generic streaming parsing
103103

104104
To create a pcap reader for input in either PCAP or PCAPNG format, use the
105-
[`create_reader`](https://docs.rs/pcap-parser/latest/pcap_parser/fn.create_reader.html) function.
105+
[`create_reader`] function.
106106

107107
# Serialization
108108

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
//! ## Example: streaming parsers
5757
//!
5858
//! The following code shows how to parse a file in the pcap-ng format, using a
59-
//! [`PcapNGReader`](struct.PcapNGReader.html) streaming parser.
59+
//! [`PcapNGReader`] streaming parser.
6060
//! This reader provides a convenient abstraction over the file format, and takes
6161
//! care of the endianness.
6262
//!
@@ -85,13 +85,13 @@
8585
//! }
8686
//! println!("num_blocks: {}", num_blocks);
8787
//! ```
88-
//! See [`PcapNGReader`](struct.PcapNGReader.html) for a complete example,
88+
//! See [`PcapNGReader`] for a complete example,
8989
//! including handling of linktype and accessing packet data.
9090
//!
91-
//! See also the [`pcapng`](pcapng/index.html) module for more details about the new capture file format.
91+
//! See also the [`pcapng`] module for more details about the new capture file format.
9292
//!
9393
//! For legacy pcap files, use similar code with the
94-
//! [`LegacyPcapReader`](struct.LegacyPcapReader.html) streaming parser.
94+
//! [`LegacyPcapReader`] streaming parser.
9595
//!
9696
//! See [pcap-analyzer](https://github.com/rusticata/pcap-analyzer), in particular the
9797
//! [libpcap-tools](https://github.com/rusticata/pcap-analyzer/tree/master/libpcap-tools) and
@@ -101,7 +101,7 @@
101101
//! ## Example: generic streaming parsing
102102
//!
103103
//! To create a pcap reader for input in either PCAP or PCAPNG format, use the
104-
//! [`create_reader`](fn.create_reader.html) function.
104+
//! [`create_reader`] function.
105105
//!
106106
//! # Serialization
107107
//!

src/linktype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl display Linktype {
2828
IPV6 = 229,
2929

3030
// Linux netlink NETLINK NFLOG socket log messages.
31-
// Use the [`pcap_nflog`]()../pcap_nflog/index.html module to access content.
31+
// Use the [`pcap_nflog`] module to access content.
3232
NFLOG = 239,
3333

3434
// Upper-layer protocol saves from Wireshark

src/pcap.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
//! See <https://wiki.wireshark.org/Development/LibpcapFileFormat> for details.
44
//!
55
//! There are 2 main ways of parsing a PCAP file. The first method is to use
6-
//! [`parse_pcap`](../fn.parse_pcap.html). This method requires to load the entire
6+
//! [`parse_pcap`]. This method requires to load the entire
77
//! file to memory, and thus may not be good for large files.
88
//!
9-
//! The [`PcapCapture`](../struct.PcapCapture.html) implements the
10-
//! [`Capture`](../trait.Capture.html) trait to provide generic methods. However,
9+
//! The [`PcapCapture`] implements the
10+
//! [`Capture`](crate::Capture) trait to provide generic methods. However,
1111
//! this trait also reads the entire file.
1212
//!
1313
//! The second method is to first parse the PCAP header
14-
//! using [`parse_pcap_header`](fn.parse_pcap_header.html), then
15-
//! loop over [`parse_pcap_frame`](fn.parse_pcap_frame.html) to get the data.
14+
//! using [`parse_pcap_header`], then
15+
//! loop over [`parse_pcap_frame`] to get the data.
1616
//! This can be used in a streaming parser.
1717
1818
mod capture;

src/pcap/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use std::io::Read;
2626
/// larger value (at least 65k) is advised to avoid frequent reads and buffer shifts.
2727
///
2828
/// **There are precautions to take when reading multiple blocks before consuming data. See
29-
/// [PcapReaderIterator](traits/trait.PcapReaderIterator.html) for details.**
29+
/// [`PcapReaderIterator`] for details.**
3030
///
3131
/// ## Example
3232
///

src/pcapng.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
//! See <https://github.com/pcapng/pcapng> for details.
44
//!
55
//! There are several ways of parsing a PCAPNG file. The first method is to use
6-
//! [`parse_pcapng`](../fn.parse_pcapng.html). This method requires to load the entire
6+
//! [`parse_pcapng`]. This method requires to load the entire
77
//! file to memory, and thus may not be good for large files.
88
//!
9-
//! The second method is to create a [`PcapNGCapture`](../struct.PcapNGCapture.html) object,
10-
//! which implements the [`Capture`](../trait.Capture.html) trait to provide generic methods.
9+
//! The second method is to create a [`PcapNGCapture`] object,
10+
//! which implements the [`Capture`](crate::Capture) trait to provide generic methods.
1111
//! However, this method also reads the entire file.
1212
//!
13-
//! The third (and prefered) method is to use a [`PcapNGReader`](../struct.PcapNGReader.html)
13+
//! The third (and prefered) method is to use a [`PcapNGReader`]
1414
//! object.
1515
//!
1616
//! The last method is to manually read the blocks using
17-
//! [`parse_sectionheaderblock`](fn.parse_sectionheaderblock.html),
18-
//! [`parse_block_le`](fn.parse_block_le.html) and/or
19-
//! [`parse_block_be`](fn.parse_block_be.html).
17+
//! [`parse_sectionheaderblock`],
18+
//! [`parse_block_le`] and/or
19+
//! [`parse_block_be`].
2020
//!
2121
//! ## File format and parsing
2222
//!

src/pcapng/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::io::Read;
3030
/// larger value (at least 65k) is advised to avoid frequent reads and buffer shifts.
3131
///
3232
/// **There are precautions to take when reading multiple blocks before consuming data. See
33-
/// [PcapReaderIterator](traits/trait.PcapReaderIterator.html) for details.**
33+
/// [`PcapReaderIterator`] for details.**
3434
///
3535
/// ## Example
3636
///

0 commit comments

Comments
 (0)