libnl 3.9.0
nl_dump_params Struct Reference

Dumping parameters. More...

#include <types.h>

Data Fields

enum nl_dump_type dp_type
 Specifies the type of dump that is requested.
 
int dp_prefix
 Specifies the number of whitespaces to be put in front of every new line (indentation).
 
int dp_print_index
 Causes the cache index to be printed for each element.
 
int dp_dump_msgtype
 Causes each element to be prefixed with the message type.
 
void(* dp_cb )(struct nl_dump_params *, char *)
 A callback invoked for output.
 
void(* dp_nl_cb )(struct nl_dump_params *, int)
 A callback invoked for every new line, can be used to customize the indentation.
 
void * dp_data
 User data pointer, can be used to pass data to callbacks.
 
FILE * dp_fd
 File descriptor the dumping output should go to.
 
char * dp_buf
 Alternatively the output may be redirected into a buffer.
 
size_t dp_buflen
 Length of the buffer dp_buf.
 
int dp_pre_dump
 PRIVATE Set if a dump was performed prior to the actual dump handler.
 
int dp_ivar
 PRIVATE Owned by the current caller.
 
unsigned int dp_line
 

Detailed Description

Dumping parameters.

Definition at line 31 of file types.h.

Field Documentation

◆ dp_type

enum nl_dump_type nl_dump_params::dp_type

Specifies the type of dump that is requested.

Definition at line 36 of file types.h.

Referenced by nl_cache_dump_filter().

◆ dp_prefix

int nl_dump_params::dp_prefix

Specifies the number of whitespaces to be put in front of every new line (indentation).

Definition at line 42 of file types.h.

Referenced by nl_cache_mngr_info(), and nl_new_line().

◆ dp_print_index

int nl_dump_params::dp_print_index

Causes the cache index to be printed for each element.

Definition at line 47 of file types.h.

◆ dp_dump_msgtype

int nl_dump_params::dp_dump_msgtype

Causes each element to be prefixed with the message type.

Definition at line 52 of file types.h.

◆ dp_cb

void(* nl_dump_params::dp_cb) (struct nl_dump_params *, char *)

A callback invoked for output.

Passed arguments are:

  • dumping parameters
  • string to append to the output

Definition at line 61 of file types.h.

◆ dp_nl_cb

void(* nl_dump_params::dp_nl_cb) (struct nl_dump_params *, int)

A callback invoked for every new line, can be used to customize the indentation.

Passed arguments are:

  • dumping parameters
  • line number starting from 0

Definition at line 71 of file types.h.

Referenced by nl_new_line().

◆ dp_data

void* nl_dump_params::dp_data

User data pointer, can be used to pass data to callbacks.

Definition at line 76 of file types.h.

◆ dp_fd

FILE* nl_dump_params::dp_fd

File descriptor the dumping output should go to.

Definition at line 81 of file types.h.

Referenced by nl_new_line().

◆ dp_buf

char* nl_dump_params::dp_buf

Alternatively the output may be redirected into a buffer.

Definition at line 86 of file types.h.

Referenced by nl_cache_dump_filter(), nl_new_line(), and nl_object_dump().

◆ dp_buflen

size_t nl_dump_params::dp_buflen

Length of the buffer dp_buf.

Definition at line 91 of file types.h.

Referenced by nl_cache_dump_filter(), nl_new_line(), and nl_object_dump().

◆ dp_pre_dump

int nl_dump_params::dp_pre_dump

PRIVATE Set if a dump was performed prior to the actual dump handler.

Definition at line 97 of file types.h.

◆ dp_ivar

int nl_dump_params::dp_ivar

PRIVATE Owned by the current caller.

Definition at line 103 of file types.h.

◆ dp_line

unsigned int nl_dump_params::dp_line

Definition at line 105 of file types.h.