Table of Contents

Name

tcpsend - send an Ethernet frame containing a TCP/IPv4 packet with user-specified header values

Synopsis

tcpsend [ -c count ] [ -d debuglevel ] [ -h ] [ -p pause_time ] [ -q ] [ -v ] [ -w ]
[
-i interface_name ]
[
-E ether_source_address ] [ -e ether_dest_address ]
[
-Q vlan_id ]
[
-S ip_src_address ] [ -s ip_dest_address ] [ -T ip_ttl ] [ -D ip_id ] [ -f ip_frag ] [ -67 ] [ -Y tcp_src_port ] [ -y tcp_dest_port ] [ -B tcp_seq_num ] [ -A tcp_ack_num ] [ -U tcp_urg_ptr ] [ -W tcp_win ] [ -012345 ]

Description

tcpsend send an Ethernet frame containing a TCP/IPv4 packet containing header values you specify. This is a diagnostic tool intended for use by network administrators.

tcpsend is a product of Network Switching and Routing at Princeton University’s Office of Information Technology, and is available from https://www.net.princeton.edu/software/tcpsend/

Presently the product builds and runs on Solaris 9 and 10 on SPARC with gcc.

The program relies on the libnet(3) library.

Options

-c count
Specifies the number of packets to send. If not specified, this defaults to 1.
-d debug_level
Sets the debug_level variable that controls the amount of debugging messages generated. If not specified, this defaults to 0 (no debugging). Presently no debugging messages are defined.
-E ether_source_address
Specifies the source address of the Ethernet frame. If not specified, this defaults to the Ethernet address of the outgoing interface. (Some environments may not allow you to override this value.)
-e ether_dest_address
Specifies the destination address of the Ethernet frame. This option must be specified; no default value is supplied.
-h
Display a brief usage summary, then exit.
-i interface_name
Specifes the name of the Ethernet interface through which the packet should be sent. If not specified, this defaults to the first interface that is up (other than loopback).
-p pause_time
Specifies the number of seconds to pause between sending each packet, when the packet count is great than 1. If not specified, this defaults to 1 second.
-Q vlan_id
Tag the frame with an 802.1Q VLAN ID.
-q
Specifies ’quiet’ operation; only errors and warnings are displayed.
-S ip_src_address
Specifies the IP source address. If not specified, this defaults to the primary IP address of the outgoing interface.
-s ip_dest_address
Specifies the IP destination address. This option must be specified; no default value is supplied.
-T ip_ttl
Overrides the default IP TTL (64).
-D ip_id
Overrides the default IP datagram id (1).
-f ip_frag
Overrides the default IP fragmentation offset (0).
-6
Set the IP DF (don’t fragment) flag.
-7
Set the IP MF (more fragments) flag.
-v
Display the program’s version number, then exit.
-w
Specifies that tcpsend should not warn you about values that might cause network problems.
-Y tcp_src_port
Override the default TCP source port (0).
-y tcp_dest_port
Override the default TCP destination port (0).
-B tcp_seq_num
Override the default TCP sequence number (0).
-A tcp_ack_num
Override the default TCP acknowledgement number (0).
-U tcp_urg_ptr
Override the default TCP urgent pointer (0).
-W tcp_win
Override the default TCP window size (1024).
-0
Set the TCP SYN flag.
-1
Set the TCP ACK flag.
-2
Set the TCP FIN flag.
-3
Set the TCP RST flag.
-4
Set the TCP URG flag.
-5
Set the TCP PUSH flag.

Operation

tcpsend is a diagnostic tool intended to be used by an network administrator. It is possible to specify values that will interfere with the normal operation of devices attached to the network.

tcpsend checks for a few-common values that are likely to cause problems, but by no means can catch all such combinations of values. When it believes the values you specify could cause a problem, it will display a warning, and ask you if you still wish to send the packet. You can skip these checks (and the associated prompt) with the -w option; your packet will be sent without comment.

There is presently no support for specifying IP options, TCP options, or a TCP payload.

Author

The program was written by Irwin Tillman of Princeton University OIT Network Switching and Routing. It was written to run on Solaris 9 and 10, relying on the generally-available libnet(3) library.

See Also

libnet(3)
available from https://github.com/libnet/libnet/releases

or https://codedocs.xyz/libnet/libnet/md_README.html


Table of Contents