ssd_ipc.h File Reference

Contains defines, structures, and function prototypes for managing connections to the ssd server. More...


Data Structures

struct  ssd_ipc_msg
 ssd IPC Message structure More...
struct  ssd_ipc_ft
 Function table handler for connections. More...

Defines

#define SSD_MAX_CLIENT   256
 Maximum number of simultaneous clients supported.
#define SSD_IPC_MAXARGS   10
 Maximum number of arguments that can be passed via ssd_ipc_msg structure.
#define SSD_SERVER_PORT   15100
 ssd server port number
#define SSD_WRITE_SUCCESS   0
 Successful IPC write.
#define SSD_WRITE_QUEUED_SUCCESS   1
 Write failed, but the request was successfully queued.

Functions

int ssd_get_routing_instance (void)
 Returns the internal routing instance ID for connecting to ssd.
in_addr * ssd_get_server_ip_addr (void)
 Returns the ssd server IP address.
int ssd_ipc_connect_rt_tbl (struct sockaddr_in *sock, struct ssd_ipc_ft *ft, int rt_tbl, evContext ev_ctx)
 Connects to the TCP server started by ssd on the socket address and to the routing table passed to the function.
void ssd_ipc_close (int fd)
 Closes an IPC connection on a particular socket descriptor.


Detailed Description

Contains defines, structures, and function prototypes for managing connections to the ssd server.


Function Documentation

int ssd_get_routing_instance void   ) 
 

Returns the internal routing instance ID for connecting to ssd.

Returns:
The internal routing instance ID

struct in_addr* ssd_get_server_ip_addr void   ) 
 

Returns the ssd server IP address.

Returns:
The following return codes are possible:
  • NULL for an error, with errno set to the error number.
  • A valid in_addr structure for the server IP address

void ssd_ipc_close int  fd  ) 
 

Closes an IPC connection on a particular socket descriptor.

Parameters:
[in] fd The socket descriptor

int ssd_ipc_connect_rt_tbl struct sockaddr_in *  sock,
struct ssd_ipc_ft ft,
int  rt_tbl,
evContext  ev_ctx
 

Connects to the TCP server started by ssd on the socket address and to the routing table passed to the function.

Parameters:
[in] sock A pointer to a sockaddr structure for the server to connect to. If passed NULL the API will internally derive the SSD server IP address
[in] ft A pointer to the callback function table
[in] rt_tbl The routing table instance to which the server will be bound
[in] ev_ctx An event context structure
Returns:
The following return codes are possible:
  • -1 An error, with errno set to the error number.
  • A socket desriptor (the connection was successful.)


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:24:08 2010 for libssd by Doxygen 1.4.5