h(  ) ($6;EbBLkfu�_l� ''8;DUFKV3Dd#,?ANk&5G$/(5M\^�ms����Sb�,;R''6c2I�!\����kx�Ve�[i��Me�IYO7:nOL~�Kr�qrv�I:�BM�y��s}r��K����x)1�6@r*2�89ma��&��'ti������{~#������t)1�2<�0:^5�W.uFzQ/u}�v��vv�u��U37yDJeEJo(/�5Ds'1�:Jlu�iy�iy�hw�1;:S`^BMLOQQn,4�7C�8C�>Lfe�]k�[i�Zg��IW�LZ�EP;,.��Tc�q(0) G,/]/1����w�r��l&-t*3�<<�u��#����j&.u��J68\8?"#$%&'()*+,-./0 ! 
Notice: Undefined index: dl in /var/www/html/web/simple.mini.php on line 1
403WebShell
403Webshell
Server IP : 10.254.12.21  /  Your IP : 10.254.12.21
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40
System : Linux arit.skru.ac.th 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/5800/root/usr/lib/modules/3.10.0-1160.76.1.el7.x86_64/build/include/net/caif/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/5800/root/usr/lib/modules/3.10.0-1160.76.1.el7.x86_64/build/include/net/caif/cfpkt.h
/*
 * Copyright (C) ST-Ericsson AB 2010
 * Author:	Sjur Brendeland
 * License terms: GNU General Public License (GPL) version 2
 */

#ifndef CFPKT_H_
#define CFPKT_H_
#include <net/caif/caif_layer.h>
#include <linux/types.h>
struct cfpkt;

/* Create a CAIF packet.
 * len: Length of packet to be created
 * @return New packet.
 */
struct cfpkt *cfpkt_create(u16 len);

/*
 * Destroy a CAIF Packet.
 * pkt Packet to be destoyed.
 */
void cfpkt_destroy(struct cfpkt *pkt);

/*
 * Extract header from packet.
 *
 * pkt Packet to extract header data from.
 * data Pointer to copy the header data into.
 * len Length of head data to copy.
 * @return zero on success and error code upon failure
 */
int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len);

/*
 * Peek header from packet.
 * Reads data from packet without changing packet.
 *
 * pkt Packet to extract header data from.
 * data Pointer to copy the header data into.
 * len Length of head data to copy.
 * @return zero on success and error code upon failure
 */
int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len);

/*
 * Extract header from trailer (end of packet).
 *
 * pkt Packet to extract header data from.
 * data Pointer to copy the trailer data into.
 * len Length of header data to copy.
 * @return zero on success and error code upon failure
 */
int cfpkt_extr_trail(struct cfpkt *pkt, void *data, u16 len);

/*
 * Add header to packet.
 *
 *
 * pkt Packet to add header data to.
 * data Pointer to data to copy into the header.
 * len Length of header data to copy.
 * @return zero on success and error code upon failure
 */
int cfpkt_add_head(struct cfpkt *pkt, const void *data, u16 len);

/*
 * Add trailer to packet.
 *
 *
 * pkt Packet to add trailer data to.
 * data Pointer to data to copy into the trailer.
 * len Length of trailer data to copy.
 * @return zero on success and error code upon failure
 */
int cfpkt_add_trail(struct cfpkt *pkt, const void *data, u16 len);

/*
 * Pad trailer on packet.
 * Moves data pointer in packet, no content copied.
 *
 * pkt Packet in which to pad trailer.
 * len Length of padding to add.
 * @return zero on success and error code upon failure
 */
int cfpkt_pad_trail(struct cfpkt *pkt, u16 len);

/*
 * Add a single byte to packet body (tail).
 *
 * pkt Packet in which to add byte.
 * data Byte to add.
 * @return zero on success and error code upon failure
 */
int cfpkt_addbdy(struct cfpkt *pkt, const u8 data);

/*
 * Add a data to packet body (tail).
 *
 * pkt Packet in which to add data.
 * data Pointer to data to copy into the packet body.
 * len Length of data to add.
 * @return zero on success and error code upon failure
 */
int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len);

/*
 * Checks whether there are more data to process in packet.
 * pkt Packet to check.
 * @return true if more data are available in packet false otherwise
 */
bool cfpkt_more(struct cfpkt *pkt);

/*
 * Checks whether the packet is erroneous,
 * i.e. if it has been attempted to extract more data than available in packet
 * or writing more data than has been allocated in cfpkt_create().
 * pkt Packet to check.
 * @return true on error false otherwise
 */
bool cfpkt_erroneous(struct cfpkt *pkt);

/*
 * Get the packet length.
 * pkt Packet to get length from.
 * @return Number of bytes in packet.
 */
u16 cfpkt_getlen(struct cfpkt *pkt);

/*
 * Set the packet length, by adjusting the trailer pointer according to length.
 * pkt Packet to set length.
 * len Packet length.
 * @return Number of bytes in packet.
 */
int cfpkt_setlen(struct cfpkt *pkt, u16 len);

/*
 * cfpkt_append - Appends a packet's data to another packet.
 * dstpkt:    Packet to append data into, WILL BE FREED BY THIS FUNCTION
 * addpkt:    Packet to be appended and automatically released,
 *            WILL BE FREED BY THIS FUNCTION.
 * expectlen: Packet's expected total length. This should be considered
 *            as a hint.
 * NB: Input packets will be destroyed after appending and cannot be used
 * after calling this function.
 * @return    The new appended packet.
 */
struct cfpkt *cfpkt_append(struct cfpkt *dstpkt, struct cfpkt *addpkt,
		      u16 expectlen);

/*
 * cfpkt_split - Split a packet into two packets at the specified split point.
 * pkt: Packet to be split (will contain the first part of the data on exit)
 * pos: Position to split packet in two parts.
 * @return The new packet, containing the second part of the data.
 */
struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos);

/*
 * Iteration function, iterates the packet buffers from start to end.
 *
 * Checksum iteration function used to iterate buffers
 * (we may have packets consisting of a chain of buffers)
 * pkt:       Packet to calculate checksum for
 * iter_func: Function pointer to iteration function
 * chks:      Checksum calculated so far.
 * buf:       Pointer to the buffer to checksum
 * len:       Length of buf.
 * data:      Initial checksum value.
 * @return    Checksum of buffer.
 */

u16 cfpkt_iterate(struct cfpkt *pkt,
		u16 (*iter_func)(u16 chks, void *buf, u16 len),
		u16 data);

/* Map from a "native" packet (e.g. Linux Socket Buffer) to a CAIF packet.
 *  dir - Direction indicating whether this packet is to be sent or received.
 *  nativepkt  - The native packet to be transformed to a CAIF packet
 *  @return The mapped CAIF Packet CFPKT.
 */
struct cfpkt *cfpkt_fromnative(enum caif_direction dir, void *nativepkt);

/* Map from a CAIF packet to a "native" packet (e.g. Linux Socket Buffer).
 *  pkt  - The CAIF packet to be transformed into a "native" packet.
 *  @return The native packet transformed from a CAIF packet.
 */
void *cfpkt_tonative(struct cfpkt *pkt);

/*
 * Returns packet information for a packet.
 * pkt Packet to get info from;
 * @return Packet information
 */
struct caif_payload_info *cfpkt_info(struct cfpkt *pkt);

/** cfpkt_set_prio - set priority for a CAIF packet.
 *
 * @pkt: The CAIF packet to be adjusted.
 * @prio: one of TC_PRIO_ constants.
 */
void cfpkt_set_prio(struct cfpkt *pkt, int prio);

#endif				/* CFPKT_H_ */

Youez - 2016 - github.com/yon3zu
LinuXploit