2 * netlink/netlink-types.h Netlink 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-2006 Thomas Graf <tgraf@suug.ch>
12 #ifndef __NETLINK_TYPES_H_
13 #define __NETLINK_TYPES_H_
18 * Dumping types (dp_type)
22 NL_DUMP_BRIEF, /**< Dump object in a brief one-liner */
23 NL_DUMP_FULL, /**< Dump all attributes but no statistics */
24 NL_DUMP_STATS, /**< Dump all attributes including statistics */
25 NL_DUMP_XML, /**< Dump all attribtes in XML format */
26 NL_DUMP_ENV, /**< Dump all attribtues as env variables */
27 NL_DUMP_EVENTS, /**< Dump event */
30 #define NL_DUMP_MAX (__NL_DUMP_MAX - 1)
39 * Specifies the type of dump that is requested.
41 enum nl_dump_type dp_type;
44 * Specifies the number of whitespaces to be put in front
45 * of every new line (indentation).
50 * Causes the cache index to be printed for each element.
55 * Causes each element to be prefixed with the message type.
60 * A callback invoked for output
62 * Passed arguments are:
63 * - dumping parameters
64 * - string to append to the output
66 void (*dp_cb)(struct nl_dump_params *, char *);
69 * A callback invoked for every new line, can be used to
70 * customize the indentation.
72 * Passed arguments are:
73 * - dumping parameters
74 * - line number starting from 0
76 void (*dp_nl_cb)(struct nl_dump_params *, int);
79 * User data pointer, can be used to pass data to callbacks.
84 * File descriptor the dumping output should go to
89 * Alternatively the output may be redirected into a buffer
94 * Length of the buffer dp_buf
100 * Set if a dump was performed prior to the actual dump handler.