ipsnooper_server.c File Reference

IP Snooper server functions. More...

#include "ipsnooper.h"

Functions

void session_thread_exit (ssn_thrd_t *thrd)
void server_close (void)
int server_init (evContext ctx)

Variables

ssn_thrd_t ssn_thrd [MSP_MAX_CPUS]


Detailed Description

IP Snooper server functions.

These functions manage client connection and communication. The main server process is scheduled to run any available control CPU. After a client connection setup, server process will find out which control CPU was assigned to handle the flow for this client.

If there is already a session thread running on that control CPU, the server process will send the new session info to that thread by the pipe.

Otherwise, the server process creates a session thread and binds it to that control CPU. A pipe between the server process and the session thread will be created too.

The session thread has its own event context and listens to the pipe and all session sockets. Once it receives a request from a client, it will process and reply it.

When the session is closed by client, the session thread will remove it from its listen list and notify server process to clean it up. The session thread will stay once it was created, even all sessions are closed.


Function Documentation

void server_close ( void   ) 

Close the server only.

int server_init ( evContext  ctx  ) 

Initialize the server

Parameters:
[in] ctx Event context
Returns:
0 on success, -1 on failure

void session_thread_exit ( ssn_thrd_t thrd  ) 

Session thread exit.

Parameters:
[in] thrd Pointer to the session thread data


Variable Documentation

ssn_thrd_t ssn_thrd[MSP_MAX_CPUS]

session thread data structures


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:27:00 2010 for SDK Your Net Corporation IP Snooper 1.0 by Doxygen 1.5.1