mirror of
https://github.com/mfontanini/libtins
synced 2026-01-29 21:14:28 +01:00
Added license to some files.
This commit is contained in:
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* libtins is a net packet wrapper library for crafting and
|
||||||
|
* interpreting sniffed packets.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 Nasel
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __ARP_H
|
#ifndef __ARP_H
|
||||||
#define __ARP_H
|
#define __ARP_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* libtins is a net packet wrapper library for crafting and
|
||||||
|
* interpreting sniffed packets.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 Nasel
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __ICMP_H
|
#ifndef __ICMP_H
|
||||||
#define __ICMP_H
|
#define __ICMP_H
|
||||||
|
|
||||||
|
|||||||
23
src/arp.cpp
23
src/arp.cpp
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* libtins is a net packet wrapper library for crafting and
|
||||||
|
* interpreting sniffed packets.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 Nasel
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
@@ -18,6 +40,7 @@ Tins::ARP::ARP() : PDU(0x0608) {
|
|||||||
void Tins::ARP::set_arp_request(const string &ip_dst, const string &ip_src, const string &hw_src) {
|
void Tins::ARP::set_arp_request(const string &ip_dst, const string &ip_src, const string &hw_src) {
|
||||||
_arp.ar_tip = Utils::resolve_ip(ip_dst);
|
_arp.ar_tip = Utils::resolve_ip(ip_dst);
|
||||||
_arp.ar_sip = Utils::resolve_ip(ip_src);
|
_arp.ar_sip = Utils::resolve_ip(ip_src);
|
||||||
|
_arp.ar_op = REQUEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t Tins::ARP::header_size() const {
|
uint32_t Tins::ARP::header_size() const {
|
||||||
|
|||||||
22
src/icmp.cpp
22
src/icmp.cpp
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* libtins is a net packet wrapper library for crafting and
|
||||||
|
* interpreting sniffed packets.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 Nasel
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user