Changeset 4687a26c in mainline for uspace/srv/net/il/arp/arp.h
- Timestamp:
- 2010-11-02T18:29:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4f35b9ff
- Parents:
- 76e1121f (diff), 28f4adb (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/il/arp/arp.h
r76e1121f r4687a26c 28 28 29 29 /** @addtogroup arp 30 * 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * 34 * ARP module. 35 35 */ 36 36 37 #ifndef __NET_ARP_H__38 #define __NET_ARP_H__37 #ifndef NET_ARP_H_ 38 #define NET_ARP_H_ 39 39 40 40 #include <fibril_synch.h> … … 43 43 #include <ipc/services.h> 44 44 45 #include <net_device.h> 45 #include <net/device.h> 46 #include <net/packet.h> 46 47 #include <net_hardware.h> 47 48 #include <adt/generic_char_map.h> … … 49 50 #include <adt/measured_strings.h> 50 51 51 52 52 /** Type definition of the ARP device specific data. 53 * 53 * @see arp_device 54 54 */ 55 typedef struct arp_device 55 typedef struct arp_device arp_device_t; 56 56 57 57 /** Type definition of the ARP device specific data pointer. 58 * 58 * @see arp_device 59 59 */ 60 typedef arp_device_t * 60 typedef arp_device_t *arp_device_ref; 61 61 62 62 /** Type definition of the ARP global data. 63 * 63 * @see arp_globals 64 64 */ 65 typedef struct arp_globals 65 typedef struct arp_globals arp_globals_t; 66 66 67 67 /** Type definition of the ARP protocol specific data. 68 * 68 * @see arp_proto 69 69 */ 70 typedef struct arp_proto 70 typedef struct arp_proto arp_proto_t; 71 71 72 72 /** Type definition of the ARP protocol specific data pointer. 73 * 73 * @see arp_proto 74 74 */ 75 typedef arp_proto_t * 75 typedef arp_proto_t *arp_proto_ref; 76 76 77 77 /** ARP address map. 78 * Translates addresses. 79 * @see generic_char_map.h 78 * 79 * Translates addresses. 80 * @see generic_char_map.h 80 81 */ 81 GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t) 82 GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t); 82 83 83 84 /** ARP address cache. 84 * Maps devices to the ARP device specific data. 85 * @see device.h 85 * 86 * Maps devices to the ARP device specific data. 87 * @see device.h 86 88 */ 87 DEVICE_MAP_DECLARE(arp_cache, arp_device_t) 89 DEVICE_MAP_DECLARE(arp_cache, arp_device_t); 88 90 89 91 /** ARP protocol map. 90 * Maps protocol identifiers to the ARP protocol specific data. 91 * @see int_map.h 92 * 93 * Maps protocol identifiers to the ARP protocol specific data. 94 * @see int_map.h 92 95 */ 93 INT_MAP_DECLARE(arp_protos, arp_proto_t) 96 INT_MAP_DECLARE(arp_protos, arp_proto_t); 94 97 95 /** ARP device specific data. 96 */ 97 struct arp_device{ 98 /** Actual device hardware address. 99 */ 98 /** ARP device specific data. */ 99 struct arp_device { 100 /** Actual device hardware address. */ 100 101 measured_string_ref addr; 101 /** Actual device hardware address data. 102 */ 103 char * addr_data; 104 /** Broadcast device hardware address. 105 */ 102 /** Actual device hardware address data. */ 103 char *addr_data; 104 /** Broadcast device hardware address. */ 106 105 measured_string_ref broadcast_addr; 107 /** Broadcast device hardware address data. 108 */ 109 char * broadcast_data; 110 /** Device identifier. 111 */ 106 /** Broadcast device hardware address data. */ 107 char *broadcast_data; 108 /** Device identifier. */ 112 109 device_id_t device_id; 113 /** Hardware type. 114 */ 110 /** Hardware type. */ 115 111 hw_type_t hardware; 116 /** Packet dimension. 117 */ 112 /** Packet dimension. */ 118 113 packet_dimension_t packet_dimension; 119 /** Device module phone. 120 */ 114 /** Device module phone. */ 121 115 int phone; 122 /** Protocol map. 123 * Address map for each protocol. 116 117 /** 118 * Protocol map. 119 * Address map for each protocol. 124 120 */ 125 121 arp_protos_t protos; 126 /** Device module service.127 */122 123 /** Device module service. */ 128 124 services_t service; 129 125 }; 130 126 131 /** ARP global data. 132 */ 133 struct arp_globals{ 134 /** ARP address cache. 135 */ 127 /** ARP global data. */ 128 struct arp_globals { 129 /** ARP address cache. */ 136 130 arp_cache_t cache; 137 /** The client connection processing function. 138 * The module skeleton propagates its own one. 131 132 /** 133 * The client connection processing function. 134 * The module skeleton propagates its own one. 139 135 */ 140 136 async_client_conn_t client_connection; 141 /** Networking module phone.142 */137 138 /** Networking module phone. */ 143 139 int net_phone; 144 /** Safety lock. 145 */ 140 /** Safety lock. */ 146 141 fibril_rwlock_t lock; 147 142 }; 148 143 149 /** ARP protocol specific data. 150 */ 151 struct arp_proto{ 152 /** Actual device protocol address. 153 */ 144 /** ARP protocol specific data. */ 145 struct arp_proto { 146 /** Actual device protocol address. */ 154 147 measured_string_ref addr; 155 /** Actual device protocol address data. 156 */ 157 char * addr_data; 158 /** Address map. 159 */ 148 /** Actual device protocol address data. */ 149 char *addr_data; 150 /** Address map. */ 160 151 arp_addr_t addresses; 161 /** Protocol service. 162 */ 152 /** Protocol service. */ 163 153 services_t service; 164 154 };
Note:
See TracChangeset
for help on using the changeset viewer.