mirror of
https://github.com/mfontanini/libtins
synced 2026-01-26 12:01:34 +01:00
Removed the PDU* parameter in several PDU's constructors.
This commit is contained in:
@@ -178,10 +178,8 @@ namespace Tins {
|
||||
* destination's and source's MAC.
|
||||
*
|
||||
* \param dst_hw_addr The destination hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11(const address_type &dst_hw_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
Dot11(const address_type &dst_hw_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs 802.11 PDU from a buffer and adds all
|
||||
@@ -2656,11 +2654,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_hw_addr The destination hardware address.
|
||||
* \param src_hw_addr The source hardware address.
|
||||
* \param child The inner PDU.
|
||||
*/
|
||||
Dot11Data(const address_type &dst_hw_addr = address_type(),
|
||||
const address_type &src_hw_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &src_hw_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11Data object from a buffer and adds
|
||||
@@ -2828,11 +2824,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_hw_addr The destination hardware address.
|
||||
* \param src_hw_addr The source hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11QoSData(const address_type &dst_hw_addr = address_type(),
|
||||
const address_type &src_hw_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &src_hw_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructors Dot11QoSData object from a buffer and adds
|
||||
@@ -2919,10 +2913,8 @@ namespace Tins {
|
||||
* source hardware addresses.
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11Control(const address_type &dst_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
Dot11Control(const address_type &dst_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11Control object from a buffer and
|
||||
@@ -2981,11 +2973,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param target_addr The source hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11ControlTA(const address_type &dst_addr = address_type(),
|
||||
const address_type &target_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &target_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11ControlTA object from a buffer and
|
||||
@@ -3037,11 +3027,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param target_addr The source hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11RTS(const address_type &dst_addr = address_type(),
|
||||
const address_type &target_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &target_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11RTS object from a buffer and adds all
|
||||
@@ -3098,11 +3086,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param target_addr The source hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11PSPoll(const address_type &dst_addr = address_type(),
|
||||
const address_type &target_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &target_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11PSPoll object from a buffer and
|
||||
@@ -3160,11 +3146,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param target_addr The source hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11CFEnd(const address_type &dst_addr = address_type(),
|
||||
const address_type &target_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &target_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11CFEnd object from a buffer and adds
|
||||
@@ -3222,11 +3206,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param target_addr The source hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11EndCFAck(const address_type &dst_addr = address_type(),
|
||||
const address_type &target_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &target_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11EndCFAck frame object from a buffer
|
||||
@@ -3283,10 +3265,8 @@ namespace Tins {
|
||||
* hardware addresses.
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11Ack(const address_type &dst_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
Dot11Ack(const address_type &dst_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11Ack frame object from a buffer and
|
||||
@@ -3347,11 +3327,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param target_addr The source hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11BlockAckRequest(const address_type &dst_addr = address_type(),
|
||||
const address_type &target_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &target_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11BlockAckRequest object from a buffer
|
||||
@@ -3490,11 +3468,9 @@ namespace Tins {
|
||||
*
|
||||
* \param dst_addr The destination hardware address.
|
||||
* \param target_addr The source hardware address.
|
||||
* \param child PDU* with the PDU contained by the 802.11 PDU (optional).
|
||||
*/
|
||||
Dot11BlockAck(const address_type &dst_addr = address_type(),
|
||||
const address_type &target_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &target_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot11BlockAck frame object from a buffer
|
||||
|
||||
@@ -69,8 +69,7 @@ namespace Tins {
|
||||
* \param child The PDU which will be set as the inner PDU.
|
||||
*/
|
||||
Dot3(const address_type &dst_hw_addr = address_type(),
|
||||
const address_type &src_hw_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &src_hw_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a Dot3 object from a buffer and adds a
|
||||
|
||||
@@ -61,13 +61,11 @@ namespace Tins {
|
||||
/**
|
||||
* \brief Constructs an ethernet II PDU.
|
||||
*
|
||||
* \param dst_hw_addr address_type containing the destination's MAC(optional).
|
||||
* \param src_hw_addr address_type containing the source's MAC(optional).
|
||||
* \param child PDU* with the PDU contained by the ethernet PDU (optional).
|
||||
* \param dst_hw_addr address_type containing the destination's MAC.
|
||||
* \param src_hw_addr address_type containing the source's MAC.
|
||||
*/
|
||||
EthernetII(const address_type &dst_hw_addr = address_type(),
|
||||
const address_type &src_hw_addr = address_type(),
|
||||
PDU* child = 0);
|
||||
const address_type &src_hw_addr = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs a EthernetII object from a buffer and adds
|
||||
|
||||
@@ -229,12 +229,9 @@ namespace Tins {
|
||||
*
|
||||
* \param ip_dst The destination ip address(optional).
|
||||
* \param ip_src The source ip address(optional).
|
||||
* \param child pointer to a PDU which will be set as the inner_pdu
|
||||
* for the packet being constructed(optional).
|
||||
*/
|
||||
IP(address_type ip_dst = address_type(),
|
||||
address_type ip_src = address_type(),
|
||||
PDU *child = 0);
|
||||
address_type ip_src = address_type());
|
||||
|
||||
/**
|
||||
* \brief Constructs an IP object from a buffer and adds all
|
||||
|
||||
@@ -90,18 +90,17 @@ namespace Tins {
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Creates an instance of LLC
|
||||
* \param child The child PDU.(optional)
|
||||
* \brief Default constructor.
|
||||
*/
|
||||
LLC(PDU *child = 0);
|
||||
LLC();
|
||||
|
||||
/**
|
||||
* \brief Creates an instance of LLC, setting the dsap and ssap.
|
||||
* The control field is set all to 0.
|
||||
* @param dsap The dsap value to be set.
|
||||
* @param ssap The ssap value to be set.
|
||||
* \brief Constructs an instance of LLC, setting the dsap and ssap.
|
||||
* The control field is set to 0.
|
||||
* \param dsap The dsap value to be set.
|
||||
* \param ssap The ssap value to be set.
|
||||
*/
|
||||
LLC(uint8_t dsap, uint8_t ssap, PDU* child = 0);
|
||||
LLC(uint8_t dsap, uint8_t ssap);
|
||||
|
||||
/**
|
||||
* \brief Constructs a LLC object from a buffer and adds all
|
||||
|
||||
@@ -47,16 +47,6 @@ public:
|
||||
* The family identifier is left as zero.
|
||||
*/
|
||||
Loopback();
|
||||
|
||||
/**
|
||||
* \brief Construct a Loopback object.
|
||||
*
|
||||
* The NetworkInterface object will only be used in *BSD, where
|
||||
* Null/Loopback PDUs can actually be sent.
|
||||
*
|
||||
* \param inner_pdu The inner pdu to be set.
|
||||
*/
|
||||
Loopback(PDU *inner_pdu = 0);
|
||||
|
||||
/**
|
||||
* \brief Construct a Loopback object from a buffer and adds
|
||||
|
||||
@@ -121,13 +121,9 @@ namespace Tins {
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief PDU constructor
|
||||
*
|
||||
* Must be called by subclasses in their constructors.
|
||||
* \param flag The flag identifier for the subclass' PDU.
|
||||
* \param next_pdu The child PDU. Can be obviated.
|
||||
* \brief Default constructor.
|
||||
*/
|
||||
PDU(PDU *next_pdu = 0);
|
||||
PDU();
|
||||
|
||||
#if TINS_IS_CXX11
|
||||
/**
|
||||
|
||||
@@ -107,10 +107,9 @@ namespace Tins {
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Creates an instance of RadioTap.
|
||||
* \param child The child PDU.
|
||||
* \brief Default constructor.
|
||||
*/
|
||||
RadioTap(PDU *child = 0);
|
||||
RadioTap();
|
||||
|
||||
/**
|
||||
* \brief Constructs a RadioTap object from a buffer and adds all
|
||||
|
||||
@@ -56,9 +56,8 @@ namespace Tins {
|
||||
* \brief Creates an instance of SNAP
|
||||
* This constructor sets the dsap and ssap fields to 0xaa, and
|
||||
* the id field to 3.
|
||||
* \param child The child PDU.(optional)
|
||||
*/
|
||||
SNAP(PDU *child = 0);
|
||||
SNAP();
|
||||
|
||||
/**
|
||||
* \brief Constructs a SNAP object from a buffer and adds all
|
||||
|
||||
@@ -53,11 +53,11 @@ namespace Tins {
|
||||
*
|
||||
* Creates an instance of UDP. Destination and source port can
|
||||
* be provided, otherwise both will be 0.
|
||||
*
|
||||
* \param dport Destination port.
|
||||
* \param sport Source port.
|
||||
* \param child The child PDU(optional).
|
||||
* */
|
||||
UDP(uint16_t dport = 0, uint16_t sport = 0, PDU *child = 0);
|
||||
UDP(uint16_t dport = 0, uint16_t sport = 0);
|
||||
|
||||
/**
|
||||
* \brief Constructs an UDP object from a buffer.
|
||||
@@ -145,7 +145,7 @@ namespace Tins {
|
||||
/**
|
||||
* \sa PDU::clone
|
||||
*/
|
||||
PDU *clone() const {
|
||||
UDP *clone() const {
|
||||
return new UDP(*this);
|
||||
}
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user