1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 20:44:26 +01:00

Ported almost everything to BSD. Utils::route_entries and sending link layer PDUs still don't work.

This commit is contained in:
Matias Fontanini
2012-11-28 00:11:42 -03:00
parent e6e3e8453b
commit 6696c1b284
23 changed files with 486 additions and 227 deletions

View File

@@ -34,6 +34,7 @@
#ifndef WIN32
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#else
#include <winsock2.h>
#endif
@@ -168,7 +169,12 @@ void IP::tos(uint8_t new_tos) {
}
void IP::tot_len(uint16_t new_tot_len) {
// BSD wants this in host byte order............
#ifdef BSD
_ip.tot_len = new_tot_len;
#else
_ip.tot_len = Endian::host_to_be(new_tot_len);
#endif
}
void IP::id(uint16_t new_id) {