Changeset 779541b in mainline for uspace/srv/net/tcp/tcp_type.h
- Timestamp:
- 2015-05-09T13:43:50Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1d4b815
- Parents:
- 99ea91b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/tcp_type.h
r99ea91b2 r779541b 96 96 TCP_EINVPREC, 97 97 /* Security/compartment not allowed */ 98 TCP_EINVCOMP 98 TCP_EINVCOMP, 99 TCP_EAGAIN 99 100 } tcp_error_t; 100 101 … … 154 155 typedef void (*tcp_cstate_cb_t)(tcp_conn_t *, void *); 155 156 157 /** Connection callbacks */ 158 typedef struct { 159 void (*cstate_change)(tcp_conn_t *, void *); 160 void (*recv_data)(tcp_conn_t *, void *); 161 } tcp_cb_t; 162 156 163 /** Connection */ 157 164 struct tcp_conn { … … 159 166 link_t link; 160 167 161 /** Connection state change callbackfunction */162 tcp_c state_cb_t cstate_cb;168 /** Connection callbacks function */ 169 tcp_cb_t *cb; 163 170 /** Argument to @c cstate_cb */ 164 void *c state_cb_arg;171 void *cb_arg; 165 172 166 173 /** Connection identification (local and foreign socket) */ … … 318 325 } tcp_pdu_t; 319 326 320 typedef struct { 327 /** TCP client connection */ 328 typedef struct tcp_cconn { 329 /** Connection */ 330 tcp_conn_t *conn; 331 /** Connection ID for the client */ 332 sysarg_t id; 333 /** Client */ 334 struct tcp_client *client; 335 link_t lclient; 336 } tcp_cconn_t; 337 338 /** TCP client listener */ 339 typedef struct tcp_clst { 340 /** Connection */ 341 tcp_conn_t *conn; 342 /** Listener ID for the client */ 343 sysarg_t id; 344 /** Client */ 345 struct tcp_client *client; 346 /** Link to tcp_client_t.clst */ 347 link_t lclient; 348 } tcp_clst_t; 349 350 /** TCP client */ 351 typedef struct tcp_client { 352 /** Client callbac session */ 321 353 async_sess_t *sess; 322 // socket_cores_t sockets; 354 /** Client's connections */ 355 list_t cconn; /* of tcp_cconn_t */ 356 /** Client's listeners */ 357 list_t clst; 323 358 } tcp_client_t; 324 359 … … 358 393 } tcp_sock_lconn_t; 359 394 360 361 395 #endif 362 396
Note:
See TracChangeset
for help on using the changeset viewer.