|
| | Ipv4Header () |
| |
| | Ipv4Header (const Ipv4Header &other) |
| |
| virtual | ~Ipv4Header () |
| |
| Ipv4Header & | operator= (const Ipv4Header &other) |
| |
| virtual Ipv4Header * | dup () const override |
| |
| virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
| |
| virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
| |
| virtual short | getVersion () const |
| |
| virtual void | setVersion (short version) |
| |
| virtual B | getHeaderLength () const |
| |
| virtual void | setHeaderLength (B headerLength) |
| |
| virtual short | getTypeOfService () const |
| |
| virtual void | setTypeOfService (short typeOfService) |
| |
| virtual B | getTotalLengthField () const |
| |
| virtual void | setTotalLengthField (B totalLengthField) |
| |
| virtual uint16_t | getIdentification () const |
| |
| virtual void | setIdentification (uint16_t identification) |
| |
| virtual bool | getReservedBit () const |
| |
| virtual void | setReservedBit (bool reservedBit) |
| |
| virtual bool | getMoreFragments () const |
| |
| virtual void | setMoreFragments (bool moreFragments) |
| |
| virtual bool | getDontFragment () const |
| |
| virtual void | setDontFragment (bool dontFragment) |
| |
| virtual uint16_t | getFragmentOffset () const |
| |
| virtual void | setFragmentOffset (uint16_t fragmentOffset) |
| |
| virtual short | getTimeToLive () const |
| |
| virtual void | setTimeToLive (short timeToLive) |
| |
| virtual IpProtocolId | getProtocolId () const |
| |
| virtual void | setProtocolId (IpProtocolId protocolId) |
| |
| virtual uint16_t | getCrc () const |
| |
| virtual void | setCrc (uint16_t crc) |
| |
| virtual CrcMode | getCrcMode () const |
| |
| virtual void | setCrcMode (CrcMode crcMode) |
| |
| virtual const Ipv4Address & | getSrcAddress () const |
| |
| virtual Ipv4Address & | getSrcAddressForUpdate () |
| |
| virtual void | setSrcAddress (const Ipv4Address &srcAddress) |
| |
| virtual const Ipv4Address & | getDestAddress () const |
| |
| virtual Ipv4Address & | getDestAddressForUpdate () |
| |
| virtual void | setDestAddress (const Ipv4Address &destAddress) |
| |
| virtual const TlvOptions & | getOptions () const |
| |
| virtual TlvOptions & | getOptionsForUpdate () |
| |
| virtual void | setOptions (const TlvOptions &options) |
| |
| virtual short | getDscp () const |
| |
| virtual void | setDscp (short dscp) |
| |
| virtual short | getEcn () const |
| |
| virtual void | setEcn (short ecn) |
| |
| virtual unsigned int | getOptionArraySize () const |
| | Returns the number of extension headers in this datagram. More...
|
| |
| virtual TlvOptionBase & | getOptionForUpdate (unsigned int k) |
| | Returns the kth extension header in this datagram. More...
|
| |
| virtual const TlvOptionBase & | getOption (unsigned int k) const |
| |
| virtual TlvOptionBase * | findMutableOptionByType (short int optionType, int index=0) |
| | Returns the TlvOptionBase of the specified type, or nullptr. More...
|
| |
| virtual const TlvOptionBase * | findOptionByType (short int optionType, int index=0) const |
| |
| virtual void | addOption (TlvOptionBase *opt) |
| | Adds an TlvOptionBase to the datagram. More...
|
| |
| virtual void | addOption (TlvOptionBase *opt, int atPos) |
| |
| virtual B | calculateHeaderByteLength () const |
| | Calculates the length of the Ipv6 header plus the extension headers. More...
|
| |
| virtual L3Address | getSourceAddress () const override |
| |
| virtual void | setSourceAddress (const L3Address &address) override |
| |
| virtual L3Address | getDestinationAddress () const override |
| |
| virtual void | setDestinationAddress (const L3Address &address) override |
| |
| virtual const Protocol * | getProtocol () const override |
| |
| virtual void | setProtocol (const Protocol *protocol) override |
| |
| virtual bool | isFragment () const override |
| |
| | FieldsChunk () |
| |
| | FieldsChunk (const FieldsChunk &other) |
| |
| virtual | ~FieldsChunk () |
| |
| virtual void | parsimPack (cCommBuffer *buffer) const override |
| |
| virtual void | parsimUnpack (cCommBuffer *buffer) override |
| |
| virtual void | handleChange () override |
| |
| virtual ChunkType | getChunkType () const override |
| | Returns the type of this chunk as an enum member. More...
|
| |
| virtual bool | containsSameData (const Chunk &other) const override |
| | Returns true if the two chunks represent the same binary data. More...
|
| |
| virtual b | getChunkLength () const override |
| | Returns the length of data represented by this chunk. More...
|
| |
| virtual void | setChunkLength (b chunkLength) |
| |
| virtual void | addChunkLength (b chunkLength) |
| |
| virtual std::ostream & | printFieldsToStream (std::ostream &stream, int level, int evFlags=0) const override |
| | Prints an optinally formatted human readable string representation of the feilds of this chunk to the given stream. More...
|
| |
| | Chunk () |
| |
| | Chunk (const Chunk &other) |
| |
| virtual const Ptr< Chunk > | dupShared () const |
| | Returns a mutable copy of this chunk in a shared pointer. More...
|
| |
| virtual void | forEachChild (cVisitor *v) override |
| |
| virtual bool | isMutable () const |
| |
| virtual bool | isImmutable () const |
| |
| virtual void | markImmutable () |
| |
| void | markMutableIfExclusivelyOwned () |
| |
| virtual bool | isComplete () const |
| |
| virtual bool | isIncomplete () const |
| |
| virtual void | markIncomplete () |
| |
| virtual bool | isCorrect () const |
| |
| virtual bool | isIncorrect () const |
| |
| virtual void | markIncorrect () |
| |
| virtual bool | isProperlyRepresented () const |
| |
| virtual bool | isImproperlyRepresented () const |
| |
| virtual void | markImproperlyRepresented () |
| |
| virtual void | moveIterator (Iterator &iterator, b length) const |
| |
| virtual void | seekIterator (Iterator &iterator, b position) const |
| |
| virtual bool | canInsertAtFront (const Ptr< const Chunk > &chunk) const |
| | Returns true if this chunk is capable of representing the result. More...
|
| |
| virtual bool | canInsertAtBack (const Ptr< const Chunk > &chunk) const |
| | Returns true if this chunk is capable of representing the result. More...
|
| |
| virtual bool | canInsertAt (const Ptr< const Chunk > &chunk, b offset) const |
| | Returns true if this chunk is capable of representing the result. More...
|
| |
| void | insertAtFront (const Ptr< const Chunk > &chunk) |
| | Inserts the provided chunk at the beginning of this chunk. More...
|
| |
| void | insertAtBack (const Ptr< const Chunk > &chunk) |
| | Inserts the provided chunk at the end of this chunk. More...
|
| |
| void | insertAt (const Ptr< const Chunk > &chunk, b offset) |
| | Inserts the provided chunk into this chunk. More...
|
| |
| virtual bool | canRemoveAtFront (b length) const |
| | Returns true if this chunk is capable of representing the result. More...
|
| |
| virtual bool | canRemoveAtBack (b length) const |
| | Returns true if this chunk is capable of representing the result. More...
|
| |
| virtual bool | canRemoveAt (b offset, b length) const |
| | Returns true if this chunk is capable of representing the result. More...
|
| |
| void | removeAtFront (b length) |
| | Removes the requested part from the beginning of this chunk. More...
|
| |
| void | removeAtBack (b length) |
| | Removes the requested part from the end of this chunk. More...
|
| |
| void | removeAt (b offset, b length) |
| | Removes the requested part from this chunk. More...
|
| |
| int | getChunkId () const |
| | Returns the sequentially assigned id. More...
|
| |
| virtual bool | isEmpty () const |
| | Returns true if this chunk contains no data. More...
|
| |
| const Ptr< Chunk > | simplify () const |
| | Returns the simplified representation of this chunk eliminating all potential redundancies. More...
|
| |
| const Ptr< Chunk > | peek (const Iterator &iterator, b length=unspecifiedLength, int flags=0) const |
| | Returns the designated part of the data represented by this chunk in its default representation. More...
|
| |
| template<typename T > |
| bool | has (const Iterator &iterator, b length=unspecifiedLength) const |
| | Returns whether if the designated part of the data is available in the requested representation. More...
|
| |
| template<typename T > |
| const Ptr< T > | peek (const Iterator &iterator, b length=unspecifiedLength, int flags=0) const |
| | Returns the designated part of the data represented by this chunk in the requested representation. More...
|
| |
| virtual SharingRegionTagSet & | getRegionTags () override |
| | Returns all region tags. More...
|
| |
| int | getNumTags () const |
| | Returns the number of chunk tags. More...
|
| |
| const Ptr< const TagBase > | getTag (int index) const |
| | Returns the chunk tag at the given index. More...
|
| |
| void | clearTags (b offset=b(0), b length=b(-1)) |
| | Clears the set of chunk tags in the given region. More...
|
| |
| void | copyTags (const Chunk &source, b sourceOffset=b(0), b offset=b(0), b length=b(-1)) |
| | Copies the set of chunk tags from the source region to the provided region. More...
|
| |
| template<typename T > |
| const Ptr< const T > | findTag (b offset=b(0), b length=b(-1)) const |
| | Returns the chunk tag for the provided type and range, or returns nullptr if no such chunk tag is found. More...
|
| |
| template<typename T > |
| const Ptr< const T > | getTag (b offset=b(0), b length=b(-1)) const |
| | Returns the chunk tag for the provided type and range, or throws an exception if no such chunk tag is found. More...
|
| |
| template<typename T > |
| void | mapAllTags (b offset, b length, std::function< void(b, b, const Ptr< const T > &)> f) const |
| | Maps all tags in the provided range to to the function. More...
|
| |
| template<typename T > |
| void | mapAllTagsForUpdate (b offset, b length, std::function< void(b, b, const Ptr< T > &)> f) |
| | Maps all tags in the provided range to to the function. More...
|
| |
| template<typename T > |
| std::vector< SharingRegionTagSet::RegionTag< const T > > | getAllTags (b offset=b(0), b length=b(-1)) const |
| | Returns all chunk tags for the provided type and range in a detached vector of region tags. More...
|
| |
| template<typename T > |
| std::vector< SharingRegionTagSet::RegionTag< T > > | getAllTagsForUpdate (b offset=b(0), b length=b(-1)) |
| | Returns all chunk tags for the provided type and range in a detached vector of region tags. More...
|
| |
| template<typename T > |
| const Ptr< T > | addTag (b offset=b(0), b length=b(-1)) |
| | Returns a newly added chunk tag for the provided type and range, or throws an exception if such a chunk tag is already present. More...
|
| |
| template<typename T > |
| const Ptr< T > | addTagIfAbsent (b offset=b(0), b length=b(-1)) |
| | Returns a newly added chunk tag for the provided type and range if absent, or returns the chunk tag that is already present. More...
|
| |
| template<typename T > |
| std::vector< SharingRegionTagSet::RegionTag< T > > | addTagsWhereAbsent (b offset=b(0), b length=b(-1)) |
| | Returns the newly added chunk tags for the provided type and range where the tag is absent. More...
|
| |
| template<typename T > |
| const Ptr< T > | removeTag (b offset, b length) |
| | Removes the chunk tag for the provided type and range, or throws an exception if no such chunk tag is found. More...
|
| |
| template<typename T > |
| const Ptr< T > | removeTagIfPresent (b offset, b length) |
| | Removes the chunk tag for the provided type and range if present, or returns nullptr if no such chunk tag is found. More...
|
| |
| template<typename T > |
| std::vector< SharingRegionTagSet::RegionTag< T > > | removeTagsWherePresent (b offset, b length) |
| | Removes and returns all chunk tags for the provided type and range. More...
|
| |
| virtual std::ostream & | printToStream (std::ostream &stream, int level, int evFlags=0) const override |
| | Prints an optinally formatted human readable string representation of the data present in this chunk to the given stream. More...
|
| |
| virtual std::string | str () const override |
| | Returns a human readable string representation of the data present in this chunk. More...
|
| |
| virtual | ~IPrintableObject () |
| |
| virtual std::string | printToString () const |
| |
| virtual std::string | printToString (int level, int evFlags=0) const |
| |
| virtual std::string | getInfoStringRepresentation (int evFlags=0) const |
| |
| virtual std::string | getDetailStringRepresentation (int evFlags=0) const |
| |
| virtual std::string | getDebugStringRepresentation (int evFlags=0) const |
| |
| virtual std::string | getTraceStringRepresentation (int evFlags=0) const |
| |
| virtual std::string | getCompleteStringRepresentation (int evFlags=0) const |
| |
Class generated from inet/networklayer/ipv4/Ipv4Header.msg:170 by opp_msgtool.
//
// Represents an Ipv4 datagram.
//
// Uses the following cPacket fields:
// - getByteLength() / setByteLength() to represent total datagram length
// - hasBitError() / setBitError() to represent datagram correctness
// - getTimestamp() / setTimestamp (simtime) used in timestamp option
//
// Additional length fields defined in this class are in bytes.
//
// Only one of the option fields can exist at a time.
//
// TODO cleanup order of fields
class Ipv4Header extends NetworkHeaderBase
{
chunkLength = IPv4_MIN_HEADER_LENGTH; short version = 4; // @bit(4)
B headerLength = IPv4_MIN_HEADER_LENGTH; // @bit(4), bytes, must be multiple of 4
short typeOfService; // @bit(8)
// OMNeT++ 6.0:
// short __dscp @custom @getter(getDscp) @setter(setDscp); // @bit(6), maps to bits 0-5 of ToS, stored in typeOfService
// short __ecn @custom @getter(getEcn) @setter(setEcn); // @bit(2), maps to bits 6-7 of ToS, stored in typeOfService B totalLengthField; // @byte(2)
uint16_t identification; // @byte(2)
bool reservedBit = false; // @bit(1)
bool moreFragments; // @bit(1)
bool dontFragment; // @bit(1)
uint16_t fragmentOffset; // @bit(13), must be multiple of 8 short timeToLive; // @byte(1)
IpProtocolId protocolId = IP_PROT_NONE; // @byte(1)
uint16_t crc = 0; // @byte(2)
CrcMode crcMode = CRC_MODE_UNDEFINED; Ipv4Address srcAddress;
Ipv4Address destAddress;
TlvOptions options; // array of option pointers, option pointers owned by datagram
}