| Fast DDS Version 3.3.0 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
18
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
28 namespace eprosima {
29 namespace fastdds {
30 namespace rtps {
31
38 struct NetworkInterfaceWithFilter : public NetworkInterface
39{
41 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
42 const std::string& name,
43 NetmaskFilterKind netmask_filter);
44
46 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
47 const std::string& name);
48
50 NetworkInterfaceWithFilter(
51 const std::string& device,
52 const std::string& ip,
53 const LocatorWithMask& locator,
54 NetmaskFilterKind netmask_filter);
55
57 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
58 const std::string& device,
59 const std::string& ip,
60 const LocatorWithMask& locator);
61
63 virtual FASTDDS_EXPORTED_API ~NetworkInterfaceWithFilter() = default;
64
66 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
67 const NetworkInterfaceWithFilter& iface) = default;
68
70 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter& operator =(
71 const NetworkInterfaceWithFilter& iface) = default;
72
74 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(
75 NetworkInterfaceWithFilter&& iface) = default;
76
78 FASTDDS_EXPORTED_API NetworkInterfaceWithFilter& operator =(
79 NetworkInterfaceWithFilter&& iface) = default;
80
82 FASTDDS_EXPORTED_API bool operator ==(
83 const NetworkInterfaceWithFilter& iface) const;
84
86 NetmaskFilterKind netmask_filter;
87};
88
89} // namespace rtps
90} // namespace fastdds
91} // namespace eprosima
92
93#endif // FASTDDS_RTPS_TRANSPORT_NETWORK__NETWORKINTERFACEWITHFILTER_HPP
eprosima::fastdds::rtps::LocatorWithMask
A Locator with a mask that defines the number of significant bits of its address.
Definition LocatorWithMask.hpp:35
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds::rtps::NetmaskFilterKind
NetmaskFilterKind
Definition NetmaskFilterKind.hpp:31
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::rtps::NetworkInterface::locator
LocatorWithMask locator
IP address with network mask.
Definition NetworkInterface.hpp:80
eprosima::fastdds::rtps::NetworkInterface::NetworkInterface
FASTDDS_EXPORTED_API NetworkInterface(const std::string &name)
Constructor by name.
eprosima::fastdds::rtps::NetworkInterface::ip
std::string ip
IP address in string format (includes scope ID in the IPv6 case).
Definition NetworkInterface.hpp:78
eprosima::fastdds::rtps::NetworkInterface::device
std::string device
Interface device name.
Definition NetworkInterface.hpp:76
eprosima::fastdds::rtps::NetworkInterface::name
std::string name
Interface device name or IP address in string format (to be filled by the user).
Definition NetworkInterface.hpp:73
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::operator=
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter & operator=(const NetworkInterfaceWithFilter &iface)=default
Copy assignment.
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::NetworkInterfaceWithFilter
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(const std::string &name)
Constructor by name.
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::NetworkInterfaceWithFilter
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.
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::NetworkInterfaceWithFilter
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(NetworkInterfaceWithFilter &&iface)=default
Move constructor.
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::netmask_filter
NetmaskFilterKind netmask_filter
Netmask filter configuration.
Definition NetworkInterfaceWithFilter.hpp:86
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::NetworkInterfaceWithFilter
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(const std::string &name, NetmaskFilterKind netmask_filter)
Constructor by name and netmask filter.
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::~NetworkInterfaceWithFilter
virtual FASTDDS_EXPORTED_API ~NetworkInterfaceWithFilter()=default
Destructor.
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::NetworkInterfaceWithFilter
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.
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::operator==
FASTDDS_EXPORTED_API bool operator==(const NetworkInterfaceWithFilter &iface) const
Comparison operator.
eprosima::fastdds::rtps::NetworkInterfaceWithFilter::NetworkInterfaceWithFilter
FASTDDS_EXPORTED_API NetworkInterfaceWithFilter(const NetworkInterfaceWithFilter &iface)=default
Copy constructor.