-
Notifications
You must be signed in to change notification settings - Fork 2
/
ngcp.h
55 lines (43 loc) · 1.48 KB
/
ngcp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
Header file for NCGP protocol
Copyright (C) 2016-2024 Michele Campus <michelecampus5@gmail.com>
This file is part of decoder.
[ The headers in this module follow the RFC 5246
and the pcap analyzed to have a real conformity
from theory and real traffic ]
decoder is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
decoder is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
decoder. If not, see <http://www.gnu.org/licenses/>.
**/
#ifndef NGCP_H_
#define NGCP_H_
#include <stdio.h>
#include <stdlib.h>
#include <endian.h>
#include <net/ethernet.h>
#define OFFER 1
#define ANSWER 2
#define DELETE 3
#ifdef __GNUC__
/* GNU C */
#define PACK_OFF __attribute__ ((__packed__));
#endif
struct msg_fake_sip {
char magic[20];
char *raw_sdp;
char a_number[20];
char b_number[20];
char call_id[256];
char from_tag[100];
char to_tag[100];
int comm_flag; // 1 answer 2 offer 3 delete
};
struct msg_fake_sip *ngcp_parser(const u_char * payload,
const u_int16_t size_payload);
#endif