source: mainline/uspace/srv/net/tcp/ucall.h@ 7c15d6f

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 7c15d6f was 2f19103, checked in by Jiri Svoboda <jiri@…>, 10 years ago

TCP and UDP servers can make use of inet/endpoint.h types internally.

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[c5808b41]1/*
[2f19103]2 * Copyright (c) 2015 Jiri Svoboda
[c5808b41]3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup tcp
30 * @{
31 */
[762b48a]32/** @file TCP user calls (close to those defined in the RFC)
[c5808b41]33 */
34
[762b48a]35#ifndef UCALL_H
36#define UCALL_H
[c5808b41]37
[2f19103]38#include <inet/endpoint.h>
[c5808b41]39#include <sys/types.h>
40#include "tcp_type.h"
41
42/*
43 * User calls
44 */
[2f19103]45extern tcp_error_t tcp_uc_open(inet_ep2_t *, acpass_t,
[ae481e0]46 tcp_open_flags_t, tcp_conn_t **);
[854e79a6]47extern tcp_error_t tcp_uc_send(tcp_conn_t *, void *, size_t, xflags_t);
48extern tcp_error_t tcp_uc_receive(tcp_conn_t *, void *, size_t, size_t *, xflags_t *);
49extern tcp_error_t tcp_uc_close(tcp_conn_t *);
[c5808b41]50extern void tcp_uc_abort(tcp_conn_t *);
51extern void tcp_uc_status(tcp_conn_t *, tcp_conn_status_t *);
[7a8c1c4e]52extern void tcp_uc_delete(tcp_conn_t *);
[779541b]53extern void tcp_uc_set_cb(tcp_conn_t *, tcp_cb_t *, void *);
[1d4b815]54extern void *tcp_uc_get_userptr(tcp_conn_t *);
[c5808b41]55
56/*
57 * Arriving segments
58 */
[2f19103]59extern void tcp_as_segment_arrived(inet_ep2_t *, tcp_segment_t *);
[c5808b41]60
61/*
62 * Timeouts
63 */
64extern void tcp_to_user(void);
65
66#endif
67
68/** @}
69 */
Note: See TracBrowser for help on using the repository browser.