1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-26 03:51:35 +01:00

Fixed some bugs.

This commit is contained in:
Matias Fontanini
2011-09-18 11:42:21 -03:00
parent a1f2334d52
commit 1f2967c8fb
6 changed files with 138 additions and 28 deletions

View File

@@ -27,7 +27,6 @@
#endif
#include "snap.h"
#include "constants.h"
#include "utils.h"
#include "arp.h"
#include "ip.h"
#include "eapol.h"
@@ -68,6 +67,22 @@ Tins::SNAP &Tins::SNAP::operator= (const SNAP &other) {
return *this;
}
void Tins::SNAP::id(uint8_t new_id) {
_snap.id = new_id;
}
void Tins::SNAP::poll(uint8_t new_poll) {
_snap.poll = new_poll;
}
void Tins::SNAP::org_code(uint32_t new_org) {
_snap.org_code = new_org;
}
void Tins::SNAP::eth_type(uint32_t new_eth) {
_snap.eth_type = Utils::net_to_host_s(new_eth);
}
uint32_t Tins::SNAP::header_size() const {
return sizeof(_snap);
}