.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Stream Parser |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
9 | 6 | */ |
---|
10 | 7 | |
---|
11 | 8 | #ifndef __NET_STRPARSER_H_ |
---|
.. | .. |
---|
57 | 54 | int offset; |
---|
58 | 55 | }; |
---|
59 | 56 | |
---|
| 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 | + |
---|
60 | 71 | static inline struct strp_msg *strp_msg(struct sk_buff *skb) |
---|
61 | 72 | { |
---|
62 | 73 | return (struct strp_msg *)((void *)skb->cb + |
---|
63 | | - offsetof(struct qdisc_skb_cb, data)); |
---|
| 74 | + offsetof(struct sk_skb_cb, strp)); |
---|
64 | 75 | } |
---|
65 | 76 | |
---|
66 | 77 | /* Structure for an attached lower socket */ |
---|