David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 1 | /* RxRPC kernel service interface definitions |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 2 | * |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 4 | * 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 Howells | 4de48af | 2016-08-30 12:00:48 +0100 | [diff] [blame] | 17 | struct key; |
| 18 | struct sock; |
| 19 | struct socket; |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 20 | struct rxrpc_call; |
| 21 | |
David Howells | d001648 | 2016-08-30 20:42:14 +0100 | [diff] [blame^] | 22 | typedef void (*rxrpc_notify_rx_t)(struct sock *, struct rxrpc_call *, |
| 23 | unsigned long); |
| 24 | typedef void (*rxrpc_notify_new_call_t)(struct sock *); |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 25 | |
David Howells | d001648 | 2016-08-30 20:42:14 +0100 | [diff] [blame^] | 26 | void rxrpc_kernel_new_call_notification(struct socket *, |
| 27 | rxrpc_notify_new_call_t); |
Joe Perches | cd2cf63 | 2013-07-31 17:31:34 -0700 | [diff] [blame] | 28 | struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *, |
| 29 | struct sockaddr_rxrpc *, |
| 30 | struct key *, |
| 31 | unsigned long, |
David Howells | d001648 | 2016-08-30 20:42:14 +0100 | [diff] [blame^] | 32 | gfp_t, |
| 33 | rxrpc_notify_rx_t); |
David Howells | 4de48af | 2016-08-30 12:00:48 +0100 | [diff] [blame] | 34 | int rxrpc_kernel_send_data(struct socket *, struct rxrpc_call *, |
| 35 | struct msghdr *, size_t); |
David Howells | d001648 | 2016-08-30 20:42:14 +0100 | [diff] [blame^] | 36 | int rxrpc_kernel_recv_data(struct socket *, struct rxrpc_call *, |
| 37 | void *, size_t, size_t *, bool, u32 *); |
David Howells | 4de48af | 2016-08-30 12:00:48 +0100 | [diff] [blame] | 38 | void rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *, u32); |
| 39 | void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *); |
David Howells | d001648 | 2016-08-30 20:42:14 +0100 | [diff] [blame^] | 40 | struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *, unsigned long, |
| 41 | rxrpc_notify_rx_t); |
Joe Perches | cd2cf63 | 2013-07-31 17:31:34 -0700 | [diff] [blame] | 42 | int rxrpc_kernel_reject_call(struct socket *); |
David Howells | 8324f0b | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 43 | void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *, |
| 44 | struct sockaddr_rxrpc *); |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 45 | |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 46 | #endif /* _NET_RXRPC_H */ |