'ODTONE - Open Dot Twenty One'

PrevUpHomeNext

Struct frame

odtone::dns::frame

Synopsis

// In header: </home/carlos/Projectos/odtone/inc/odtone/net/dns/frame.hpp>


struct frame {

  // public static functions
  static frame * cast(void *, size_t);
  static const frame * cast(const void *, size_t);

  // public member functions
  void tid(uint16);
  void qr(bool);
  void opcode(uint8);
  void aa(bool);
  void tc(bool);
  void rd(bool);
  void ra(bool);
  void z(bool);
  void rcode(uint8);
  void nquery(uint16);
  void nanswer(uint16);
  void nauth(uint16);
  void nadd(uint16);
  uint16 tid() const;
  bool qr() const;
  uint8 opcode() const;
  bool aa() const;
  bool tc() const;
  bool rd() const;
  bool ra() const;
  bool z() const;
  uint8 rcode() const;
  uint16 nquery() const;
  uint16 nanswer() const;
  uint16 nauth() const;
  uint16 nadd() const;
  uint8 * payload();
  const uint8 * payload() const;
  uint8 * get();
  const uint8 * get() const;

  // public data members
  static const uint8 mask_qr;
  static const uint8 mask_opcode;
  static const uint8 mask_aa;
  static const uint8 mask_tc;
  static const uint8 mask_rd;
  static const uint8 mask_ra;
  static const uint8 mask_z;
  static const uint8 mask_rcode;
  uint8 hdr;
};

Description

DNS message frame. This class provides access to all fields of the DNS message header.

frame public static functions

  1. static frame * cast(void * buff, size_t len);

    Convert a byte buffer to a frame.

    Parameters:

    buff

    The byte buffer.

    len

    The size of the byte buffer.

    Returns:

    The pointer of the returning frame.

  2. static const frame * cast(const void * buff, size_t len);

    Convert a byte buffer to a frame.

    Parameters:

    buff

    The byte buffer.

    len

    The size of the byte buffer.

    Returns:

    The pointer of the returning frame.

frame public member functions

  1. void tid(uint16 tid);

    Set the DNS Message Transaction Identifier.

    Parameters:

    tid

    The value of the DNS Message Transaction Identifier field.

  2. void qr(bool qr);

    Set the DNS Message Query/Response Flag.

    Parameters:

    qr

    The value of the DNS Message Query/Response Flag field.

  3. void opcode(uint8 opcode);

    Set the DNS Message Operation Code.

    Parameters:

    opcode

    The value of the DNS Message Operation Code field.

  4. void aa(bool aa);

    Set the DNS Message Authoritative Answer Flag.

    Parameters:

    aa

    The value of the DNS Message Authoritative Answer Flag field.

  5. void tc(bool tc);

    Set the DNS Message Truncation Flag.

    Parameters:

    tc

    The value of the DNS Message Truncation Flag field.

  6. void rd(bool rd);

    Set the DNS Message Recursion Desired.

    Parameters:

    rd

    The value of the DNS Message Recursion Desired field.

  7. void ra(bool ra);

    Set the DNS Message Recursion Available.

    Parameters:

    ra

    The value of the DNS Message Recursion Available field.

  8. void z(bool z);

    Set the DNS Message Zero.

    Parameters:

    z

    The value of the DNS Message Zero field.

  9. void rcode(uint8 rcode);

    Set the DNS Message Response Code.

    Parameters:

    rcode

    The value of the DNS Message Response Code field.

  10. void nquery(uint16 nquery);

    Set the DNS Message Question Count.

    Parameters:

    nquery

    The value of the DNS Message Question Count field.

  11. void nanswer(uint16 nanswer);

    Set the DNS Message Answer Record Count.

    Parameters:

    nanswer

    The value of the DNS Message Answer Record Count field.

  12. void nauth(uint16 nauth);

    Set the DNS Message Authority Record Count.

    Parameters:

    nauth

    The value of the DNS Message Authority Record Count field.

  13. void nadd(uint16 nadd);

    Set the DNS Message Additional Record Count.

    Parameters:

    nadd

    The value of the DNS Message Additional Record Count field.

  14. uint16 tid() const;

    Get the DNS Message Transaction Identifier.

    Returns:

    The value of the DNS Message Transaction Identifier field.

  15. bool qr() const;

    Get the DNS Message Query/Response Flag.

    Returns:

    The value of the DNS Message Query/Response Flag field.

  16. uint8 opcode() const;

    Get the DNS Message Operation Code.

    Returns:

    The value of the DNS Message Operation Code field.

  17. bool aa() const;

    Get the DNS Message Authoritative Answer Flag.

    Returns:

    The value of the DNS Message Authoritative Answer Flag field.

  18. bool tc() const;

    Get the DNS Message Truncation Flag.

    Returns:

    The value of the DNS Message Truncation Flag field.

  19. bool rd() const;

    Get the DNS Message Recursion Desired.

    Returns:

    The value of the DNS Message Recursion Desired field.

  20. bool ra() const;

    Get the DNS Message Recursion Available.

    Returns:

    The value of the DNS Message Recursion Available field.

  21. bool z() const;

    Get the DNS Message Zero.

    Returns:

    The value of the DNS Message Zero field.

  22. uint8 rcode() const;

    Get the DNS Message Response Code.

    Returns:

    The value of the DNS Message Response Code field.

  23. uint16 nquery() const;

    Get the DNS Message Question Count.

    Returns:

    The value of the DNS Message Question Count field.

  24. uint16 nanswer() const;

    Get the DNS Message Answer Record Count.

    Returns:

    The value of the DNS Message Answer Record Count field.

  25. uint16 nauth() const;

    Get the DNS Message Authority Record Count.

    Returns:

    The value of the DNS Message Authority Record Count field.

  26. uint16 nadd() const;

    Get the DNS Message Additional Record Count.

    Returns:

    The value of the DNS Message Additional Record Count field.

  27. uint8 * payload();

    Get the pointer of the message payload.

    Returns:

    The pointer of the message payload.

  28. const uint8 * payload() const;

    Get the pointer of the message payload.

    Returns:

    The pointer of the message payload.

  29. uint8 * get();

    Get the pointer of the message payload.

    Returns:

    The pointer of the message payload.

  30. const uint8 * get() const;

    Get the pointer of the message payload.

    Returns:

    The pointer of the message payload.

frame public public data members

  1. static const uint8 mask_qr;

    DNS Message Query/Response Flag mask.

  2. static const uint8 mask_opcode;

    DNS Message Operation Code mask.

  3. static const uint8 mask_aa;

    DNS Message Authoritative Answer Flag mask.

  4. static const uint8 mask_tc;

    DNS Message Truncation Flag mask.

  5. static const uint8 mask_rd;

    DNS Message Recursion Desired mask.

  6. static const uint8 mask_ra;

    DNS Message Recursion Available mask.

  7. static const uint8 mask_z;

    DNS Message Zero mask.

  8. static const uint8 mask_rcode;

    DNS Message Response Code mask.

  9. uint8 hdr;

    Frame bytes.


PrevUpHomeNext