monitube-mgmt_conn.h File Reference

Relating to managing the connections. More...

Go to the source code of this file.

Functions

status_t init_server (evContext ctx)
void close_connections (void)
void mspic_offline (const char *name)
void notify_monitor_update (const char *mon_name, uint32_t rate)
void notify_address_update (const char *mon_name, in_addr_t address, in_addr_t mask)
void notify_mirror_update (in_addr_t mirror_from, in_addr_t mirror_to)
void notify_monitor_delete (const char *mon_name)
void notify_address_delete (const char *mon_name, in_addr_t address, in_addr_t mask)
void notify_mirror_delete (in_addr_t mirror_from)
void notify_delete_all_monitors (void)
void notify_delete_all_mirrors (void)
void notify_replication_interval (uint8_t r_int)
void process_notifications (void)
void set_master_address (in_addr_t addr)


Detailed Description

Relating to managing the connections.

These functions and types will manage the connections.

Definition in file monitube-mgmt_conn.h.


Function Documentation

void close_connections ( void   ) 

Close existing connections and shutdown server

Definition at line 373 of file monitube-mgmt_conn.c.

References mgmt_server, MONITUBE_PORT_NUM, and session_s::session.

Referenced by monitube_init(), and monitube_shutdown().

status_t init_server ( evContext  ctx  ) 

Initialize the server socket connection

Parameters:
[in] ctx Newly created event context
Returns:
SUCCESS if successful; otherwise EFAIL with an error message.

Definition at line 340 of file monitube-mgmt_conn.c.

References LOG, m_ctx, mgmt_server, MONITUBE_MGMT_SERVER_MAX_CONN, MONITUBE_PORT_NUM, receive_connection(), and receive_message().

Referenced by monitube_init().

void mspic_offline ( const char *  name  ) 

Notification about an MS-PIC interface going down

Parameters:
[in] name name of interface that has gone down

Definition at line 406 of file monitube-mgmt_conn.c.

References session_s::session.

Referenced by ifd_down_async_handler().

void notify_address_delete ( const char *  mon_name,
in_addr_t  address,
in_addr_t  mask 
)

Enqueue a message to go to the data component about an address delete

Parameters:
[in] mon_name Monitor's name
[in] address Address in the monitor
[in] mask Address mask

Definition at line 602 of file monitube-mgmt_conn.c.

References maddr_info_s::addr, maddr_info_s::mask, maddr_info_s::mon_name, maddr_info_s::mon_name_len, MSG_DELETE_MON_ADDR, and notification_msg_t.

Referenced by delete_address().

void notify_address_update ( const char *  mon_name,
in_addr_t  address,
in_addr_t  mask 
)

Enqueue a message to go to the data component about an address update

Parameters:
[in] mon_name Monitor's name
[in] address Address in the monitor
[in] mask Address mask

Definition at line 489 of file monitube-mgmt_conn.c.

References maddr_info_s::addr, maddr_info_s::mask, maddr_info_s::mon_name, maddr_info_s::mon_name_len, MSG_CONF_MON_ADDR, and notification_msg_t.

Referenced by receive_connection(), and update_address().

void notify_delete_all_mirrors ( void   ) 

Enqueue a message to go to the data component to delete all mirrors

Definition at line 691 of file monitube-mgmt_conn.c.

References MSG_DELETE_ALL_MIR, and notification_msg_t.

Referenced by delete_all_mirrors().

void notify_delete_all_monitors ( void   ) 

Enqueue a message to go to the data component to delete all monitors

Definition at line 668 of file monitube-mgmt_conn.c.

References MSG_DELETE_ALL_MON, and notification_msg_t.

Referenced by delete_all_monitors().

void notify_mirror_delete ( in_addr_t  mirror_from  ) 

Enqueue a message to go to the data component about an mirror delete

Parameters:
[in] mirror_from Mirror from address

Definition at line 638 of file monitube-mgmt_conn.c.

References del_mir_info_s::mirror_from, MSG_DELETE_MIR, and notification_msg_t.

Referenced by delete_mirror().

void notify_mirror_update ( in_addr_t  mirror_from,
in_addr_t  mirror_to 
)

Enqueue a message to go to the data component about a mirror update

Parameters:
[in] mirror_from Mirror from address
[in] mirror_to Mirror to address

Definition at line 528 of file monitube-mgmt_conn.c.

References update_mir_info_s::mirror_from, update_mir_info_s::mirror_to, MSG_CONF_MIR, and notification_msg_t.

Referenced by receive_connection(), and update_mirror().

void notify_monitor_delete ( const char *  mon_name  ) 

Enqueue a message to go to the data component about a monitor delete

Parameters:
[in] mon_name Monitor's name

Definition at line 562 of file monitube-mgmt_conn.c.

References del_mon_info_s::mon_name, del_mon_info_s::mon_name_len, MSG_DELETE_MON, and notification_msg_t.

Referenced by delete_all_addresses(), and delete_monitor().

void notify_monitor_update ( const char *  mon_name,
uint32_t  rate 
)

Enqueue a message to go to the data component about a monitor update

Parameters:
[in] mon_name Monitor's name
[in] rate Configuration group bps rate

Definition at line 448 of file monitube-mgmt_conn.c.

References update_mon_info_s::mon_name, update_mon_info_s::mon_name_len, MSG_CONF_MON, notification_msg_t, and update_mon_info_s::rate.

Referenced by receive_connection(), and update_monitor().

void notify_replication_interval ( uint8_t  r_int  ) 

Enqueue a message to go to the data component to set the replication interval

Parameters:
[in] r_int New replication interval

Definition at line 717 of file monitube-mgmt_conn.c.

References replication_info_s::interval, MSG_REP_INFO, and notification_msg_t.

Referenced by monitube_config_read(), and receive_connection().

void process_notifications ( void   ) 

Go through the buffered messages and send them to the data component if it's connected.

Definition at line 748 of file monitube-mgmt_conn.c.

References LOG, notification_msg_t, and session_s::session.

Referenced by monitube_config_read().

void set_master_address ( in_addr_t  addr  ) 

Switch to this new master PIC for the data component

Parameters:
[in] addr The IRI2 interface address of the new master PIC


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:03 2010 for SDK Your Net Corporation Monitube IPTV Monitoring Example: monitube-mgmt 1.0 by Doxygen 1.5.1