Changeset 774e6d1a in mainline for uspace/srv/net/netif/lo/lo.c
- Timestamp:
- 2011-01-09T23:24:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4b86dac
- Parents:
- 3c106e88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/netif/lo/lo.c
r3c106e88 r774e6d1a 49 49 #include <net/device.h> 50 50 #include <nil_interface.h> 51 #include <netif_interface.h> 52 #include <netif_local.h> 51 #include <netif_skel.h> 53 52 54 53 /** Default hardware address. */ … … 65 64 66 65 int netif_specific_message(ipc_callid_t callid, ipc_call_t *call, 67 ipc_call_t *answer, int *answer_count)66 ipc_call_t *answer, size_t *count) 68 67 { 69 68 return ENOTSUP; … … 172 171 } 173 172 174 int netif_probe_message(device_id_t device_id, int irq, uintptr_tio)173 int netif_probe_message(device_id_t device_id, int irq, void *io) 175 174 { 176 175 netif_device_t *device; … … 233 232 } 234 233 235 /** Default thread for new connections.236 *237 * @param[in] iid The initial message identifier.238 * @param[in] icall The initial message call structure.239 */240 static void netif_client_connection(ipc_callid_t iid, ipc_call_t *icall)241 {242 /*243 * Accept the connection244 * - Answer the first IPC_M_CONNECT_ME_TO call.245 */246 ipc_answer_0(iid, EOK);247 248 while (true) {249 ipc_call_t answer;250 int answer_count;251 252 /* Clear the answer structure */253 refresh_answer(&answer, &answer_count);254 255 /* Fetch the next message */256 ipc_call_t call;257 ipc_callid_t callid = async_get_call(&call);258 259 /* Process the message */260 int res = netif_module_message(NAME, callid, &call, &answer,261 &answer_count);262 263 /*264 * End if told to either by the message or the processing265 * result.266 */267 if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) ||268 (res == EHANGUP))269 return;270 271 /* Answer the message */272 answer_call(callid, res, &answer, answer_count);273 }274 }275 276 234 int main(int argc, char *argv[]) 277 235 { 278 int rc;279 280 236 /* Start the module */ 281 rc = netif_module_start(netif_client_connection); 282 return rc; 237 return netif_module_start(); 283 238 } 284 239
Note:
See TracChangeset
for help on using the changeset viewer.