Changes in uspace/srv/net/dhcp/main.c [a46e56b:5a6cc679] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dhcp/main.c
ra46e56b r5a6cc679 50 50 #define NAME "dhcp" 51 51 52 static void dhcp_client_conn( cap_call_handle_t, ipc_call_t *, void *);52 static void dhcp_client_conn(ipc_callid_t, ipc_call_t *, void *); 53 53 54 54 static errno_t dhcp_init(void) … … 84 84 } 85 85 86 static void dhcp_link_add_srv( cap_call_handle_t chandle, ipc_call_t *call)86 static void dhcp_link_add_srv(ipc_callid_t callid, ipc_call_t *call) 87 87 { 88 88 sysarg_t link_id; … … 94 94 95 95 rc = dhcpsrv_link_add(link_id); 96 async_answer_0(c handle, rc);96 async_answer_0(callid, rc); 97 97 } 98 98 99 static void dhcp_link_remove_srv( cap_call_handle_t chandle, ipc_call_t *call)99 static void dhcp_link_remove_srv(ipc_callid_t callid, ipc_call_t *call) 100 100 { 101 101 sysarg_t link_id; … … 107 107 108 108 rc = dhcpsrv_link_remove(link_id); 109 async_answer_0(c handle, rc);109 async_answer_0(callid, rc); 110 110 } 111 111 112 static void dhcp_discover_srv( cap_call_handle_t chandle, ipc_call_t *call)112 static void dhcp_discover_srv(ipc_callid_t callid, ipc_call_t *call) 113 113 { 114 114 sysarg_t link_id; … … 120 120 121 121 rc = dhcpsrv_discover(link_id); 122 async_answer_0(c handle, rc);122 async_answer_0(callid, rc); 123 123 } 124 124 125 static void dhcp_client_conn( cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)125 static void dhcp_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg) 126 126 { 127 127 log_msg(LOG_DEFAULT, LVL_DEBUG, "dhcp_client_conn()"); 128 128 129 129 /* Accept the connection */ 130 async_answer_0(i call_handle, EOK);130 async_answer_0(iid, EOK); 131 131 132 132 while (true) { 133 133 ipc_call_t call; 134 cap_call_handle_t chandle= async_get_call(&call);134 ipc_callid_t callid = async_get_call(&call); 135 135 sysarg_t method = IPC_GET_IMETHOD(call); 136 136 137 137 if (!method) { 138 138 /* The other side has hung up */ 139 async_answer_0(c handle, EOK);139 async_answer_0(callid, EOK); 140 140 return; 141 141 } … … 143 143 switch (method) { 144 144 case DHCP_LINK_ADD: 145 dhcp_link_add_srv(c handle, &call);145 dhcp_link_add_srv(callid, &call); 146 146 break; 147 147 case DHCP_LINK_REMOVE: 148 dhcp_link_remove_srv(c handle, &call);148 dhcp_link_remove_srv(callid, &call); 149 149 break; 150 150 case DHCP_DISCOVER: 151 dhcp_discover_srv(c handle, &call);151 dhcp_discover_srv(callid, &call); 152 152 break; 153 153 default: 154 async_answer_0(c handle, EINVAL);154 async_answer_0(callid, EINVAL); 155 155 } 156 156 }
Note:
See TracChangeset
for help on using the changeset viewer.