Skip to content

Commit 54066e7

Browse files
committed
Fix license and URLs
Signed-off-by: Gris Ge <[email protected]>
1 parent e704c21 commit 54066e7

File tree

3 files changed

+104
-9
lines changed

3 files changed

+104
-9
lines changed

Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
description = "Linux kernel MPTCP path manager netlink Library"
88
keywords = ["network"]
99
categories = ["network-programming", "os"]
10-
readme = "../README.md"
10+
readme = "README.md"
1111

1212
[lib]
1313
name = "mptcp_pm"
@@ -27,12 +27,12 @@ futures = "0.3.17"
2727
log = "0.4.14"
2828
thiserror = "1.0.29"
2929
tokio = { version = "1.0.1", features = ["rt"], optional = true}
30-
genetlink = { default-features = false, version = "0.2.1", path = "../genetlink" }
31-
netlink-packet-core = { version = "0.4.2", path = "../netlink-packet-core" }
32-
netlink-packet-generic = { version = "0.3.1", path = "../netlink-packet-generic" }
33-
netlink-packet-utils = { version = "0.5.1", path = "../netlink-packet-utils" }
34-
netlink-proto = { default-features = false, version = "0.10", path = "../netlink-proto" }
35-
netlink-sys = { version = "0.8.3", path = "../netlink-sys" }
30+
genetlink = { default-features = false, version = "0.2.1" }
31+
netlink-packet-core = { version = "0.4.2" }
32+
netlink-packet-generic = { version = "0.3.1" }
33+
netlink-packet-utils = { version = "0.5.1" }
34+
netlink-proto = { default-features = false, version = "0.10" }
35+
netlink-sys = { version = "0.8.3" }
3636

3737
[dev-dependencies]
3838
tokio = { version = "1.11.0", features = ["macros", "rt", "rt-multi-thread"] }

LICENSE-MIT

-1
This file was deleted.

LICENSE-MIT

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Permission is hereby granted, free of charge, to any person obtaining a copy of
2+
this software and associated documentation files (the "Software"), to deal in
3+
the Software without restriction, including without limitation the rights to
4+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
5+
of the Software, and to permit persons to whom the Software is furnished to do
6+
so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all
9+
copies or substantial portions of the Software.
10+
11+
Distributions of all or part of the Software intended to be used by the
12+
recipients as they would use the unmodified Software, containing modifications
13+
that substantially alter, remove, or disable functionality of the Software,
14+
outside of the documented configuration mechanisms provided by the Software,
15+
shall be modified such that the Original Author's bug reporting email addresses
16+
and urls are either replaced with the contact information of the parties
17+
responsible for the changes, or removed entirely.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.

README.md

-1
This file was deleted.

README.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[![Build Status](https://travis-ci.org/little-dude/netlink.svg?branch=master)](https://travis-ci.org/little-dude/netlink)
2+
3+
# Netlink
4+
5+
This project aims at providing building blocks for [netlink][man-netlink] (see `man 7 netlink`).
6+
7+
## Organization
8+
9+
- the [`netlink_sys`](./netlink-sys) crate provides netlink sockets. Integration with [`mio`][mio] and [`tokio`][tokio]
10+
is optional.
11+
- Each netlink protocol has a `netlink-packet-<protocol_name>` crate that provides the packets for this protocol:
12+
- [`netlink-packet-route`](./netlink-packet-route) provides messages for the [route protocol][man-rtnetlink]
13+
- [`netlink-packet-audit`](./netlink-packet-audit) provides messages for the [audit][man-audit] protocol
14+
- [`netlink-packet-sock-diag`](./netlink-packet-sock-diag) provides messages for the [sock-diag][man-sock-diag]
15+
protocol
16+
- [`netlink-packet-generic`](./netlink-packet-generic) provides message for the [generic netlink][man-genl]
17+
protocol
18+
- [`netlink-packet-netfilter`](./netlink-packet-netfilter) provides message for the `NETLINK_NETFILTER`
19+
protocol
20+
- the [`netlink-packet-core`](./netlink-packet-core) is the glue for all the other `netlink-packet-*` crates. It
21+
provides a `NetlinkMessage<T>` type that represent any netlink message for any sub-protocol.
22+
- the [`netlink_proto`](./netlink-proto) crate is an asynchronous implementation of the netlink protocol. It only
23+
depends on `netlink-packet-core` for the `NetlinkMessage` type and `netlink-sys` for the socket.
24+
- the [`rtnetlink`](./rtnetlink) crate provides higher level abstraction for the [route protocol][man-rtnetlink]
25+
- the [`audit`](./audit) crate provides higher level abstractions for the audit protocol.
26+
- the [`genetlink`](./genetlink) crate provide higher level abstraction for the
27+
[generic netlink protocol][man-genl]
28+
- the [`ethtool`](./ethtool) crate provide higher level abstraction for
29+
[ethtool netlink protocol][ethtool-kernel-doc]
30+
31+
32+
## Altnernatives
33+
34+
- https://github.com/jbaublitz/neli: the main alternative to these crates, as it is actively developed.
35+
- Other but less actively developed alternatives:
36+
- https://github.com/achanda/netlink
37+
- https://github.com/polachok/pnetlink
38+
- https://github.com/crhino/netlink-rs
39+
- https://github.com/carrotsrc/rsnl
40+
- https://github.com/TaborKelly/nl-utils
41+
42+
## Credits
43+
44+
My main resource so far has been the source code of [`pyroute2`][pyroute2] (python) and [`netlink`][netlink-go] (golang)
45+
a lot. These two projects are great, and very nicely written. As someone who does not read C fluently, and that does not
46+
know much about netlink, they have been invaluable.
47+
48+
I'd also like to praise [`libnl`][libnl] for its documentation. It helped me a lot in understanding the protocol basics.
49+
50+
The whole packet parsing logic is inspired by @whitequark excellent blog posts ([part 1][whitequark-1], [part
51+
2][whitequark-2] and [part 3][whitequark-3], although I've only really used the concepts described in the first blog
52+
post).
53+
54+
Thanks also to the people behind [tokio](tokio.rs) for the amazing
55+
tool they are building, and the support they provide.
56+
57+
[man-netlink]: https://www.man7.org/linux/man-pages/man7/netlink.7.html
58+
[man-audit]: https://man7.org/linux/man-pages/man3/audit_open.3.html
59+
[man-sock-diag]: https://www.man7.org/linux/man-pages/man7/sock_diag.7.html
60+
[man-rtnetlink]: https://www.man7.org/linux/man-pages/man7/rtnetlink.7.html
61+
[man-genl]: https://www.man7.org/linux/man-pages/man8/genl.8.html
62+
[generic-netlink-lwn]: https://lwn.net/Articles/208755/
63+
[mio]: https://github.com/tokio-rs/mio
64+
[tokio]: https://github.com/tokio-rs/tokio
65+
[route-proto-doc]: https://www.infradead.org/~tgr/libnl/doc/route.html
66+
[netlink-go]: https://github.com/vishvananda/netlink
67+
[pyroute2]: https://github.com/svinota/pyroute2/tree/master/pyroute2/netlink
68+
[libnl]: https://www.infradead.org/~tgr/libnl
69+
[whitequark-1]: https://lab.whitequark.org/notes/2016-12-13/abstracting-over-mutability-in-rust
70+
[whitequark-2]: https://lab.whitequark.org/notes/2016-12-17/owning-collections-in-heap-less-rust
71+
[whitequark-3]: https://lab.whitequark.org/notes/2017-01-16/abstracting-over-mutability-in-rust-macros
72+
[ethtool-kernel-doc]: https://www.kernel.org/doc/html/latest/networking/ethtool-netlink.html

0 commit comments

Comments
 (0)