A C D E F G H I J L M N O P R S T U V W

A

ack - Variable in class jpcap.TCPPacket
ACK flag
ack_num - Variable in class jpcap.TCPPacket
ACK number
addr_entry_size - Variable in class jpcap.ICMPPacket
Address entry size
addr_num - Variable in class jpcap.ICMPPacket
Number of the advertised addresses
addrs - Variable in class jpcap.IPv6Option
IP addresses of the route (for routing option)
AH_OPTION - Static variable in class jpcap.IPv6Option
AH option
alive_time - Variable in class jpcap.ICMPPacket
Address alive time
ARP_REPLY - Static variable in class jpcap.ARPPacket
Operation: ARP reply
ARP_REQUEST - Static variable in class jpcap.ARPPacket
Operation: ARP request
ARPPacket - class jpcap.ARPPacket.
This class represents an ARP/RARP packet.
ARPPacket() - Constructor for class jpcap.ARPPacket
 

C

caplen - Variable in class jpcap.Packet
Captured length
checksum - Variable in class jpcap.ICMPPacket
Checksum
close() - Method in class jpcap.Jpcap
Close the interface or dump file which is currently opened.
closeDumpFile() - Method in class jpcap.JpcapWriter
Close opening dump file.
code - Variable in class jpcap.ICMPPacket
ICMP code

D

d_flag - Variable in class jpcap.IPPacket
IP flag bit [D]elay (v4)
data - Variable in class jpcap.Packet
Data of the packet (excluded the headers).
datalink - Variable in class jpcap.Packet
Header of dataling layer
DatalinkPacket - class jpcap.DatalinkPacket.
This class represents Datagram packet header.
All datagram packet header class, such as EthernetPacket, must inherit this class.
DatalinkPacket() - Constructor for class jpcap.DatalinkPacket
 
DESTINATION_OPTION - Static variable in class jpcap.IPv6Option
Destination option
dont_frag - Variable in class jpcap.IPPacket
Don't fragment flag (v4)
dropped_packets - Variable in class jpcap.Jpcap
Number of packets dropped
dst_ip - Variable in class jpcap.IPPacket
Destionation IP address
dst_mac - Variable in class jpcap.EthernetPacket
Destination MAC address
dst_port - Variable in class jpcap.UDPPacket
Destination port number
dst_port - Variable in class jpcap.TCPPacket
Destination port number

E

equals(Object) - Method in class jpcap.IPAddress
Check if this object is equal to the given object.
ESP_OPTION - Static variable in class jpcap.IPv6Option
ESP option
EthernetPacket - class jpcap.EthernetPacket.
This class represents Ethernet packet header.
EthernetPacket() - Constructor for class jpcap.EthernetPacket
 

F

fin - Variable in class jpcap.TCPPacket
FIN flag
flow_label - Variable in class jpcap.IPPacket
Flow label (v6)
FRAGMENT_OPTION - Static variable in class jpcap.IPv6Option
Fragment option
frametype - Variable in class jpcap.EthernetPacket
Frame type

G

getAddress() - Method in class jpcap.IPAddress
Returns the byte array of this object.
getDestinationAddress() - Method in class jpcap.EthernetPacket
Returns the destination MAC address string.
getErrorMessage() - Method in class jpcap.Jpcap
Returns the error message which was caused by the error while capturing.
getHostAddress() - Method in class jpcap.IPAddress
Returns the IP address string "%d.%d.%d.%d" or "%x:%x::%x:%x"
getHostName() - Method in class jpcap.IPAddress
Return the domain name of this object.
getInetAddress() - Method in class jpcap.IPAddress
Returns the instance of java.net.InetAddress, if this is IPv4 address.
Returns null if this is IPv6.
getJpcapInfo() - Method in class jpcap.Jpcap
Return JpcapInfo of this Jpcap instance.
getPacket() - Method in class jpcap.Jpcap
Captures one packet.
getSenderHardwareAddress() - Method in class jpcap.ARPPacket
Return sender MAC address in String
getSenderProtocolAddress() - Method in class jpcap.ARPPacket
Return sender protocol address (usually in jpcap.IPAddress)
getSourceAddress() - Method in class jpcap.EthernetPacket
Returns the source MAC address string.
getTargetHardwareAddress() - Method in class jpcap.ARPPacket
Return target MAC address in String
getTargetProtocolAddress() - Method in class jpcap.ARPPacket
Return target protocol address (usually in jpcap.IPAddress)

H

handlePacket(Packet) - Method in interface jpcap.JpcapHandler
Method for analyzing packets
Called each time a packet is captured.
hardtype - Variable in class jpcap.ARPPacket
Hardware type
HARDTYPE_ETHER - Static variable in class jpcap.ARPPacket
Hardware type: Ethernet
HARDTYPE_FRAMERELAY - Static variable in class jpcap.ARPPacket
Hardware type: Frame Relay
HARDTYPE_IEEE802 - Static variable in class jpcap.ARPPacket
Hardware type: Token ring
hlen - Variable in class jpcap.ARPPacket
Hardware address length
hlen - Variable in class jpcap.IPv6Option
Header length
HOP_BY_HOP_OPTION - Static variable in class jpcap.IPv6Option
Hop by Hop option
hop_left - Variable in class jpcap.IPv6Option
Hop left (for routing option)
hop_limit - Variable in class jpcap.IPPacket
Hop limit (Time To Live) (v4/v6)

I

ICMP_ECHO - Static variable in class jpcap.ICMPPacket
echo request
ICMP_ECHOREPLY - Static variable in class jpcap.ICMPPacket
echo reply
ICMP_IREQ - Static variable in class jpcap.ICMPPacket
information request
ICMP_IREQREPLY - Static variable in class jpcap.ICMPPacket
information reply
ICMP_MASKREPLY - Static variable in class jpcap.ICMPPacket
address mask reply
ICMP_MASKREQ - Static variable in class jpcap.ICMPPacket
address mask request
ICMP_PARAMPROB - Static variable in class jpcap.ICMPPacket
ip header bad
ICMP_PARAMPROB_ERRATPTR - Static variable in class jpcap.ICMPPacket
ip header bad code: error at param ptr
ICMP_PARAMPROB_LENGTH - Static variable in class jpcap.ICMPPacket
ip header bad code: bad length
ICMP_PARAMPROB_OPTABSENT - Static variable in class jpcap.ICMPPacket
ip header bad code: req.
ICMP_REDIRECT - Static variable in class jpcap.ICMPPacket
redirect
ICMP_REDIRECT_HOST - Static variable in class jpcap.ICMPPacket
redirect code: for host
ICMP_REDIRECT_NET - Static variable in class jpcap.ICMPPacket
redirect code: for network
ICMP_REDIRECT_TOSHOST - Static variable in class jpcap.ICMPPacket
redirect code: for tos and host
ICMP_REDIRECT_TOSNET - Static variable in class jpcap.ICMPPacket
redirect code: for tos and net
ICMP_ROUTERADVERT - Static variable in class jpcap.ICMPPacket
router advertisement
ICMP_ROUTERSOLICIT - Static variable in class jpcap.ICMPPacket
router solicitation
ICMP_SOURCEQUENCH - Static variable in class jpcap.ICMPPacket
packet lost, slow down
ICMP_TIMXCEED - Static variable in class jpcap.ICMPPacket
time exceeded
ICMP_TIMXCEED_INTRANS - Static variable in class jpcap.ICMPPacket
time exceeded code: ttl==0 in transit
ICMP_TIMXCEED_REASS - Static variable in class jpcap.ICMPPacket
time exceeded code: ttl==0 in reass
ICMP_TSTAMP - Static variable in class jpcap.ICMPPacket
timestamp request
ICMP_TSTAMPREPLY - Static variable in class jpcap.ICMPPacket
timestamp reply
ICMP_UNREACH - Static variable in class jpcap.ICMPPacket
dest unreachable
ICMP_UNREACH_FILTER_PROHIB - Static variable in class jpcap.ICMPPacket
dest unreachable code: admin prohib
ICMP_UNREACH_HOST - Static variable in class jpcap.ICMPPacket
dest unreachable code: bad host
ICMP_UNREACH_HOST_PRECEDENCE - Static variable in class jpcap.ICMPPacket
dest unreachable code: host prec vio.
ICMP_UNREACH_HOST_PROHIB - Static variable in class jpcap.ICMPPacket
dest unreachable code: ditto
ICMP_UNREACH_HOST_UNKNOWN - Static variable in class jpcap.ICMPPacket
dest unreachable code: unknown host
ICMP_UNREACH_ISOLATED - Static variable in class jpcap.ICMPPacket
dest unreachable code: src host isolated
ICMP_UNREACH_NEEDFRAG - Static variable in class jpcap.ICMPPacket
dest unreachable code: IP_DF caused drop
ICMP_UNREACH_NET - Static variable in class jpcap.ICMPPacket
dest unreachable code: bad net
ICMP_UNREACH_NET_PROHIB - Static variable in class jpcap.ICMPPacket
dest unreachable code: prohibited access
ICMP_UNREACH_NET_UNKNOWN - Static variable in class jpcap.ICMPPacket
dest unreachable code: unknown net
ICMP_UNREACH_PORT - Static variable in class jpcap.ICMPPacket
dest unreachable code: bad port
ICMP_UNREACH_PRECEDENCE_CUTOFF - Static variable in class jpcap.ICMPPacket
dest unreachable code: prec cutoff
ICMP_UNREACH_PROTOCOL - Static variable in class jpcap.ICMPPacket
dest unreachable code: bad protocol
ICMP_UNREACH_SRCFAIL - Static variable in class jpcap.ICMPPacket
dest unreachable code: src route failed
ICMP_UNREACH_TOSHOST - Static variable in class jpcap.ICMPPacket
dest unreachable code: bad tos for host
ICMP_UNREACH_TOSNET - Static variable in class jpcap.ICMPPacket
dest unreachable code: bad tos for net
ICMPPacket - class jpcap.ICMPPacket.
This class represents a ICMPv4 packet.
ICMPPacket() - Constructor for class jpcap.ICMPPacket
 
id - Variable in class jpcap.ICMPPacket
ID
ident - Variable in class jpcap.IPPacket
IDENTIFICATION (v4)
identification - Variable in class jpcap.IPv6Option
Identification (for fragment option)
INV_REPLY - Static variable in class jpcap.ARPPacket
Identify peer response
INV_REQUEST - Static variable in class jpcap.ARPPacket
Identify peer request
IPAddress - class jpcap.IPAddress.
This class represents an IP address.

Either IPv4 and IPv6 addresses can be represented by this class.
IPAddress(byte[]) - Constructor for class jpcap.IPAddress
Creates IP address of the specified byte array.
This doesn't check if the address is valid.
IPAddress(int, byte[]) - Constructor for class jpcap.IPAddress
Creates IP address of the specified version and byte array.
This doesn't check if the address is valid.
IPAddress(int, String) - Constructor for class jpcap.IPAddress
Creates an IP address of the specified version and IP address or domain name.
IPAddress(String) - Constructor for class jpcap.IPAddress
Creates IPv4 address of the specified address or domain name.
ippacket - Variable in class jpcap.ICMPPacket
IP header which was sent back
IPPacket - class jpcap.IPPacket.
This class represents an IP packet.

Both IPv4 or v6 packet can be handled by this class.
IPPacket() - Constructor for class jpcap.IPPacket
 
IPv6Option - class jpcap.IPv6Option.
This class represents an IPv6 option header.
IPv6Option() - Constructor for class jpcap.IPv6Option
 

J

jpcap - package jpcap
 
Jpcap - class jpcap.Jpcap.
Main class of package jpcap.
Capturing and Sending packets are done through the instance of this class.
Jpcap.JpcapInfo - class jpcap.Jpcap.JpcapInfo.
Class for keeping capture info.
Jpcap(String) - Constructor for class jpcap.Jpcap
Opens the dump file created by tcpdump and creates the instance of this class.
Jpcap(String, int, boolean, int) - Constructor for class jpcap.Jpcap
Initializes the specified network interface and creates the instance of this class.
JpcapHandler - interface jpcap.JpcapHandler.
Interface to define the packet analyzing method for Jpcap.handlePacket()
JpcapWriter - class jpcap.JpcapWriter.
This class is to write packets to dump file
JpcapWriter(Jpcap.JpcapInfo, String) - Constructor for class jpcap.JpcapWriter
Create JpcapWriter instance for saving packets to dump file.

L

length - Variable in class jpcap.IPPacket
Length of this packet (v4/v6)
length - Variable in class jpcap.UDPPacket
Packet length
lookupDevice() - Static method in class jpcap.Jpcap
Returns the name of the device which can be used for capturing.

M

m_flag - Variable in class jpcap.IPv6Option
More fragment option (for fragment option)
more_frag - Variable in class jpcap.IPPacket
More fragment flag (v4)
mtu - Variable in class jpcap.ICMPPacket
MTU

N

next_header - Variable in class jpcap.IPv6Option
Next header
NONE_OPTION - Static variable in class jpcap.IPv6Option
No next header option

O

offset - Variable in class jpcap.IPPacket
Fragment offset (v4)
offset - Variable in class jpcap.IPv6Option
Offset (for fragment option)
openRawSocket() - Method in class jpcap.Jpcap
Initializes the sending socket.
This method must be called before sending packets.
operation - Variable in class jpcap.ARPPacket
Operation
option - Variable in class jpcap.IPv6Option
Option
options - Variable in class jpcap.IPPacket
Option headers (v6)
orig_timestamp - Variable in class jpcap.ICMPPacket
Timestamp Request

P

Packet - class jpcap.Packet.
Super class of all the packet object which can be captured by Jpcap
Packet() - Constructor for class jpcap.Packet
 
plen - Variable in class jpcap.ARPPacket
Protocol address length
preference - Variable in class jpcap.ICMPPacket
Preferences
priority - Variable in class jpcap.IPPacket
Priority (or class) of this packet (v4/v6)
processPacket(int, JpcapHandler) - Method in class jpcap.Jpcap
Captures the specified number of packets consecutively.
protocol - Variable in class jpcap.IPPacket
Protocol of higher layer (v4/v6)
prototype - Variable in class jpcap.ARPPacket
Protocol type
PROTOTYPE_IP - Static variable in class jpcap.ARPPacket
Protocol type: IP
psh - Variable in class jpcap.TCPPacket
PSH flag

R

r_flag - Variable in class jpcap.IPPacket
IP flag bit [R]eliability (v4)
RARP_REPLY - Static variable in class jpcap.ARPPacket
Operation: Reverse ARP reply
RARP_REQUEST - Static variable in class jpcap.ARPPacket
Operation: Reverse ARP request
received_packets - Variable in class jpcap.Jpcap
Number of packets received
recv_timestamp - Variable in class jpcap.ICMPPacket
Timestamp Request
redir_ip - Variable in class jpcap.ICMPPacket
Redirect IP address
router_ip - Variable in class jpcap.ICMPPacket
Addresses advertised
ROUTING_OPTION - Static variable in class jpcap.IPv6Option
Routing option
routing_type - Variable in class jpcap.IPv6Option
Routing type (for routing option)
rst - Variable in class jpcap.TCPPacket
RST flag
rsv_frag - Variable in class jpcap.IPPacket
Reserved fragmentation flag (v4)

S

sec - Variable in class jpcap.Packet
Timestamp in second.
sender_hardaddr - Variable in class jpcap.ARPPacket
Sender hardware address
sender_protoaddr - Variable in class jpcap.ARPPacket
Sender protocol address
sendPacket(IPPacket) - Method in class jpcap.Jpcap
Sends a IP packet.

Currently only TCP/UDP/ICMP over IPv4 are supported.
For ICMP, only echo packets can be sent.
seq - Variable in class jpcap.ICMPPacket
Sequence number
sequence - Variable in class jpcap.TCPPacket
Sequence number
sequence - Variable in class jpcap.IPv6Option
Sequence number (for AH option)
setFilter(String, boolean) - Method in class jpcap.Jpcap
Sets up the capturing filter.
setIPv4Parameter(int, boolean, boolean, boolean, boolean, boolean, boolean, int, int, int, int, IPAddress, IPAddress) - Method in class jpcap.IPPacket
Sets up the parameters of IPv4
setIPv6Parameter(int, int, int, int, IPAddress, IPAddress) - Method in class jpcap.IPPacket
Sets up the parameters of IPv6
spi - Variable in class jpcap.IPv6Option
SPI (for AH option)
src_ip - Variable in class jpcap.IPPacket
Source IP address
src_mac - Variable in class jpcap.EthernetPacket
Source MAC address
src_port - Variable in class jpcap.UDPPacket
Source port number
src_port - Variable in class jpcap.TCPPacket
Source port number
subnetmask - Variable in class jpcap.ICMPPacket
Subnet mask
syn - Variable in class jpcap.TCPPacket
SYN flag

T

t_flag - Variable in class jpcap.IPPacket
IP flag bit [T]hrough (v4)
target_hardaddr - Variable in class jpcap.ARPPacket
Target hardware address
target_protoaddr - Variable in class jpcap.ARPPacket
Target protocol address
TCPPacket - class jpcap.TCPPacket.
This class represents TCP packet.
TCPPacket(int, int, long, long, boolean, boolean, boolean, boolean, boolean, boolean, int, int) - Constructor for class jpcap.TCPPacket
Creates the object of a TCP packet.
toString() - Method in class jpcap.Packet
Converts this header to String.

sec:usec
toString() - Method in class jpcap.ARPPacket
Convert this object to String

ARP(hardtype:prototype)
toString() - Method in class jpcap.EthernetPacket
Converts this header to String.

src_mac -> dst_mac (frametype)
toString() - Method in class jpcap.IPPacket
Converts this object to String

IPv4: src_ip->dst_ip protocol(protocol) priority(priority) [D][T][R] hop(hop_limit) [RF/][DF/][MF] offset(offset) ident(ident)

IPv6: src_ip->dst_ip protocol(protocol) priority(priority) flowlabel(flow_label) hop(hop_limit)
toString() - Method in class jpcap.UDPPacket
Convert this object to String.

src_port > dst_port
toString() - Method in class jpcap.TCPPacket
Conver this object to String.

src_port > dst_port seq(sequence) win(window) [ack ack_num] [S][F][P]
toString() - Method in class jpcap.IPAddress
Returns the IP address string "%d.%d.%d.%d" or "%x:%x::%x:%x"
toString() - Method in class jpcap.ICMPPacket
Represents this ICMP packet as String

type(type) code(code)
trans_timestamp - Variable in class jpcap.ICMPPacket
Timestamp Request
type - Variable in class jpcap.ICMPPacket
ICMP type
type - Variable in class jpcap.IPv6Option
Option header type

U

UDPPacket - class jpcap.UDPPacket.
This class represents UDP packet.
UDPPacket(int, int) - Constructor for class jpcap.UDPPacket
Create the object of a UDP packet
updateStat() - Method in class jpcap.Jpcap
Updates received_packets and dropped_packets
urg - Variable in class jpcap.TCPPacket
URG flag
urgent_pointer - Variable in class jpcap.TCPPacket
Urgent pointer
usec - Variable in class jpcap.Packet
Timestamp in milli second.

V

version - Variable in class jpcap.IPPacket
IP version (v4/v6)

W

window - Variable in class jpcap.TCPPacket
Window size
writeDumpFile(Packet) - Method in class jpcap.JpcapWriter
Write a packet to dump file.

A C D E F G H I J L M N O P R S T U V W