OpenV2G
v2gtp.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 2007-2018 Siemens AG
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published
7  * by the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 /*******************************************************************
20  *
21  * @author Sebastian.Kaebisch@siemens.com
22  * @author Daniel.Peintner.EXT@siemens.com
23  * @version 0.9.4
24  * @contact Richard.Kuntschke@siemens.com
25  *
26  ********************************************************************/
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #ifndef V2GTP_H_
33 #define V2GTP_H_
34 
35 #include <stdint.h>
36 
37 /* generic V2GTP header length */
38 #define V2GTP_HEADER_LENGTH 8
39 
40 /* define V2GTP Version */
41 #define V2GTP_VERSION 0x01
42 #define V2GTP_VERSION_INV 0xFE
43 
44 /* define V2GTP payload types*/
45 #define V2GTP_EXI_TYPE 0x8001
46 
47 int write_v2gtpHeader(uint8_t* outStream, uint32_t outStreamLength, uint16_t payloadType);
48 
49 int read_v2gtpHeader(uint8_t* inStream, uint32_t* payloadLength);
50 
51 #endif /* V2GTP_H_ */
52 
53 #ifdef __cplusplus
54 }
55 #endif
int read_v2gtpHeader(uint8_t *inStream, uint32_t *payloadLength)
Definition: v2gtp.c:66
int write_v2gtpHeader(uint8_t *outStream, uint32_t outStreamLength, uint16_t payloadType)
Definition: v2gtp.c:43