3 stable releases
1.2.7 | Jun 21, 2023 |
---|---|
1.2.3 | May 31, 2023 |
1.2.0 |
|
#1619 in Network programming
92KB
1.5K
SLoC
Contains (static library, 27KB) lib/npcap/wpcap.lib, (static library, 1KB) lib/cursock/linux/libcursock.a
Cursock v1.2.7
Crate for raw socketing, can send raw packets and some protocols
Changelog
- reimplemented
Icmp
,Arp
andAdapter
structs - added
IpPacked
which represents eth + (ipv4 | ipv6) headers - handling dest mac address for
Icmp
struct
Todo
- Add ipv6 support for Icmp
Protocols
- Arp
- Icmp
Platforms
- Windows (npcap)
- Linux
Links
- docs.rs - https://docs.rs/cursock
- github - https://github.com/CURVoid/cursock.git
Examples
use cursock::*;
use cursock::utils::*;
let socket = Socket::new("wlan0").expect("initialize error");
let mut buffer = [0; 1000];
socket.read_raw_packet(&mut buffer).expect("read error");
socket.destroy();
lib.rs
:
Cursock
cursock
is a crate that designed to help with socketing.
Dependencies
~310KB