1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Added DHCP and BootP constructors from uint8_t buffer. Normalized IP destination and source address getters/setters.

This commit is contained in:
Matias Fontanini
2011-08-19 10:13:35 -03:00
parent bb3ea10209
commit 3e2168f6fc
17 changed files with 161 additions and 73 deletions

View File

@@ -179,12 +179,12 @@ namespace Tins {
*
* \return The source address for this IP PDU.
*/
inline uint32_t source_address() const { return _ip.saddr; }
inline uint32_t src_addr() const { return _ip.saddr; }
/** \brief Getter for the destination address field.
* \return The destination address for this IP PDU.
*/
inline uint32_t dest_address() const { return _ip.daddr; }
inline uint32_t dst_addr() const { return _ip.daddr; }
/* Setters */
@@ -249,28 +249,28 @@ namespace Tins {
*
* \param ip The ip address in dotted string notation.
*/
void source_address(const std::string &ip);
void src_addr(const std::string &ip);
/**
* \brief Setter for the source address field.
*
* \param ip The ip address in integer notation.
*/
void source_address(uint32_t ip);
void src_addr(uint32_t ip);
/**
* \brief Setter for the destination address field.
*
* \param ip The ip address in dotted string notation.
*/
void dest_address(const std::string &ip);
void dst_addr(const std::string &ip);
/**
* \brief Setter for the destination address field.
*
* \param ip The ip address in integer notation.
*/
void dest_address(uint32_t ip);
void dst_addr(uint32_t ip);
/**
* \brief Sets an IP option.