Changeset fdbc3ff in mainline for uspace/srv/net/netif/lo/lo.c
- Timestamp:
- 2010-11-19T23:50:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46d4d9f
- Parents:
- b4c9c61 (diff), a9c6b966 (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/netif/lo/lo.c
rb4c9c61 rfdbc3ff 70 70 } 71 71 72 int netif_get_addr_message(device_id_t device_id, measured_string_ refaddress)72 int netif_get_addr_message(device_id_t device_id, measured_string_t *address) 73 73 { 74 74 if (!address) … … 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 … … 103 103 * @param[in] device The device structure. 104 104 * @param[in] state The new device state. 105 * @return sThe new state if changed.106 * @return sEOK otherwise.105 * @return The new state if changed. 106 * @return EOK otherwise. 107 107 */ 108 108 static int change_state_message(netif_device_t *device, device_state_t state) … … 124 124 * @param[in] device_id The new devce identifier. 125 125 * @param[out] device The device structure. 126 * @return sEOK on success.127 * @return sEXDEV if one loopback network interface already exists.128 * @return sENOMEM if there is not enough memory left.126 * @return EOK on success. 127 * @return EXDEV if one loopback network interface already exists. 128 * @return ENOMEM if there is not enough memory left. 129 129 */ 130 130 static int create(device_id_t device_id, netif_device_t **device) … … 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);
Note:
See TracChangeset
for help on using the changeset viewer.