^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright (C) ST-Ericsson AB 2010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Author: Sjur Brendeland
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #ifndef CFPKT_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define CFPKT_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <net/caif/caif_layer.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct cfpkt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) /* Create a CAIF packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * len: Length of packet to be created
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * @return New packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) struct cfpkt *cfpkt_create(u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) * Destroy a CAIF Packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) * pkt Packet to be destoyed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) void cfpkt_destroy(struct cfpkt *pkt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) * Extract header from packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) * pkt Packet to extract header data from.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) * data Pointer to copy the header data into.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * len Length of head data to copy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) * @return zero on success and error code upon failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) static inline u8 cfpkt_extr_head_u8(struct cfpkt *pkt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) u8 tmp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) cfpkt_extr_head(pkt, &tmp, 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) return tmp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) static inline u16 cfpkt_extr_head_u16(struct cfpkt *pkt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) __le16 tmp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) cfpkt_extr_head(pkt, &tmp, 2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) return le16_to_cpu(tmp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) static inline u32 cfpkt_extr_head_u32(struct cfpkt *pkt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) __le32 tmp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) cfpkt_extr_head(pkt, &tmp, 4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) return le32_to_cpu(tmp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) * Peek header from packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) * Reads data from packet without changing packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * pkt Packet to extract header data from.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) * data Pointer to copy the header data into.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) * len Length of head data to copy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) * @return zero on success and error code upon failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) * Extract header from trailer (end of packet).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) * pkt Packet to extract header data from.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) * data Pointer to copy the trailer data into.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) * len Length of header data to copy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) * @return zero on success and error code upon failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) int cfpkt_extr_trail(struct cfpkt *pkt, void *data, u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) * Add header to packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) * pkt Packet to add header data to.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) * data Pointer to data to copy into the header.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) * len Length of header data to copy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) * @return zero on success and error code upon failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) int cfpkt_add_head(struct cfpkt *pkt, const void *data, u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) * Add trailer to packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) * pkt Packet to add trailer data to.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) * data Pointer to data to copy into the trailer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) * len Length of trailer data to copy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) * @return zero on success and error code upon failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) int cfpkt_add_trail(struct cfpkt *pkt, const void *data, u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) * Pad trailer on packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) * Moves data pointer in packet, no content copied.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) * pkt Packet in which to pad trailer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) * len Length of padding to add.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) * @return zero on success and error code upon failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) int cfpkt_pad_trail(struct cfpkt *pkt, u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) * Add a single byte to packet body (tail).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) * pkt Packet in which to add byte.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) * data Byte to add.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) * @return zero on success and error code upon failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) int cfpkt_addbdy(struct cfpkt *pkt, const u8 data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) * Add a data to packet body (tail).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) * pkt Packet in which to add data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) * data Pointer to data to copy into the packet body.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) * len Length of data to add.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) * @return zero on success and error code upon failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) * Checks whether there are more data to process in packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) * pkt Packet to check.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) * @return true if more data are available in packet false otherwise
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) bool cfpkt_more(struct cfpkt *pkt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) * Checks whether the packet is erroneous,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) * i.e. if it has been attempted to extract more data than available in packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) * or writing more data than has been allocated in cfpkt_create().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) * pkt Packet to check.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) * @return true on error false otherwise
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) bool cfpkt_erroneous(struct cfpkt *pkt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) * Get the packet length.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) * pkt Packet to get length from.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) * @return Number of bytes in packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) u16 cfpkt_getlen(struct cfpkt *pkt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) * Set the packet length, by adjusting the trailer pointer according to length.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) * pkt Packet to set length.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) * len Packet length.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) * @return Number of bytes in packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) int cfpkt_setlen(struct cfpkt *pkt, u16 len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) * cfpkt_append - Appends a packet's data to another packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) * dstpkt: Packet to append data into, WILL BE FREED BY THIS FUNCTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) * addpkt: Packet to be appended and automatically released,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) * WILL BE FREED BY THIS FUNCTION.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) * expectlen: Packet's expected total length. This should be considered
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) * as a hint.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) * NB: Input packets will be destroyed after appending and cannot be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) * after calling this function.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) * @return The new appended packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) struct cfpkt *cfpkt_append(struct cfpkt *dstpkt, struct cfpkt *addpkt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) u16 expectlen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) * cfpkt_split - Split a packet into two packets at the specified split point.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) * pkt: Packet to be split (will contain the first part of the data on exit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) * pos: Position to split packet in two parts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) * @return The new packet, containing the second part of the data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) * Iteration function, iterates the packet buffers from start to end.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) * Checksum iteration function used to iterate buffers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) * (we may have packets consisting of a chain of buffers)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) * pkt: Packet to calculate checksum for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) * iter_func: Function pointer to iteration function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) * chks: Checksum calculated so far.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) * buf: Pointer to the buffer to checksum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) * len: Length of buf.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) * data: Initial checksum value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) * @return Checksum of buffer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) int cfpkt_iterate(struct cfpkt *pkt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) u16 (*iter_func)(u16 chks, void *buf, u16 len),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) u16 data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) /* Map from a "native" packet (e.g. Linux Socket Buffer) to a CAIF packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) * dir - Direction indicating whether this packet is to be sent or received.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) * nativepkt - The native packet to be transformed to a CAIF packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) * @return The mapped CAIF Packet CFPKT.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) struct cfpkt *cfpkt_fromnative(enum caif_direction dir, void *nativepkt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) /* Map from a CAIF packet to a "native" packet (e.g. Linux Socket Buffer).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) * pkt - The CAIF packet to be transformed into a "native" packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) * @return The native packet transformed from a CAIF packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) void *cfpkt_tonative(struct cfpkt *pkt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) * Returns packet information for a packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) * pkt Packet to get info from;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) * @return Packet information
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) struct caif_payload_info *cfpkt_info(struct cfpkt *pkt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) /** cfpkt_set_prio - set priority for a CAIF packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) * @pkt: The CAIF packet to be adjusted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) * @prio: one of TC_PRIO_ constants.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) void cfpkt_set_prio(struct cfpkt *pkt, int prio);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) #endif /* CFPKT_H_ */