summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/osdnet.h
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2011-09-09 14:21:42 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2011-09-09 14:21:42 +0000
commit1063a955cc5ac713c0342c79e20d74fe1725f643 (patch)
treefc235eb3613fde9623eb907ab3cd682ea998240e /src/osd/osdnet.h
parentd57fb0b8dcfcba7ca235b5677d6739dc553c3c98 (diff)
Added network support used by MESS implemented by Carl (no whatsnew)
part is disabled for now by compile options. Will be enabled,at least in MESS when all platforms get their implementation.
Diffstat (limited to 'src/osd/osdnet.h')
-rw-r--r--src/osd/osdnet.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/osd/osdnet.h b/src/osd/osdnet.h
new file mode 100644
index 00000000000..fd80bece7b4
--- /dev/null
+++ b/src/osd/osdnet.h
@@ -0,0 +1,33 @@
+#include "emu.h"
+
+#ifndef __OSDNET_H__
+#define __OSDNET_H__
+
+class netdev
+{
+public:
+ netdev(class device_network_interface *ifdev, int rate);
+ virtual ~netdev();
+
+ virtual int send(UINT8 *buf, int len);
+ virtual void set_mac(const char *mac);
+ virtual void set_promisc(bool promisc);
+
+ const char *get_mac();
+ bool get_promisc();
+
+protected:
+ virtual int recv_dev(UINT8 **buf);
+
+private:
+ void recv(void *ptr, int param);
+
+ class device_network_interface *m_dev;
+};
+
+#define CREATE_NETDEV(name) class netdev *name(const char *ifname, class device_network_interface *ifdev, int rate)
+typedef class netdev *(*create_netdev)(const char *ifname, class device_network_interface *ifdev, int rate);
+
+class netdev *open_netdev(const char *name, class device_network_interface *ifdev, int rate);
+void add_netdev(const char *name, create_netdev func);
+#endif