xref: /openbmc/linux/include/net/af_rxrpc.h (revision e833251ad813168253fef9915aaf6a8c883337b0)
1651350d1SDavid Howells /* RxRPC kernel service interface definitions
217926a79SDavid Howells  *
3651350d1SDavid Howells  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
417926a79SDavid Howells  * Written by David Howells (dhowells@redhat.com)
517926a79SDavid Howells  *
617926a79SDavid Howells  * This program is free software; you can redistribute it and/or
717926a79SDavid Howells  * modify it under the terms of the GNU General Public License
817926a79SDavid Howells  * as published by the Free Software Foundation; either version
917926a79SDavid Howells  * 2 of the License, or (at your option) any later version.
1017926a79SDavid Howells  */
1117926a79SDavid Howells 
1217926a79SDavid Howells #ifndef _NET_RXRPC_H
1317926a79SDavid Howells #define _NET_RXRPC_H
1417926a79SDavid Howells 
1517926a79SDavid Howells #include <linux/rxrpc.h>
1617926a79SDavid Howells 
174de48af6SDavid Howells struct key;
184de48af6SDavid Howells struct sock;
194de48af6SDavid Howells struct socket;
20651350d1SDavid Howells struct rxrpc_call;
21651350d1SDavid Howells 
22d001648eSDavid Howells typedef void (*rxrpc_notify_rx_t)(struct sock *, struct rxrpc_call *,
23d001648eSDavid Howells 				  unsigned long);
24*e833251aSDavid Howells typedef void (*rxrpc_notify_end_tx_t)(struct sock *, struct rxrpc_call *,
25*e833251aSDavid Howells 				      unsigned long);
2600e90712SDavid Howells typedef void (*rxrpc_notify_new_call_t)(struct sock *, struct rxrpc_call *,
2700e90712SDavid Howells 					unsigned long);
2800e90712SDavid Howells typedef void (*rxrpc_discard_new_call_t)(struct rxrpc_call *, unsigned long);
2900e90712SDavid Howells typedef void (*rxrpc_user_attach_call_t)(struct rxrpc_call *, unsigned long);
30651350d1SDavid Howells 
31d001648eSDavid Howells void rxrpc_kernel_new_call_notification(struct socket *,
3200e90712SDavid Howells 					rxrpc_notify_new_call_t,
3300e90712SDavid Howells 					rxrpc_discard_new_call_t);
34cd2cf63aSJoe Perches struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *,
35651350d1SDavid Howells 					   struct sockaddr_rxrpc *,
36651350d1SDavid Howells 					   struct key *,
37651350d1SDavid Howells 					   unsigned long,
38e754eba6SDavid Howells 					   s64,
39d001648eSDavid Howells 					   gfp_t,
40d001648eSDavid Howells 					   rxrpc_notify_rx_t);
414de48af6SDavid Howells int rxrpc_kernel_send_data(struct socket *, struct rxrpc_call *,
42*e833251aSDavid Howells 			   struct msghdr *, size_t,
43*e833251aSDavid Howells 			   rxrpc_notify_end_tx_t);
44d001648eSDavid Howells int rxrpc_kernel_recv_data(struct socket *, struct rxrpc_call *,
45d001648eSDavid Howells 			   void *, size_t, size_t *, bool, u32 *);
4684a4c09cSDavid Howells bool rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *,
475a42976dSDavid Howells 			     u32, int, const char *);
484de48af6SDavid Howells void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *);
498324f0bcSDavid Howells void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *,
508324f0bcSDavid Howells 			   struct sockaddr_rxrpc *);
5100e90712SDavid Howells int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
5200e90712SDavid Howells 			       rxrpc_user_attach_call_t, unsigned long, gfp_t);
53e754eba6SDavid Howells void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
54651350d1SDavid Howells 
5517926a79SDavid Howells #endif /* _NET_RXRPC_H */
56