1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 20:44:26 +01:00

Removed deprecated methods/types.

This commit is contained in:
Matias Fontanini
2013-04-21 19:52:39 -03:00
parent 9e20c0241f
commit 69968cbc5c
26 changed files with 33 additions and 238 deletions

View File

@@ -272,19 +272,6 @@ namespace Tins {
* \param total_sz The size of the buffer.
*/
bool matches_response(uint8_t *ptr, uint32_t total_sz);
/**
* \brief Clones this pdu, filling the corresponding header with data
* extracted from a buffer.
*
* \deprecated This method is obsolete.
*
* \param ptr The pointer to the from from which the data will be extracted.
* \param total_sz The size of the buffer.
* \return The cloned PDU.
* \sa PDU::clone_packet
*/
TINS_DEPRECATED(PDU *clone_packet(const uint8_t *ptr, uint32_t total_sz));
/**
* \sa PDU::clone

View File

@@ -140,15 +140,11 @@ namespace Tins {
END = 255
};
TINS_DEPRECATED(typedef OptionTypes Options);
/**
* The DHCP option type.
*/
typedef PDUOption<uint8_t> option;
TINS_DEPRECATED(typedef option dhcp_option);
/**
* The type used to store the DHCP options.
*/

View File

@@ -47,8 +47,6 @@ public:
* Represents a DHCPv6 option.
*/
typedef PDUOption<uint16_t> option;
TINS_DEPRECATED(typedef option dhcpv6_option);
/**
* The message types.
@@ -152,8 +150,6 @@ public:
KRB_DEFAULT_REALM_NAME,
KRB_KDC
};
TINS_DEPRECATED(typedef OptionTypes Option);
/**
* The type used to store the DHCPv6 options.

View File

@@ -112,8 +112,6 @@ namespace Tins {
RSN = 48,
EXT_SUPPORTED_RATES = 50
};
TINS_DEPRECATED(typedef OptionTypes TaggedOption);
/**
* \brief Enum for the different subtypes of 802.11 management frames.
@@ -173,8 +171,6 @@ namespace Tins {
*/
typedef PDUOption<uint8_t> option;
TINS_DEPRECATED(typedef option dot11_option);
/**
* \brief Constructor for creating an 802.11 PDU
*
@@ -384,12 +380,6 @@ namespace Tins {
*/
void send(PacketSender &sender, const NetworkInterface &iface);
#endif // WIN32
/**
* \brief Adds a new option to this Dot11 PDU.
* \param opt The option to be added.
*/
TINS_DEPRECATED(void add_tagged_option(const option &opt));
/**
* \brief Adds a new option to this Dot11 PDU.

View File

@@ -166,19 +166,6 @@ namespace Tins {
*/
PDUType pdu_type() const { return pdu_flag; }
/**
* \brief Clones this pdu, filling the corresponding header with data
* extracted from a buffer.
*
* \deprecated This method is obsolete.
*
* \param ptr The pointer to the from from which the data will be extracted.
* \param total_sz The size of the buffer.
* \return The cloned PDU.
* \sa PDU::clone_packet
*/
TINS_DEPRECATED(PDU *clone_packet(const uint8_t *ptr, uint32_t total_sz));
/**
* \sa PDU::clone
*/

View File

@@ -170,19 +170,6 @@ namespace Tins {
*/
PDUType pdu_type() const { return PDU::ETHERNET_II; }
/**
* \brief Clones this pdu, filling the corresponding header with data
* extracted from a buffer.
*
* \deprecated This method is obsolete.
*
* \param ptr The pointer to the from from which the data will be extracted.
* \param total_sz The size of the buffer.
* \return The cloned PDU.
* \sa PDU::clone_packet
*/
TINS_DEPRECATED(PDU *clone_packet(const uint8_t *ptr, uint32_t total_sz));
/**
* \sa PDU::clone
*/

View File

@@ -287,19 +287,6 @@ namespace Tins {
* \sa PDU::pdu_type
*/
PDUType pdu_type() const { return PDU::ICMP; }
/**
* \brief Clones this pdu, filling the corresponding header with data
* extracted from a buffer.
*
* \deprecated This method is obsolete.
*
* \param ptr The pointer to the from from which the data will be extracted.
* \param total_sz The size of the buffer.
* \return The cloned PDU.
* \sa PDU::clone_packet
*/
TINS_DEPRECATED(PDU *clone_packet(const uint8_t *ptr, uint32_t total_sz));
/**
* \sa PDU::clone

View File

@@ -122,8 +122,6 @@ public:
CARD_REPLY
};
TINS_DEPRECATED(typedef OptionTypes Options);
/**
* The type used to store addresses.
*/
@@ -139,8 +137,6 @@ public:
*/
typedef PDUOption<uint8_t> option;
TINS_DEPRECATED(typedef option icmpv6_option);
/**
* The type used to store options.
*/

View File

@@ -170,8 +170,6 @@ namespace Tins {
* The IP options type.
*/
typedef PDUOption<option_identifier> option;
TINS_DEPRECATED(typedef option ip_option);
/**
* The type of the security option.
@@ -597,19 +595,6 @@ namespace Tins {
*/
PDUType pdu_type() const { return PDU::IP; }
/**
* \brief Clones this pdu, filling the corresponding header with data
* extracted from a buffer.
*
* \deprecated This method is obsolete.
*
* \param ptr The pointer to the from from which the data will be extracted.
* \param total_sz The size of the buffer.
* \return The cloned PDU.
* \sa PDU::clone_packet
*/
TINS_DEPRECATED(PDU *clone_packet(const uint8_t *ptr, uint32_t total_sz));
/**
* \sa PDU::clone
*/

View File

@@ -62,8 +62,6 @@ public:
*/
typedef PDUOption<uint8_t> ext_header;
TINS_DEPRECATED(typedef ext_header ipv6_ext_header);
/**
* The type used to store the extension headers.
*/

View File

@@ -346,17 +346,6 @@ namespace Tins {
* \return Returns the PDUType corresponding to the PDU.
*/
virtual PDUType pdu_type() const = 0;
/** \brief Clones this pdu, filling the corresponding header with data
* extracted from a buffer.
*
* \deprecated This method is obsolete.
*
* \param ptr The pointer to the from from which the data will be extracted.
* \param total_sz The size of the buffer.
* \return The cloned PDU.
*/
TINS_DEPRECATED(virtual PDU *clone_packet(const uint8_t *ptr, uint32_t total_sz));
protected:
/**
* \brief Copy constructor.

View File

@@ -126,13 +126,6 @@ public:
PDUType pdu_type() const {
return cached.pdu_type();
}
/**
* Forwards the call to the cached PDU. \sa PDU::clone_packet.
*/
TINS_DEPRECATED(PDU *clone_packet(const uint8_t *ptr, uint32_t total_sz)) {
return 0;
}
private:
void write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU *parent) {
if(cached_serialization.size() != total_sz) {

View File

@@ -90,8 +90,6 @@ namespace Tins {
ALTCHK = 14
};
TINS_DEPRECATED(typedef OptionTypes Option);
/**
* \brief Alternate checksum enum.
*/
@@ -105,8 +103,6 @@ namespace Tins {
* The type used to store TCP options.
*/
typedef PDUOption<uint8_t> option;
TINS_DEPRECATED(typedef option tcp_option);
/**
* The type used to store the options.
@@ -363,18 +359,6 @@ namespace Tins {
* \param value The new value for this flag. Must be 0 or 1.
*/
void set_flag(Flags tcp_flag, small_uint<1> value);
/**
* \brief Adds a TCP option.
*
* \deprecated This function is deprecated. The overloads taking
* a TCP::option should be used.
*
* \param option The option type flag to be set.
* \param length The length of this option(optional).
* \param data Pointer to this option's data(optional).
*/
TINS_DEPRECATED(void add_option(OptionTypes opt, uint8_t length = 0, const uint8_t *data = 0));
/**
* \brief Adds a TCP option.

View File

@@ -95,16 +95,6 @@ namespace Tins {
*/
IPv4Address mask;
};
/**
* \brief Resolves a domain name and returns its corresponding ip address.
*
* If an ip address is given, its integer representation is returned.
* Otherwise, the domain name is resolved and its ip address is returned.
*
* \param to_resolve The domain name/ip address to resolve.
*/
IPv4Address resolve_ip(const std::string &to_resolve);
/**
* \brief Resolves a domain name and returns its corresponding ip address.
@@ -125,21 +115,6 @@ namespace Tins {
* \param to_resolve The domain name/ip address to resolve.
*/
IPv6Address resolve_domain6(const std::string &to_resolve);
/**
* \brief Resolves the hardware address for a given ip.
*
* \param iface The interface in which the packet will be sent.
* \param ip The ip to resolve, in integer format.
* \param buffer The buffer in which the host's hardware address will be stored.
* \param sender The sender to use to send and receive the ARP requests.
* \return Returns true if the hardware address was resolved successfully,
* false otherwise.
*/
TINS_DEPRECATED(
bool resolve_hwaddr(const NetworkInterface &iface, IPv4Address ip,
HWAddress<6> *address, PacketSender &sender)
);
/**
* \brief Resolves the hardware address for a given ip.