Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-amr.h
1/* packet-amr.h
2 *
3 * Adaptive Multi-Rate (AMR) speech codec 3GPP TS 26.101
4 *
5 * (C) 2024 by sysmocom s.f.m.c. GmbH <[email protected]>
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef __PACKET_AMR_H__
11#define __PACKET_AMR_H__
12
13#include "config.h"
14
15#include <stddef.h>
16#include <stdint.h>
17
18#include "ws_symbol_export.h"
19
20/* According to TS 26.101 Table A.1b: */
21#define AMR_FT_0 0 /* 4.75 */
22#define AMR_FT_1 1 /* 5.15 */
23#define AMR_FT_2 2 /* 5.90 */
24#define AMR_FT_3 3 /* 6.70 */
25#define AMR_FT_4 4 /* 7.40 */
26#define AMR_FT_5 5 /* 7.95 */
27#define AMR_FT_6 6 /* 10.2 */
28#define AMR_FT_7 7 /* 12.2 */
29#define AMR_FT_SID 8 /* AMR SID */
30#define AMR_FT_GSM_EFR_SID 9 /* GSM-EFR SID */
31#define AMR_FT_TDMA_EFR_SID 10 /* TDMA-EFR SID */
32#define AMR_FT_PDC_EFR_SID 11 /* PDC-EFR SID */
33/* version 16.0.0 Release 16: 12-14 for future use */
34#define AMR_FT_NO_DATA 15 /* NO_DATA */
35
36/* 1B Payload Header + 1B ToC: */
37#define AMR_NB_OA_HDR_LEN 2
38
39WS_DLL_PUBLIC
40int amr_nb_bytes_to_ft(uint8_t bytes);
41
42#endif /*__PACKET_AMR_H__*/