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
27class 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 */
Device driver server.
Network Device abstract class.
Networking server.
void registerNetworkDevice(NetworkDevice *dev)
Register network device.
virtual ~NetworkServer()
Destructor.
virtual bool retryRequests()
Starts DMA on NetworkDevices after all pending requests are done.
virtual FileSystem::Result initialize()
Initialize the NetworkServer.
virtual void onProcessTerminated(const ProcessID pid)
Called whenever another Process is terminated.
NetworkDevice * m_device
Network device instance.
u32 ProcessID
Process Identification Number.
Definition Types.h:140
Result
Result code for filesystem Actions.
Definition FileSystem.h:53