android_system_bpf/loader/BpfLoader.cpp
Maciej Żenczykowski dd4bd2d655 BpfLoader: split legacy bpfloader into 3 phases, simplify arguments
Should make integration with BpfLoader written in rust easier.

While at it add simple wrappers around ALOG{V,D,I,W,E}(),
which may come in handy as bpfloader runs early enough that
logging must be to the kernel dmesg ringbuffer instead...

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia49c605bae63241b74d04e2e0f58fd089c23993d
2024-08-07 21:20:02 +00:00

24 lines
763 B
C++

/*
* Copyright (C) 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <libbpf_android.h>
__noreturn int main() {
initLogging();
legacyBpfLoader();
execNetBpfLoadDone();
// unreachable
}