Commit e3317836 authored by John Hodge's avatar John Hodge
Browse files

Kernel - A bit of cleanup

parent acae9501
......@@ -30,10 +30,13 @@ log_cfg:
LOG_CFG_ENT("kernel::memory::phys" , LEVEL_TRACE) // PMM only prints >Trace
//LOG_CFG_ENT("kernel::metadevs::storage", LEVEL_TRACE)
LOG_CFG_ENT("kernel::arch::imp::acpi::internal::shim_out", LEVEL_TRACE) // Shut up the x86 ACPI shim
//LOG_CFG_ENT("kernel::async", LEVEL_DEBUG)
LOG_CFG_ENT("kernel::async", LEVEL_DEBUG)
LOG_CFG_ENT("kernel::irqs", LEVEL_DEBUG)
LOG_CFG_ENT("kernel::sync::event_channel", LEVEL_DEBUG)
//LOG_CFG_ENT("fs_fat", LEVEL_DEBUG)
//LOG_CFG_ENT("storage_ata::io", LEVEL_DEBUG)
LOG_CFG_ENT("input_ps2::i8042", LEVEL_TRACE)
LOG_CFG_ENT("syscalls::gui_calls", LEVEL_DEBUG)
.globl log_cfg_end
log_cfg_end:
......@@ -307,7 +307,13 @@ fn rx_thread(int: &Interface)
let ether_ty = r.read_u16n().unwrap();
match ether_ty
{
0x0800 => ::ipv4::handle_rx_ethernet(int, src_mac, r).expect("Unable to hanle IPv4 packet (TODO)"),
0x0800 => match ::ipv4::handle_rx_ethernet(int, src_mac, r)
{
Ok( () ) => {},
Err(e) => {
log_warning!("TODO: Unable to hanle IPv4 packet - {:?}", e);
},
}
// ARP
0x0806 => {
// TODO: Pass on to ARP
......
......@@ -25,6 +25,7 @@ static CONNECTIONS: SharedMap<Quad, Connection> = SharedMap::new();
static PROTO_CONNECTIONS: SharedMap<Quad, ProtoConnection> = SharedMap::new();
static SERVERS: SharedMap<(Option<Address>,u16), Server> = SharedMap::new();
fn rx_handler_v4(int: &::ipv4::Interface, src_addr: ::ipv4::Address, pkt: ::nic::PacketReader)
{
rx_handler(Address::Ipv4(src_addr), Address::Ipv4(int.addr()), pkt)
......@@ -182,7 +183,6 @@ impl Quad
{
Address::Ipv4(a) => ::ipv4::send_packet(a, self.remote_addr.unwrap_ipv4(), hdr_pkt),
}
todo!("Quad::send_packet");
}
}
......
......@@ -170,11 +170,12 @@ impl objects::Object for Window
},
values::GUI_WIN_GETEVENT => {
let mut ev_ptr: FreezeMut<values::GuiEvent> = try!(args.get());
log_debug!("GUI_WIN_GETEVENT({:p})", &*ev_ptr);
log_trace!("GUI_WIN_GETEVENT({:p})", &*ev_ptr);
match self.0.lock().pop_event()
{
Some(ev) => {
*ev_ptr = ev.into();
log_debug!("GUI_WIN_GETEVENT() = {:?}", *ev_ptr);
Ok(0)
},
None => Ok(!0),
......
......@@ -9,6 +9,11 @@ use kernel::memory::freeze::{Freeze,FreezeMut};
unsafe impl ::args::Pod for ::values::SocketAddress { }
unsafe impl ::args::Pod for ::values::MaskedSocketAddress { }
pub fn new_server(local_address: ::values::SocketAddress) -> Result<u32, ::values::SocketError>
{
todo!("new_server");
}
pub fn new_free_socket(local_address: ::values::SocketAddress, remote_mask: ::values::MaskedSocketAddress) -> Result<u32, ::values::SocketError>
{
if local_address.port_ty != remote_mask.addr.port_ty {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment