- Fix typos in extern "C" wrappers.
- 'class' is a reserved word, change to cls.
- int -> enum casts are not automatic.
- Static strings must be of type const char*
- Add a few implicit header dependencies explicitly.
http://lists.infradead.org/pipermail/libnl/2016-July/002165.html
Signed-off-by: Craig Gallek <kraig@google.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
#define _IPV6_H
#include <asm/byteorder.h>
+#include <linux/in6.h>
/* The latest drafts declared increase in minimal mtu up to 1280. */
extern void dump_from_ops(struct nl_object *, struct nl_dump_params *);
extern struct rtnl_link *link_lookup(struct nl_cache *cache, int ifindex);
-static inline int nl_cb_call(struct nl_cb *cb, int type, struct nl_msg *msg)
+static inline int nl_cb_call(struct nl_cb *cb, enum nl_cb_type type, struct nl_msg *msg)
{
int ret;
dst->rate = src->rs_rate;
}
-static inline char *nl_cache_name(struct nl_cache *cache)
+static inline const char *nl_cache_name(struct nl_cache *cache)
{
return cache->c_ops ? cache->c_ops->co_name : "unknown";
}
#include <netlink/route/route.h>
#include <netlink/idiag/idiagnl.h>
#include <netlink/netfilter/ct.h>
+#include <netlink-private/object-api.h>
#include <netlink-private/route/tc-api.h>
#include <linux/tc_act/tc_mirred.h>
#include <linux/tc_act/tc_skbedit.h>
#ifndef NETLINK_HASHTABLE_H_
#define NETLINK_HASHTABLE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
extern int rtnl_link_ip6_tnl_set_proto(struct rtnl_link *link, uint8_t proto);
extern uint8_t rtnl_link_ip6_tnl_get_proto(struct rtnl_link *link);
-#ifdef _cplusplus
+#ifdef __cplusplus
}
#endif
int rtnl_link_sit_set_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t prefix);
int rtnl_link_sit_get_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t *prefix);
-#ifdef _cplusplus
+#ifdef __cplusplus
}
#endif
extern uint32_t rtnl_qdisc_hfsc_get_defcls(const struct rtnl_qdisc *);
extern int rtnl_qdisc_hfsc_set_defcls(struct rtnl_qdisc *, uint32_t);
-extern int rtnl_class_hfsc_get_rsc(const struct rtnl_class *class, struct tc_service_curve *tsc);
-extern int rtnl_class_hfsc_set_rsc(struct rtnl_class *class, const struct tc_service_curve *tsc);
-extern int rtnl_class_hfsc_get_fsc(const struct rtnl_class *class, struct tc_service_curve *tsc);
-extern int rtnl_class_hfsc_set_fsc(struct rtnl_class *class, const struct tc_service_curve *tsc);
-extern int rtnl_class_hfsc_get_usc(const struct rtnl_class *class, struct tc_service_curve *tsc);
-extern int rtnl_class_hfsc_set_usc(struct rtnl_class *class, const struct tc_service_curve *tsc);
+extern int rtnl_class_hfsc_get_rsc(const struct rtnl_class *cls, struct tc_service_curve *tsc);
+extern int rtnl_class_hfsc_set_rsc(struct rtnl_class *cls, const struct tc_service_curve *tsc);
+extern int rtnl_class_hfsc_get_fsc(const struct rtnl_class *cls, struct tc_service_curve *tsc);
+extern int rtnl_class_hfsc_set_fsc(struct rtnl_class *cls, const struct tc_service_curve *tsc);
+extern int rtnl_class_hfsc_get_usc(const struct rtnl_class *cls, struct tc_service_curve *tsc);
+extern int rtnl_class_hfsc_set_usc(struct rtnl_class *cls, const struct tc_service_curve *tsc);
#ifdef __cplusplus
}
#endif