return 0;
}
-int sd_rtnl_message_route_get_flags(const sd_netlink_message *m, unsigned *flags) {
+int sd_rtnl_message_route_get_flags(sd_netlink_message *m, unsigned *flags) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_route_get_family(const sd_netlink_message *m, int *family) {
+int sd_rtnl_message_route_get_family(sd_netlink_message *m, int *family) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_route_get_type(const sd_netlink_message *m, unsigned char *type) {
+int sd_rtnl_message_route_get_type(sd_netlink_message *m, unsigned char *type) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_route_get_protocol(const sd_netlink_message *m, unsigned char *protocol) {
+int sd_rtnl_message_route_get_protocol(sd_netlink_message *m, unsigned char *protocol) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_route_get_scope(const sd_netlink_message *m, unsigned char *scope) {
+int sd_rtnl_message_route_get_scope(sd_netlink_message *m, unsigned char *scope) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_route_get_tos(const sd_netlink_message *m, uint8_t *tos) {
+int sd_rtnl_message_route_get_tos(sd_netlink_message *m, uint8_t *tos) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_route_get_table(const sd_netlink_message *m, unsigned char *table) {
+int sd_rtnl_message_route_get_table(sd_netlink_message *m, unsigned char *table) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_route_get_dst_prefixlen(const sd_netlink_message *m, unsigned char *dst_len) {
+int sd_rtnl_message_route_get_dst_prefixlen(sd_netlink_message *m, unsigned char *dst_len) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_route_get_src_prefixlen(const sd_netlink_message *m, unsigned char *src_len) {
+int sd_rtnl_message_route_get_src_prefixlen(sd_netlink_message *m, unsigned char *src_len) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
rtm = NLMSG_DATA((*ret)->hdr);
rtm->rtm_family = rtm_family;
- rtm->rtm_scope = RT_SCOPE_UNIVERSE;
- rtm->rtm_type = RTN_UNICAST;
- rtm->rtm_table = RT_TABLE_MAIN;
rtm->rtm_protocol = rtm_protocol;
return 0;
return 0;
}
-int sd_rtnl_message_nexthop_get_family(const sd_netlink_message *m, uint8_t *family) {
+int sd_rtnl_message_nexthop_get_family(sd_netlink_message *m, uint8_t *family) {
struct nhmsg *nhm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_nexthop_get_protocol(const sd_netlink_message *m, uint8_t *protocol) {
+int sd_rtnl_message_nexthop_get_protocol(sd_netlink_message *m, uint8_t *protocol) {
struct nhmsg *nhm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_neigh_get_flags(const sd_netlink_message *m, uint8_t *flags) {
+int sd_rtnl_message_neigh_get_flags(sd_netlink_message *m, uint8_t *flags) {
struct ndmsg *ndm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_neigh_get_state(const sd_netlink_message *m, uint16_t *state) {
+int sd_rtnl_message_neigh_get_state(sd_netlink_message *m, uint16_t *state) {
struct ndmsg *ndm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_neigh_get_family(const sd_netlink_message *m, int *family) {
+int sd_rtnl_message_neigh_get_family(sd_netlink_message *m, int *family) {
struct ndmsg *ndm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_neigh_get_ifindex(const sd_netlink_message *m, int *index) {
+int sd_rtnl_message_neigh_get_ifindex(sd_netlink_message *m, int *index) {
struct ndmsg *ndm;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_addr_get_family(const sd_netlink_message *m, int *family) {
+int sd_rtnl_message_addr_get_family(sd_netlink_message *m, int *family) {
struct ifaddrmsg *ifa;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_addr_get_prefixlen(const sd_netlink_message *m, unsigned char *prefixlen) {
+int sd_rtnl_message_addr_get_prefixlen(sd_netlink_message *m, unsigned char *prefixlen) {
struct ifaddrmsg *ifa;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_addr_get_scope(const sd_netlink_message *m, unsigned char *scope) {
+int sd_rtnl_message_addr_get_scope(sd_netlink_message *m, unsigned char *scope) {
struct ifaddrmsg *ifa;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_addr_get_flags(const sd_netlink_message *m, unsigned char *flags) {
+int sd_rtnl_message_addr_get_flags(sd_netlink_message *m, unsigned char *flags) {
struct ifaddrmsg *ifa;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_addr_get_ifindex(const sd_netlink_message *m, int *ifindex) {
+int sd_rtnl_message_addr_get_ifindex(sd_netlink_message *m, int *ifindex) {
struct ifaddrmsg *ifa;
assert_return(m, -EINVAL);
if (r < 0)
return r;
- if (nlmsg_type == RTM_GETADDR)
- (*ret)->hdr->nlmsg_flags |= NLM_F_DUMP;
-
ifa = NLMSG_DATA((*ret)->hdr);
ifa->ifa_index = index;
ifa->ifa_family = family;
- if (family == AF_INET)
- ifa->ifa_prefixlen = 32;
- else if (family == AF_INET6)
- ifa->ifa_prefixlen = 128;
return 0;
}
return 0;
}
-int sd_rtnl_message_link_get_ifindex(const sd_netlink_message *m, int *ifindex) {
+int sd_rtnl_message_link_get_ifindex(sd_netlink_message *m, int *ifindex) {
struct ifinfomsg *ifi;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_link_get_flags(const sd_netlink_message *m, unsigned *flags) {
+int sd_rtnl_message_link_get_flags(sd_netlink_message *m, unsigned *flags) {
struct ifinfomsg *ifi;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_link_get_type(const sd_netlink_message *m, unsigned short *type) {
+int sd_rtnl_message_link_get_type(sd_netlink_message *m, unsigned short *type) {
struct ifinfomsg *ifi;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_get_family(const sd_netlink_message *m, int *family) {
+int sd_rtnl_message_get_family(sd_netlink_message *m, int *family) {
assert_return(m, -EINVAL);
assert_return(family, -EINVAL);
return 0;
}
-int sd_rtnl_message_addrlabel_get_prefixlen(const sd_netlink_message *m, unsigned char *prefixlen) {
+int sd_rtnl_message_addrlabel_get_prefixlen(sd_netlink_message *m, unsigned char *prefixlen) {
struct ifaddrlblmsg *addrlabel;
assert_return(m, -EINVAL);
frh = NLMSG_DATA((*ret)->hdr);
frh->family = ifal_family;
- frh->action = FR_ACT_TO_TBL;
return 0;
}
return 0;
}
-int sd_rtnl_message_routing_policy_rule_get_tos(const sd_netlink_message *m, uint8_t *tos) {
+int sd_rtnl_message_routing_policy_rule_get_tos(sd_netlink_message *m, uint8_t *tos) {
struct fib_rule_hdr *frh;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_routing_policy_rule_get_table(const sd_netlink_message *m, uint8_t *table) {
+int sd_rtnl_message_routing_policy_rule_get_table(sd_netlink_message *m, uint8_t *table) {
struct fib_rule_hdr *frh;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_routing_policy_rule_get_flags(const sd_netlink_message *m, uint32_t *flags) {
+int sd_rtnl_message_routing_policy_rule_get_flags(sd_netlink_message *m, uint32_t *flags) {
struct fib_rule_hdr *frh;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_routing_policy_rule_get_fib_type(const sd_netlink_message *m, uint8_t *type) {
+int sd_rtnl_message_routing_policy_rule_get_fib_type(sd_netlink_message *m, uint8_t *type) {
struct fib_rule_hdr *frh;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_routing_policy_rule_get_fib_dst_prefixlen(const sd_netlink_message *m, uint8_t *len) {
+int sd_rtnl_message_routing_policy_rule_get_fib_dst_prefixlen(sd_netlink_message *m, uint8_t *len) {
struct fib_rule_hdr *frh;
assert_return(m, -EINVAL);
return 0;
}
-int sd_rtnl_message_routing_policy_rule_get_fib_src_prefixlen(const sd_netlink_message *m, uint8_t *len) {
+int sd_rtnl_message_routing_policy_rule_get_fib_src_prefixlen(sd_netlink_message *m, uint8_t *len) {
struct fib_rule_hdr *frh;
assert_return(m, -EINVAL);