Changeset 984a9ba in mainline for uspace/srv/net/dhcp/main.c
- Timestamp:
- 2018-07-05T09:34:09Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dhcp/main.c
r76f566d r984a9ba 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_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_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(call, 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_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(call, 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_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(call, 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_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(icall _handle, EOK);130 async_answer_0(icall, EOK); 131 131 132 132 while (true) { 133 133 ipc_call_t call; 134 cap_call_handle_t chandle =async_get_call(&call);134 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( chandle, EOK);139 async_answer_0(&call, EOK); 140 140 return; 141 141 } … … 143 143 switch (method) { 144 144 case DHCP_LINK_ADD: 145 dhcp_link_add_srv( chandle,&call);145 dhcp_link_add_srv(&call); 146 146 break; 147 147 case DHCP_LINK_REMOVE: 148 dhcp_link_remove_srv( chandle,&call);148 dhcp_link_remove_srv(&call); 149 149 break; 150 150 case DHCP_DISCOVER: 151 dhcp_discover_srv( chandle,&call);151 dhcp_discover_srv(&call); 152 152 break; 153 153 default: 154 async_answer_0( chandle, EINVAL);154 async_answer_0(&call, EINVAL); 155 155 } 156 156 }
Note:
See TracChangeset
for help on using the changeset viewer.