mirror of
https://github.com/mfontanini/libtins
synced 2026-01-29 04:54:28 +01:00
Updated IP, PDU and PacketSender so as to send forged ip packets successfully
This commit is contained in:
@@ -10,6 +10,14 @@ namespace Tins {
|
||||
namespace Utils {
|
||||
uint32_t ip_to_int(const std::string &ip);
|
||||
std::string ip_to_string(uint32_t ip);
|
||||
|
||||
inline uint32_t ntohl(uint32_t address) {
|
||||
return (((address & 0xff000000) >> 24) |
|
||||
((address & 0x00ff0000) >> 8) |
|
||||
((address & 0x0000ff00) << 8) |
|
||||
((address & 0x000000ff) << 24));
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user