Package org.onlab.packet
Class BasePacket
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- All Implemented Interfaces:
IPacket
- Direct Known Subclasses:
ARP,Authentication,BaseOptions,Data,DHCP,DHCP6,Dhcp6Duid,Dhcp6Option,DhcpOption,EAP,EAPOL,EAPOLMkpdu,EAPOLMkpduBasicParameterSet,EAPOLMkpduDistributedSAKParameterSet,EAPOLMkpduICVIndicatorParameterSet,EAPOLMkpduMACSecUseParameterSet,EAPOLMkpduPeerListParameterSet,EncapSecurityPayload,Ethernet,Fragment,ICMP,ICMP6,ICMPEcho,IGMP,IP,Lacp,LacpTlv,LLC,LLDP,MPLS,NeighborAdvertisement,NeighborDiscoveryOptions,NeighborSolicitation,PIM,PIMHello,PIMJoinPrune,RADIUS,Redirect,RIP,RIPng,RIPngEntry,RIPV2AuthEntry,RIPV2Entry,RouterAdvertisement,RouterSolicitation,Routing,Slow,TCP,UDP,VXLAN
public abstract class BasePacket extends java.lang.Object implements IPacket
Base packet class.
-
-
Constructor Summary
Constructors Constructor Description BasePacket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()This implementation of clone() is here to preserve backwards compatibility.booleanequals(java.lang.Object obj)IPacketgetParent()Obtain the parent packet.IPacketgetPayload()Obtain the packet payload.inthashCode()voidresetChecksum()Reset any checksum as needed, and call resetChecksum on all parents.IPacketsetParent(IPacket parent)Configure a new parent packet.IPacketsetPayload(IPacket payload)Assign the packet payload.
-
-
-
Method Detail
-
getParent
public IPacket getParent()
Description copied from interface:IPacketObtain the parent packet.
-
setParent
public IPacket setParent(IPacket parent)
Description copied from interface:IPacketConfigure a new parent packet.
-
getPayload
public IPacket getPayload()
Description copied from interface:IPacketObtain the packet payload.- Specified by:
getPayloadin interfaceIPacket- Returns:
- the payload
-
setPayload
public IPacket setPayload(IPacket payload)
Description copied from interface:IPacketAssign the packet payload.- Specified by:
setPayloadin interfaceIPacket- Parameters:
payload- new payload- Returns:
- self
-
resetChecksum
public void resetChecksum()
Description copied from interface:IPacketReset any checksum as needed, and call resetChecksum on all parents.- Specified by:
resetChecksumin interfaceIPacket
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
clone
public java.lang.Object clone()
This implementation of clone() is here to preserve backwards compatibility. Applications should not use clone() and instead use the duplicate() methods on the packet classes.- Overrides:
clonein classjava.lang.Object- Returns:
- copy of packet
-
-