From ba3d9facecdcbc34a73bb2ffccf6dc04af72d7ec Mon Sep 17 00:00:00 2001 From: Richard Acayan Date: Thu, 5 Jan 2023 21:17:04 -0500 Subject: [PATCH] fastrpc: add adsp_default_listener interface The ADSP default listener interface is an interface with which to register the default listener for FastRPC reverse tunneling. Add the interface for this so programs can advertise their ability to receive FastRPC messages. It was accidentally #include-ed in a previous commit. Fixes: 2ba7bf1df62e ("fastrpc: rpcd: close remote handle") --- fastrpc/fastrpc_adsp_default_listener.h | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 fastrpc/fastrpc_adsp_default_listener.h diff --git a/fastrpc/fastrpc_adsp_default_listener.h b/fastrpc/fastrpc_adsp_default_listener.h new file mode 100644 index 0000000..bba69ce --- /dev/null +++ b/fastrpc/fastrpc_adsp_default_listener.h @@ -0,0 +1,42 @@ +/* + * FastRPC reverse tunnel registration interface + * + * Copyright (C) 2023 Richard Acayan + * + * This file is part of sensh. + * + * Sensh is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef FASTRPC_ADSP_DEFAULT_LISTENER_H +#define FASTRPC_ADSP_DEFAULT_LISTENER_H + +#include "fastrpc.h" + +#define DEFINE_REMOTE_PROCEDURE(mid, name, \ + innums, inbufs, \ + outnums, outbufs) \ + struct fastrpc_function_def_interp2 name##_def = { \ + .msg_id = mid, \ + .in_nums = innums, \ + .in_bufs = inbufs, \ + .out_nums = outnums, \ + .out_bufs = outbufs, \ + } + +DEFINE_REMOTE_PROCEDURE(0, adsp_default_listener_register, 0, 0, 0, 0); + +#undef DEFINE_REMOTE_PROCEDURE + +#endif