Initial import of libmnl Third-Party Import of: https://git.netfilter.org/libmnl Request Document: go/android3p For CL Reviewers: go/android3p#reviewing-a-cl For Build Team: go/ab-third-party-imports Bug: http://b/457275163 Original import of the code can be found at: https://googleplex-android.googlesource.com/platform/external/libmnl/+/refs/heads/third-party-review Security Questionnaire: http://b/457275163#comment1 Test: built locally Change-Id: I9be6d326962c28c1f9b1848ac09e728d9a293bcb
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..2351544 --- /dev/null +++ b/Android.bp
@@ -0,0 +1,31 @@ +package { + default_applicable_licenses: ["external_libmnl_license"], +} + +license { + name: "external_libmnl_license", + visibility: [":__subpackages__"], + license_kinds: ["SPDX-license-identifier-LGPL-2.1"], + license_text: ["LICENSE"], +} + +cc_library_shared { + name: "libmnl", + srcs: [ + "src/attr.c", + "src/callback.c", + "src/nlmsg.c", + "src/socket.c", + ], + export_include_dirs: ["include"], + cflags: [ + "-Wall", + "-Werror", + "-Wno-gnu-pointer-arith", + ], + vendor_available: true, + + // b/479773959: Restrict visibility once Soong support is available. + // For now, use __subpackages__ to unblock development. + visibility: ["//vendor:__subpackages__"], +}
diff --git a/LICENSE b/LICENSE new file mode 120000 index 0000000..d24842f --- /dev/null +++ b/LICENSE
@@ -0,0 +1 @@ +COPYING \ No newline at end of file
diff --git a/METADATA b/METADATA new file mode 100644 index 0000000..4a78cd4 --- /dev/null +++ b/METADATA
@@ -0,0 +1,15 @@ +name: "libmnl" +description: "Minimalistic Netlink Library" +third_party { + url { + type: GIT + value: "https://git.netfilter.org/libmnl" + } + version: "libmnl-1.0.5" + license_type: RESTRICTED + last_upgrade_date { + year: 2026 + month: 1 + day: 19 + } +}
diff --git a/MODULE_LICENSE_LGPL b/MODULE_LICENSE_LGPL new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/MODULE_LICENSE_LGPL
diff --git a/OWNERS.android b/OWNERS.android new file mode 100644 index 0000000..2e8f086 --- /dev/null +++ b/OWNERS.android
@@ -0,0 +1 @@ +include platform/system/core:main:/janitors/OWNERS
diff --git a/include/config.h b/include/config.h new file mode 100644 index 0000000..e903671 --- /dev/null +++ b/include/config.h
@@ -0,0 +1,67 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* True if compiler supports -fvisibility=hidden */ +#define HAVE_VISIBILITY_HIDDEN 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libmnl" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libmnl" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libmnl 1.0.5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libmnl" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.0.5" + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "1.0.5"