summaryrefslogtreecommitdiffstats
path: root/include/linux/udp.h
diff options
context:
space:
mode:
authorTom Parkin <tparkin@katalix.com>2013-03-19 06:11:12 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-20 12:10:38 -0400
commit44046a593eb770dbecdabf1c82bcd252f2a8337b (patch)
tree1f8db140d6f920d0abad4a072c8f2d85a6e6ca9b /include/linux/udp.h
parentf1e79e208076ffe7bad97158275f1c572c04f5c7 (diff)
downloadop-kernel-dev-44046a593eb770dbecdabf1c82bcd252f2a8337b.zip
op-kernel-dev-44046a593eb770dbecdabf1c82bcd252f2a8337b.tar.gz
udp: add encap_destroy callback
Users of udp encapsulation currently have an encap_rcv callback which they can use to hook into the udp receive path. In situations where a encapsulation user allocates resources associated with a udp encap socket, it may be convenient to be able to also hook the proto .destroy operation. For example, if an encap user holds a reference to the udp socket, the destroy hook might be used to relinquish this reference. This patch adds a socket destroy hook into udp, which is set and enabled in the same way as the existing encap_rcv hook. Signed-off-by: Tom Parkin <tparkin@katalix.com> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r--include/linux/udp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 9d81de1..42278bb 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -68,6 +68,7 @@ struct udp_sock {
* For encapsulation sockets.
*/
int (*encap_rcv)(struct sock *sk, struct sk_buff *skb);
+ void (*encap_destroy)(struct sock *sk);
};
static inline struct udp_sock *udp_sk(const struct sock *sk)
OpenPOWER on IntegriCloud