nfs-ganesha 1.4
Classes | Defines | Typedefs | Enumerations | Functions

ganesha_rpc.h File Reference

#include <rpc/xdr_inline.h>
#include <rpc/rpc.h>
#include <rpc/svc.h>
#include <rpc/svc_dg.h>
#include <rpc/clnt.h>
#include <rpc/svc_rqst.h>
#include <rpc/svc_dplx.h>
#include "HashTable.h"

Go to the source code of this file.

Classes

struct  gsh_xprt_private

Defines

#define SOCK_NAME_MAX   128
#define XPRT_PRIVATE_FLAG_NONE   0x0000
#define XPRT_PRIVATE_FLAG_DESTROYED   0x0001
#define XPRT_PRIVATE_FLAG_LOCKED   0x0002
#define XPRT_PRIVATE_FLAG_REF   0x0004

Typedefs

typedef struct sockaddr_storage sockaddr_t
typedef struct gsh_xprt_private gsh_xprt_private_t
typedef enum _ignore_port ignore_port_t

Enumerations

enum  _ignore_port { IGNORE_PORT, CHECK_PORT }

Functions

void socket_setoptions (int socketFd)
void Svc_dg_soft_destroy (SVCXPRT *xport)
struct netconfig * getnetconfigent (const char *netid)
void freenetconfigent (struct netconfig *)
SVCXPRT * Svc_vc_create (int, u_int, u_int)
SVCXPRT * Svc_dg_create (int, u_int, u_int)
int copy_xprt_addr (sockaddr_t *addr, SVCXPRT *xprt)
int sprint_sockaddr (sockaddr_t *addr, char *buf, int len)
int sprint_sockip (sockaddr_t *addr, char *buf, int len)
SVCXPRT * Svcxprt_copy (SVCXPRT *xprt_copy, SVCXPRT *xprt_orig)
SVCXPRT * Svcxprt_copycreate ()
const char * xprt_type_to_str (xprt_type_t type)
int cmp_sockaddr (sockaddr_t *addr_1, sockaddr_t *addr_2, ignore_port_t ignore_port)
unsigned long hash_sockaddr (sockaddr_t *addr, ignore_port_t ignore_port)
in_addr_t get_in_addr (sockaddr_t *addr)
int get_port (sockaddr_t *addr)
int ipstring_to_sockaddr (const char *str, sockaddr_t *addr)
CLIENT * Clnt_create (char *host, unsigned long prog, unsigned long vers, char *proto)
void Clnt_destroy (CLIENT *clnt)

Define Documentation

#define SOCK_NAME_MAX   128

Definition at line 31 of file ganesha_rpc.h.

#define XPRT_PRIVATE_FLAG_DESTROYED   0x0001

Definition at line 99 of file ganesha_rpc.h.

#define XPRT_PRIVATE_FLAG_LOCKED   0x0002

Definition at line 100 of file ganesha_rpc.h.

#define XPRT_PRIVATE_FLAG_NONE   0x0000

Definition at line 98 of file ganesha_rpc.h.

#define XPRT_PRIVATE_FLAG_REF   0x0004

Definition at line 101 of file ganesha_rpc.h.


Typedef Documentation

typedef struct sockaddr_storage sockaddr_t

Definition at line 29 of file ganesha_rpc.h.


Enumeration Type Documentation

Enumerator:
IGNORE_PORT 
CHECK_PORT 

Definition at line 186 of file ganesha_rpc.h.


Function Documentation

CLIENT* Clnt_create ( char *  host,
unsigned long  prog,
unsigned long  vers,
char *  proto 
)

Definition at line 459 of file rpc_tools.c.

void Clnt_destroy ( CLIENT *  clnt)

Definition at line 476 of file rpc_tools.c.

int cmp_sockaddr ( sockaddr_t addr_1,
sockaddr_t addr_2,
ignore_port_t  ignore_port 
)

cmp_sockaddr: compare 2 sockaddrs, including ports

Parameters:
addr_1[IN] first address
addr_2[IN] second address
ignore_port[IN] 1 if you want to ignore port comparison, 0 if you need port comparisons
Returns:
1 if addresses match, 0 if they don't

Definition at line 305 of file rpc_tools.c.

int copy_xprt_addr ( sockaddr_t addr,
SVCXPRT *  xprt 
)

copy_xprt_addr: copies and transport address into an address field.

copies and transport address into an address field.

Parameters:
addr[OUT] address field to fill in.
xprt[IN] transport to get address from.
Returns:
1 if ok, 0 if failure.

Definition at line 137 of file rpc_tools.c.

void freenetconfigent ( struct netconfig *  )
in_addr_t get_in_addr ( sockaddr_t addr)

Definition at line 349 of file rpc_tools.c.

int get_port ( sockaddr_t addr)

Definition at line 361 of file rpc_tools.c.

struct netconfig* getnetconfigent ( const char *  netid) [read]
unsigned long hash_sockaddr ( sockaddr_t addr,
ignore_port_t  ignore_port 
)

hash_sockaddr: create a hash value based on the sockaddr_t structure

This creates a native pointer size (unsigned long int) hash value from the sockaddr_t structure. It supports both IPv4 and IPv6, other types can be added in time.

Parameters:
addr[IN] sockaddr_t address to hash
xprt[IN] transport to get address from.
Returns:
hash value

Definition at line 170 of file rpc_tools.c.

int ipstring_to_sockaddr ( const char *  str,
sockaddr_t addr 
)

Definition at line 404 of file rpc_tools.c.

void socket_setoptions ( int  socketFd)

Definition at line 378 of file rpc_tools.c.

int sprint_sockaddr ( sockaddr_t addr,
char *  buf,
int  len 
)

Definition at line 218 of file rpc_tools.c.

int sprint_sockip ( sockaddr_t addr,
char *  buf,
int  len 
)

Definition at line 262 of file rpc_tools.c.

SVCXPRT* Svc_dg_create ( int  ,
u_int  ,
u_int   
)
void Svc_dg_soft_destroy ( SVCXPRT *  xport)
SVCXPRT* Svc_vc_create ( int  ,
u_int  ,
u_int   
)
SVCXPRT* Svcxprt_copy ( SVCXPRT *  xprt_copy,
SVCXPRT *  xprt_orig 
)
SVCXPRT* Svcxprt_copycreate ( )
const char* xprt_type_to_str ( xprt_type_t  type)

Definition at line 111 of file rpc_tools.c.