mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Fixed merge conflicts.
This commit is contained in:
16
Makefile.in
16
Makefile.in
@@ -1,11 +1,11 @@
|
||||
CXX=@CXX@
|
||||
CFLAGS=-c -Wall @CFLAGS@ -DTINS_VERSION=@PACKAGE_VERSION@
|
||||
LDFLAGS=-lpcap
|
||||
CFLAGS=-c -Wall -fPIC @CFLAGS@ -DTINS_VERSION=@PACKAGE_VERSION@
|
||||
LDFLAGS=-lpcap -shared -Wl,-soname,libtins.so
|
||||
SOURCES=$(wildcard src/*.cpp)
|
||||
|
||||
OBJECTS=$(SOURCES:.cpp=.o)
|
||||
INCLUDE = -Iinclude/
|
||||
EXECUTABLE=client
|
||||
INCLUDE=-Iinclude/
|
||||
EXECUTABLE=libtins.so
|
||||
|
||||
all: $(SOURCES) $(EXECUTABLE)
|
||||
|
||||
@@ -21,3 +21,11 @@ $(EXECUTABLE): $(OBJECTS)
|
||||
|
||||
clean:
|
||||
rm $(OBJECTS) $(EXECUTABLE)
|
||||
|
||||
install:
|
||||
install include/* /usr/include/tins/
|
||||
install $(EXECUTABLE) /usr/lib/
|
||||
|
||||
uninstall:
|
||||
rm -r /usr/include/tins/
|
||||
rm /usr/lib/$(EXECUTABLE)
|
||||
|
||||
102
configure
vendored
102
configure
vendored
@@ -1586,6 +1586,52 @@ $as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
|
||||
|
||||
} # ac_fn_cxx_check_header_compile
|
||||
|
||||
# ac_fn_cxx_try_link LINENO
|
||||
# -------------------------
|
||||
# Try to link conftest.$ac_ext, and return whether this succeeded.
|
||||
ac_fn_cxx_try_link ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { { ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo"; } >&5
|
||||
(eval "$ac_link") 2>conftest.err
|
||||
ac_status=$?
|
||||
if test -s conftest.err; then
|
||||
grep -v '^ *+' conftest.err >conftest.er1
|
||||
cat conftest.er1 >&5
|
||||
mv -f conftest.er1 conftest.err
|
||||
fi
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; } && {
|
||||
test -z "$ac_cxx_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext && {
|
||||
test "$cross_compiling" = yes ||
|
||||
$as_test_x conftest$ac_exeext
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_retval=1
|
||||
fi
|
||||
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
|
||||
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
|
||||
# interfere with the next link command; also delete a directory that is
|
||||
# left behind by Apple's compiler. We do this before executing the actions.
|
||||
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
|
||||
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
|
||||
as_fn_set_status $ac_retval
|
||||
|
||||
} # ac_fn_cxx_try_link
|
||||
cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
@@ -2854,19 +2900,65 @@ fi
|
||||
done
|
||||
|
||||
|
||||
for ac_header
|
||||
for ac_header in pcap.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
|
||||
ac_fn_cxx_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_pcap_h" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
#define HAVE_PCAP_H 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_loop in -lpcap" >&5
|
||||
$as_echo_n "checking for pcap_loop in -lpcap... " >&6; }
|
||||
if test "${ac_cv_lib_pcap_pcap_loop+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lpcap $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char pcap_loop ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return pcap_loop ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_link "$LINENO"; then :
|
||||
ac_cv_lib_pcap_pcap_loop=yes
|
||||
else
|
||||
ac_cv_lib_pcap_pcap_loop=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_loop" >&5
|
||||
$as_echo "$ac_cv_lib_pcap_pcap_loop" >&6; }
|
||||
if test "x$ac_cv_lib_pcap_pcap_loop" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBPCAP 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lpcap $LIBS"
|
||||
|
||||
else
|
||||
as_fn_error $? "pcap library is needed!" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile"
|
||||
|
||||
|
||||
@@ -3,13 +3,14 @@ AC_INIT(myconfig, 0.1)
|
||||
AC_PROG_CXX()
|
||||
AC_LANG(C++)
|
||||
|
||||
if test -n "$debug"
|
||||
if test -n "$debug"
|
||||
then
|
||||
CFLAGS="-DDEBUG -g"
|
||||
else
|
||||
CFLAGS="-O3"
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([])
|
||||
AC_CHECK_HEADERS([pcap.h])
|
||||
AC_CHECK_LIB(pcap, pcap_loop, [], [AC_MSG_ERROR([pcap library is needed!])])
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_OUTPUT(Makefile)
|
||||
|
||||
@@ -1028,6 +1028,7 @@ namespace Tins {
|
||||
|
||||
uint32_t write_ext_header(uint8_t *buffer, uint32_t total_sz);
|
||||
void copy_ext_header(const Dot11ManagementFrame *other);
|
||||
|
||||
private:
|
||||
ExtendedHeader _ext_header;
|
||||
uint8_t _addr4[6];
|
||||
@@ -1825,13 +1826,13 @@ namespace Tins {
|
||||
Dot11Control(uint32_t iface_index, const uint8_t* dst_addr = 0, PDU* child = 0);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 control frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 control frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
*/
|
||||
Dot11Control(const uint8_t *buffer, uint32_t total_sz);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Getter for the PDU's type.
|
||||
* \sa PDU::pdu_type
|
||||
@@ -1883,24 +1884,24 @@ namespace Tins {
|
||||
Dot11ControlTA(uint32_t iface_index, const uint8_t* dst_addr = 0, const uint8_t *target_addr = 0, PDU* child = 0);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 control frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 control frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
*/
|
||||
Dot11ControlTA(const uint8_t *buffer, uint32_t total_sz);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Getter for the target address field.
|
||||
*/
|
||||
inline const uint8_t* target_addr() const { return _taddr; }
|
||||
|
||||
|
||||
/**
|
||||
* \brief Setter for the target address field.
|
||||
* \param addr The new target address.
|
||||
*/
|
||||
void target_addr(const uint8_t *addr);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Returns the 802.11 frame's header length.
|
||||
*
|
||||
@@ -1913,13 +1914,13 @@ namespace Tins {
|
||||
* \brief Getter for the control ta additional fields size.
|
||||
*/
|
||||
uint32_t controlta_size() const { return sizeof(_taddr) + sizeof(ieee80211_header); }
|
||||
|
||||
|
||||
uint32_t write_ext_header(uint8_t *buffer, uint32_t total_sz);
|
||||
private:
|
||||
|
||||
|
||||
uint8_t _taddr[6];
|
||||
};
|
||||
|
||||
|
||||
class Dot11RTS : public Dot11ControlTA {
|
||||
public:
|
||||
/**
|
||||
@@ -1960,7 +1961,7 @@ namespace Tins {
|
||||
Dot11RTS(uint32_t iface_index, const uint8_t* dst_hw_addr = 0, const uint8_t *target_addr = 0, PDU* child = 0);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 RTS frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 RTS frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
@@ -1980,7 +1981,7 @@ namespace Tins {
|
||||
*/
|
||||
PDUType pdu_type() const { return PDU::DOT11_RTS; }
|
||||
};
|
||||
|
||||
|
||||
class Dot11PSPoll : public Dot11ControlTA {
|
||||
public:
|
||||
/**
|
||||
@@ -2021,7 +2022,7 @@ namespace Tins {
|
||||
Dot11PSPoll(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 PS-Poll frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 PS-Poll frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
@@ -2035,7 +2036,7 @@ namespace Tins {
|
||||
*/
|
||||
PDU *clone_pdu() const;
|
||||
};
|
||||
|
||||
|
||||
class Dot11CFEnd : public Dot11ControlTA {
|
||||
public:
|
||||
/**
|
||||
@@ -2076,7 +2077,7 @@ namespace Tins {
|
||||
Dot11CFEnd(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 CF-End frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 CF-End frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
@@ -2090,7 +2091,7 @@ namespace Tins {
|
||||
*/
|
||||
PDU *clone_pdu() const;
|
||||
};
|
||||
|
||||
|
||||
class Dot11EndCFAck : public Dot11ControlTA {
|
||||
public:
|
||||
/**
|
||||
@@ -2128,7 +2129,7 @@ namespace Tins {
|
||||
Dot11EndCFAck(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 End-CF-Ack frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 End-CF-Ack frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
@@ -2142,7 +2143,7 @@ namespace Tins {
|
||||
*/
|
||||
PDU *clone_pdu() const;
|
||||
};
|
||||
|
||||
|
||||
class Dot11Ack : public Dot11Control {
|
||||
public:
|
||||
/**
|
||||
@@ -2181,13 +2182,13 @@ namespace Tins {
|
||||
Dot11Ack(uint32_t iface_index, const uint8_t* dst_addr, PDU* child);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 Ack frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 Ack frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
*/
|
||||
Dot11Ack(const uint8_t *buffer, uint32_t total_sz);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Getter for the PDU's type.
|
||||
* \sa PDU::pdu_type
|
||||
@@ -2200,8 +2201,9 @@ namespace Tins {
|
||||
* \sa PDU::clone_pdu
|
||||
*/
|
||||
PDU *clone_pdu() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \brief Class that represents an 802.11 Block Ack Request PDU.
|
||||
*/
|
||||
@@ -2242,27 +2244,26 @@ namespace Tins {
|
||||
Dot11BlockAckRequest(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 Block Ack request frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 Block Ack request frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
*/
|
||||
Dot11BlockAckRequest(const uint8_t *buffer, uint32_t total_sz);
|
||||
|
||||
|
||||
/* Getter */
|
||||
|
||||
|
||||
/**
|
||||
* \brief Getter for the bar control field.
|
||||
* \return The bar control field.
|
||||
*/
|
||||
uint16_t bar_control() const { return *(const uint16_t*)&_bar_control; }
|
||||
uint16_t bar_control() const { return _bar_control.tid; }
|
||||
|
||||
/**
|
||||
* \brief Getter for the start sequence field.
|
||||
* \return The bar start sequence.
|
||||
*/
|
||||
uint16_t start_sequence() const { return *(const uint16_t*)&_start_sequence; }
|
||||
|
||||
uint16_t start_sequence() const { return (_start_sequence.frag << 12) | (_start_sequence.seq); }
|
||||
/**
|
||||
* \brief Returns the 802.11 frame's header length.
|
||||
*
|
||||
@@ -2270,15 +2271,15 @@ namespace Tins {
|
||||
* \sa PDU::header_size()
|
||||
*/
|
||||
uint32_t header_size() const;
|
||||
|
||||
|
||||
/* Setter */
|
||||
|
||||
|
||||
/**
|
||||
* \brief Setter for the bar control field.
|
||||
* \param bar The new bar control field.
|
||||
*/
|
||||
void bar_control(uint16_t bar);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Setter for the start sequence field.
|
||||
* \param bar The new start sequence field.
|
||||
@@ -2296,25 +2297,25 @@ namespace Tins {
|
||||
* \brief Getter for the control ta additional fields size.
|
||||
*/
|
||||
uint32_t blockack_request_size() const { return controlta_size() + sizeof(_bar_control) + sizeof(_start_sequence); }
|
||||
|
||||
|
||||
uint32_t write_ext_header(uint8_t *buffer, uint32_t total_sz);
|
||||
private:
|
||||
struct BarControl {
|
||||
uint16_t reserved:12,
|
||||
tid:4;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
|
||||
struct StartSequence {
|
||||
uint16_t frag:4,
|
||||
seq:12;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
|
||||
void init_block_ack();
|
||||
|
||||
|
||||
BarControl _bar_control;
|
||||
StartSequence _start_sequence;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \brief Class that represents an 802.11 block ack frame.
|
||||
*/
|
||||
@@ -2355,13 +2356,13 @@ namespace Tins {
|
||||
Dot11BlockAck(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child);
|
||||
|
||||
/**
|
||||
* \brief Constructor which creates an 802.11 Block Ack request frame object from a buffer and
|
||||
* \brief Constructor which creates an 802.11 Block Ack request frame object from a buffer and
|
||||
* adds all identifiable PDUs found in the buffer as children of this one.
|
||||
* \param buffer The buffer from which this PDU will be constructed.
|
||||
* \param total_sz The total size of the buffer.
|
||||
*/
|
||||
Dot11BlockAck(const uint8_t *buffer, uint32_t total_sz);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Returns the 802.11 frame's header length.
|
||||
*
|
||||
@@ -2369,19 +2370,19 @@ namespace Tins {
|
||||
* \sa PDU::header_size()
|
||||
*/
|
||||
uint32_t header_size() const;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Getter for the bitmap field.
|
||||
* \return The bitmap field.
|
||||
*/
|
||||
const uint8_t *bitmap() const { return _bitmap; }
|
||||
|
||||
|
||||
/**
|
||||
* \brief Setter for the bitmap field.
|
||||
* \param bit The new bitmap field to be set.
|
||||
*/
|
||||
void bitmap(const uint8_t *bit);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Getter for the PDU's type.
|
||||
* \sa PDU::pdu_type
|
||||
|
||||
@@ -1062,16 +1062,16 @@ Tins::Dot11RTS::Dot11RTS(const uint8_t* dst_addr , const uint8_t* target_addr, P
|
||||
subtype(RTS);
|
||||
}
|
||||
|
||||
Tins::Dot11RTS::Dot11RTS(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
Tins::Dot11RTS::Dot11RTS(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
subtype(RTS);
|
||||
}
|
||||
|
||||
Tins::Dot11RTS::Dot11RTS(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
Tins::Dot11RTS::Dot11RTS(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
subtype(RTS);
|
||||
}
|
||||
|
||||
Tins::Dot11RTS::Dot11RTS(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
|
||||
Tins::Dot11RTS::Dot11RTS(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
|
||||
}
|
||||
|
||||
Tins::PDU *Tins::Dot11RTS::clone_pdu() const {
|
||||
@@ -1086,16 +1086,16 @@ Tins::Dot11PSPoll::Dot11PSPoll(const uint8_t* dst_addr , const uint8_t* target_a
|
||||
subtype(PS);
|
||||
}
|
||||
|
||||
Tins::Dot11PSPoll::Dot11PSPoll(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
Tins::Dot11PSPoll::Dot11PSPoll(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
subtype(PS);
|
||||
}
|
||||
|
||||
Tins::Dot11PSPoll::Dot11PSPoll(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
Tins::Dot11PSPoll::Dot11PSPoll(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
subtype(PS);
|
||||
}
|
||||
|
||||
Tins::Dot11PSPoll::Dot11PSPoll(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
|
||||
Tins::Dot11PSPoll::Dot11PSPoll(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
|
||||
}
|
||||
|
||||
Tins::PDU *Tins::Dot11PSPoll::clone_pdu() const {
|
||||
@@ -1110,16 +1110,16 @@ Tins::Dot11CFEnd::Dot11CFEnd(const uint8_t* dst_addr , const uint8_t* target_add
|
||||
subtype(CF_END);
|
||||
}
|
||||
|
||||
Tins::Dot11CFEnd::Dot11CFEnd(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
Tins::Dot11CFEnd::Dot11CFEnd(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
subtype(CF_END);
|
||||
}
|
||||
|
||||
Tins::Dot11CFEnd::Dot11CFEnd(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
Tins::Dot11CFEnd::Dot11CFEnd(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
subtype(CF_END);
|
||||
}
|
||||
|
||||
Tins::Dot11CFEnd::Dot11CFEnd(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
|
||||
Tins::Dot11CFEnd::Dot11CFEnd(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
|
||||
}
|
||||
|
||||
Tins::PDU *Tins::Dot11CFEnd::clone_pdu() const {
|
||||
@@ -1134,16 +1134,16 @@ Tins::Dot11EndCFAck::Dot11EndCFAck(const uint8_t* dst_addr , const uint8_t* targ
|
||||
subtype(CF_END_ACK);
|
||||
}
|
||||
|
||||
Tins::Dot11EndCFAck::Dot11EndCFAck(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
Tins::Dot11EndCFAck::Dot11EndCFAck(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
subtype(CF_END_ACK);
|
||||
}
|
||||
|
||||
Tins::Dot11EndCFAck::Dot11EndCFAck(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
Tins::Dot11EndCFAck::Dot11EndCFAck(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
subtype(CF_END_ACK);
|
||||
}
|
||||
|
||||
Tins::Dot11EndCFAck::Dot11EndCFAck(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
|
||||
Tins::Dot11EndCFAck::Dot11EndCFAck(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
|
||||
}
|
||||
|
||||
Tins::PDU *Tins::Dot11EndCFAck::clone_pdu() const {
|
||||
@@ -1158,16 +1158,16 @@ Tins::Dot11Ack::Dot11Ack(const uint8_t* dst_addr, PDU* child) : Dot11Control(ds
|
||||
subtype(ACK);
|
||||
}
|
||||
|
||||
Tins::Dot11Ack::Dot11Ack(const std::string& iface, const uint8_t* dst_addr, PDU* child) throw (std::runtime_error) : Dot11Control(iface, dst_addr, child) {
|
||||
Tins::Dot11Ack::Dot11Ack(const std::string& iface, const uint8_t* dst_addr, PDU* child) throw (std::runtime_error) : Dot11Control(iface, dst_addr, child) {
|
||||
subtype(ACK);
|
||||
}
|
||||
|
||||
Tins::Dot11Ack::Dot11Ack(uint32_t iface_index, const uint8_t* dst_addr, PDU* child) : Dot11Control(iface_index, dst_addr, child) {
|
||||
Tins::Dot11Ack::Dot11Ack(uint32_t iface_index, const uint8_t* dst_addr, PDU* child) : Dot11Control(iface_index, dst_addr, child) {
|
||||
subtype(ACK);
|
||||
}
|
||||
|
||||
Tins::Dot11Ack::Dot11Ack(const uint8_t *buffer, uint32_t total_sz) : Dot11Control(buffer, total_sz) {
|
||||
|
||||
Tins::Dot11Ack::Dot11Ack(const uint8_t *buffer, uint32_t total_sz) : Dot11Control(buffer, total_sz) {
|
||||
|
||||
}
|
||||
|
||||
Tins::PDU *Tins::Dot11Ack::clone_pdu() const {
|
||||
@@ -1182,15 +1182,15 @@ Tins::Dot11BlockAckRequest::Dot11BlockAckRequest(const uint8_t* dst_addr , const
|
||||
init_block_ack();
|
||||
}
|
||||
|
||||
Tins::Dot11BlockAckRequest::Dot11BlockAckRequest(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
Tins::Dot11BlockAckRequest::Dot11BlockAckRequest(const std::string& iface, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) throw (std::runtime_error) : Dot11ControlTA(iface, dst_addr, target_addr, child) {
|
||||
init_block_ack();
|
||||
}
|
||||
|
||||
Tins::Dot11BlockAckRequest::Dot11BlockAckRequest(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
Tins::Dot11BlockAckRequest::Dot11BlockAckRequest(uint32_t iface_index, const uint8_t* dst_addr, const uint8_t *target_addr, PDU* child) : Dot11ControlTA(iface_index, dst_addr, target_addr, child) {
|
||||
init_block_ack();
|
||||
}
|
||||
|
||||
Tins::Dot11BlockAckRequest::Dot11BlockAckRequest(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
Tins::Dot11BlockAckRequest::Dot11BlockAckRequest(const uint8_t *buffer, uint32_t total_sz) : Dot11ControlTA(buffer, total_sz) {
|
||||
uint32_t padding = controlta_size();
|
||||
buffer += padding;
|
||||
total_sz -= padding;
|
||||
@@ -1219,7 +1219,7 @@ uint32_t Tins::Dot11BlockAckRequest::write_ext_header(uint8_t *buffer, uint32_t
|
||||
void Tins::Dot11BlockAckRequest::bar_control(uint16_t bar) {
|
||||
std::memcpy(&_bar_control, &bar, sizeof(bar));
|
||||
}
|
||||
|
||||
|
||||
void Tins::Dot11BlockAckRequest::start_sequence(uint16_t seq) {
|
||||
std::memcpy(&_start_sequence, &seq, sizeof(seq));
|
||||
}
|
||||
@@ -1250,7 +1250,7 @@ Tins::Dot11BlockAck::Dot11BlockAck(uint32_t iface_index, const uint8_t* dst_addr
|
||||
std::memset(_bitmap, 0, sizeof(_bitmap));
|
||||
}
|
||||
|
||||
Tins::Dot11BlockAck::Dot11BlockAck(const uint8_t *buffer, uint32_t total_sz) : Dot11BlockAckRequest(buffer, total_sz) {
|
||||
Tins::Dot11BlockAck::Dot11BlockAck(const uint8_t *buffer, uint32_t total_sz) : Dot11BlockAckRequest(buffer, total_sz) {
|
||||
uint32_t padding = blockack_request_size();
|
||||
buffer += padding;
|
||||
total_sz -= padding;
|
||||
|
||||
Reference in New Issue
Block a user