Class ProtocolL3

Class Documentation

class peafowl::ProtocolL3

L3 (IP) protocol.

Public Functions

ProtocolL3(pfwl_protocol_l3_t protocol)

Copy constructor

Parameters
  • protocol: The protocol to copy.

ProtocolL3(const std::string &protocol)

Build the protocol starting from its name.

Parameters
  • protocol: The protocol name.

const std::string &getName() const

Returns the name of the protocol.

Return

The name of the protocol.

pfwl_protocol_l3_t getId() const

Returns the identifier of the protocol.

Return

The identifier of the protocol.

operator pfwl_protocol_l3_t() const

Accesses the protocol.

Friends

friend bool operator==(const ProtocolL3 &p1, const pfwl_protocol_l3_t &p2)

Checks if two protocols are equal.

Return

True if the two protocols are equal, false otherwise.

Parameters
  • p1: The first protocol.

  • p2: The second protocol.

friend bool operator!=(const ProtocolL3 &p1, const pfwl_protocol_l3_t &p2)

Checks if two protocols are different.

Return

True if the two protocols are different, false otherwise.

Parameters
  • p1: The first protocol.

  • p2: The second protocol.