aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno Cabral <bcabral@uw.edu>2015-06-15 16:20:28 +0000
committerBruno Cabral <bcabral@uw.edu>2015-06-15 16:20:28 +0000
commita46cf4c29fbf527b16d1b2de75d01793320a400e (patch)
tree36bb3399dade1de5324126b9481ab4087fb54280 /src
parent1ed484dfdf1676d92e95b9ed262abc28ca7b3aee (diff)
downloadgnunet-a46cf4c29fbf527b16d1b2de75d01793320a400e.tar.gz
gnunet-a46cf4c29fbf527b16d1b2de75d01793320a400e.zip
Stub nat_stun.c
Diffstat (limited to 'src')
-rw-r--r--src/nat/nat_stun.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/nat/nat_stun.c b/src/nat/nat_stun.c
new file mode 100644
index 000000000..e90134d23
--- /dev/null
+++ b/src/nat/nat_stun.c
@@ -0,0 +1,46 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2009, 2015 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
21/**
22 * This code is based on ministun.c, that is based on Asterisk old STUN code.
23 * This code provides some support for doing STUN transactions.
24 * The simplest request packet is just the header defined in
25 * struct stun_header, and from the response we may just look at
26 * one attribute, STUN_MAPPED_ADDRESS, that we find in the response.
27 * By doing more transactions with different server addresses we
28 * may determine more about the behaviour of the NAT boxes, of
29 * course - the details are in the RFC.
30 *
31 * All STUN packets start with a simple header made of a type,
32 * length (excluding the header) and a 16-byte random transaction id.
33 * Following the header we may have zero or more attributes, each
34 * structured as a type, length and a value (whose format depends
35 * on the type, but often contains addresses).
36 * Of course all fields are in network format.
37 *
38 *
39 * @file nat/test_stun.c
40 * @brief Testcase for STUN library
41 * @author Bruno Souza Cabral
42 * @autor Mark Spencer (Original code borrowed from Asterisk)
43 *
44 */
45
46