/* * Copyright (C) 2021 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 #include #include "llcp_int.h" #define SIZE 16 #define LENGTH 1 extern tLLCP_CB llcp_cb; void llcp_init(void); int main() { GKI_init(); llcp_init(); uint8_t *p_i_pdu = (uint8_t *)malloc(SIZE); if (!p_i_pdu) { return EXIT_FAILURE; } llcp_cb.dlcb[0].state = LLCP_DLC_STATE_CONNECTED; llcp_dlc_proc_i_pdu(llcp_cb.dlcb[0].local_sap, llcp_cb.dlcb[0].remote_sap, LENGTH, &p_i_pdu[SIZE - LENGTH], nullptr); free(p_i_pdu); return EXIT_SUCCESS; }