00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_RTNL_H_
00013 #define NETLINK_RTNL_H_
00014
00015 #include <netlink/netlink.h>
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #define RTNL_REALM_MASK (0xFFFF)
00031
00032
00033
00034
00035 #define RTNL_REALM_FROM(realm) ((realm) >> 16)
00036
00037
00038
00039
00040 #define RTNL_REALM_TO(realm) ((realm) & RTNL_REALM_MASK)
00041
00042
00043
00044
00045 #define RTNL_MAKE_REALM(from, to) \
00046 ((RTNL_REALM_TO(from) << 16) & RTNL_REALM_TO(to))
00047
00048
00049
00050
00051
00052 extern int nl_rtgen_request(struct nl_sock *, int, int, int);
00053
00054
00055 extern char * nl_rtntype2str(int, char *, size_t);
00056 extern int nl_str2rtntype(const char *);
00057
00058
00059 extern char * rtnl_scope2str(int, char *, size_t);
00060 extern int rtnl_str2scope(const char *);
00061
00062
00063 extern char * rtnl_realms2str(uint32_t, char *, size_t);
00064
00065 #ifdef __cplusplus
00066 }
00067 #endif
00068
00069 #endif