|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jnetpcap.PcapPktHdr
public class PcapPktHdr
Class peered with native pcap_pkthdr structure. This classes
fields are initialized with values from the C structure. There are no setter
methods, since the pcap_pkthdr C structure is used in
read-only fassion.
| Constructor Summary | |
|---|---|
PcapPktHdr()
Initializes the timestamp fields to current time and length fields to 0. |
|
PcapPktHdr(int caplen,
int len)
Allocates a new packet header and initializes the caplen and len fields. |
|
PcapPktHdr(long seconds,
int useconds,
int caplen,
int len)
|
|
| Method Summary | |
|---|---|
int |
getCaplen()
Number of bytes actually captured. |
int |
getLen()
Number of original bytes in the packet. |
long |
getSeconds()
Capture timestamp in seconds. |
int |
getUseconds()
Capture timestamp in microseconds fraction. |
void |
setCaplen(int caplen)
|
void |
setLen(int len)
|
void |
setSeconds(long seconds)
|
void |
setUseconds(int useconds)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PcapPktHdr()
public PcapPktHdr(int caplen,
int len)
caplen - amount of data capturedlen - original packet length
public PcapPktHdr(long seconds,
int useconds,
int caplen,
int len)
seconds - time stamp in secondsuseconds - a fraction of a second. Valid value is from 0 to 999,999.caplen - amount of data capturedlen - original packet length| Method Detail |
|---|
public final long getSeconds()
public final int getUseconds()
public final int getCaplen()
public final int getLen()
public final void setSeconds(long seconds)
seconds - the seconds to setpublic final void setUseconds(int useconds)
useconds - the useconds to setpublic final void setCaplen(int caplen)
caplen - the caplen to setpublic final void setLen(int len)
len - the len to set
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||