blob: 1061a472a3e35b88a7df587fdeefcdb310c793bc [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);
David Howells00e90712016-09-08 11:10:12 +010024typedef void (*rxrpc_notify_new_call_t)(struct sock *, struct rxrpc_call *,
25 unsigned long);
26typedef void (*rxrpc_discard_new_call_t)(struct rxrpc_call *, unsigned long);
27typedef void (*rxrpc_user_attach_call_t)(struct rxrpc_call *, unsigned long);
David Howells651350d2007-04-26 15:50:17 -070028
David Howellsd0016482016-08-30 20:42:14 +010029void rxrpc_kernel_new_call_notification(struct socket *,
David Howells00e90712016-09-08 11:10:12 +010030 rxrpc_notify_new_call_t,
31 rxrpc_discard_new_call_t);
Joe Perchescd2cf632013-07-31 17:31:34 -070032struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *,
33 struct sockaddr_rxrpc *,
34 struct key *,
35 unsigned long,
David Howellsd0016482016-08-30 20:42:14 +010036 gfp_t,
37 rxrpc_notify_rx_t);
David Howells4de48af2016-08-30 12:00:48 +010038int rxrpc_kernel_send_data(struct socket *, struct rxrpc_call *,
39 struct msghdr *, size_t);
David Howellsd0016482016-08-30 20:42:14 +010040int rxrpc_kernel_recv_data(struct socket *, struct rxrpc_call *,
41 void *, size_t, size_t *, bool, u32 *);
David Howells5a429762016-09-06 22:19:51 +010042void rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *,
43 u32, int, const char *);
David Howells4de48af2016-08-30 12:00:48 +010044void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *);
David Howells8324f0b2016-08-30 09:49:29 +010045void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *,
46 struct sockaddr_rxrpc *);
David Howells00e90712016-09-08 11:10:12 +010047int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
48 rxrpc_user_attach_call_t, unsigned long, gfp_t);
David Howells651350d2007-04-26 15:50:17 -070049
David Howells17926a72007-04-26 15:48:28 -070050#endif /* _NET_RXRPC_H */