From 8f505c3de4870df00b0fe6346e69abc63593355d Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Mon, 12 Jan 2004 23:25:40 +0000 Subject: [PATCH] Add ether_driver.h to private net headers. Should we make this public? git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6034 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/net/ether_driver.h | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 headers/private/net/ether_driver.h diff --git a/headers/private/net/ether_driver.h b/headers/private/net/ether_driver.h new file mode 100644 index 0000000000..9572f792e8 --- /dev/null +++ b/headers/private/net/ether_driver.h @@ -0,0 +1,57 @@ +/* + * ether_driver.h + * + * Ethernet driver: handles NE2000 and 3C503 cards + */ +/* + Copyright 1999, Be Incorporated. All Rights Reserved. + This file may be used under the terms of the Be Sample Code License. +*/ +#ifndef _ETHER_DRIVER_H +#define _ETHER_DRIVER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* + * ioctls: belongs in a public header file + * somewhere, so that the net_server and other ethernet drivers can use. + */ +enum { + ETHER_GETADDR = B_DEVICE_OP_CODES_END, /* get ethernet address */ + ETHER_INIT, /* set irq and port */ + ETHER_NONBLOCK, /* set/unset nonblocking mode */ + ETHER_ADDMULTI, /* add multicast addr */ + ETHER_REMMULTI, /* rem multicast addr */ + ETHER_SETPROMISC, /* set promiscuous */ + ETHER_GETFRAMESIZE /* get frame size */ +}; + + +/* + * 48-bit ethernet address, passed back from ETHER_GETADDR + */ +typedef struct { + unsigned char ebyte[6]; +} ether_address_t; + + +/* + * info passed to ETHER_INIT + */ + +typedef struct ether_init_params { + short port; + short irq; + unsigned long mem; +} ether_init_params_t; + +#ifdef __cplusplus +} +#endif + + +#endif /* _ETHER_DRIVER_H */