├── COPYING ├── LICENSE_1_0.txt ├── README.md ├── bin └── .gitignore ├── doc ├── Jamfile.v2 ├── addstyle.pl ├── classes │ ├── hash.qbk │ ├── ip__address.qbk │ ├── ip__address_v4.qbk │ ├── ip__address_v6.qbk │ └── ip__bad_address_cast.qbk ├── definitions.qbk ├── error_reporting.qbk ├── functions │ ├── ip__address_cast.qbk │ └── literals.qbk ├── headers │ └── network.qbk └── proposal.qbk ├── include ├── network └── std │ └── net │ ├── detail │ ├── config.hpp │ ├── impl │ │ ├── socket_ops.ipp │ │ ├── system_errors.ipp │ │ ├── throw_error.ipp │ │ └── winsock_init.ipp │ ├── local_free_on_block_exit.hpp │ ├── old_win_sdk_compat.hpp │ ├── pop_options.hpp │ ├── push_options.hpp │ ├── socket_ops.hpp │ ├── socket_types.hpp │ ├── system_errors.hpp │ ├── throw_error.hpp │ ├── throw_exception.hpp │ └── winsock_init.hpp │ ├── ip │ ├── address.hpp │ ├── address_cast.hpp │ ├── address_v4.hpp │ ├── address_v6.hpp │ ├── bad_address_cast.hpp │ ├── fwd.hpp │ └── impl │ │ ├── address.hpp │ │ ├── address.ipp │ │ ├── address_v4.hpp │ │ ├── address_v4.ipp │ │ ├── address_v6.hpp │ │ └── address_v6.ipp │ └── literals.hpp ├── project-root.jam └── tests ├── .gitignore ├── Makefile ├── ip ├── address.cpp ├── address.dSYM │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── address ├── address_v4.cpp └── address_v6.cpp ├── network.cpp └── unit_test.hpp /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com) 2 | 3 | Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | -------------------------------------------------------------------------------- /LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | IP Address Proposal 2 | =================== 3 | 4 | Proposed IP addresses classes for the standard C++ library. 5 | 6 | What's Included 7 | --------------- 8 | 9 | * `./doc` - Proposed text using Boost.Quickbook format. 10 | * `./include` - Reference implementation. 11 | * `./tests` - Unit tests for reference implementation. 12 | 13 | Tested Platforms 14 | ---------------- 15 | 16 | * Mac OS 10.8 using g++ 4.7 (requires `-std=c++11`) 17 | * Mac OS 10.8 using clang++ from Xcode 4.6 (requires `-std=c++11` and `-stdlib=libc++`) 18 | * Linux (CentOS 6.2) using g++ 4.7 (requires `-std=c++11`) 19 | * Windows 7 32-bit using Visual Studio 2010 20 | * Windows 7 x64 using Visual Studio 2010 21 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /doc/Jamfile.v2: -------------------------------------------------------------------------------- 1 | project asio-tr2-doc 2 | : build-dir ../bin 3 | ; 4 | 5 | using quickbook ; 6 | 7 | boostbook proposal 8 | : 9 | proposal.qbk 10 | : 11 | toc.section.depth=6 12 | section.autolabel=1 13 | toc.max.depth=6 14 | onehtml 15 | ; 16 | 17 | # install html : design/membar.png ; 18 | -------------------------------------------------------------------------------- /doc/addstyle.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | 5 | if (@ARGV != 1) 6 | { 7 | print "Usage: addstyle \n"; 8 | exit; 9 | } 10 | 11 | my $style = 12 | ""; 19 | 20 | my $rev = `git rev-parse HEAD`; 21 | chomp($rev); 22 | my $draft_info = " (as of commit $rev)"; 23 | 24 | my $docno = 25 | "
" .
26 | "Doc. no:  D4044 " . $draft_info . "\n" .
27 | "Date:     2014-05-24\n" .
28 | "Revises:  N3603\n" .
29 | "Reply-To: Christopher Kohlhoff <chris\@kohlhoff.com>\n" .
30 | "
\n"; 31 | 32 | my @lines = (); 33 | my $saw_h4 = 0; 34 | 35 | my $filename = ${ARGV}[0]; 36 | open my $file_in, "<$filename" or die "Can't open $filename"; 37 | while (my $line = <$file_in>) 38 | { 39 | $line =~ s~\~\$style~; 40 | $line =~ s~\~\$docno~; 41 | $line =~ s/\240/ /g; 42 | if ($line =~ /

/) 43 | { 44 | $line =~ s/

/

/; 45 | $saw_h4 = 1; 46 | } 47 | if ($saw_h4 and $line =~ /<\/h4>/) 48 | { 49 | $line =~ s/<\/h4>/<\/p>/; 50 | $saw_h4 = 0; 51 | } 52 | if ($line =~ /