Move nl_route_types definition from netlink.c to netlink_route.c

The side effect of #include "xlat/nl_route_types.h" is
RTM_* constants properly defined in that header file.
While netlink.c does not use these constants itself,
netlink_route.c is going to need them soon.

* defs.h (nl_route_types): New xlat prototype.
* netlink.c: Move inclusion of "xlat/nl_route_types.h" ...
* netlink_route.c: ... here.
This commit is contained in:
JingPiao Chen 2017-06-16 20:58:38 +08:00
parent 7f95ee6017
commit 4c437e1856
3 changed files with 3 additions and 1 deletions

1
defs.h
View File

@ -292,6 +292,7 @@ extern const struct xlat evdev_abs[];
extern const struct xlat inet_protocols[]; extern const struct xlat inet_protocols[];
extern const struct xlat msg_flags[]; extern const struct xlat msg_flags[];
extern const struct xlat netlink_protocols[]; extern const struct xlat netlink_protocols[];
extern const struct xlat nl_route_types[];
extern const struct xlat open_access_modes[]; extern const struct xlat open_access_modes[];
extern const struct xlat open_mode_flags[]; extern const struct xlat open_mode_flags[];
extern const struct xlat resource_flags[]; extern const struct xlat resource_flags[];

View File

@ -43,7 +43,6 @@
#include "xlat/nl_crypto_types.h" #include "xlat/nl_crypto_types.h"
#include "xlat/nl_netfilter_msg_types.h" #include "xlat/nl_netfilter_msg_types.h"
#include "xlat/nl_netfilter_subsys_ids.h" #include "xlat/nl_netfilter_subsys_ids.h"
#include "xlat/nl_route_types.h"
#include "xlat/nl_selinux_types.h" #include "xlat/nl_selinux_types.h"
#include "xlat/nl_sock_diag_types.h" #include "xlat/nl_sock_diag_types.h"
#include "xlat/nl_xfrm_types.h" #include "xlat/nl_xfrm_types.h"

View File

@ -30,6 +30,8 @@
#include "defs.h" #include "defs.h"
#include "netlink.h" #include "netlink.h"
#include "xlat/nl_route_types.h"
static void static void
decode_family(struct tcb *const tcp, const uint8_t family, decode_family(struct tcb *const tcp, const uint8_t family,
const kernel_ulong_t addr, const unsigned int len) const kernel_ulong_t addr, const unsigned int len)