Changeset 0ac2158 in mainline for uspace/srv/net/tl/tcp/ucall.c
- Timestamp:
- 2011-12-08T23:29:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d9e14fa4
- Parents:
- 5f9ecd3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/ucall.c
r5f9ecd3 r0ac2158 50 50 /** OPEN user call 51 51 * 52 * @param l port Local port52 * @param lsock Local socket 53 53 * @param fsock Foreign socket 54 54 * @param acpass Active/passive 55 55 * @param conn Connection 56 * 57 * Unlike in the spec we allow specifying the local address. This means 58 * the implementation does not need to magically guess it, especially 59 * considering there can be more than one local address. 56 60 * 57 61 * XXX We should be able to call active open on an existing listening … … 60 64 * establishment. 61 65 */ 62 tcp_error_t tcp_uc_open( uint16_t lport, tcp_sock_t *fsock, acpass_t acpass,66 tcp_error_t tcp_uc_open(tcp_sock_t *lsock, tcp_sock_t *fsock, acpass_t acpass, 63 67 tcp_conn_t **conn) 64 68 { 65 69 tcp_conn_t *nconn; 66 tcp_sock_t lsock; 67 68 log_msg(LVL_DEBUG, "tcp_uc_open(%" PRIu16 ", %p, %s, %p)", 69 lport, fsock, acpass == ap_active ? "active" : "passive", 70 71 log_msg(LVL_DEBUG, "tcp_uc_open(%p, %p, %s, %p)", 72 lsock, fsock, acpass == ap_active ? "active" : "passive", 70 73 conn); 71 74 72 lsock.port = lport; 73 lsock.addr.ipv4 = TCP_IPV4_ANY; 74 75 nconn = tcp_conn_new(&lsock, fsock); 75 nconn = tcp_conn_new(lsock, fsock); 76 76 tcp_conn_add(nconn); 77 77 … … 246 246 if (conn->ident.foreign.port == TCP_PORT_ANY) 247 247 conn->ident.foreign.port = sp->foreign.port; 248 if (conn->ident.local.addr.ipv4 == TCP_IPV4_ANY) 249 conn->ident.local.addr.ipv4 = sp->local.addr.ipv4; 248 250 249 251 tcp_conn_segment_arrived(conn, seg);
Note:
See TracChangeset
for help on using the changeset viewer.