#ifndef SUNRPC_SVC_XPRT_H
#define SUNRPC_SVC_XPRT_H
#include <linux/sunrpc/svc.h>
struct module;
struct svc_xprt_ops { … };
struct svc_xprt_class { … };
struct svc_xpt_user { … };
struct svc_xprt { … };
enum { … };
static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
{ … }
static inline int register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
{ … }
static inline bool svc_xprt_is_dead(const struct svc_xprt *xprt)
{ … }
int svc_reg_xprt_class(struct svc_xprt_class *);
void svc_unreg_xprt_class(struct svc_xprt_class *);
void svc_xprt_init(struct net *, struct svc_xprt_class *, struct svc_xprt *,
struct svc_serv *);
int svc_xprt_create_from_sa(struct svc_serv *serv, const char *xprt_name,
struct net *net, struct sockaddr *sap,
int flags, const struct cred *cred);
int svc_xprt_create(struct svc_serv *serv, const char *xprt_name,
struct net *net, const int family,
const unsigned short port, int flags,
const struct cred *cred);
void svc_xprt_destroy_all(struct svc_serv *serv, struct net *net);
void svc_xprt_received(struct svc_xprt *xprt);
void svc_xprt_enqueue(struct svc_xprt *xprt);
void svc_xprt_put(struct svc_xprt *xprt);
void svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt);
void svc_xprt_close(struct svc_xprt *xprt);
int svc_port_is_privileged(struct sockaddr *sin);
int svc_print_xprts(char *buf, int maxlen);
struct svc_xprt *svc_find_listener(struct svc_serv *serv, const char *xcl_name,
struct net *net, const struct sockaddr *sa);
struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name,
struct net *net, const sa_family_t af,
const unsigned short port);
int svc_xprt_names(struct svc_serv *serv, char *buf, const int buflen);
void svc_add_new_perm_xprt(struct svc_serv *serv, struct svc_xprt *xprt);
void svc_age_temp_xprts_now(struct svc_serv *, struct sockaddr *);
void svc_xprt_deferred_close(struct svc_xprt *xprt);
static inline void svc_xprt_get(struct svc_xprt *xprt)
{ … }
static inline void svc_xprt_set_local(struct svc_xprt *xprt,
const struct sockaddr *sa,
const size_t salen)
{ … }
static inline void svc_xprt_set_remote(struct svc_xprt *xprt,
const struct sockaddr *sa,
const size_t salen)
{ … }
static inline unsigned short svc_addr_port(const struct sockaddr *sa)
{ … }
static inline size_t svc_addr_len(const struct sockaddr *sa)
{ … }
static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt)
{ … }
static inline unsigned short svc_xprt_remote_port(const struct svc_xprt *xprt)
{ … }
static inline char *__svc_print_addr(const struct sockaddr *addr,
char *buf, const size_t len)
{ … }
#endif