ssize_t getcmdline(char **line, size_t *len, FILE *in);
int makeargs(char *line, char *argv[], int maxargs);
-struct iplink_req {
- struct nlmsghdr n;
- struct ifinfomsg i;
- char buf[1024];
-};
-
-int iplink_parse(int argc, char **argv, struct iplink_req *req,
- char **name, char **type, char **link, char **dev,
- int *group, int *index);
-
int do_each_netns(int (*func)(char *nsname, void *arg), void *arg,
bool show_label);
extern struct rtnl_handle rth;
+struct iplink_req {
+ struct nlmsghdr n;
+ struct ifinfomsg i;
+ char buf[1024];
+};
+
struct link_util {
struct link_util *next;
const char *id;
struct link_util *get_link_kind(const char *kind);
+int iplink_parse(int argc, char **argv, struct iplink_req *req,
+ char **name, char **type, char **link, char **dev,
+ int *group, int *index);
+
+/* iplink_bridge.c */
void br_dump_bridge_id(const struct ifla_bridge_id *id, char *buf, size_t len);
int bridge_parse_xstats(struct link_util *lu, int argc, char **argv);
int bridge_print_xstats(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg);
+/* iproute_lwtunnel.c */
+int lwt_parse_encap(struct rtattr *rta, size_t len, int *argcp, char ***argvp);
+void lwt_print_encap(FILE *fp, struct rtattr *encap_type, struct rtattr *encap);
+
+/* iplink_xdp.c */
+int xdp_parse(int *argc, char ***argv, struct iplink_req *req, __u32 ifindex,
+ bool generic, bool drv, bool offload);
+void xdp_dump(FILE *fp, struct rtattr *tb, bool link, bool details);
+
+/* iplink_vrf.c */
__u32 ipvrf_get_table(const char *name);
int name_is_vrf(const char *name);
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __LWTUNNEL_H__
-#define __LETUNNEL_H__ 1
-
-int lwt_parse_encap(struct rtattr *rta, size_t len, int *argcp, char ***argvp);
-void lwt_print_encap(FILE *fp, struct rtattr *encap_type,
- struct rtattr *encap);
-
-#endif
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __XDP__
-#define __XDP__
-
-#include "utils.h"
-
-int xdp_parse(int *argc, char ***argv, struct iplink_req *req, __u32 ifindex,
- bool generic, bool drv, bool offload);
-void xdp_dump(FILE *fp, struct rtattr *tb, bool link, bool details);
-
-#endif /* __XDP__ */