Changeset f772bc55 in mainline
- Timestamp:
- 2010-11-18T22:56:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88a1bb9
- Parents:
- 4e5c7ba
- Location:
- uspace
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/net/device.h
r4e5c7ba rf772bc55 59 59 */ 60 60 typedef struct device_stats device_stats_t; 61 62 /** Type definition of the device usage statistics pointer.63 * @see device_stats64 */65 typedef device_stats_t *device_stats_ref;66 61 67 62 /** Device state. */ -
uspace/lib/c/include/net/packet.h
r4e5c7ba rf772bc55 48 48 typedef struct packet * packet_t; 49 49 50 /** Type definition of the packet pointer.51 * @see packet52 */53 typedef packet_t * packet_ref;54 55 50 /** Type definition of the packet dimension. 56 51 * @see packet_dimension 57 52 */ 58 53 typedef struct packet_dimension packet_dimension_t; 59 60 /** Type definition of the packet dimension pointer.61 * @see packet_dimension62 */63 typedef packet_dimension_t * packet_dimension_ref;64 54 65 55 /** Packet dimension. */ -
uspace/lib/net/generic/generic.c
r4e5c7ba rf772bc55 138 138 int 139 139 generic_packet_size_req_remote(int phone, int message, device_id_t device_id, 140 packet_dimension_ refpacket_dimension)140 packet_dimension_t *packet_dimension) 141 141 { 142 142 if (!packet_dimension) -
uspace/lib/net/generic/packet_remote.c
r4e5c7ba rf772bc55 64 64 */ 65 65 static int 66 packet_return(int phone, packet_ refpacket, packet_id_t packet_id, size_t size)66 packet_return(int phone, packet_t *packet, packet_id_t packet_id, size_t size) 67 67 { 68 68 ipc_call_t answer; … … 107 107 * function. 108 108 */ 109 int packet_translate_remote(int phone, packet_ refpacket, packet_id_t packet_id)109 int packet_translate_remote(int phone, packet_t *packet, packet_id_t packet_id) 110 110 { 111 111 int rc; -
uspace/lib/net/il/ip_remote.c
r4e5c7ba rf772bc55 186 186 */ 187 187 int ip_packet_size_req_remote(int ip_phone, device_id_t device_id, 188 packet_dimension_ refpacket_dimension)188 packet_dimension_t *packet_dimension) 189 189 { 190 190 return generic_packet_size_req_remote(ip_phone, NET_IL_PACKET_SPACE, -
uspace/lib/net/include/generic.h
r4e5c7ba rf772bc55 52 52 char **); 53 53 extern int generic_packet_size_req_remote(int, int, device_id_t, 54 packet_dimension_ ref);54 packet_dimension_t *); 55 55 extern int generic_received_msg_remote(int, int, device_id_t, packet_id_t, 56 56 services_t, services_t); -
uspace/lib/net/include/ip_remote.h
r4e5c7ba rf772bc55 44 44 45 45 extern int ip_set_gateway_req_remote(int, device_id_t, in_addr_t); 46 extern int ip_packet_size_req_remote(int, device_id_t, packet_dimension_ ref);46 extern int ip_packet_size_req_remote(int, device_id_t, packet_dimension_t *); 47 47 extern int ip_received_error_msg_remote(int, device_id_t, packet_t, services_t, 48 48 services_t); -
uspace/lib/net/include/netif_local.h
r4e5c7ba rf772bc55 193 193 */ 194 194 extern int netif_get_device_stats(device_id_t device_id, 195 device_stats_ refstats);195 device_stats_t *stats); 196 196 197 197 extern int netif_get_addr_req_local(int, device_id_t, measured_string_ref *, … … 201 201 extern int netif_start_req_local(int, device_id_t); 202 202 extern int netif_stop_req_local(int, device_id_t); 203 extern int netif_stats_req_local(int, device_id_t, device_stats_ ref);203 extern int netif_stats_req_local(int, device_id_t, device_stats_t *); 204 204 extern int netif_bind_service_local(services_t, device_id_t, services_t, 205 205 async_client_conn_t); 206 206 207 207 extern int find_device(device_id_t, netif_device_t **); 208 extern void null_device_stats(device_stats_ ref);208 extern void null_device_stats(device_stats_t *); 209 209 extern void netif_pq_release(packet_id_t); 210 210 extern packet_t netif_packet_get_1(size_t); -
uspace/lib/net/include/netif_remote.h
r4e5c7ba rf772bc55 47 47 extern int netif_start_req_remote(int, device_id_t); 48 48 extern int netif_stop_req_remote(int, device_id_t); 49 extern int netif_stats_req_remote(int, device_id_t, device_stats_ ref);49 extern int netif_stats_req_remote(int, device_id_t, device_stats_t *); 50 50 extern int netif_bind_service_remote(services_t, device_id_t, services_t, 51 51 async_client_conn_t); -
uspace/lib/net/include/packet_remote.h
r4e5c7ba rf772bc55 37 37 #include <sys/types.h> 38 38 39 extern int packet_translate_remote(int, packet_ ref, packet_id_t);39 extern int packet_translate_remote(int, packet_t *, packet_id_t); 40 40 extern packet_t packet_get_4_remote(int, size_t, size_t, size_t, size_t); 41 41 extern packet_t packet_get_1_remote(int, size_t); -
uspace/lib/net/include/tl_common.h
r4e5c7ba rf772bc55 51 51 DEVICE_MAP_DECLARE(packet_dimensions, packet_dimension_t); 52 52 53 extern int tl_get_ip_packet_dimension(int, packet_dimensions_ ref,54 device_id_t, packet_dimension_ ref*);53 extern int tl_get_ip_packet_dimension(int, packet_dimensions_t *, 54 device_id_t, packet_dimension_t **); 55 55 extern int tl_get_address_port(const struct sockaddr *, int, uint16_t *); 56 extern int tl_update_ip_packet_dimension(packet_dimensions_ ref, device_id_t,56 extern int tl_update_ip_packet_dimension(packet_dimensions_t *, device_id_t, 57 57 size_t); 58 58 extern int tl_set_address_port(struct sockaddr *, int, uint16_t); 59 59 extern int tl_prepare_icmp_packet(int, int, packet_t, services_t); 60 extern int tl_socket_read_packet_data(int, packet_ ref, size_t,61 const packet_dimension_ ref, const struct sockaddr *, socklen_t);60 extern int tl_socket_read_packet_data(int, packet_t *, size_t, 61 const packet_dimension_t *, const struct sockaddr *, socklen_t); 62 62 63 63 #endif -
uspace/lib/net/netif/netif_local.c
r4e5c7ba rf772bc55 181 181 */ 182 182 int netif_stats_req_local(int netif_phone, device_id_t device_id, 183 device_stats_ refstats)183 device_stats_t *stats) 184 184 { 185 185 fibril_rwlock_read_lock(&netif_globals.lock); … … 253 253 * @param[in] stats The usage statistics. 254 254 */ 255 void null_device_stats(device_stats_ refstats)255 void null_device_stats(device_stats_t *stats) 256 256 { 257 257 bzero(stats, sizeof(device_stats_t)); -
uspace/lib/net/netif/netif_remote.c
r4e5c7ba rf772bc55 138 138 */ 139 139 int netif_stats_req_remote(int netif_phone, device_id_t device_id, 140 device_stats_ refstats)140 device_stats_t *stats) 141 141 { 142 142 if (!stats) -
uspace/lib/net/tl/tl_common.c
r4e5c7ba rf772bc55 120 120 int 121 121 tl_get_ip_packet_dimension(int ip_phone, 122 packet_dimensions_ refpacket_dimensions, device_id_t device_id,123 packet_dimension_ ref*packet_dimension)122 packet_dimensions_t *packet_dimensions, device_id_t device_id, 123 packet_dimension_t **packet_dimension) 124 124 { 125 125 int rc; … … 162 162 */ 163 163 int 164 tl_update_ip_packet_dimension(packet_dimensions_ refpacket_dimensions,164 tl_update_ip_packet_dimension(packet_dimensions_t *packet_dimensions, 165 165 device_id_t device_id, size_t content) 166 166 { 167 packet_dimension_ refpacket_dimension;167 packet_dimension_t *packet_dimension; 168 168 169 169 packet_dimension = packet_dimensions_find(packet_dimensions, device_id); … … 287 287 */ 288 288 int 289 tl_socket_read_packet_data(int packet_phone, packet_ refpacket, size_t prefix,290 const packet_dimension_ refdimension, const struct sockaddr *addr,289 tl_socket_read_packet_data(int packet_phone, packet_t *packet, size_t prefix, 290 const packet_dimension_t *dimension, const struct sockaddr *addr, 291 291 socklen_t addrlen) 292 292 { -
uspace/lib/packet/generic/packet_server.c
r4e5c7ba rf772bc55 103 103 }; 104 104 105 int packet_translate_local(int phone, packet_ refpacket, packet_id_t packet_id)105 int packet_translate_local(int phone, packet_t *packet, packet_id_t packet_id) 106 106 { 107 107 if (!packet) -
uspace/lib/packet/include/packet_local.h
r4e5c7ba rf772bc55 43 43 /*@{*/ 44 44 45 extern int packet_translate_local(int, packet_ ref, packet_id_t);45 extern int packet_translate_local(int, packet_t *, packet_id_t); 46 46 extern packet_t packet_get_4_local(int, size_t, size_t, size_t, size_t); 47 47 extern packet_t packet_get_1_local(int, size_t); -
uspace/srv/hw/netif/dp8390/dp8390_module.c
r4e5c7ba rf772bc55 157 157 } 158 158 159 int netif_get_device_stats(device_id_t device_id, device_stats_ref stats){ 159 int netif_get_device_stats(device_id_t device_id, device_stats_t *stats) 160 { 160 161 netif_device_t * device; 161 162 eth_stat_t * de_stat; -
uspace/srv/net/netif/lo/lo.c
r4e5c7ba rf772bc55 81 81 } 82 82 83 int netif_get_device_stats(device_id_t device_id, device_stats_ refstats)83 int netif_get_device_stats(device_id_t device_id, device_stats_t *stats) 84 84 { 85 85 netif_device_t *device; … … 93 93 return rc; 94 94 95 memcpy(stats, (device_stats_ ref) device->specific,95 memcpy(stats, (device_stats_t *) device->specific, 96 96 sizeof(device_stats_t)); 97 97 … … 145 145 } 146 146 147 null_device_stats((device_stats_ ref) (*device)->specific);147 null_device_stats((device_stats_t *) (*device)->specific); 148 148 (*device)->device_id = device_id; 149 149 (*device)->nil_phone = -1; … … 204 204 next = packet; 205 205 do { 206 ((device_stats_ ref) device->specific)->send_packets++;207 ((device_stats_ ref) device->specific)->receive_packets++;206 ((device_stats_t *) device->specific)->send_packets++; 207 ((device_stats_t *) device->specific)->receive_packets++; 208 208 length = packet_get_data_length(next); 209 ((device_stats_ ref) device->specific)->send_bytes += length;210 ((device_stats_ ref) device->specific)->receive_bytes += length;209 ((device_stats_t *) device->specific)->send_bytes += length; 210 ((device_stats_t *) device->specific)->receive_bytes += length; 211 211 next = pq_next(next); 212 212 } while(next); -
uspace/srv/net/tl/tcp/tcp.c
r4e5c7ba rf772bc55 126 126 */ 127 127 typedef struct tcp_timeout tcp_timeout_t; 128 129 /** Type definition of the TCP timeout pointer.130 * @see tcp_timeout131 */132 typedef tcp_timeout_t *tcp_timeout_ref;133 128 134 129 /** TCP reply timeout data. … … 809 804 size_t total_length) 810 805 { 811 packet_dimension_ refpacket_dimension;806 packet_dimension_t *packet_dimension; 812 807 int rc; 813 808 … … 1306 1301 tcp_socket_data_t *socket_data; 1307 1302 socket_core_ref socket; 1308 packet_dimension_ refpacket_dimension;1303 packet_dimension_t *packet_dimension; 1309 1304 1310 1305 /* … … 1540 1535 int tcp_timeout(void *data) 1541 1536 { 1542 tcp_timeout_ reftimeout = data;1537 tcp_timeout_t *timeout = data; 1543 1538 int keep_write_lock = false; 1544 1539 socket_core_ref socket; … … 1617 1612 int tcp_release_after_timeout(void *data) 1618 1613 { 1619 tcp_timeout_ reftimeout = data;1614 tcp_timeout_t *timeout = data; 1620 1615 socket_core_ref socket; 1621 1616 tcp_socket_data_t *socket_data; … … 2054 2049 int globals_read_only) 2055 2050 { 2056 tcp_timeout_ refoperation_timeout;2051 tcp_timeout_t *operation_timeout; 2057 2052 fid_t fibril; 2058 2053 … … 2159 2154 socket_core_ref socket; 2160 2155 tcp_socket_data_t *socket_data; 2161 packet_dimension_ refpacket_dimension;2156 packet_dimension_t *packet_dimension; 2162 2157 packet_t packet; 2163 2158 size_t total_length; … … 2301 2296 tcp_socket_data_t *socket_data, int synchronize, int finalize) 2302 2297 { 2303 packet_dimension_ refpacket_dimension;2298 packet_dimension_t *packet_dimension; 2304 2299 tcp_header_t *header; 2305 2300 int rc; … … 2338 2333 socket_core_ref socket; 2339 2334 tcp_socket_data_t *socket_data; 2340 packet_dimension_ refpacket_dimension;2335 packet_dimension_t *packet_dimension; 2341 2336 int rc; 2342 2337 -
uspace/srv/net/tl/udp/udp.c
r4e5c7ba rf772bc55 235 235 struct sockaddr *src; 236 236 struct sockaddr *dest; 237 packet_dimension_ refpacket_dimension;237 packet_dimension_t *packet_dimension; 238 238 int rc; 239 239 … … 469 469 size_t headerlen; 470 470 device_id_t device_id; 471 packet_dimension_ refpacket_dimension;471 packet_dimension_t *packet_dimension; 472 472 int rc; 473 473 … … 714 714 ipc_call_t answer; 715 715 int answer_count; 716 packet_dimension_ refpacket_dimension;716 packet_dimension_t *packet_dimension; 717 717 718 718 /*
Note:
See TracChangeset
for help on using the changeset viewer.