diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
commit | c44379cc7d9c7aa113989237ab0f56db12aa5219 (patch) | |
tree | 66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/apps/drwho/Multicast_Manager.h | |
parent | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff) | |
download | ATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz |
Repo restructuring
Diffstat (limited to 'ACE/apps/drwho/Multicast_Manager.h')
-rw-r--r-- | ACE/apps/drwho/Multicast_Manager.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/ACE/apps/drwho/Multicast_Manager.h b/ACE/apps/drwho/Multicast_Manager.h new file mode 100644 index 00000000000..ee21ac6ac08 --- /dev/null +++ b/ACE/apps/drwho/Multicast_Manager.h @@ -0,0 +1,58 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// drwho +// +// = FILENAME +// Multicast_Manager.h +// +// = AUTHOR +// Douglas C. Schmidt +// +// ============================================================================ + +#ifndef _MULTICAST_MANAGER_H +#define _MULTICAST_MANAGER_H + +#include "global.h" +#include "ace/os_include/netinet/os_in.h" +#include "ace/os_include/os_netdb.h" + +class Host_Elem +{ +public: + const char *host_name; + in_addr host_addr; + int checked_off; + Host_Elem *next; + + Host_Elem (const char *h_name, Host_Elem *n); +}; + +class Multicast_Manager +{ + // = TITLE + // This file handles all the operations upon host machines names + // and addresses. +public: + static void add_host (const char *host_name); + static void checkoff_host (in_addr host_addr); + static int get_next_host_addr (in_addr &host_addr); + static int outstanding_hosts_remain (void); + static int get_next_non_responding_host (const char *&host_name); + static int insert_hosts_from_file (const char *filename); + static void insert_default_hosts (void); + +private: + static hostent *get_host_entry (const char *host); + + static int received_host_count; + static const char *host_names[]; + static Host_Elem *drwho_list; + static Host_Elem *current_ptr; +}; + +#endif /* _MULTICAST_MANAGER_H */ |