5 #include <hilti/ast/builder/type.h> 6 #include <hilti/ast/operators/common.h> 7 #include <hilti/ast/types/integer.h> 8 #include <hilti/ast/types/network.h> 12 STANDARD_OPERATOR_2(network, Equal, type::Bool(), type::Network(), type::Network(),
"Compares two network values.")
13 STANDARD_OPERATOR_2(network, Unequal, type::Bool(), type::Network(), type::Network(), "Compares two network values.")
14 STANDARD_OPERATOR_2(network, In, type::Bool(), type::Address(), type::Network(),
15 "Returns true if the address is part of the network range.")
17 BEGIN_METHOD(network, Family)
18 const auto& signature()
const {
19 static auto _signature = Signature{.self = type::Network(),
20 .result = builder::typeByID(
"hilti::AddressFamily"),
24 Returns the protocol family of the network, which can be IPv4 or IPv6. 30 BEGIN_METHOD(network, Prefix)
31 const auto& signature()
const {
32 static auto _signature =
33 Signature{.self = type::Network(), .result = type::Address(), .id =
"prefix", .args = {}, .doc = R
"( 34 Returns the network's prefix as a masked IP address. 40 BEGIN_METHOD(network, Length)
41 const auto& signature()
const {
42 static auto _signature =
43 Signature{.self = type::Network(), .result = type::SignedInteger(64), .id =
"length", .args = {}, .doc = R
"( 44 Returns the length of the network's prefix. Definition: operator-registry.h:15