mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-12 03:01:32 +00:00
First implementation of Transmit(Packet) method. Not working yet. Fixed bitwise mathematics in PacketHeader. Created several of the memory-registers as separate classes.
26 lines
696 B
C#
26 lines
696 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.Driver.RTL8139
|
|
{
|
|
/// <summary>
|
|
/// A network Packet used when transferring data over a network.
|
|
/// Consists of a body (with the data) and a head (with info about the packet)
|
|
/// </summary>
|
|
public class Packet
|
|
{
|
|
private PacketHeader head;
|
|
public PacketHeader Head { get; private set; }
|
|
|
|
public Packet(PacketHeader newhead)
|
|
{
|
|
head = newhead;
|
|
}
|
|
|
|
public byte[] PacketBody()
|
|
{
|
|
return new byte[10]; //TODO: Redo this completely! Hardcoded to some bogus value now.
|
|
}
|
|
}
|
|
}
|