Changeset 59157eb in mainline for uspace/lib/c/generic/inet.c
- Timestamp:
- 2012-02-02T15:18:46Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f834f90d
- Parents:
- ecff3d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inet.c
recff3d9 r59157eb 148 148 } 149 149 150 static void inet_ev_recv(ipc_callid_t callid, ipc_call_t *call) 151 { 152 int rc; 153 inet_dgram_t dgram; 154 155 dgram.src.ipv4 = IPC_GET_ARG1(*call); 156 dgram.dest.ipv4 = IPC_GET_ARG2(*call); 157 dgram.tos = IPC_GET_ARG3(*call); 158 159 rc = async_data_write_accept(&dgram.data, false, 0, 0, 0, &dgram.size); 160 if (rc != EOK) { 161 async_answer_0(callid, rc); 162 return; 163 } 164 165 rc = inet_ev_ops->recv(&dgram); 166 async_answer_0(callid, rc); 167 } 168 150 169 static void inet_cb_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg) 151 170 { … … 153 172 ipc_call_t call; 154 173 ipc_callid_t callid = async_get_call(&call); 155 174 156 175 if (!IPC_GET_IMETHOD(call)) { 157 176 /* TODO: Handle hangup */ 158 177 return; 159 178 } 160 179 161 180 switch (IPC_GET_IMETHOD(call)) { 162 181 case INET_EV_RECV: 163 async_answer_0(callid, EOK);182 inet_ev_recv(callid, &call); 164 183 break; 165 184 default:
Note:
See TracChangeset
for help on using the changeset viewer.