1 /*****************************************************************************
2 * Copyright 2005 Daniel Ferullo *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
16 *****************************************************************************/
20 * @author Daniel Ferullo (ferullo@cmu.edu)
22 * @brief functions to spoof/forge tcp/ip packets
28 #include "errorcodes.h"
32 * @brief spoofs a tcp packet
34 * @param tcp_hdr the tcp_packet_info_t with the essential information to spoof * a tcp packet based on.
35 * @param device the device to spoof on
36 * @param payload pointer to the payload of the packet. if NULL then no payload
37 * @param payload_len the length of the payload
38 * @param ttl the TTL to use on the spoofed packets
40 * @return SUCCESS, errorcode on failure
42 errorcode
spoof(tcp_packet_info_t
*tcp_hdr
, char *device
, void *payload
,
43 unsigned long payload_len
, short ttl
);
45 #endif /* __SPOOF_H__ */