FreeNOS
NetworkProtocol.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include "NetworkDevice.h"
19 #include "NetworkProtocol.h"
20 #include "NetworkServer.h"
21 
23  NetworkDevice &device,
24  NetworkProtocol &parent)
25  : Directory(server.getNextInode())
26  , m_server(server)
27  , m_device(device)
28  , m_parent(parent)
29 {
30 }
31 
33 {
34 }
35 
37 {
39 }
40 
42  const void *address,
43  const Size addressSize,
44  const NetworkProtocol::Identifier protocol,
45  const Size payloadSize)
46 {
48 }
NetworkProtocol
Network protocol abstraction class.
Definition: NetworkProtocol.h:39
NetworkProtocol::~NetworkProtocol
virtual ~NetworkProtocol()
Destructor.
Definition: NetworkProtocol.cpp:32
NetworkDevice::getMaximumPacketSize
const Size getMaximumPacketSize() const
Get maximum packet size.
Definition: NetworkDevice.cpp:69
NetworkDevice
Network Device abstract class.
Definition: NetworkDevice.h:41
Directory
Directory File functionality.
Definition: Directory.h:59
NetworkProtocol.h
NetworkProtocol::m_device
NetworkDevice & m_device
Network device instance.
Definition: NetworkProtocol.h:123
FileSystem::NotSupported
@ NotSupported
Definition: FileSystem.h:61
NetworkDevice.h
NetworkServer
Networking server.
Definition: NetworkServer.h:40
NetworkProtocol::getMaximumPacketSize
virtual const Size getMaximumPacketSize() const
Get maximum packet size.
Definition: NetworkProtocol.cpp:36
Size
unsigned int Size
Any sane size indicator cannot go negative.
Definition: Types.h:128
NetworkProtocol::NetworkProtocol
NetworkProtocol(NetworkServer &server, NetworkDevice &device, NetworkProtocol &parent)
Constructor.
Definition: NetworkProtocol.cpp:22
NetworkProtocol::getTransmitPacket
virtual FileSystem::Result getTransmitPacket(NetworkQueue::Packet **pkt, const void *address, const Size addressSize, const Identifier protocol, const Size payloadSize)
Get a new packet for transmission.
Definition: NetworkProtocol.cpp:41
FileSystem::Result
Result
Result code for filesystem Actions.
Definition: FileSystem.h:52
NetworkServer.h
NetworkQueue::Packet
Represents a network packet.
Definition: NetworkQueue.h:50
NetworkProtocol::Identifier
Identifier
List of known network protocol identifiers.
Definition: NetworkProtocol.h:46