libnl
3.2.3
|
00001 /* 00002 * src/utils.h Utilities 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation version 2.1 00007 * of the License. 00008 * 00009 * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch> 00010 */ 00011 00012 #ifndef __NETLINK_CLI_UTILS_H_ 00013 #define __NETLINK_CLI_UTILS_H_ 00014 00015 #include <stdio.h> 00016 #include <string.h> 00017 #include <stdlib.h> 00018 #include <stdarg.h> 00019 #include <limits.h> 00020 #include <inttypes.h> 00021 #include <errno.h> 00022 #include <stdint.h> 00023 #include <ctype.h> 00024 #include <getopt.h> 00025 #include <dlfcn.h> 00026 #include <sys/types.h> 00027 #include <sys/socket.h> 00028 00029 #include <netlink/netlink.h> 00030 #include <netlink/utils.h> 00031 #include <netlink/addr.h> 00032 #include <netlink/list.h> 00033 #include <netlink/route/rtnl.h> 00034 #include <netlink/route/link.h> 00035 #include <netlink/route/addr.h> 00036 #include <netlink/route/neighbour.h> 00037 #include <netlink/route/neightbl.h> 00038 #include <netlink/route/route.h> 00039 #include <netlink/route/rule.h> 00040 #include <netlink/route/qdisc.h> 00041 #include <netlink/route/class.h> 00042 #include <netlink/route/classifier.h> 00043 #include <netlink/route/cls/ematch.h> 00044 #include <netlink/fib_lookup/lookup.h> 00045 #include <netlink/fib_lookup/request.h> 00046 #include <netlink/genl/genl.h> 00047 #include <netlink/genl/ctrl.h> 00048 #include <netlink/genl/mngt.h> 00049 #include <netlink/netfilter/ct.h> 00050 00051 #ifdef __cplusplus 00052 extern "C" { 00053 #endif 00054 00055 #ifndef __init 00056 #define __init __attribute__((constructor)) 00057 #endif 00058 00059 #ifndef __exit 00060 #define __exit __attribute__((destructor)) 00061 #endif 00062 00063 extern uint32_t nl_cli_parse_u32(const char *); 00064 extern void nl_cli_print_version(void); 00065 extern void nl_cli_fatal(int, const char *, ...); 00066 extern struct nl_addr * nl_cli_addr_parse(const char *, int); 00067 extern int nl_cli_connect(struct nl_sock *, int); 00068 extern struct nl_sock * nl_cli_alloc_socket(void); 00069 extern int nl_cli_parse_dumptype(const char *); 00070 extern int nl_cli_confirm(struct nl_object *, 00071 struct nl_dump_params *, int); 00072 00073 extern struct nl_cache *nl_cli_alloc_cache(struct nl_sock *, const char *, 00074 int (*ac)(struct nl_sock *, struct nl_cache **)); 00075 00076 extern void nl_cli_load_module(const char *, const char *); 00077 00078 #ifdef __cplusplus 00079 } 00080 #endif 00081 00082 #endif