shill: connection: Choose reasonable default Broadcast Address
Calculate the correct default broadcast address since the kernel
will not do so for us.
BUG=chromium-os:23930
TEST=New unit tests -- manual testing by setting a manual IP address
and prefix length only and attaching to a network without a DHCP server.
Change-Id: Ibfb7f942a100cdc2c33a7da915f7bfa5f27ef24e
Reviewed-on: https://gerrit.chromium.org/gerrit/21507
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/byte_string.h b/byte_string.h
index 840fc7d..a1b76d4 100644
--- a/byte_string.h
+++ b/byte_string.h
@@ -56,8 +56,17 @@
// Perform an AND operation between each element of |this| with the
// corresponding byte of |b|. Returns true if both |this| and |b|
// are the same length, and as such the operation succeeds; false
- // if they are not.
- bool ApplyMask(const ByteString &b);
+ // if they are not. The result of the operation is stored in |this|.
+ bool BitwiseAnd(const ByteString &b);
+
+ // Perform an OR operation between each element of |this| with the
+ // corresponding byte of |b|. Returns true if both |this| and |b|
+ // are the same length, and as such the operation succeeds; false
+ // if they are not. The result of the operation is stored in |this|.
+ bool BitwiseOr(const ByteString &b);
+
+ // Perform an inversion operation on each of the bits this string.
+ void BitwiseInvert();
bool Equals(const ByteString &b) const;
void Append(const ByteString &b);