v2gtp.h 1.5 KB

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