diff options
author | Courtney Cavin <courtney.cavin@sonymobile.com> | 2016-05-06 17:09:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-09 06:46:14 +0300 |
commit | bdabad3e363d825ddf9679dd431cca0b2c30f881 (patch) | |
tree | 4389faff05dd23ddcc296277aa7c51a4ec65bc3f /net/qrtr/qrtr.h | |
parent | 43315f31adc2bf3b35e04dcf2372c3bb08014ed1 (diff) | |
download | linux-bdabad3e363d825ddf9679dd431cca0b2c30f881.tar.xz |
net: Add Qualcomm IPC router
Add an implementation of Qualcomm's IPC router protocol, used to
communicate with service providing remote processors.
Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
[bjorn: Cope with 0 being a valid node id and implement RTM_NEWADDR]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/qrtr/qrtr.h')
-rw-r--r-- | net/qrtr/qrtr.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/net/qrtr/qrtr.h b/net/qrtr/qrtr.h new file mode 100644 index 000000000000..2b848718f8fe --- /dev/null +++ b/net/qrtr/qrtr.h @@ -0,0 +1,31 @@ +#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); + +#endif |