- Timestamp:
- 2006-03-19T12:43:37Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4c61e60
- Parents:
- 0a862b65
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ns/ns.c
r0a862b65 r7048773 15 15 ipcarg_t retval, arg1, arg2; 16 16 17 printf("N ame service started.\n");17 printf("NS:Name service started.\n"); 18 18 while (1) { 19 call.taskid = -1; 19 20 callid = ipc_wait_for_call(&call, 0); 20 printf("Received call from: %P..%llX\n", &call.taskid,call.taskid); 21 printf("NS:Call task=%llX,phone=%lX..", 22 call.taskid,call.data.phoneid); 21 23 switch (IPC_GET_METHOD(call.data)) { 22 case IPC_M_CONNECTTOME: 23 printf("Somebody wants to connect with phoneid %zd...accepting\n", IPC_GET_ARG3(call.data)); 24 case IPC_M_PHONE_HUNGUP: 25 printf("Phone hung up.\n"); 26 retval = 0; 27 break; 28 case IPC_M_CONNECT_TO_ME: 29 printf("Somebody connecting phid=%zd.\n", IPC_GET_ARG3(call.data)); 24 30 service = IPC_GET_ARG3(call.data); 25 31 retval = 0; 26 32 break; 27 case IPC_M_CONNECT METO:28 printf(" Somebody wants to connectto: %zd\n",33 case IPC_M_CONNECT_ME_TO: 34 printf("Connectmeto: %zd\n", 29 35 IPC_GET_ARG1(call.data)); 30 36 retval = 0; … … 37 43 arg2 = 0xbeef; 38 44 break; 45 case NS_HANGUP: 46 printf("Closing connection.\n"); 47 retval = EHANGUP; 48 break; 39 49 case NS_PING_SVC: 40 printf(" Pinging service %d\n", service);50 printf("NS:Pinging service %d\n", service); 41 51 ipc_call_sync(service, NS_PING, 0xbeef, 0); 42 printf(" Got pong\n");52 printf("NS:Got pong\n"); 43 53 break; 44 54 default:
Note:
See TracChangeset
for help on using the changeset viewer.