Skip to content

Commit 8e3896b

Browse files
authored
Added @deprecated to documentation to output a warning in the docs. (#1920)
1 parent e2d10e9 commit 8e3896b

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Pcap++/header/PcapLiveDeviceList.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ namespace pcpp
5757
/// Get a pointer to the live device by its IP address. IP address can be both IPv4 or IPv6
5858
/// @param[in] ipAddr The IP address defined for the device
5959
/// @return A pointer to the live device if this IP address exists. nullptr otherwise
60+
/// @deprecated Use `getDeviceByIp` instead.
6061
PCPP_DEPRECATED("Use `getDeviceByIp`")
6162
PcapLiveDevice* getPcapLiveDeviceByIp(const IPAddress& ipAddr) const;
6263

@@ -68,6 +69,7 @@ namespace pcpp
6869
/// Get a pointer to the live device by its IPv4 address
6970
/// @param[in] ipAddr The IPv4 address defined for the device
7071
/// @return A pointer to the live device if this IPv4 address exists. nullptr otherwise
72+
/// @deprecated Use `getDeviceByIp` instead.
7173
PCPP_DEPRECATED("Use `getDeviceByIp`")
7274
PcapLiveDevice* getPcapLiveDeviceByIp(const IPv4Address& ipAddr) const;
7375

@@ -79,6 +81,7 @@ namespace pcpp
7981
/// Get a pointer to the live device by its IPv6 address
8082
/// @param[in] ip6Addr The IPv6 address defined for the device
8183
/// @return A pointer to the live device if this IPv6 address exists. nullptr otherwise
84+
/// @deprecated Use `getDeviceByIp` instead.
8285
PCPP_DEPRECATED("Use `getDeviceByIp`")
8386
PcapLiveDevice* getPcapLiveDeviceByIp(const IPv6Address& ip6Addr) const;
8487

@@ -91,6 +94,7 @@ namespace pcpp
9194
/// IPv6
9295
/// @param[in] ipAddrAsString The IP address defined for the device as string
9396
/// @return A pointer to the live device if this IP address is valid and exists. nullptr otherwise
97+
/// @deprecated Use `getDeviceByIp` instead.
9498
PCPP_DEPRECATED("Use `getDeviceByIp`")
9599
PcapLiveDevice* getPcapLiveDeviceByIp(const std::string& ipAddrAsString) const;
96100

@@ -103,6 +107,7 @@ namespace pcpp
103107
/// Get a pointer to the live device by its name
104108
/// @param[in] name The name of the interface (e.g eth0)
105109
/// @return A pointer to the live device if this name exists. nullptr otherwise
110+
/// @deprecated Use `getDeviceByName` instead.
106111
PCPP_DEPRECATED("Use `getDeviceByName`")
107112
PcapLiveDevice* getPcapLiveDeviceByName(const std::string& name) const;
108113

@@ -114,6 +119,7 @@ namespace pcpp
114119
/// Get a pointer to the live device by its IP address or name
115120
/// @param[in] ipOrName An IP address or name of the interface
116121
/// @return A pointer to the live device if exists, nullptr otherwise
122+
/// @deprecated Use `getDeviceByIpOrName` instead.
117123
PCPP_DEPRECATED("Use `getDeviceByIpOrName`")
118124
PcapLiveDevice* getPcapLiveDeviceByIpOrName(const std::string& ipOrName) const;
119125

Pcap++/header/PcapRemoteDeviceList.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ namespace pcpp
140140
/// Search a PcapRemoteDevice in the list by its IPv4 address
141141
/// @param[in] ip4Addr The IPv4 address
142142
/// @return The PcapRemoteDevice if found, nullptr otherwise
143+
/// @deprecated Use `getDeviceByIp` instead.
143144
PCPP_DEPRECATED("Use `getDeviceByIp`")
144145
PcapRemoteDevice* getRemoteDeviceByIP(const IPv4Address& ip4Addr) const;
145146

@@ -151,6 +152,7 @@ namespace pcpp
151152
/// Search a PcapRemoteDevice in the list by its IPv6 address
152153
/// @param[in] ip6Addr The IPv6 address
153154
/// @return The PcapRemoteDevice if found, nullptr otherwise
155+
/// @deprecated Use `getDeviceByIp` instead.
154156
PCPP_DEPRECATED("Use `getDeviceByIp`")
155157
PcapRemoteDevice* getRemoteDeviceByIP(const IPv6Address& ip6Addr) const;
156158

@@ -162,6 +164,7 @@ namespace pcpp
162164
/// Search a PcapRemoteDevice in the list by its IP address (IPv4 or IPv6)
163165
/// @param[in] ipAddr The IP address
164166
/// @return The PcapRemoteDevice if found, nullptr otherwise
167+
/// @deprecated Use `getDeviceByIp` instead.
165168
PCPP_DEPRECATED("Use `getDeviceByIp`")
166169
PcapRemoteDevice* getRemoteDeviceByIP(const IPAddress& ipAddr) const;
167170

@@ -173,6 +176,7 @@ namespace pcpp
173176
/// Search a PcapRemoteDevice in the list by its IP address
174177
/// @param[in] ipAddrAsString The IP address in string format
175178
/// @return The PcapRemoteDevice if found, nullptr otherwise
179+
/// @deprecated Use `getDeviceByIP` instead.
176180
PCPP_DEPRECATED("Use `getDeviceByIp`")
177181
PcapRemoteDevice* getRemoteDeviceByIP(const std::string& ipAddrAsString) const;
178182

Pcap++/header/PfRingDeviceList.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ namespace pcpp
4848
/// Get a PF_RING device by name. The name is the Linux interface name which appears in ifconfig
4949
/// (e.g eth0, eth1, etc.)
5050
/// @return A pointer to the PF_RING device
51+
/// @deprecated Use `getDeviceByName` instead.
5152
PCPP_DEPRECATED("Use `getDeviceByName`")
5253
PfRingDevice* getPfRingDeviceByName(const std::string& devName) const;
5354

0 commit comments

Comments
 (0)