Definitions for the Frame Streams data transport protocol for dnstap message logs. More...
#include "config.h"
#include "dnstap/dnstap_fstrm.h"
#include "sldns/sbuffer.h"
#include "sldns/wire2str.h"
Functions | |
void * | fstrm_create_control_frame_start (char *contenttype, size_t *len) |
This creates an FSTRM control frame of type START. More... | |
void * | fstrm_create_control_frame_stop (size_t *len) |
This creates an FSTRM control frame of type STOP. More... | |
void * | fstrm_create_control_frame_ready (char *contenttype, size_t *len) |
This creates an FSTRM control frame of type READY. More... | |
void * | fstrm_create_control_frame_accept (char *contenttype, size_t *len) |
This creates an FSTRM control frame of type ACCEPT. More... | |
void * | fstrm_create_control_frame_finish (size_t *len) |
This creates an FSTRM control frame of type FINISH. More... | |
char * | fstrm_describe_control (void *pkt, size_t len) |
Return string that describes a control packet. More... | |
Definitions for the Frame Streams data transport protocol for dnstap message logs.
void* fstrm_create_control_frame_start | ( | char * | contenttype, |
size_t * | len | ||
) |
This creates an FSTRM control frame of type START.
contenttype | a zero delimited string with the content type. eg. use the constant DNSTAP_CONTENT_TYPE, which is defined as "protobuf:dnstap.Dnstap", for a dnstap frame stream. |
len | if a buffer is returned this is the length of that buffer. |
References FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE, and FSTRM_CONTROL_FRAME_START.
Referenced by dtio_control_start_send().
void* fstrm_create_control_frame_stop | ( | size_t * | len | ) |
This creates an FSTRM control frame of type STOP.
len | if a buffer is returned this is the length of that buffer. |
References FSTRM_CONTROL_FRAME_STOP.
Referenced by dtio_control_stop_flush().
void* fstrm_create_control_frame_ready | ( | char * | contenttype, |
size_t * | len | ||
) |
This creates an FSTRM control frame of type READY.
contenttype | a zero delimited string with the content type. eg. use the constant DNSTAP_CONTENT_TYPE, which is defined as "protobuf:dnstap.Dnstap", for a dnstap frame stream. |
len | if a buffer is returned this is the length of that buffer. |
References FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE, and FSTRM_CONTROL_FRAME_READY.
Referenced by dtio_control_ready_send().
void* fstrm_create_control_frame_accept | ( | char * | contenttype, |
size_t * | len | ||
) |
This creates an FSTRM control frame of type ACCEPT.
contenttype | a zero delimited string with the content type. for dnstap streams use DNSTAP_CONTENT_TYPE. |
len | if a buffer is returned this is the length of that buffer. |
References FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE, and FSTRM_CONTROL_FRAME_ACCEPT.
Referenced by reply_with_accept().
void* fstrm_create_control_frame_finish | ( | size_t * | len | ) |
This creates an FSTRM control frame of type FINISH.
len | if a buffer is returned this is the length of that buffer. |
References FSTRM_CONTROL_FRAME_FINISH.
Referenced by reply_with_finish().
char* fstrm_describe_control | ( | void * | pkt, |
size_t | len | ||
) |
Return string that describes a control packet.
For debug, logs. Like 'start content-type(protobuf:dnstap.Dnstap)' or 'stop'.
pkt | the packet data, that is the data after the 4 zero start bytes and 4 length bytes. |
len | the length of the control packet data, in pkt. This is the ntohl of the 4 bytes length preceding the data. |