1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-26 20:01:35 +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

@@ -200,11 +200,7 @@ Tins::PDU* Tins::ARP::make_arp_reply(const string& iface,
const uint8_t* hw_snd) {
/* Create ARP packet and set its attributes */
ARP* arp = new ARP();
arp->target_ip_addr(target);
arp->sender_ip_addr(sender);
arp->target_hw_addr(hw_tgt);
arp->sender_hw_addr(hw_snd);
ARP* arp = new ARP(target, sender, hw_tgt, hw_snd);
arp->opcode(REPLY);
/* Create the EthernetII PDU with the ARP PDU as its inner PDU */