libBsdSockets
C++ Wrapper classes to the BSD Socket API
AddressInfo.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (c) 2013, Komodo Does Inc
4 All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
7 
8 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
9 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10 Neither the name of the Komodo Does Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 
13 */
14 
15 #ifndef ADDRESS_INFO_H
16 #define ADDRESS_INFO_H
17 
18 /**
19  * BSD Sockets Package.
20  */
21 namespace BsdSockets {
22 
23  /** The low-level domain of a socket or address.
24  *
25  * This provides detail to the low-level implementation.
26  */
27  enum class SocketDomain {
28  /** Traditional internet address for TCP, UDP, etc. */
29  INET4,
30 
31  /** IPv6 internet address TCP, UDP, etc. */
32  INET6,
33 
34  /** Local/Unix/Pipe socket address */
35  LOCAL,
36 
37  /** Internal Routing Protocol */
38  ROUTE,
39 
40  /** Internal Key Management */
41  KEY,
42 
43  /** Kernel Event Messages */
44 // SYSTEM,
45 
46  /** Raw Protocol Interface */
47 // RAW
48  };
49 
50  /** The low-level type of the socket.
51  *
52  * This provides detail to the low-level implementation.
53  */
54  enum class SocketType {
55  /** Stream of messages */
56  STREAM,
57 
58  /** Datagram socket */
59  DATAGRAM,
60 
61  /** Raw protocol interface */
63 
64  /** Reliably-delivered message */
66 
67  /** Sequenced packet stream */
69  };
70 
71 }
72 
73 #endif // ADDRESS_INFO_H
Namespace of the BsdSockets library.
Definition: Address.cpp:20