Changes in uspace/lib/net/netif/netif_remote.c [6b82009:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/netif/netif_remote.c
r6b82009 r79ae36dd 38 38 #include <packet_client.h> 39 39 #include <generic.h> 40 #include <async_obsolete.h> 40 41 #include <ipc/services.h> 41 42 #include <ipc/netif.h> 43 42 44 #include <net/modules.h> 43 45 #include <adt/measured_strings.h> … … 47 49 /** Return the device local hardware address. 48 50 * 49 * @param[in] sess Network interface session.50 * @param[in] device_id Device identifier.51 * @param[out] address Device local hardware address.52 * @param[out] data Address data.51 * @param[in] netif_phone Network interface phone. 52 * @param[in] device_id Device identifier. 53 * @param[out] address Device local hardware address. 54 * @param[out] data Address data. 53 55 * 54 56 * @return EOK on success. … … 59 61 * 60 62 */ 61 int netif_get_addr_req( async_sess_t *sess, device_id_t device_id,63 int netif_get_addr_req(int netif_phone, device_id_t device_id, 62 64 measured_string_t **address, uint8_t **data) 63 65 { 64 return generic_get_addr_req( sess, NET_NETIF_GET_ADDR, device_id,66 return generic_get_addr_req(netif_phone, NET_NETIF_GET_ADDR, device_id, 65 67 address, data); 66 68 } … … 68 70 /** Probe the existence of the device. 69 71 * 70 * @param[in] sess Network interface session.71 * @param[in] device_id Device identifier.72 * @param[in] irq Device interrupt number.73 * @param[in] io Device input/output address.72 * @param[in] netif_phone Network interface phone. 73 * @param[in] device_id Device identifier. 74 * @param[in] irq Device interrupt number. 75 * @param[in] io Device input/output address. 74 76 * 75 77 * @return EOK on success. … … 78 80 * 79 81 */ 80 int netif_probe_req( async_sess_t *sess, device_id_t device_id, int irq, void *io)82 int netif_probe_req(int netif_phone, device_id_t device_id, int irq, void *io) 81 83 { 82 async_exch_t *exch = async_exchange_begin(sess); 83 int rc = async_req_3_0(exch, NET_NETIF_PROBE, device_id, (sysarg_t) irq, 84 return async_obsolete_req_3_0(netif_phone, NET_NETIF_PROBE, device_id, irq, 84 85 (sysarg_t) io); 85 async_exchange_end(exch);86 87 return rc;88 86 } 89 87 90 88 /** Send the packet queue. 91 89 * 92 * @param[in] sess Network interface session.93 * @param[in] device_id Device identifier.94 * @param[in] packet Packet queue.95 * @param[in] sender Sending module service.90 * @param[in] netif_phone Network interface phone. 91 * @param[in] device_id Device identifier. 92 * @param[in] packet Packet queue. 93 * @param[in] sender Sending module service. 96 94 * 97 95 * @return EOK on success. … … 100 98 * 101 99 */ 102 int netif_send_msg( async_sess_t *sess, device_id_t device_id, packet_t *packet,100 int netif_send_msg(int netif_phone, device_id_t device_id, packet_t *packet, 103 101 services_t sender) 104 102 { 105 return generic_send_msg_remote( sess, NET_NETIF_SEND, device_id,103 return generic_send_msg_remote(netif_phone, NET_NETIF_SEND, device_id, 106 104 packet_get_id(packet), sender, 0); 107 105 } … … 109 107 /** Start the device. 110 108 * 111 * @param[in] sess Network interface session.112 * @param[in] device_id Device identifier.109 * @param[in] netif_phone Network interface phone. 110 * @param[in] device_id Device identifier. 113 111 * 114 112 * @return EOK on success. … … 119 117 * 120 118 */ 121 int netif_start_req( async_sess_t *sess, device_id_t device_id)119 int netif_start_req(int netif_phone, device_id_t device_id) 122 120 { 123 async_exch_t *exch = async_exchange_begin(sess); 124 int rc = async_req_1_0(exch, NET_NETIF_START, device_id); 125 async_exchange_end(exch); 126 127 return rc; 121 return async_obsolete_req_1_0(netif_phone, NET_NETIF_START, device_id); 128 122 } 129 123 130 124 /** Stop the device. 131 125 * 132 * @param[in] sess Network interface session.133 * @param[in] device_id Device identifier.126 * @param[in] netif_phone Network interface phone. 127 * @param[in] device_id Device identifier. 134 128 * 135 129 * @return EOK on success. … … 140 134 * 141 135 */ 142 int netif_stop_req( async_sess_t *sess, device_id_t device_id)136 int netif_stop_req(int netif_phone, device_id_t device_id) 143 137 { 144 async_exch_t *exch = async_exchange_begin(sess); 145 int rc = async_req_1_0(exch, NET_NETIF_STOP, device_id); 146 async_exchange_end(exch); 147 148 return rc; 138 return async_obsolete_req_1_0(netif_phone, NET_NETIF_STOP, device_id); 149 139 } 150 140 151 141 /** Return the device usage statistics. 152 142 * 153 * @param[in] sess Network interface session.154 * @param[in] device_idDevice identifier.155 * @param[out] stats Device usage statistics.143 * @param[in] netif_phone Network interface phone. 144 * @param[in] device_id Device identifier. 145 * @param[out] stats Device usage statistics. 156 146 * 157 147 * @return EOK on success. 158 148 * 159 149 */ 160 int netif_stats_req( async_sess_t *sess, device_id_t device_id,150 int netif_stats_req(int netif_phone, device_id_t device_id, 161 151 device_stats_t *stats) 162 152 { … … 164 154 return EBADMEM; 165 155 166 async_exch_t *exch = async_exchange_begin(sess); 167 aid_t message_id = async_send_1(exch, NET_NETIF_STATS, 156 aid_t message_id = async_obsolete_send_1(netif_phone, NET_NETIF_STATS, 168 157 (sysarg_t) device_id, NULL); 169 async_data_read_start(exch, stats, sizeof(*stats)); 170 async_exchange_end(exch); 158 async_obsolete_data_read_start(netif_phone, stats, sizeof(*stats)); 171 159 172 160 sysarg_t result; … … 181 169 * register the message receiver. 182 170 * 183 * @param[in] service Network interface module service.184 * @param[in] device_id Device identifier.185 * @param[in] me Requesting module service.186 * @param[in] receiver Message receiver.171 * @param[in] service The network interface module service. 172 * @param[in] device_id The device identifier. 173 * @param[in] me The requesting module service. 174 * @param[in] receiver The message receiver. 187 175 * 188 * @return Session to the needed service. 189 * @return NULL on failure. 176 * @return The phone of the needed service. 177 * @return EOK on success. 178 * @return Other error codes as defined for the bind_service() 179 * function. 190 180 * 191 181 */ 192 async_sess_t *netif_bind_service(services_t service, device_id_t device_id,182 int netif_bind_service(services_t service, device_id_t device_id, 193 183 services_t me, async_client_conn_t receiver) 194 184 {
Note:
See TracChangeset
for help on using the changeset viewer.