result 1 result 2
Go back to reference home
Go back to DNS module
functions
parseHeaderParse a DNS-Header from a buffer.
parseRequestParse a DNS-Request from a buffer.
parseResponseParse a DNS-Response from a buffer.
types
napc__DNSOPCodeRepresentation of a DNS operation code.
napc__DNSHeaderRepresentation of a DNS header.
napc__DNSQTypeRepresentation of DNS query type.
napc__DNSQueryRepresentation of a DNS query.
napc__DNSAnswerRepresentation of a DNS answer.
napc__DNSRequestRepresentation of a DNS request.
napc__DNSResponseRepresentation of a DNS response.

parseHeader

Parse a DNS-Header from a buffer.

This fn does not have a description.

Function Protoype


bool napc_DNS_parseHeader(
    napc__DNSHeader * out,
    const void *      buffer,
    napc_size         buffer_size
);

Parameter


out
Pointer to a napc__DNSHeader to store result.
buffer
Buffer to be parsed.
buffer_size
Size of buffer.

Returns


Returns true on success, false otherwise.

Changelog


Version
Date
Change
1.0.0
17.02.2022
initial version
Version: 1.4.1
Documentation generated at 24.03.2022 03:43:18 (UTC)
Go back to reference home
Go back to DNS module
functions
parseHeaderParse a DNS-Header from a buffer.
parseRequestParse a DNS-Request from a buffer.
parseResponseParse a DNS-Response from a buffer.
types
napc__DNSOPCodeRepresentation of a DNS operation code.
napc__DNSHeaderRepresentation of a DNS header.
napc__DNSQTypeRepresentation of DNS query type.
napc__DNSQueryRepresentation of a DNS query.
napc__DNSAnswerRepresentation of a DNS answer.
napc__DNSRequestRepresentation of a DNS request.
napc__DNSResponseRepresentation of a DNS response.
typedef struct {
    napc__DNSOPCode opcode;
    bool            authoritative_answer;
    bool            truncated;
    napc_u16        request_identifier;
    napc_u16        response_code;
    napc_u16        question_count;
    napc_u16        answer_count;
} napc__DNSHeader;
typedef napc_u32 napc_size;