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