Mercurial > ecos
comparison packages/io/eth/current/include/netdev.h @ 115:6ed91473a1cd ecos-sw-2000-08-21
Merge from eCos master repository on 2000-08-21-22:40:54-BST
| author | jlarmour |
|---|---|
| date | Fri, 25 Aug 2000 17:32:38 +0000 |
| parents | |
| children | 0ec04793409a |
comparison
equal
deleted
inserted
replaced
| 114:5ad2b71d525e | 115:6ed91473a1cd |
|---|---|
| 1 #ifndef _NETDEV_H_ | |
| 2 #define _NETDEV_H_ | |
| 3 //========================================================================== | |
| 4 // | |
| 5 // include/netdev.h | |
| 6 // | |
| 7 // Network device description | |
| 8 // | |
| 9 //========================================================================== | |
| 10 //####COPYRIGHTBEGIN#### | |
| 11 // | |
| 12 // ------------------------------------------- | |
| 13 // The contents of this file are subject to the Red Hat eCos Public License | |
| 14 // Version 1.1 (the "License"); you may not use this file except in | |
| 15 // compliance with the License. You may obtain a copy of the License at | |
| 16 // http://www.redhat.com/ | |
| 17 // | |
| 18 // Software distributed under the License is distributed on an "AS IS" | |
| 19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
| 20 // License for the specific language governing rights and limitations under | |
| 21 // the License. | |
| 22 // | |
| 23 // The Original Code is eCos - Embedded Configurable Operating System, | |
| 24 // released September 30, 1998. | |
| 25 // | |
| 26 // The Initial Developer of the Original Code is Red Hat. | |
| 27 // Portions created by Red Hat are | |
| 28 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | |
| 29 // All Rights Reserved. | |
| 30 // ------------------------------------------- | |
| 31 // | |
| 32 //####COPYRIGHTEND#### | |
| 33 //####BSDCOPYRIGHTBEGIN#### | |
| 34 // | |
| 35 // ------------------------------------------- | |
| 36 // | |
| 37 // Portions of this software may have been derived from OpenBSD or other sources, | |
| 38 // and are covered by the appropriate copyright disclaimers included herein. | |
| 39 // | |
| 40 // ------------------------------------------- | |
| 41 // | |
| 42 //####BSDCOPYRIGHTEND#### | |
| 43 //========================================================================== | |
| 44 //#####DESCRIPTIONBEGIN#### | |
| 45 // | |
| 46 // Author(s): gthomas | |
| 47 // Contributors: gthomas | |
| 48 // Date: 2000-01-10 | |
| 49 // Purpose: | |
| 50 // Description: | |
| 51 // | |
| 52 // | |
| 53 //####DESCRIPTIONEND#### | |
| 54 // | |
| 55 //========================================================================== | |
| 56 | |
| 57 #include <cyg/hal/hal_tables.h> | |
| 58 | |
| 59 // Network device support | |
| 60 | |
| 61 typedef struct cyg_netdevtab_entry { | |
| 62 const char *name; | |
| 63 bool (*init)(struct cyg_netdevtab_entry *tab); | |
| 64 void *device_instance; // Local data, instance specific | |
| 65 unsigned long status; | |
| 66 } cyg_netdevtab_entry_t; | |
| 67 | |
| 68 #define CYG_NETDEVTAB_STATUS_AVAIL 0x0001 | |
| 69 | |
| 70 extern cyg_netdevtab_entry_t __NETDEVTAB__[], __NETDEVTAB_END__; | |
| 71 | |
| 72 #define NETDEVTAB_ENTRY(_l,_name,_init,_instance) \ | |
| 73 static bool _init(struct cyg_netdevtab_entry *tab); \ | |
| 74 cyg_netdevtab_entry_t _l CYG_HAL_TABLE_ENTRY( netdev ) = { \ | |
| 75 _name, \ | |
| 76 _init, \ | |
| 77 _instance \ | |
| 78 }; | |
| 79 | |
| 80 #endif // _NETDEV_H_ |
