20 #ifndef MACHINE_NETWORK_STACK_H 21 #define MACHINE_NETWORK_STACK_H 23 #include "pedigree/kernel/compiler.h" 24 #include "pedigree/kernel/machine/Network.h" 25 #include "pedigree/kernel/processor/types.h" 26 #include "pedigree/kernel/utilities/MemoryPool.h" 27 #include "pedigree/kernel/utilities/RequestQueue.h" 28 #include "pedigree/kernel/utilities/String.h" 29 #include "pedigree/kernel/utilities/Tree.h" 30 #include "pedigree/kernel/utilities/Vector.h" 54 receive(
size_t nBytes, uintptr_t packet,
Network *pCard, uint32_t offset);
57 void registerDevice(
Network *pDevice);
63 size_t getNumDevices();
66 void deRegisterDevice(
Network *pDevice);
95 uintptr_t getBuffer()
const 100 size_t getLength()
const 102 return m_PacketLength;
110 uint32_t getOffset()
const 116 bool copyFrom(uintptr_t otherPacket,
size_t size);
119 size_t m_PacketLength;
128 return m_Interfaces.lookup(pCard);
134 virtual uint64_t executeRequest(
135 uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5,
136 uint64_t p6, uint64_t p7, uint64_t p8);
147 #if defined(THREADS) || defined(UTILITY_LINUX)
MemoryPool & getMemPool()
Tree< Network *, struct netif * > m_Interfaces
static NetworkStack & instance()
void setLoopback(Network *pCard)
size_t m_NextInterfaceNumber
struct netif * getInterface(Network *pCard) const
Vector< Network * > m_Children