inet.cc (7811:a8fc35183c10) inet.cc (7814:c819526b7c2a)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 124 unchanged lines hidden (view full) ---

133 return left.ip() == right.ip();
134}
135
136ostream &
137operator<<(ostream &stream, const IpAddress &ia)
138{
139 uint32_t ip = ia.ip();
140 ccprintf(stream, "%x.%x.%x.%x",
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 124 unchanged lines hidden (view full) ---

133 return left.ip() == right.ip();
134}
135
136ostream &
137operator<<(ostream &stream, const IpAddress &ia)
138{
139 uint32_t ip = ia.ip();
140 ccprintf(stream, "%x.%x.%x.%x",
141 (uint8_t)(ip >> 0), (uint8_t)(ip >> 8),
142 (uint8_t)(ip >> 16), (uint8_t)(ip >> 24));
141 (uint8_t)(ip >> 24), (uint8_t)(ip >> 16),
142 (uint8_t)(ip >> 8), (uint8_t)(ip >> 0));
143 return stream;
144}
145
146string
147IpNetmask::string() const
148{
149 stringstream stream;
150 stream << *this;

--- 150 unchanged lines hidden ---
143 return stream;
144}
145
146string
147IpNetmask::string() const
148{
149 stringstream stream;
150 stream << *this;

--- 150 unchanged lines hidden ---