jpcap
Class UDPPacket

java.lang.Object
  |
  +--jpcap.Packet
        |
        +--jpcap.IPPacket
              |
              +--jpcap.UDPPacket

public class UDPPacket
extends IPPacket

This class represents UDP packet.


Field Summary
 int dst_port
          Destination port number
 int length
          packet length
 int src_port
          Source port number
 
Fields inherited from class jpcap.IPPacket
d_flag, dont_frag, dst_ip, flow_label, hop_limit, ident, more_frag, offset, option, options, priority, protocol, r_flag, rsv_frag, rsv_tos, src_ip, t_flag, version
 
Fields inherited from class jpcap.Packet
caplen, data, datalink, header, len, sec, usec
 
Constructor Summary
UDPPacket(int src_port, int dst_port)
          Creates a UDP packet.
 
Method Summary
 java.lang.String toString()
          Returns a string representation of this packet.

Format: src_port > dst_port
 
Methods inherited from class jpcap.IPPacket
setIPv4Parameter, setIPv6Parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

src_port

public int src_port
Source port number


dst_port

public int dst_port
Destination port number


length

public int length
packet length

Constructor Detail

UDPPacket

public UDPPacket(int src_port,
                 int dst_port)
Creates a UDP packet.

Parameters:
src_port - source port number
dst_port - destination port number
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this packet.

Format: src_port > dst_port

Overrides:
toString in class IPPacket
Returns:
a string representation of this packet