~ubuntu-branches/debian/sid/kamailio/sid

« back to all changes in this revision

Viewing changes to stun.h

  • Committer: Package Import Robot
  • Author(s): Victor Seva
  • Date: 2014-01-06 11:47:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140106114713-t8xidp4arzrnyeya
Tags: 4.1.1-1
* New upstream release
* debian/patches:
  - add upstream fixes
* Added tls outbound websocket autheph dnssec modules
  - openssl exception added to their license
* removing sparc and ia64 from supported archs
  for mono module (Closes: #728915)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id$
 
3
 *
 
4
 * Portions Copyright (C) 2013 Crocodile RCS Ltd
 
5
 *
 
6
 * Based on "ser_stun.h". Copyright (C) 2001-2003 FhG Fokus
 
7
 *
 
8
 * This file is part of Kamailio, a free SIP server.
 
9
 *
 
10
 * Kamailio is free software; you can redistribute it and/or modify
 
11
 * it under the terms of the GNU General Public License as published by
 
12
 * the Free Software Foundation; either version 2 of the License, or
 
13
 * (at your option) any later version
 
14
 *
 
15
 * Kamailio is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 * GNU General Public License for more details.
 
19
 *
 
20
 * You should have received a copy of the GNU General Public License 
 
21
 * along with this program; if not, write to the Free Software 
 
22
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
23
 *
 
24
 */
 
25
 
 
26
#ifndef _STUN_H
 
27
#define _STUN_H
 
28
 
 
29
#include "ip_addr.h"
 
30
 
 
31
/* type redefinition */
 
32
typedef unsigned char UCHAR_T;
 
33
typedef unsigned short USHORT_T;
 
34
typedef unsigned int UINT_T;
 
35
typedef unsigned long ULONG_T;
 
36
 
 
37
#define MAGIC_COOKIE    0x2112A442
 
38
#define TRANSACTION_ID  12
 
39
 
 
40
struct transaction_id {
 
41
        UINT_T magic_cookie;
 
42
        UCHAR_T id[TRANSACTION_ID];
 
43
};
 
44
 
 
45
struct stun_hdr {
 
46
        USHORT_T type;
 
47
        USHORT_T len;
 
48
        struct transaction_id id;
 
49
};
 
50
 
 
51
struct stun_attr {
 
52
        USHORT_T type;
 
53
        USHORT_T len;
 
54
};
 
55
 
 
56
typedef struct stun_event_info {
 
57
        char *buf;
 
58
        unsigned int len;
 
59
        struct receive_info *rcv;
 
60
} stun_event_info_t;
 
61
 
 
62
int stun_process_msg(char* buf, unsigned int len, struct receive_info* ri);
 
63
 
 
64
#endif /* _STUN_H */