0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _NET_RXRPC_H
0009 #define _NET_RXRPC_H
0010
0011 #include <linux/rxrpc.h>
0012 #include <linux/ktime.h>
0013
0014 struct key;
0015 struct sock;
0016 struct socket;
0017 struct rxrpc_call;
0018
0019 enum rxrpc_interruptibility {
0020 RXRPC_INTERRUPTIBLE,
0021 RXRPC_PREINTERRUPTIBLE,
0022 RXRPC_UNINTERRUPTIBLE,
0023 };
0024
0025
0026
0027
0028 extern atomic_t rxrpc_debug_id;
0029
0030 typedef void (*rxrpc_notify_rx_t)(struct sock *, struct rxrpc_call *,
0031 unsigned long);
0032 typedef void (*rxrpc_notify_end_tx_t)(struct sock *, struct rxrpc_call *,
0033 unsigned long);
0034 typedef void (*rxrpc_notify_new_call_t)(struct sock *, struct rxrpc_call *,
0035 unsigned long);
0036 typedef void (*rxrpc_discard_new_call_t)(struct rxrpc_call *, unsigned long);
0037 typedef void (*rxrpc_user_attach_call_t)(struct rxrpc_call *, unsigned long);
0038
0039 void rxrpc_kernel_new_call_notification(struct socket *,
0040 rxrpc_notify_new_call_t,
0041 rxrpc_discard_new_call_t);
0042 struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *,
0043 struct sockaddr_rxrpc *,
0044 struct key *,
0045 unsigned long,
0046 s64,
0047 gfp_t,
0048 rxrpc_notify_rx_t,
0049 bool,
0050 enum rxrpc_interruptibility,
0051 unsigned int);
0052 int rxrpc_kernel_send_data(struct socket *, struct rxrpc_call *,
0053 struct msghdr *, size_t,
0054 rxrpc_notify_end_tx_t);
0055 int rxrpc_kernel_recv_data(struct socket *, struct rxrpc_call *,
0056 struct iov_iter *, size_t *, bool, u32 *, u16 *);
0057 bool rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *,
0058 u32, int, const char *);
0059 void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *);
0060 void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *,
0061 struct sockaddr_rxrpc *);
0062 bool rxrpc_kernel_get_srtt(struct socket *, struct rxrpc_call *, u32 *);
0063 int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
0064 rxrpc_user_attach_call_t, unsigned long, gfp_t,
0065 unsigned int);
0066 void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
0067 bool rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *);
0068 u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *);
0069 bool rxrpc_kernel_call_is_complete(struct rxrpc_call *);
0070 void rxrpc_kernel_set_max_life(struct socket *, struct rxrpc_call *,
0071 unsigned long);
0072
0073 int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val);
0074
0075 #endif