Changeset 89c57b6 in mainline for uspace/srv/net/nil/nildummy/nildummy.h
- Timestamp:
- 2011-04-13T14:45:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88634420
- Parents:
- cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/nil/nildummy/nildummy.h
rcefb126 r89c57b6 28 28 29 29 /** @addtogroup nildummy 30 * 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * 34 * Dummy network interface layer module. 35 35 */ 36 36 37 #ifndef __NET_NILDUMMY_H__38 #define __NET_NILDUMMY_H__37 #ifndef NET_NILDUMMY_H_ 38 #define NET_NILDUMMY_H_ 39 39 40 40 #include <fibril_synch.h> 41 41 #include <ipc/services.h> 42 42 43 #include <net _device.h>43 #include <net/device.h> 44 44 #include <adt/measured_strings.h> 45 45 46 46 /** Type definition of the dummy nil global data. 47 * @see nildummy_globals 47 * 48 * @see nildummy_globals 49 * 48 50 */ 49 typedef struct nildummy_globals 51 typedef struct nildummy_globals nildummy_globals_t; 50 52 51 53 /** Type definition of the dummy nil device specific data. 52 * @see nildummy_device 54 * 55 * @see nildummy_device 56 * 53 57 */ 54 typedef struct nildummy_device nildummy_device_t; 55 56 /** Type definition of the dummy nil device specific data pointer. 57 * @see nildummy_device 58 */ 59 typedef nildummy_device_t * nildummy_device_ref; 58 typedef struct nildummy_device nildummy_device_t; 60 59 61 60 /** Type definition of the dummy nil protocol specific data. 62 * @see nildummy_proto 61 * 62 * @see nildummy_proto 63 * 63 64 */ 64 typedef struct nildummy_proto nildummy_proto_t; 65 66 /** Type definition of the dummy nil protocol specific data pointer. 67 * @see nildummy_proto 68 */ 69 typedef nildummy_proto_t * nildummy_proto_ref; 65 typedef struct nildummy_proto nildummy_proto_t; 70 66 71 67 /** Dummy nil device map. 72 * Maps devices to the dummy nil device specific data. 73 * @see device.h 68 * 69 * Map devices to the dummy nil device specific data. 70 * @see device.h 71 * 74 72 */ 75 DEVICE_MAP_DECLARE(nildummy_devices, nildummy_device_t) 73 DEVICE_MAP_DECLARE(nildummy_devices, nildummy_device_t); 76 74 77 /** Dummy nil device specific data. 78 */ 79 struct nildummy_device{ 80 /** Device identifier. 81 */ 75 /** Dummy nil device specific data. */ 76 struct nildummy_device { 77 /** Device identifier. */ 82 78 device_id_t device_id; 83 /** Device driver service.84 */79 80 /** Device driver service. */ 85 81 services_t service; 86 /** Driver phone.87 */82 83 /** Driver phone. */ 88 84 int phone; 89 /** Maximal transmission unit.90 */85 86 /** Maximal transmission unit. */ 91 87 size_t mtu; 92 /** Actual device hardware address.93 */94 measured_string_ refaddr;95 /** Actual device hardware address data.96 */97 char *addr_data;88 89 /** Actual device hardware address. */ 90 measured_string_t *addr; 91 92 /** Actual device hardware address data. */ 93 uint8_t *addr_data; 98 94 }; 99 95 100 /** Dummy nil protocol specific data. 101 */ 102 struct nildummy_proto{ 103 /** Protocol service. 104 */ 96 /** Dummy nil protocol specific data. */ 97 struct nildummy_proto { 98 /** Protocol service. */ 105 99 services_t service; 106 /** Protocol module phone.107 */100 101 /** Protocol module phone. */ 108 102 int phone; 109 103 }; 110 104 111 /** Dummy nil global data. 112 */ 113 struct nildummy_globals{ 114 /** Networking module phone. 115 */ 105 /** Dummy nil global data. */ 106 struct nildummy_globals { 107 /** Networking module phone. */ 116 108 int net_phone; 117 /** Safety lock for devices.118 */109 110 /** Lock for devices. */ 119 111 fibril_rwlock_t devices_lock; 120 /** All known Ethernet devices.121 */112 113 /** All known Ethernet devices. */ 122 114 nildummy_devices_t devices; 123 /** Safety lock for protocols.124 */115 116 /** Safety lock for protocols. */ 125 117 fibril_rwlock_t protos_lock; 126 /** Default protocol.127 */118 119 /** Default protocol. */ 128 120 nildummy_proto_t proto; 129 121 };
Note:
See TracChangeset
for help on using the changeset viewer.