Definitions for the Frame Streams data transport protocol for dnstap message logs. More...
Macros | |
#define | FSTRM_CONTENT_TYPE_LENGTH_MAX 256 |
max length of Frame Streams content type field string | |
#define | FSTRM_CONTROL_FRAME_ACCEPT 0x01 |
control frame value to denote the control frame ACCEPT | |
#define | FSTRM_CONTROL_FRAME_START 0x02 |
control frame value to denote the control frame START | |
#define | FSTRM_CONTROL_FRAME_STOP 0x03 |
control frame value to denote the control frame STOP | |
#define | FSTRM_CONTROL_FRAME_READY 0x04 |
control frame value to denote the control frame READY | |
#define | FSTRM_CONTROL_FRAME_FINISH 0x05 |
control frame value to denote the control frame FINISH | |
#define | FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE 0x01 |
the constant that denotes the control field type that is the string for the content type of the stream. | |
#define | DNSTAP_CONTENT_TYPE "protobuf:dnstap.Dnstap" |
the content type for DNSTAP frame streams | |
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_ready (char *contenttype, size_t *len) |
This creates an FSTRM control frame of type READY. 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_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_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_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_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. |