#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 | 
      
 
 
      
        
          | #define XPRT_PRIVATE_FLAG_DESTROYED   0x0001 | 
      
 
 
      
        
          | #define XPRT_PRIVATE_FLAG_LOCKED   0x0002 | 
      
 
 
      
        
          | #define XPRT_PRIVATE_FLAG_NONE   0x0000 | 
      
 
 
      
        
          | #define XPRT_PRIVATE_FLAG_REF   0x0004 | 
      
 
 
Typedef Documentation
Enumeration Type Documentation
Function Documentation
      
        
          | CLIENT* Clnt_create | ( | char * | host, | 
        
          |  |  | unsigned long | prog, | 
        
          |  |  | unsigned long | vers, | 
        
          |  |  | char * | proto | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | void Clnt_destroy | ( | CLIENT * | clnt | ) |  | 
      
 
 
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 * |  | ) |  | 
      
 
 
      
        
          | struct netconfig* getnetconfigent | ( | const char * | netid | ) |  [read] | 
      
 
 
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 | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | void socket_setoptions | ( | int | socketFd | ) |  | 
      
 
 
      
        
          | int sprint_sockaddr | ( | sockaddr_t * | addr, | 
        
          |  |  | char * | buf, | 
        
          |  |  | int | len | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | int sprint_sockip | ( | sockaddr_t * | addr, | 
        
          |  |  | char * | buf, | 
        
          |  |  | int | len | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | 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 | ) |  |