to match normal iproute. No obj-code changes.
return 0;
}
-static int print_addrinfo(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
+static int print_addrinfo(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED)
{
struct ifaddrmsg *ifa = NLMSG_DATA(n);
}
-static int store_nlmsg(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
+static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
{
struct nlmsg_list **linfo = (struct nlmsg_list**)arg;
struct nlmsg_list *h;
return hz_internal;
}
-static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
+static int print_route(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
struct nlmsghdr *n, void *arg)
{
FILE *fp = (FILE*)arg;
}
*/
-static int print_rule(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
+static int print_rule(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED)
{
struct rtmsg *r = NLMSG_DATA(n);
}
static int rtnl_dump_filter(struct rtnl_handle *rth,
- int (*filter)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
+ int (*filter)(const struct sockaddr_nl *, struct nlmsghdr *n, void *),
void *arg1/*,
int (*junk)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
void *arg2*/)
}
int xrtnl_dump_filter(struct rtnl_handle *rth,
- int (*filter)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
+ int (*filter)(const struct sockaddr_nl *, struct nlmsghdr *, void *),
void *arg1)
{
int ret = rtnl_dump_filter(rth, filter, arg1/*, NULL, NULL*/);
int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
pid_t peer, unsigned groups,
struct nlmsghdr *answer,
- int (*junk)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
+ int (*junk)(struct sockaddr_nl *, struct nlmsghdr *, void *),
void *jarg)
{
/* bbox doesn't use parameters no. 3, 4, 6, 7, they are stubbed out */
extern int xrtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type);
extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len);
extern int xrtnl_dump_filter(struct rtnl_handle *rth,
- int (*filter)(struct sockaddr_nl*, struct nlmsghdr *n, void*),
+ int (*filter)(const struct sockaddr_nl*, struct nlmsghdr *n, void*),
void *arg1);
/* bbox doesn't use parameters no. 3, 4, 6, 7, stub them out */
return NULL;
}
-int ll_remember_index(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
+int ll_remember_index(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
struct nlmsghdr *n,
void *arg ATTRIBUTE_UNUSED)
{
# pragma GCC visibility push(hidden)
#endif
-int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
+int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
int ll_init_map(struct rtnl_handle *rth);
int xll_name_to_index(const char *const name);
const char *ll_index_to_name(int idx);