'ODTONE - Open Dot Twenty One'

PrevUpHomeNext

Class header

odtone::net::ip::icmp::header

Synopsis

// In header: </home/carlos/Projectos/odtone/inc/odtone/net/ip/icmp/icmp.hpp>



class header {
public:
  // construct/copy/destruct
  header(uint8, uint8);

  // public static functions
  template<typename T> static T * cast(void *, size_t);

  // public member functions
  uint8 type() const;
  uint8 code() const;
  void checksum(uint16);
};

Description

This class represents the header of an ICMP packet.

header public construct/copy/destruct

  1. header(uint8 type, uint8 code);

    Construct an ICMP packet header.

    Parameters:

    type

    The ICMP packet header type.

header public static functions

  1. template<typename T> static T * cast(void * buffer, size_t length);

    Convert a byte buffer ICMP packet.

    Returns:

    The pointer of the returning ICMP packet.

header public member functions

  1. uint8 type() const;

    Get the ICMP packet header type.

    Returns:

    The ICMP packet header type.

  2. uint8 code() const;

    Get the ICMP packet header code.

    Returns:

    The ICMP packet header code.

  3. void checksum(uint16 csum);

    Set the ICMP packet checksum field.

    Parameters:

    csum

    The ICMP packet checksum field.


PrevUpHomeNext