mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-27 23:34:19 +08:00
* Port previous ethernet scheme * Add ipd * Fix initfs rebuilds, use QEMU user networking addresses in ipd * Add tcp/udp, netutils, dns, and network config * Add fsync to network driver * Add dns, router, subnet by default * Fix e1000 driver. Make ethernet and IP non-blocking to avoid deadlocks * Add orbital server, WIP * Add futex * Add orbutils and orbital * Update libstd, orbutils, and orbital Move ANSI key encoding to vesad * Add orbital assets * Update orbital * Update to add login manager * Add blocking primitives, block for most things except waitpid, update orbital * Wait in waitpid and IRQ, improvements for other waits * Fevent in root scheme * WIP: Switch to using fevent * Reorganize * Event based e1000d driver * Superuser-only access to some network schemes, display, and disk * Superuser root and irq schemes * Fix orbital
31 lines
738 B
Rust
31 lines
738 B
Rust
#![feature(rand)]
|
|
|
|
extern crate resource_scheme;
|
|
extern crate syscall;
|
|
|
|
use std::fs::File;
|
|
use std::io::{Read, Write};
|
|
use std::thread;
|
|
|
|
use resource_scheme::ResourceScheme;
|
|
use syscall::Packet;
|
|
|
|
use scheme::IpScheme;
|
|
|
|
pub mod common;
|
|
pub mod resource;
|
|
pub mod scheme;
|
|
|
|
fn main() {
|
|
thread::spawn(move || {
|
|
let mut socket = File::create(":ip").expect("ipd: failed to create ip scheme");
|
|
let scheme = IpScheme::new();
|
|
loop {
|
|
let mut packet = Packet::default();
|
|
socket.read(&mut packet).expect("ipd: failed to read events from ip scheme");
|
|
scheme.handle(&mut packet);
|
|
socket.write(&packet).expect("ipd: failed to write responses to ip scheme");
|
|
}
|
|
});
|
|
}
|