Package org.onlab.packet
Interface IPacket
-
- All Known Implementing Classes:
ARP,Authentication,BaseOptions,BasePacket,Data,DestinationOptions,DHCP,DHCP6,Dhcp6ClientDataOption,Dhcp6ClientIdOption,Dhcp6CLTOption,Dhcp6Duid,Dhcp6IaAddressOption,Dhcp6IaNaOption,Dhcp6IaPdOption,Dhcp6IaPrefixOption,Dhcp6IaTaOption,Dhcp6InterfaceIdOption,Dhcp6LeaseQueryOption,Dhcp6Option,Dhcp6RelayOption,DhcpOption,DhcpRelayAgentOption,EAP,EAPOL,EAPOLMkpdu,EAPOLMkpduBasicParameterSet,EAPOLMkpduDistributedSAKParameterSet,EAPOLMkpduICVIndicatorParameterSet,EAPOLMkpduMACSecUseParameterSet,EAPOLMkpduPeerListParameterSet,EncapSecurityPayload,Ethernet,Fragment,HopByHopOptions,ICMP,ICMP6,ICMPEcho,IGMP,IGMP.IGMPv2,IGMP.IGMPv3,IP,IPv4,IPv6,Lacp,LacpBaseTlv,LacpCollectorTlv,LacpTerminatorTlv,LacpTlv,LLC,LLDP,MPLS,NeighborAdvertisement,NeighborDiscoveryOptions,NeighborSolicitation,ONOSLLDP,PIM,PIMHello,PIMJoinPrune,RADIUS,Redirect,RIP,RIPng,RIPngEntry,RIPV2AuthEntry,RIPV2Entry,RouterAdvertisement,RouterSolicitation,Routing,Slow,TCP,UDP,VXLAN
public interface IPacketPacket Interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IPacketgetParent()Obtain the parent packet.IPacketgetPayload()Obtain the packet payload.voidresetChecksum()Reset any checksum as needed, and call resetChecksum on all parents.byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.IPacketsetParent(IPacket packet)Configure a new parent packet.IPacketsetPayload(IPacket packet)Assign the packet payload.
-
-
-
Method Detail
-
getPayload
IPacket getPayload()
Obtain the packet payload.- Returns:
- the payload
-
setPayload
IPacket setPayload(IPacket packet)
Assign the packet payload.- Parameters:
packet- new payload- Returns:
- self
-
getParent
IPacket getParent()
Obtain the parent packet.- Returns:
- parent packet
-
setParent
IPacket setParent(IPacket packet)
Configure a new parent packet.- Parameters:
packet- new parent- Returns:
- self
-
resetChecksum
void resetChecksum()
Reset any checksum as needed, and call resetChecksum on all parents.
-
serialize
byte[] serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.- Returns:
- a byte[] containing this packet and payloads
-
-