]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - net/qrtr/qrtr.h
Merge tag 'topic/drm-misc-2016-06-01' of git://anongit.freedesktop.org/drm-intel...
[mirror_ubuntu-zesty-kernel.git] / net / qrtr / qrtr.h
1 #ifndef __QRTR_H_
2 #define __QRTR_H_
3
4 #include <linux/types.h>
5
6 struct sk_buff;
7
8 /* endpoint node id auto assignment */
9 #define QRTR_EP_NID_AUTO (-1)
10
11 /**
12 * struct qrtr_endpoint - endpoint handle
13 * @xmit: Callback for outgoing packets
14 *
15 * The socket buffer passed to the xmit function becomes owned by the endpoint
16 * driver. As such, when the driver is done with the buffer, it should
17 * call kfree_skb() on failure, or consume_skb() on success.
18 */
19 struct qrtr_endpoint {
20 int (*xmit)(struct qrtr_endpoint *ep, struct sk_buff *skb);
21 /* private: not for endpoint use */
22 struct qrtr_node *node;
23 };
24
25 int qrtr_endpoint_register(struct qrtr_endpoint *ep, unsigned int nid);
26
27 void qrtr_endpoint_unregister(struct qrtr_endpoint *ep);
28
29 int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len);
30
31 #endif