Fast DDS  Version 3.1.2
Fast DDS
Loading...
Searching...
No Matches
NetworkInterfaceWithFilter.hpp
1// Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
19#ifndef FASTDDS_RTPS_TRANSPORT_NETWORK__NETWORKINTERFACEWITHFILTER_HPP
20#define FASTDDS_RTPS_TRANSPORT_NETWORK__NETWORKINTERFACEWITHFILTER_HPP
21
22#include <string>
23
24#include <fastdds/rtps/transport/network/NetmaskFilterKind.hpp>
25#include <fastdds/rtps/transport/network/NetworkInterface.hpp>
26#include <fastdds/fastdds_dll.hpp>
27
28namespace eprosima {
29namespace fastdds {
30namespace rtps {
31
39{
41 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
42 const std::string& name,
44
46 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
47 const std::string& name);
48
51 const std::string& device,
52 const std::string& ip,
55
57 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
58 const std::string& device,
59 const std::string& ip,
61
63 virtual FASTDDS_EXPORTED_API ~NetworkInterfaceWithFilter() = default;
64
66 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
67 const NetworkInterfaceWithFilter& iface) = default;
68
71 const NetworkInterfaceWithFilter& iface) = default;
72
74 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
75 NetworkInterfaceWithFilter&& iface) = default;
76
79 NetworkInterfaceWithFilter&& iface) = default;
80
82 FASTDDS_EXPORTED_API bool operator ==(
83 const NetworkInterfaceWithFilter& iface) const;
84
87};
88
89} // namespace rtps
90} // namespace fastdds
91} // namespace eprosima
92
93#endif // FASTDDS_RTPS_TRANSPORT_NETWORK__NETWORKINTERFACEWITHFILTER_HPP
A Locator with a mask that defines the number of significant bits of its address.
Definition LocatorWithMask.hpp:35
NetmaskFilterKind
Definition NetmaskFilterKind.hpp:31
eProsima namespace.
Structure encapsulating relevant network interface information.
Definition NetworkInterface.hpp:38
LocatorWithMask locator
IP address with network mask.
Definition NetworkInterface.hpp:80
std::string ip
IP address in string format (includes scope ID in the IPv6 case)
Definition NetworkInterface.hpp:78
std::string device
Interface device name.
Definition NetworkInterface.hpp:76
std::string name
Interface device name or IP address in string format (to be filled by the user)
Definition NetworkInterface.hpp:73
Structure extending NetworkInterface with netmask filter information.
Definition NetworkInterfaceWithFilter.hpp:39
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter & operator=(const NetworkInterfaceWithFilter &iface)=default
Copy assignment.
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(const std::string &name)
Constructor by name.
NetworkInterfaceWithFilter(const std::string &device, const std::string &ip, const LocatorWithMask &locator, NetmaskFilterKind netmask_filter)
Constructor by device name, IP address string, locator with mask and netmask filter.
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(NetworkInterfaceWithFilter &&iface)=default
Move constructor.
NetmaskFilterKind netmask_filter
Netmask filter configuration.
Definition NetworkInterfaceWithFilter.hpp:86
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(const std::string &name, NetmaskFilterKind netmask_filter)
Constructor by name and netmask filter.
virtual FASTDDS_EXPORTED_API ~NetworkInterfaceWithFilter()=default
Destructor.
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(const std::string &device, const std::string &ip, const LocatorWithMask &locator)
Constructor by device name, IP address string and locator with mask.
FASTDDS_EXPORTED_API bool operator==(const NetworkInterfaceWithFilter &iface) const
Comparison operator.
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(const NetworkInterfaceWithFilter &iface)=default
Copy constructor.