Registry / networking / pnet-sys

pnet-sys

JSON →
library0.35.0rscratesunverified

Low-level FFI bindings to network-related system functions and calls.

# Cargo.toml [dependencies] pnet_sys = "0.35.0"
INSTALL
IMPORT
SIG · PNET-SYS
P
pnet-sys
networkingrustv0.35.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pnet_sys
use pnet_sys::*;

Demonstrates calling a low-level system function via pnet-sys.

use pnet_sys::*; fn main() { // Example: get the hostname let mut buf = [0u8; 256]; unsafe { gethostname(buf.as_mut_ptr() as *mut i8, buf.len() as u64); } println!("Hostname: {:?}", buf); }
Debug
Known issues
gotchaRequires unsafe code; incorrect usage can cause undefined behavior.
fix
Ensure all pointers are valid and sizes are correct.
affects: >=0.0.0
Upgrade
Version history
0.35.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
pnet-sys — cargo add pnet-sys · libregistry