Changes in uspace/srv/net/nil/nildummy/nildummy.h [849ed54:30b2d02] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/nil/nildummy/nildummy.h
r849ed54 r30b2d02 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 * 47 * @see nildummy_globals 48 48 */ 49 typedef struct nildummy_globals 49 typedef struct nildummy_globals nildummy_globals_t; 50 50 51 51 /** Type definition of the dummy nil device specific data. 52 * 52 * @see nildummy_device 53 53 */ 54 typedef struct nildummy_device 54 typedef struct nildummy_device nildummy_device_t; 55 55 56 56 /** Type definition of the dummy nil device specific data pointer. 57 * 57 * @see nildummy_device 58 58 */ 59 typedef nildummy_device_t * 59 typedef nildummy_device_t *nildummy_device_ref; 60 60 61 61 /** Type definition of the dummy nil protocol specific data. 62 * 62 * @see nildummy_proto 63 63 */ 64 64 typedef struct nildummy_proto nildummy_proto_t; 65 65 66 66 /** Type definition of the dummy nil protocol specific data pointer. 67 * 67 * @see nildummy_proto 68 68 */ 69 typedef nildummy_proto_t * 69 typedef nildummy_proto_t *nildummy_proto_ref; 70 70 71 71 /** Dummy nil device map. 72 * 73 * 72 * Maps devices to the dummy nil device specific data. 73 * @see device.h 74 74 */ 75 DEVICE_MAP_DECLARE(nildummy_devices, nildummy_device_t) 75 DEVICE_MAP_DECLARE(nildummy_devices, nildummy_device_t); 76 76 77 /** Dummy nil device specific data. 78 */ 79 struct nildummy_device{ 80 /** Device identifier. 81 */ 77 /** Dummy nil device specific data. */ 78 struct nildummy_device { 79 /** Device identifier. */ 82 80 device_id_t device_id; 83 /** Device driver service. 84 */ 81 /** Device driver service. */ 85 82 services_t service; 86 /** Driver phone. 87 */ 83 /** Driver phone. */ 88 84 int phone; 89 /** Maximal transmission unit. 90 */ 85 /** Maximal transmission unit. */ 91 86 size_t mtu; 92 /** Actual device hardware address. 93 */ 87 /** Actual device hardware address. */ 94 88 measured_string_ref addr; 95 /** Actual device hardware address data. 96 */ 97 char * addr_data; 89 /** Actual device hardware address data. */ 90 char *addr_data; 98 91 }; 99 92 100 /** Dummy nil protocol specific data. 101 */ 102 struct nildummy_proto{ 103 /** Protocol service. 104 */ 93 /** Dummy nil protocol specific data. */ 94 struct nildummy_proto { 95 /** Protocol service. */ 105 96 services_t service; 106 /** Protocol module phone. 107 */ 97 /** Protocol module phone. */ 108 98 int phone; 109 99 }; 110 100 111 /** Dummy nil global data. 112 */ 113 struct nildummy_globals{ 114 /** Networking module phone. 115 */ 101 /** Dummy nil global data. */ 102 struct nildummy_globals { 103 /** Networking module phone. */ 116 104 int net_phone; 117 /** Safety lock for devices. 118 */ 105 /** Safety lock for devices. */ 119 106 fibril_rwlock_t devices_lock; 120 /** All known Ethernet devices. 121 */ 107 /** All known Ethernet devices. */ 122 108 nildummy_devices_t devices; 123 /** Safety lock for protocols. 124 */ 109 /** Safety lock for protocols. */ 125 110 fibril_rwlock_t protos_lock; 126 /** Default protocol. 127 */ 111 /** Default protocol. */ 128 112 nildummy_proto_t proto; 129 113 };
Note:
See TracChangeset
for help on using the changeset viewer.