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 typedef uint32_t realm_t;
00027
00028
00029
00030
00031
00032 #define RTNL_REALM_MASK (0xFFFF)
00033
00034
00035
00036
00037 #define RTNL_REALM_FROM(realm) ((realm) >> 16)
00038
00039
00040
00041
00042 #define RTNL_REALM_TO(realm) ((realm) & RTNL_REALM_MASK)
00043
00044
00045
00046
00047 #define RTNL_MAKE_REALM(from, to) \
00048 ((RTNL_REALM_TO(from) << 16) & RTNL_REALM_TO(to))
00049
00050
00051
00052
00053
00054 extern int nl_rtgen_request(struct nl_handle *, int, int, int);
00055
00056
00057 extern char * nl_rtntype2str(int, char *, size_t);
00058 extern int nl_str2rtntype(const char *);
00059
00060
00061 extern char * rtnl_scope2str(int, char *, size_t);
00062 extern int rtnl_str2scope(const char *);
00063
00064
00065 extern char * rtnl_realms2str(uint32_t, char *, size_t);
00066
00067 #ifdef __cplusplus
00068 }
00069 #endif
00070
00071 #endif