hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/net/strparser.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Stream Parser
34 *
45 * Copyright (c) 2016 Tom Herbert <tom@herbertland.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2
8
- * as published by the Free Software Foundation.
96 */
107
118 #ifndef __NET_STRPARSER_H_
....@@ -57,10 +54,24 @@
5754 int offset;
5855 };
5956
57
+struct _strp_msg {
58
+ /* Internal cb structure. struct strp_msg must be first for passing
59
+ * to upper layer.
60
+ */
61
+ struct strp_msg strp;
62
+ int accum_len;
63
+};
64
+
65
+struct sk_skb_cb {
66
+#define SK_SKB_CB_PRIV_LEN 20
67
+ unsigned char data[SK_SKB_CB_PRIV_LEN];
68
+ struct _strp_msg strp;
69
+};
70
+
6071 static inline struct strp_msg *strp_msg(struct sk_buff *skb)
6172 {
6273 return (struct strp_msg *)((void *)skb->cb +
63
- offsetof(struct qdisc_skb_cb, data));
74
+ offsetof(struct sk_skb_cb, strp));
6475 }
6576
6677 /* Structure for an attached lower socket */