Changes in uspace/lib/net/generic/generic.c [00d7e1b:6b82009] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/generic.c
r00d7e1b r6b82009 54 54 */ 55 55 int generic_device_state_msg_remote(async_sess_t *sess, sysarg_t message, 56 nic_device_id_t device_id, sysarg_t state, services_t target)56 device_id_t device_id, sysarg_t state, services_t target) 57 57 { 58 58 async_exch_t *exch = async_exchange_begin(sess); … … 68 68 * @param[in] message Service specific message. 69 69 * @param[in] device_id Device identifier. 70 * @param[in] arg2 Second argument of the message. 70 71 * @param[in] service Device module service. 71 72 * … … 76 77 */ 77 78 int generic_device_req_remote(async_sess_t *sess, sysarg_t message, 78 nic_device_id_t device_id, services_t service)79 { 80 async_exch_t *exch = async_exchange_begin(sess); 81 int rc = async_req_3_0(exch, message, (sysarg_t) device_id, 0,82 (sysarg_t) service);79 device_id_t device_id, sysarg_t arg2, services_t service) 80 { 81 async_exch_t *exch = async_exchange_begin(sess); 82 int rc = async_req_3_0(exch, message, (sysarg_t) device_id, 83 arg2, (sysarg_t) service); 83 84 async_exchange_end(exch); 84 85 … … 102 103 */ 103 104 int generic_get_addr_req(async_sess_t *sess, sysarg_t message, 104 nic_device_id_t device_id, uint8_t *address, size_t max_len)105 { 106 if ( !address)105 device_id_t device_id, measured_string_t **address, uint8_t **data) 106 { 107 if ((!address) || (!data)) 107 108 return EBADMEM; 108 109 109 110 /* Request the address */ 110 111 async_exch_t *exch = async_exchange_begin(sess); 111 aid_t aid = async_send_1(exch, message, (sysarg_t) device_id,112 aid_t message_id = async_send_1(exch, message, (sysarg_t) device_id, 112 113 NULL); 113 int rc = async_data_read_start(exch, address, max_len);114 int rc = measured_strings_return(exch, address, data, 1); 114 115 async_exchange_end(exch); 115 116 116 117 sysarg_t result; 117 async_wait_for(aid, &result); 118 119 if (rc != EOK) 120 return rc; 118 async_wait_for(message_id, &result); 119 120 /* If not successful */ 121 if ((rc == EOK) && (result != EOK)) { 122 /* Clear the data */ 123 free(*address); 124 free(*data); 125 } 121 126 122 127 return (int) result; … … 137 142 */ 138 143 int generic_packet_size_req_remote(async_sess_t *sess, sysarg_t message, 139 nic_device_id_t device_id, packet_dimension_t *packet_dimension)144 device_id_t device_id, packet_dimension_t *packet_dimension) 140 145 { 141 146 if (!packet_dimension) … … 174 179 */ 175 180 int generic_received_msg_remote(async_sess_t *sess, sysarg_t message, 176 nic_device_id_t device_id, packet_id_t packet_id, services_t target,181 device_id_t device_id, packet_id_t packet_id, services_t target, 177 182 services_t error) 178 183 { … … 205 210 */ 206 211 int generic_send_msg_remote(async_sess_t *sess, sysarg_t message, 207 nic_device_id_t device_id, packet_id_t packet_id, services_t sender,212 device_id_t device_id, packet_id_t packet_id, services_t sender, 208 213 services_t error) 209 214 { … … 246 251 */ 247 252 int generic_translate_req(async_sess_t *sess, sysarg_t message, 248 nic_device_id_t device_id, services_t service,253 device_id_t device_id, services_t service, 249 254 measured_string_t *configuration, size_t count, 250 255 measured_string_t **translation, uint8_t **data)
Note:
See TracChangeset
for help on using the changeset viewer.