Make TSocketAddress use folly::IPAddress
authorDave Watson <davejwatson@fb.com>
Wed, 3 Sep 2014 21:41:47 +0000 (14:41 -0700)
committerDave Watson <davejwatson@fb.com>
Mon, 15 Sep 2014 21:30:13 +0000 (14:30 -0700)
commit07286cf094a743a4db0b7cc68f7daf0337064d37
tree49e40226f2c32c3fa653973469878ed6eafd670a
parent73ebd0fd0839b3df0ff4160fe11fa93dc443bfe3
Make TSocketAddress use folly::IPAddress

Summary:
Step 1 of moving TAsyncSocket and friends to folly.

folly::IPAddress changes (can split these off if requested):
* isLoopback looks for a single address, as opposed to subnet
* For V6, isPrivate & isLoopback don't seem to check mapped addresses

TSocketAddress changes:
* Make union use folly::IPAddress instead of sockaddr struct.  external_ bool to tell if using AF_UNIX instead.
* manage the port and scope/zone info ourselves

@override-unit-failures

Overriding failures, can't get contbuild to finish all builds after several tries.  None of the failures look related

Test Plan:
fbconfig -r thrift
fbmake runtests
fbconfig folly/test:network_address_test
fbmake runtests

Reviewed By: simpkins@fb.com

Subscribers: snaptu-diffs@, trunkagent, hphp-diffs@, njormrod, fbcode-common-diffs@, doug, ruibalp, ps, alandau, bmatheny

FB internal diff: D1479365

Tasks: 3658665
folly/IPAddressV4.cpp
folly/IPAddressV4.h
folly/IPAddressV6.cpp
folly/Makefile.am
folly/test/IPAddressTest.cpp