]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/lib/bpf/libbpf_internal.h
Merge tag 'xfs-5.6-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux.git] / tools / lib / bpf / libbpf_internal.h
index 97ac17a64a58dde59adfedb34f0959c8b4c50215..8c3afbd97747bdd9d54f10c75323c3240830e657 100644 (file)
@@ -76,7 +76,7 @@ static inline bool libbpf_validate_opts(const char *opts,
 
                for (i = opts_sz; i < user_sz; i++) {
                        if (opts[i]) {
-                               pr_warn("%s has non-zero extra bytes",
+                               pr_warn("%s has non-zero extra bytes\n",
                                        type_name);
                                return false;
                        }
@@ -95,9 +95,28 @@ static inline bool libbpf_validate_opts(const char *opts,
 #define OPTS_GET(opts, field, fallback_value) \
        (OPTS_HAS(opts, field) ? (opts)->field : fallback_value)
 
+int parse_cpu_mask_str(const char *s, bool **mask, int *mask_sz);
+int parse_cpu_mask_file(const char *fcpu, bool **mask, int *mask_sz);
 int libbpf__load_raw_btf(const char *raw_types, size_t types_len,
                         const char *str_sec, size_t str_len);
 
+int bpf_object__section_size(const struct bpf_object *obj, const char *name,
+                            __u32 *size);
+int bpf_object__variable_offset(const struct bpf_object *obj, const char *name,
+                               __u32 *off);
+
+struct nlattr;
+typedef int (*libbpf_dump_nlmsg_t)(void *cookie, void *msg, struct nlattr **tb);
+int libbpf_netlink_open(unsigned int *nl_pid);
+int libbpf_nl_get_link(int sock, unsigned int nl_pid,
+                      libbpf_dump_nlmsg_t dump_link_nlmsg, void *cookie);
+int libbpf_nl_get_class(int sock, unsigned int nl_pid, int ifindex,
+                       libbpf_dump_nlmsg_t dump_class_nlmsg, void *cookie);
+int libbpf_nl_get_qdisc(int sock, unsigned int nl_pid, int ifindex,
+                       libbpf_dump_nlmsg_t dump_qdisc_nlmsg, void *cookie);
+int libbpf_nl_get_filter(int sock, unsigned int nl_pid, int ifindex, int handle,
+                        libbpf_dump_nlmsg_t dump_filter_nlmsg, void *cookie);
+
 struct btf_ext_info {
        /*
         * info points to the individual info section (e.g. func_info and