FreeNOS
NetworkServer.h
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 #ifndef __LIBNET_NETWORKSERVER_H
19 #define __LIBNET_NETWORKSERVER_H
20 
21 #include <Types.h>
22 #include <DeviceServer.h>
23 #include "NetworkDevice.h"
24 #include "Ethernet.h"
25 #include "IPV4.h"
26 
27 class NetworkDevice;
28 
41 {
42  public:
43 
47  NetworkServer(const char *path);
48 
52  virtual ~NetworkServer();
53 
60 
67 
73  virtual void onProcessTerminated(const ProcessID pid);
74 
80  virtual bool retryRequests();
81 
82  private:
83 
86 };
87 
93 #endif /* __LIBNET_NETWORKSERVER_H */
DeviceServer.h
Types.h
NetworkServer::onProcessTerminated
virtual void onProcessTerminated(const ProcessID pid)
Called whenever another Process is terminated.
Definition: NetworkServer.cpp:43
NetworkServer::m_device
NetworkDevice * m_device
Network device instance.
Definition: NetworkServer.h:85
Ethernet.h
NetworkDevice
Network Device abstract class.
Definition: NetworkDevice.h:41
ProcessID
u32 ProcessID
Process Identification Number.
Definition: Types.h:140
NetworkServer::registerNetworkDevice
void registerNetworkDevice(NetworkDevice *dev)
Register network device.
Definition: NetworkServer.cpp:31
DeviceServer
Device driver server.
Definition: DeviceServer.h:43
NetworkDevice.h
NetworkServer
Networking server.
Definition: NetworkServer.h:40
IPV4.h
NetworkServer::NetworkServer
NetworkServer(const char *path)
Constructor.
Definition: NetworkServer.cpp:21
FileSystem::Result
Result
Result code for filesystem Actions.
Definition: FileSystem.h:52
NetworkServer::initialize
virtual FileSystem::Result initialize()
Initialize the NetworkServer.
Definition: NetworkServer.cpp:37
NetworkServer::retryRequests
virtual bool retryRequests()
Starts DMA on NetworkDevices after all pending requests are done.
Definition: NetworkServer.cpp:53
NetworkServer::~NetworkServer
virtual ~NetworkServer()
Destructor.
Definition: NetworkServer.cpp:27