Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37 lines
916 B
C
37 lines
916 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __QRTR_H_
|
|
#define __QRTR_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct sk_buff;
|
|
|
|
/* endpoint node id auto assignment */
|
|
#define QRTR_EP_NID_AUTO (-1)
|
|
|
|
/**
|
|
* struct qrtr_endpoint - endpoint handle
|
|
* @xmit: Callback for outgoing packets
|
|
*
|
|
* The socket buffer passed to the xmit function becomes owned by the endpoint
|
|
* driver. As such, when the driver is done with the buffer, it should
|
|
* call kfree_skb() on failure, or consume_skb() on success.
|
|
*/
|
|
struct qrtr_endpoint {
|
|
int (*xmit)(struct qrtr_endpoint *ep, struct sk_buff *skb);
|
|
/* private: not for endpoint use */
|
|
struct qrtr_node *node;
|
|
};
|
|
|
|
int qrtr_endpoint_register(struct qrtr_endpoint *ep, unsigned int nid);
|
|
|
|
void qrtr_endpoint_unregister(struct qrtr_endpoint *ep);
|
|
|
|
int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len);
|
|
|
|
int qrtr_ns_init(void);
|
|
|
|
void qrtr_ns_remove(void);
|
|
|
|
#endif
|