Changeset a46e56b in mainline for uspace/srv/net/dhcp/main.c
- Timestamp:
- 2018-03-22T06:49:35Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 77f0a1d
- Parents:
- 3e242d2
- git-author:
- Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
- git-committer:
- Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dhcp/main.c
r3e242d2 ra46e56b 84 84 } 85 85 86 static void dhcp_link_add_srv(cap_call_handle_t c allid, ipc_call_t *call)86 static void dhcp_link_add_srv(cap_call_handle_t chandle, 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 allid, rc);96 async_answer_0(chandle, rc); 97 97 } 98 98 99 static void dhcp_link_remove_srv(cap_call_handle_t c allid, ipc_call_t *call)99 static void dhcp_link_remove_srv(cap_call_handle_t chandle, 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 allid, rc);109 async_answer_0(chandle, rc); 110 110 } 111 111 112 static void dhcp_discover_srv(cap_call_handle_t c allid, ipc_call_t *call)112 static void dhcp_discover_srv(cap_call_handle_t chandle, 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 allid, rc);122 async_answer_0(chandle, rc); 123 123 } 124 124 125 static void dhcp_client_conn(cap_call_handle_t i id, ipc_call_t *icall, void *arg)125 static void dhcp_client_conn(cap_call_handle_t icall_handle, 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 id, EOK);130 async_answer_0(icall_handle, EOK); 131 131 132 132 while (true) { 133 133 ipc_call_t call; 134 cap_call_handle_t c allid= async_get_call(&call);134 cap_call_handle_t chandle = 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 allid, EOK);139 async_answer_0(chandle, EOK); 140 140 return; 141 141 } … … 143 143 switch (method) { 144 144 case DHCP_LINK_ADD: 145 dhcp_link_add_srv(c allid, &call);145 dhcp_link_add_srv(chandle, &call); 146 146 break; 147 147 case DHCP_LINK_REMOVE: 148 dhcp_link_remove_srv(c allid, &call);148 dhcp_link_remove_srv(chandle, &call); 149 149 break; 150 150 case DHCP_DISCOVER: 151 dhcp_discover_srv(c allid, &call);151 dhcp_discover_srv(chandle, &call); 152 152 break; 153 153 default: 154 async_answer_0(c allid, EINVAL);154 async_answer_0(chandle, EINVAL); 155 155 } 156 156 }
Note:
See TracChangeset
for help on using the changeset viewer.