Changes in uspace/srv/net/tcp/ucall.c [a2e3ee6:69a93df7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/ucall.c
ra2e3ee6 r69a93df7 70 70 tcp_conn_t *nconn; 71 71 72 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_open(%p, %p, %s, %s, %p)",72 log_msg(LVL_DEBUG, "tcp_uc_open(%p, %p, %s, %s, %p)", 73 73 lsock, fsock, acpass == ap_active ? "active" : "passive", 74 74 oflags == tcp_open_nonblock ? "nonblock" : "none", conn); … … 88 88 89 89 /* Wait for connection to be established or reset */ 90 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Wait for connection.");90 log_msg(LVL_DEBUG, "tcp_uc_open: Wait for connection."); 91 91 fibril_mutex_lock(&nconn->lock); 92 92 while (nconn->cstate == st_listen || … … 97 97 98 98 if (nconn->cstate != st_established) { 99 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Connection was reset.");99 log_msg(LVL_DEBUG, "tcp_uc_open: Connection was reset."); 100 100 assert(nconn->cstate == st_closed); 101 101 fibril_mutex_unlock(&nconn->lock); … … 104 104 105 105 fibril_mutex_unlock(&nconn->lock); 106 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Connection was established.");106 log_msg(LVL_DEBUG, "tcp_uc_open: Connection was established."); 107 107 108 108 *conn = nconn; 109 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_open -> %p", nconn);109 log_msg(LVL_DEBUG, "tcp_uc_open -> %p", nconn); 110 110 return TCP_EOK; 111 111 } … … 118 118 size_t xfer_size; 119 119 120 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_send()", conn->name);120 log_msg(LVL_DEBUG, "%s: tcp_uc_send()", conn->name); 121 121 122 122 fibril_mutex_lock(&conn->lock); … … 141 141 buf_free = conn->snd_buf_size - conn->snd_buf_used; 142 142 while (buf_free == 0 && !conn->reset) { 143 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: buf_free == 0, waiting.",143 log_msg(LVL_DEBUG, "%s: buf_free == 0, waiting.", 144 144 conn->name); 145 145 fibril_condvar_wait(&conn->snd_buf_cv, &conn->lock); … … 175 175 size_t xfer_size; 176 176 177 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_receive()", conn->name);177 log_msg(LVL_DEBUG, "%s: tcp_uc_receive()", conn->name); 178 178 179 179 fibril_mutex_lock(&conn->lock); … … 186 186 /* Wait for data to become available */ 187 187 while (conn->rcv_buf_used == 0 && !conn->rcv_buf_fin && !conn->reset) { 188 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_receive() - wait for data");188 log_msg(LVL_DEBUG, "tcp_uc_receive() - wait for data"); 189 189 fibril_condvar_wait(&conn->rcv_buf_cv, &conn->lock); 190 190 } … … 223 223 tcp_tqueue_ctrl_seg(conn, CTL_ACK); 224 224 225 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_receive() - returning %zu bytes",225 log_msg(LVL_DEBUG, "%s: tcp_uc_receive() - returning %zu bytes", 226 226 conn->name, xfer_size); 227 227 … … 234 234 tcp_error_t tcp_uc_close(tcp_conn_t *conn) 235 235 { 236 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_close()", conn->name);236 log_msg(LVL_DEBUG, "%s: tcp_uc_close()", conn->name); 237 237 238 238 fibril_mutex_lock(&conn->lock); … … 258 258 void tcp_uc_abort(tcp_conn_t *conn) 259 259 { 260 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_abort()");260 log_msg(LVL_DEBUG, "tcp_uc_abort()"); 261 261 } 262 262 … … 264 264 void tcp_uc_status(tcp_conn_t *conn, tcp_conn_status_t *cstatus) 265 265 { 266 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_status()");266 log_msg(LVL_DEBUG, "tcp_uc_status()"); 267 267 cstatus->cstate = conn->cstate; 268 268 } … … 276 276 void tcp_uc_delete(tcp_conn_t *conn) 277 277 { 278 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_delete()");278 log_msg(LVL_DEBUG, "tcp_uc_delete()"); 279 279 tcp_conn_delete(conn); 280 280 } … … 282 282 void tcp_uc_set_cstate_cb(tcp_conn_t *conn, tcp_cstate_cb_t cb, void *arg) 283 283 { 284 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_uc_set_ctate_cb(%p, %p, %p)",284 log_msg(LVL_DEBUG, "tcp_uc_set_ctate_cb(%p, %p, %p)", 285 285 conn, cb, arg); 286 286 … … 298 298 tcp_conn_t *conn; 299 299 300 log_msg(LVL_DEBUG, "tcp_as_segment_arrived(f:(%x,%u), l:(%x,%u))", 301 sp->foreign.addr.ipv4, sp->foreign.port, 302 sp->local.addr.ipv4, sp->local.port); 303 300 304 conn = tcp_conn_find_ref(sp); 301 305 if (conn == NULL) { 302 log_msg(L OG_DEFAULT, LVL_WARN, "No connection found.");306 log_msg(LVL_WARN, "No connection found."); 303 307 tcp_unexpected_segment(sp, seg); 304 308 return; … … 308 312 309 313 if (conn->cstate == st_closed) { 310 log_msg(L OG_DEFAULT, LVL_WARN, "Connection is closed.");314 log_msg(LVL_WARN, "Connection is closed."); 311 315 tcp_unexpected_segment(sp, seg); 312 316 fibril_mutex_unlock(&conn->lock); … … 315 319 } 316 320 317 if (inet_addr_is_any(&conn->ident.foreign.addr)) 318 conn->ident.foreign.addr = sp->foreign.addr; 319 321 if (conn->ident.foreign.addr.ipv4 == TCP_IPV4_ANY) 322 conn->ident.foreign.addr.ipv4 = sp->foreign.addr.ipv4; 320 323 if (conn->ident.foreign.port == TCP_PORT_ANY) 321 324 conn->ident.foreign.port = sp->foreign.port; 322 323 if (inet_addr_is_any(&conn->ident.local.addr)) 324 conn->ident.local.addr = sp->local.addr; 325 if (conn->ident.local.addr.ipv4 == TCP_IPV4_ANY) 326 conn->ident.local.addr.ipv4 = sp->local.addr.ipv4; 325 327 326 328 tcp_conn_segment_arrived(conn, seg); … … 337 339 void tcp_to_user(void) 338 340 { 339 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_to_user()");341 log_msg(LVL_DEBUG, "tcp_to_user()"); 340 342 } 341 343
Note:
See TracChangeset
for help on using the changeset viewer.