2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
// author: Max Kellermann <max.kellermann@gmail.com>
|
2017-08-11 08:41:58 +02:00
|
|
|
|
|
|
|
#include "IPv4Address.hxx"
|
|
|
|
|
2020-03-12 23:20:59 +01:00
|
|
|
#include <cassert>
|
2017-08-11 08:41:58 +02:00
|
|
|
|
2020-11-30 21:35:43 +01:00
|
|
|
IPv4Address::IPv4Address(SocketAddress src) noexcept
|
|
|
|
:address(src.CastTo<struct sockaddr_in>())
|
2017-08-11 08:41:58 +02:00
|
|
|
{
|
2020-11-30 21:35:43 +01:00
|
|
|
assert(!src.IsNull());
|
|
|
|
assert(src.GetFamily() == AF_INET);
|
2017-08-11 08:41:58 +02:00
|
|
|
}
|