2 * netlink/types.h Definition of public types
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
9 * Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch>
12 #ifndef __NETLINK_TYPES_H_
13 #define __NETLINK_TYPES_H_
19 * Enumeration of dumping variations (dp_type)
22 NL_DUMP_LINE, /**< Dump object briefly on one line */
23 NL_DUMP_DETAILS, /**< Dump all attributes but no statistics */
24 NL_DUMP_STATS, /**< Dump all attributes including statistics */
27 #define NL_DUMP_MAX (__NL_DUMP_MAX - 1)
36 * Specifies the type of dump that is requested.
38 enum nl_dump_type dp_type;
41 * Specifies the number of whitespaces to be put in front
42 * of every new line (indentation).
47 * Causes the cache index to be printed for each element.
52 * Causes each element to be prefixed with the message type.
57 * A callback invoked for output
59 * Passed arguments are:
60 * - dumping parameters
61 * - string to append to the output
63 void (*dp_cb)(struct nl_dump_params *, char *);
66 * A callback invoked for every new line, can be used to
67 * customize the indentation.
69 * Passed arguments are:
70 * - dumping parameters
71 * - line number starting from 0
73 void (*dp_nl_cb)(struct nl_dump_params *, int);
76 * User data pointer, can be used to pass data to callbacks.
81 * File descriptor the dumping output should go to
86 * Alternatively the output may be redirected into a buffer
91 * Length of the buffer dp_buf
97 * Set if a dump was performed prior to the actual dump handler.
103 * Owned by the current caller
107 unsigned int dp_line;