Changeset 609243f4 in mainline for uspace/lib/net/generic/net_remote.c
- Timestamp:
- 2011-10-07T15:46:01Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e2c50e1
- Parents:
- f51b1d3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/net_remote.c
rf51b1d3 r609243f4 38 38 #include <ipc/services.h> 39 39 #include <ipc/net_net.h> 40 41 40 #include <malloc.h> 42 41 #include <async.h> 42 #include <devman.h> 43 43 #include <generic.h> 44 44 #include <net/modules.h> … … 98 98 size_t count, uint8_t **data) 99 99 { 100 return generic_translate_req(sess, NET_NET_GET_ DEVICE_CONF, 0, 0,100 return generic_translate_req(sess, NET_NET_GET_CONF, 0, 0, 101 101 *configuration, count, configuration, data); 102 102 } … … 124 124 * 125 125 */ 126 int net_get_device_conf_req(async_sess_t *sess, device_id_t device_id,126 int net_get_device_conf_req(async_sess_t *sess, nic_device_id_t device_id, 127 127 measured_string_t **configuration, size_t count, uint8_t **data) 128 128 { … … 131 131 } 132 132 133 int net_get_devices_req(async_sess_t *sess, measured_string_t **devices, 134 size_t *count, uint8_t **data) 135 { 136 if ((!devices) || (!count)) 137 return EBADMEM; 138 139 async_exch_t *exch = async_exchange_begin(sess); 140 141 int rc = async_req_0_1(exch, NET_NET_GET_DEVICES_COUNT, count); 142 if (rc != EOK) { 143 async_exchange_end(exch); 144 return rc; 145 } 146 147 if (*count == 0) { 148 async_exchange_end(exch); 149 *data = NULL; 150 return EOK; 151 } 152 153 aid_t message_id = async_send_0(exch, NET_NET_GET_DEVICES, NULL); 154 rc = measured_strings_return(exch, devices, data, *count); 155 156 async_exchange_end(exch); 157 158 sysarg_t result; 159 async_wait_for(message_id, &result); 160 161 if ((rc == EOK) && (result != EOK)) { 162 free(*devices); 163 free(*data); 164 } 165 166 return (int) result; 167 } 168 169 int net_driver_ready(async_sess_t *sess, devman_handle_t handle) 170 { 171 async_exch_t *exch = async_exchange_begin(sess); 172 int rc = async_req_1_0(exch, NET_NET_DRIVER_READY, handle); 173 async_exchange_end(exch); 174 175 return rc; 176 } 177 133 178 /** @} 134 179 */
Note:
See TracChangeset
for help on using the changeset viewer.