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 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 Object
clone()
This implementation of clone() is here to preserve backwards compatibility.boolean
equals(Object obj)
IPacket
getParent()
Obtain the parent packet.IPacket
getPayload()
Obtain the packet payload.int
hashCode()
void
resetChecksum()
Reset any checksum as needed, and call resetChecksum on all parents.IPacket
setParent(IPacket parent)
Configure a new parent packet.IPacket
setPayload(IPacket payload)
Assign the packet payload.
-
-
-
Method Detail
-
getParent
public IPacket getParent()
Description copied from interface:IPacket
Obtain the parent packet.
-
setParent
public IPacket setParent(IPacket parent)
Description copied from interface:IPacket
Configure a new parent packet.
-
getPayload
public IPacket getPayload()
Description copied from interface:IPacket
Obtain the packet payload.- Specified by:
getPayload
in interfaceIPacket
- Returns:
- the payload
-
setPayload
public IPacket setPayload(IPacket payload)
Description copied from interface:IPacket
Assign the packet payload.- Specified by:
setPayload
in interfaceIPacket
- Parameters:
payload
- new payload- Returns:
- self
-
resetChecksum
public void resetChecksum()
Description copied from interface:IPacket
Reset any checksum as needed, and call resetChecksum on all parents.- Specified by:
resetChecksum
in interfaceIPacket
-
-