First commit of release 0.1
[sockstream.git] / include / host.h
1 /**************************************************************************
2 **  (c) Copyright 2012, Andromeda Technology & Automation
3 ***************************************************************************
4 ** MODULE INFORMATION *
5 ***********************
6 **      FILE NAME      : host.h
7 **      SYSTEM NAME    : Network and socket classes
8 **      VERSION NUMBER : 0.1
9 **
10 **  DESCRIPTION      :  Host class definition
11 **
12 **  EXPORTED OBJECTS : class Host
13 **  LOCAL    OBJECTS : 
14 **  MODULES  USED    :
15 ***************************************************************************
16 **  ADMINISTRATIVE INFORMATION *
17 ********************************
18 **      ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
19 **      CREATION DATE   : Mar 02, 2012
20 **      LAST UPDATE     : Mar 05, 2012
21 **      MODIFICATIONS   : 
22 **************************************************************************/
23
24 #include <list>
25 #include "inetaddress.h"
26
27 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
28 **  NAME           : Host - A class to find hosts and addresses
29 **  MEMBERS        : name      : The name of the host (FQDN).
30 **                   addresses : The IP addresses on which the host can be reached.
31 **  OPERATORS      : None
32 **  METHODS        : FindAddress() : Find all network addresses.
33 **                   FindName()    : Find the name if the address in known.
34 **
35 **  DESCRIPTION    : 
36 **
37 **
38 **  RELATIONS      : 
39 **  SEE ALSO       : getaddrinfo(3), getnameinfo()
40 **  LAST MODIFIED  : Mar 05, 2012
41 **+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
42 */
43
44 class Host
45 {
46    String name;
47    std::list<InternetAddress> addresses;
48
49 public:
50
51    Host(String hostname)
52    {
53       name = hostname;
54    }
55
56    String FindName();
57    std::list<InternetAddress> FindAddress();
58
59 };