SourceForge Jpcap

net.sourceforge.jpcap.net
Interface IP.UDP

All Known Implementing Classes:
UDPPacket
Enclosing interface:
IP

public static interface IP.UDP

UDP (User Datagram Protocol) API interface. This is read-only. You probably can use Jpcap to send UDP packets, but what exactly is the point, when you have a nice TCP API already?

Since:
2.0.0
Version:
$Revision: 1.1 $
Author:
Esmond Pitt

Method Summary
 int getDestinationPort()
          Fetches the destination port number.
 int getSourcePort()
          Fetch the source port number.
 int getUDPChecksum()
          Fetch the UDP checksum.
 byte[] getUDPData()
          Fetch the UDP data as a byte array.
 byte[] getUDPHeader()
          Fetch the UDP header as a byte array.
 boolean isValidUDPChecksum()
          Return true iff the UDP checksum is valid.
 

Method Detail

getSourcePort

int getSourcePort()
Fetch the source port number.

Returns:
the souce port number.

getDestinationPort

int getDestinationPort()
Fetches the destination port number.

Returns:
the destination port number.

getUDPChecksum

int getUDPChecksum()
Fetch the UDP checksum.

Returns:
the UDP checksum.

getUDPHeader

byte[] getUDPHeader()
Fetch the UDP header as a byte array.

Returns:
the UDP header as a byte array.

getUDPData

byte[] getUDPData()
Fetch the UDP data as a byte array.

Returns:
the UDP data as a byte array.

isValidUDPChecksum

boolean isValidUDPChecksum()
Return true iff the UDP checksum is valid.

Returns:
true or false.

Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008.