blob: b4b6a3664ddac21118b5bb587e7579033e0cd9b5 [file] [log] [blame]
David Howells651350d2007-04-26 15:50:17 -07001/* RxRPC kernel service interface definitions
David Howells17926a72007-04-26 15:48:28 -07002 *
David Howells651350d2007-04-26 15:50:17 -07003 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
David Howells17926a72007-04-26 15:48:28 -07004 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#ifndef _NET_RXRPC_H
13#define _NET_RXRPC_H
14
15#include <linux/rxrpc.h>
16
David Howells4de48af2016-08-30 12:00:48 +010017struct key;
18struct sock;
19struct socket;
David Howells651350d2007-04-26 15:50:17 -070020struct rxrpc_call;
21
David Howellsd0016482016-08-30 20:42:14 +010022typedef void (*rxrpc_notify_rx_t)(struct sock *, struct rxrpc_call *,
23 unsigned long);
24typedef void (*rxrpc_notify_new_call_t)(struct sock *);
David Howells651350d2007-04-26 15:50:17 -070025
David Howellsd0016482016-08-30 20:42:14 +010026void rxrpc_kernel_new_call_notification(struct socket *,
27 rxrpc_notify_new_call_t);
Joe Perchescd2cf632013-07-31 17:31:34 -070028struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *,
29 struct sockaddr_rxrpc *,
30 struct key *,
31 unsigned long,
David Howellsd0016482016-08-30 20:42:14 +010032 gfp_t,
33 rxrpc_notify_rx_t);
David Howells4de48af2016-08-30 12:00:48 +010034int rxrpc_kernel_send_data(struct socket *, struct rxrpc_call *,
35 struct msghdr *, size_t);
David Howellsd0016482016-08-30 20:42:14 +010036int rxrpc_kernel_recv_data(struct socket *, struct rxrpc_call *,
37 void *, size_t, size_t *, bool, u32 *);
David Howells4de48af2016-08-30 12:00:48 +010038void rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *, u32);
39void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *);
David Howellsd0016482016-08-30 20:42:14 +010040struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *, unsigned long,
41 rxrpc_notify_rx_t);
Joe Perchescd2cf632013-07-31 17:31:34 -070042int rxrpc_kernel_reject_call(struct socket *);
David Howells8324f0b2016-08-30 09:49:29 +010043void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *,
44 struct sockaddr_rxrpc *);
David Howells651350d2007-04-26 15:50:17 -070045
David Howells17926a72007-04-26 15:48:28 -070046#endif /* _NET_RXRPC_H */