blob: 2d84fefc3df2cddf6c48215cd5c06ba27dd84b5f [file] [log] [blame]
Holger Hans Peter Freyther97f66e22010-07-28 03:32:52 +08001/*
2 * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
3 * (C) 2010 by On-Waves
4 * All Rights Reserved
5 *
Holger Hans Peter Freytherde56c222011-01-16 17:45:14 +01006 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
Holger Hans Peter Freyther97f66e22010-07-28 03:32:52 +08009 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Holger Hans Peter Freytherde56c222011-01-16 17:45:14 +010014 * GNU Affero General Public License for more details.
Holger Hans Peter Freyther97f66e22010-07-28 03:32:52 +080015 *
Holger Hans Peter Freytherde56c222011-01-16 17:45:14 +010016 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
Holger Hans Peter Freyther97f66e22010-07-28 03:32:52 +080018 *
19 */
20/* UDP Input for the SNMP On-Waves packets */
21
22#ifndef c7_udp_input_h
23#define c7_udp_input_h
24
25#include <stdint.h>
Holger Hans Peter Freythercbf7d182010-07-31 05:25:35 +080026#include <osmocore/write_queue.h>
Holger Hans Peter Freyther97f66e22010-07-28 03:32:52 +080027
28#define UDP_FORMAT_SIMPLE_UDP 2
29#define UDP_FORMAT_SIMPLE_TCP 3
30
31#define UDP_DATA_MSU_PRIO_0 0
32#define UDP_DATA_MSU_PRIO_1 1
33#define UDP_DATA_MSU_PRIO_2 2
34#define UDP_DATA_MSU_PRIO_3 3
35#define UDP_DATA_RETR_PRIO_0 16
36#define UDP_DATA_RETR_PRIO_1 17
37#define UDP_DATA_RETR_PRIO_2 18
38#define UDP_DATA_RETR_PRIO_3 19
39#define UDP_DATA_RETR_COMPL 32
40#define UDP_DATA_RETR_IMPOS 33
41
42struct udp_data_hdr {
43 uint8_t format_type;
44 uint8_t data_type;
45 uint16_t data_link_index;
46 uint32_t user_context;
47 uint32_t data_length;
48 uint8_t data[0];
49} __attribute__((packed));
50
51#endif