Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

spoof.c File Reference

functions to spoof/forge network packets More...

#include "spoof.h"
#include "spoof_private.h"
#include <libnet.h>
#include "debug.h"
#include "peerdef.h"

Go to the source code of this file.

Functions

errorcode spoof (tcp_packet_info_t *tcp_hdr, char *device, void *payload, unsigned long payload_len, short ttl)
 spoofs a tcp packet


Detailed Description

functions to spoof/forge network packets

Author:
Daniel Ferullo (ferullo@cmu.edu)

Definition in file spoof.c.


Function Documentation

errorcode spoof tcp_packet_info_t tcp_hdr,
char *  device,
void *  payload,
unsigned long  payload_len,
short  ttl
 

spoofs a tcp packet

Parameters:
tcp_hdr the tcp_packet_info_t with the essential information to spoof * a tcp packet based on.
device the device to spoof on
payload pointer to the payload of the packet. if NULL then no payload
payload_len the length of the payload
ttl the TTL to use on the spoofed packets
Returns:
SUCCESS, errorcode on failure

Definition at line 31 of file spoof.c.

References tcp_packet_info::ack_flag, tcp_packet_info::ack_num, CHECK_NOT_NULL, tcp_packet_info::d_addr, tcp_packet_info::d_port, DBG_SPOOF, DEBUG, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, errorcode, PORT_2HBO, tcp_packet_info::s_addr, tcp_packet_info::s_port, tcp_packet_info::seq_num, SEQ_NUM_2HBO, tcp_packet_info::syn_flag, tcp_packet_info_t, tcp_packet_info::window, and WINDOW_2HBO.

Referenced by flood_syns(), peer_fsm_forge_syn_ack(), and synack_flood().


Generated on Wed Mar 30 23:20:48 2005 for NATBLASTER by  doxygen 1.3.9.1