Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/svc.h>
#include <linux/lockd/lockd.h>
#include <linux/mutex.h>
#include <linux/sunrpc/svc_xprt.h>
#include <net/ipv6.h>
#include "netns.h"
Go to the source code of this file.
Data Structures | |
struct | nlm_lookup_host_info |
Macros | |
#define | NLMDBG_FACILITY NLMDBG_HOSTCACHE |
#define | NLM_HOST_NRHASH 32 |
#define | NLM_HOST_REBIND (60 * HZ) |
#define | NLM_HOST_EXPIRE (300 * HZ) |
#define | NLM_HOST_COLLECT (120 * HZ) |
#define | for_each_host(host, pos, chain, table) |
#define | for_each_host_safe(host, pos, next, chain, table) |
Functions | |
struct nlm_host * | nlmclnt_lookup_host (const struct sockaddr *sap, const size_t salen, const unsigned short protocol, const u32 version, const char *hostname, int noresvport, struct net *net) |
void | nlmclnt_release_host (struct nlm_host *host) |
struct nlm_host * | nlmsvc_lookup_host (const struct svc_rqst *rqstp, const char *hostname, const size_t hostname_len) |
void | nlmsvc_release_host (struct nlm_host *host) |
struct rpc_clnt * | nlm_bind_host (struct nlm_host *host) |
void | nlm_rebind_host (struct nlm_host *host) |
struct nlm_host * | nlm_get_host (struct nlm_host *host) |
void | nlm_host_rebooted (const struct nlm_reboot *info) |
void | nlm_shutdown_hosts_net (struct net *net) |
void | nlm_shutdown_hosts (void) |
#define NLMDBG_FACILITY NLMDBG_HOSTCACHE |
void nlm_host_rebooted | ( | const struct nlm_reboot * | info | ) |
|
read |
nlmsvc_lookup_host - Find an NLM host handle matching a remote client : incoming NLM request : name of client host : length of client hostname
Returns an nlm_host structure that matches the [client address, transport protocol, NLM version, client hostname] of the passed-in NLM request. If one doesn't already exist in the host cache, a new handle is created and returned.
Before possibly creating a new nlm_host, construct a sockaddr for a specific source address in case the local system has multiple network addresses. The family of the address in rq_daddr is guaranteed to be the same as the family of the address in rq_addr, so it's safe to use the same family for the source address.