-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Factor out the "raw_socket" and "tap_interface" features
This makes it possible to build smoltcp with the "std" feature on platforms without libc, such as redox.
1 parent
22772f0
commit 80c20ad
Showing
7 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
use libc; | ||
|
||
#[cfg(any(feature = "raw_socket"))] | ||
pub const SIOCGIFMTU: libc::c_ulong = 0x8921; | ||
#[cfg(any(feature = "raw_socket"))] | ||
pub const SIOCGIFINDEX: libc::c_ulong = 0x8933; | ||
#[cfg(any(feature = "raw_socket"))] | ||
pub const ETH_P_ALL: libc::c_short = 0x0003; | ||
|
||
#[cfg(feature = "tap_interface")] | ||
pub const TUNSETIFF: libc::c_ulong = 0x400454CA; | ||
|
||
#[cfg(feature = "tap_interface")] | ||
pub const IFF_TAP: libc::c_int = 0x0002; | ||
#[cfg(feature = "tap_interface")] | ||
pub const IFF_NO_PI: libc::c_int = 0x1000; | ||
|
||
pub const ETH_P_ALL: libc::c_short = 0x0003; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters